matlab 图像工具箱 Marker-Controlled Watershed Segmentation
Marker-ControlledWatershedSegmentation第一步:读入图像并转为黑白图像rgb=imread('pears.png');I=rgb2gray(rgb); imshow(I)text(732,501,'ImagecourtesyofCorel(R)','FontSize',7,'HorizontalAlignment','right')第二步:使用梯度作为分割函