フィルターのクリア

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