Close a specific area but do not close all the others

7 ビュー (過去 30 日間)
KuroWings
KuroWings 2021 年 10 月 14 日
コメント済み: KuroWings 2021 年 10 月 14 日
Hello there!
Im working on a project that implies on recognize and extract bubble shapes.
I need to close or recognize all these blobs right here, and try to not lose any of them
because if some of these blobs are broken i lose all that information on the next step(area, etc..)
sooo
there is any way to conect only this blob whitout touching the others ??
pd:I tried changing the color thresholding but it doesn't always work, because it's an iterative problem
Thank you in advance!!
  3 件のコメント
Catalytic
Catalytic 2021 年 10 月 14 日
because if some of these blobs are broken i lose all that information on the next step(area, etc..)
But the manner in which the gap is closed is non-unique and can produce shapes of different area. What kind of flexibility do you have on the way the gap closure changes the shape.
KuroWings
KuroWings 2021 年 10 月 14 日
Is a rare occurrence (it is a video analysis), I just need to close the gap (it can be very flexible), but it is a very variable gap.

サインインしてコメントする。

採用された回答

Catalytic
Catalytic 2021 年 10 月 14 日
編集済み: Catalytic 2021 年 10 月 14 日
What if you convert the interior of the bubbles to foreground?
load BW
N=round(numel(BW)/10);
BW=~BW;
BW0=BW;
BW=bwareaopen( BW ,N);
Keep=BW0&~BW;
BW=imopen(BW,strel('disk',5));
BW=bwareafilt(BW,[1,N])|Keep;
imshow(BW,[])
  1 件のコメント
KuroWings
KuroWings 2021 年 10 月 14 日
編集済み: KuroWings 2021 年 10 月 14 日
Its a nice solution!!, the only problem is that blob at bottom right
which is a "fake bubble" generated by the outline of 4 other blobs. (that also occur in other parts of the image center.).

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRecognition, Object Detection, and Semantic Segmentation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by