How to best select height when I am using watershed?

1 回表示 (過去 30 日間)
Naim
Naim 2017 年 6 月 23 日
編集済み: Naim 2017 年 6 月 23 日
I am building a program that isolates the largest blob in a 2D binary image, this blob always touches other objects so I want to watershed it to get it by itself. The blob can be anywhere from 1/10 the size of the image to 1/4 the size of the image. This is the standard code I'm using.
D = -bwdist(~uterusMask);
mask = imextendedmin(D, 5);
D2 = imimposemin(D, mask);
basins = watershed(D2);
ridges = basins == 0;
uterusMask = uterusMask & ~ridges;
I'm wondering how I could use the elements of the image to determine how big I want the h element in imextendedin. Could I use regionprops or is there a better way? Thanks in advance!

回答 (0 件)

カテゴリ

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