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개)

Community Treasure Hunt

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

Start Hunting!

Translated by