separate connected component in two or more regions based on certain criteria

21 ビュー (過去 30 日間)
Eirik Kvernevik
Eirik Kvernevik 2021 年 4 月 14 日
コメント済み: Image Analyst 2021 年 4 月 15 日
I will start my question by presenting two images :
These are two different binarized images containing connected regions. I have marked red lines where I wish to separate the region.
my questions are
  1. how can I separate the connected components into two or more isolated regions ? I want the method to be automated as I want to do this on many images.
I have some ideas on what the criterias should be for the separation to occur :
  1. If the connected component contains more than a maximum amount of pixels, lets say 15 pixels, I want the region to be a canditate for splitting
  2. if the region contains more than 15 pixels AND the minimum distance across the region is less than a given length then I want the region to be separated at that line defining this minimum width . I guess this is similar to saying that I want to split the region if its circularity is low, that is I do NOT want to split the largest blob in the center of both images.
  3. If I cannot find this minimum width of the region I want to separate the region in two by requiring that the two resulting regions shall have the same amount of pixels.
I would be happy for advices on how to implement this into a working algorithm. Also other suggestions on splitting criteria is much appreciated.

回答 (2 件)

Matt J
Matt J 2021 年 4 月 14 日
bwareaopen will accomplish item (1) straightforwardly. Other than that, since you haven't committed to a precise separation criteria, why not consider that in,

Image Analyst
Image Analyst 2021 年 4 月 15 日
See Steve's blog
and
Do you know how to compute circularity? If not:
props = regionprops(mask, 'Area', 'Perimeter');
allAreas = [props.Area];
allPerimeters = [props.Perimeter];
circularities = allPerimeters ./ (4 * pi * allAreas);
  1 件のコメント
Image Analyst
Image Analyst 2021 年 4 月 15 日
Also see bwferet() to get the distance across a blob at the farthest separation (widest point).

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

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by