Binary image masking using another binary image

조회 수: 1 (최근 30일)
MFK
MFK 2014년 7월 11일
답변: MFK 2014년 7월 11일
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.
Red marked regions are unwanted. And I want to remove these regions with using second image

채택된 답변

Joseph Cheng
Joseph Cheng 2014년 7월 11일
편집: Joseph Cheng 2014년 7월 11일
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
Joseph Cheng
Joseph Cheng 2014년 7월 11일
편집: Joseph Cheng 2014년 7월 11일
so... with your update I already supplied the answer of just performing my first option of
Newimage = Mask1&Mask2;

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

MFK
MFK 2014년 7월 11일
Thank you for your helping. When I reviewed my works, I realized my fault. Thank you.

카테고리

Help CenterFile Exchange에서 Author Block Masks에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by