X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 13 Apr 2016 09:59 AM by  anon
Band math : Intersection between two masks
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
13 Apr 2016 09:59 AM
    Hello I'm using Envi 5.3 version, and I want to do an intersection between two masks: as value : 0 and 1 for both of them. So I'm using this two mathematical function in Band Math: b1*b2 in this first case, every pixel of my new image have 0 as value. I don't understand how it's possible because 1*1 is supposed to return 1. and I also use: float (b1) *float (b2) I don't have any float in my two original masks, but this function returns a random partition of 1 value, but not the correct one. Is that a bug ? Or i am mistaken ?

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    14 Apr 2016 10:33 AM
    The equation should work if your masks are overlapping and consist of only 0s and 1s. I tested this with two masks that had an area of overlap. Using b1*b2 returns the overlap area only. Can you calculate the statistics of the file to make sure there are only 0s and 1s? Can you display the two masks and bring up the cursor tool then click in the overlap (intersecting) area and see if the values are 1s in both?

    Deleted User



    New Member


    Posts:
    New Member


    --
    15 Apr 2016 02:29 PM
    Thanks for your response, Indeed, the equation b1*b2 is correct, i just had to resample one of my mask. But i used another software to do it. How can i resample one of my mask with Envi ?

    MariM



    Veteran Member


    Posts:2396
    Veteran Member


    --
    15 Apr 2016 03:13 PM
    You can change the grid size by using the Resize Data tool. http://www.harrisgeospatial.com/docs/...
    You are not authorized to post a reply.