How to mask the inner region of this Binary Image? Can anyone give some idea?

조회 수: 1 (최근 30일)
This is Abdomen image(img1.jpg) . The Inner region should be completely black. if we use imfill the entire region becomes black as there is a gap in it.
Edge fill cannot be used as the shape of inner region varies.
I need to get image like this(img2.jpg)
The original image(newImg.jpg)

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 8월 1일
편집: KALYAN ACHARJYA 2019년 8월 1일
I would suggest you the slightly improved on thresholding (segmentation results), which leads great help to disconnect the black pixel link (as result shown)
se=strel('disk',5);
result=imerode(test_image,se);
largest_blob=bwareafilt(result,1,'largest');
result=imdilate(largest_blob,se);
figure,imshow(result);
Hope it Helps!
  댓글 수: 2
SASIREKHA DURAISAMY
SASIREKHA DURAISAMY 2019년 8월 4일
Thank you for your suggestion sir.
As you said i modified the threshold. I am getting the image as shown.
But my aim is to calculate the Fat. I need to calculate the white area inside the inner mask and also outside separately. On doing the above there will be changes in the fat values.(eg: Inner organ touches the outer skin layer in the second dilated image and also gap regions created its own shape which differs from the original Image).
Sir any idea you have to solve this problem. If so pls share.
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 8월 4일
"On doing the above there will be changes in the fat values.(eg: Inner organ touches the outer skin layer in the second dilated image and also gap regions created its own shape which differs from the original Image)".
Thats why, I asked to adjust accordingly, so that the link should be broken and rest are as same after morpho operations

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

추가 답변 (0개)

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by