필터 지우기
필터 지우기

Separating Objects in Binary Image

조회 수: 3 (최근 30일)
Lukas Schmitt
Lukas Schmitt 2021년 4월 10일
댓글: Lukas Schmitt 2021년 4월 10일
Hey there,
I'd like to separate the objects from the surrounding circle. I would choose operations like imopen, but the area of all objects within the circle should remain the same. I do not need the circle.
Thanks for your help!

채택된 답변

Image Analyst
Image Analyst 2021년 4월 10일
Call imfill() and then imerode(). Then mask it: Untested code
mask2 = imfill(mask1, 'holes');
se = strel('disk', 3, 0); % Adjust 3 as needed to erase outer ring.
mask2 = imerode(mask2, se);
mask1(~mask2) = false; % Erase outside of mask, which will erase the outer ring.
  댓글 수: 1
Lukas Schmitt
Lukas Schmitt 2021년 4월 10일
Thanks man, it looks so easy when I see your code!

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by