X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10 Oct 2011 10:32 PM by  anon
Masking Specific Values
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
10 Oct 2011 10:32 PM
    Hi there, Just wondering if it's possible to create a mask based on pixel values. I'm working on a quickbird image and i've calibrated the pixels to top of atmosphere reflectance. I want to create a mask to mask pixels with NIR (Band 4) reflectance over 0.3. can this be done in ENVI? I've tried building a mask using Build Mask function but it doesn't seem to allow specific band value inputs. can i do it with band math? something like If NIR > 0.3 assign a value of 0 to the pixel? is that possible? if so, whats the correct expression to use? Any help is appreciated! Thanks in Advance =) update 1 i managed to create a mask using this expression on the raw image. can't get it to work on the reflectance image due to decimal values. B4 is my NIR band : (B4 ge 100)*0 + (B4 le 100)*B4 got this from the ENVI user guide. it works for one single ban. Does anyone know the expression to apply this to other bands? if a pixel in band 4 = 0 assign a 0 to the same pixel in all other bands?

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    11 Oct 2011 08:52 AM
    You should be able to use the Build Mask tool in a couple of different ways. You could use the ROI tool to create an ROI of the pixels greater than 0.3 using the Band threshold to ROI tool. The Masking tool itself has the ability to use a data range (from the Mask Definition dialog go to Options ->Import Data Range). Once you create the mask you need, then apply it to the data where you can set the masked values to whatever value you choose (such as 0).

    Deleted User



    New Member


    Posts:
    New Member


    --
    11 Oct 2011 10:53 PM
    Thanks MariM! i'll try that out. i managed to create a mask using the band math expression i mentioned and it works beautifully.
    You are not authorized to post a reply.