MATLAB Answers

Naim
0

How to best select height when I am using watershed?

Asked by Naim
on 23 Jun 2017
Latest activity Edited by Naim
on 23 Jun 2017
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 Comments

Sign in to comment.

0 Answers