X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 15 Mar 2007 02:21 PM by  anon
Looking for Band Math normalization script
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
15 Mar 2007 02:21 PM
    Friends, I am looking to normalize pixel values within each band of a Landsat ETM stack. It would be elegant if the output was a stack of normalized bands, but this doesn't seem obvious. The function must look something like: result = (b1/(mean b1) X 100) Any help would be appreciated. Doug

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    15 Mar 2007 02:21 PM
    Your syntax is basically correct. The only thing I might add is to be sure of type casting your data correctly. For example, I opened a Landsat 5 image and its data values are in byte. I would want to make sure I perform this calculation in floating point precision: float(b1)/mean(float(b1))*100 In the next dialog of Band Math, you will pair the variable 'b1' to the appropriate band. Since you wish to do this for every band in the file, instead choose 'Map Variable to Input File' and select the file name. This will apply the equation to each band in sequence and return all bands in a single file. Is this what you were looking to do?
    You are not authorized to post a reply.