Say that we have an image which pixels were labeled 1 and 2. How can we do the following in MATLAB?
- Convert the locations of 
1sand2sinto binary masks - Filter the image with those masks
 
Thanks.
Say that we have an image which pixels were labeled 1 and 2. How can we do the following in MATLAB?
1s and 2s into binary masksThanks.
                        
Example: