Binary image masking using another binary image
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
MFK
el 11 de Jul. de 2014
Respondida: MFK
el 11 de Jul. de 2014
As you can see I have 2 binary images. I want to mask first image with second image. I want to eliminate regions or convert logic-0 in first image with using second image's logic-0 regions. How can I solve this problem? Thank you for your help.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165579/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165580/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165581/image.jpeg)
Red marked regions are unwanted. And I want to remove these regions with using second image
0 comentarios
Respuesta aceptada
Joseph Cheng
el 11 de Jul. de 2014
Editada: Joseph Cheng
el 11 de Jul. de 2014
couldn't you just NewImage = Mask1&Mask2? where the only things left are the areas where both masks have the value 1? imagesc(Mask1&Mask2),colormap gray
or are you looking for the 0 areas in mask2 in mask 1? then i would do above but invert the 0/1 logic in mask 2.
imagesc(Mask1&~Mask2),colormap gray
1 comentario
Joseph Cheng
el 11 de Jul. de 2014
Editada: Joseph Cheng
el 11 de Jul. de 2014
so... with your update I already supplied the answer of just performing my first option of
Newimage = Mask1&Mask2;
Más respuestas (1)
Ver también
Categorías
Más información sobre Author Block Masks en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!