Over-segmentation of Watershed algorithm

Viewed 4734

I followed the 2-D Watershed example in Mathworks.com to separate the connected objects, like the image below:

Imgur

The code is summarize as:

bw = imread('some_binary_image.tif');

D = -bwdist(~bw);

D(~bw) = -Inf;

L = watershed(D);

The result is:

Imgur

The particle in the center has been separated into two. Are there any ways to avoid the over-segmentation here?

Thanks, lennon310, chessboard does work well for most of my images, but there are still some cases that it doesn't. For example, the following binary image: Imgur

Using chessboard will result in: Imgur

As I have hundreds of images, it seems that it is difficult to find one combination of parameters that work for all images. I am wondering if I need to combine the good results got from using chessboard, cityblock, etc...

2 Answers
Related