Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

removing specific (innermost) feature in bw mask

조회 수: 1 (최근 30일)
Matlabber 1.0
Matlabber 1.0 2018년 4월 10일
마감: MATLAB Answer Bot 2021년 8월 20일
Dear all,
i have the following bw mask:
where i can see 6 connected loops: on outer, one inner, and 4 small ones between. I need to remove the inner loop from this mask. it should be scalable to doing this operation for ~80'000 images of 320*320 pixels on a i7 porcessor.
what would certainly work for all 80k images is:
1) specify center point of the image (≈symmetry center of those loops);
2) turn all connected black pixels to white;
3) do the same with black;
4) done.
how can I do this or remove the inner loop in a different way? i did browse https://ch.mathworks.com/help/images/morphological-filtering.html but i didnt find what i look for. Thanks!

답변 (1개)

Matlabber 1.0
Matlabber 1.0 2018년 4월 10일
편집: Matlabber 1.0 2018년 4월 10일
found it after 2 more minutes of searching^^ the double imfill with a ~ (not()) does the job:
imshow(~imfill(~imfill(km~=0,[160,160]),[160,160]))
does the job

이 질문은 마감되었습니다.

제품

Community Treasure Hunt

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

Start Hunting!

Translated by