Over-segmentation of Watershed algorithm

家住魔仙堡 提交于 2019-12-04 07:08:53

Use max(abs(x1-x2),abs(y1-y2)) as the distance metric (chessboard), and use eight-connected neighborhood in watershed function:

bw=im2bw(I);

D = -bwdist(~bw,'chessboard');
imagesc(D)
D(~bw) = -Inf;

L = watershed(D,8);
figure,imagesc(L)

Result:

I have been dealing with the same issue for a while. For me, the solution was to use a marker based watershed method instead. Looks for examples on watershed method given on the Matlab Blog by Steve: http://blogs.mathworks.com/steve/ This method given by him worked best for me: http://blogs.mathworks.com/steve/2013/11/19/watershed-transform-question-from-tech-support/

Now, in an ideal world, we would be able to segment everything properly using a single method. But watershed does over or under-segment some particle, no matter which method you use (unless you manually give the markers). So, currently I am using a semi-automatic segmentation method; i.e., use watershed to segment the image as best as possible, and then take that image into MSPaint and edit it manually to correct whatever under/over-segmentation remains.

Region growing seems to have been used by some people in the past. But my image processing knowledge is limited so I can't help you out with that. It would be great if anyone could post something about how to use region-growing to segment such an image.

Hope this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!