I = imread('image.jpg');
subplot(1,2,1); imshow(I);
title('Original Image');
se = strel('diamond',7);
Itop = imtophat(I,se);
Ibot = imbothat(I,se);
Ienhance =
imsubtract(imadd(Itop,30), Ibot);
Iec = imcomplement(Ienhance);
Iemin = imextendedmin(Iec,22);
Iimpose =
imimposemin(Iec,Iemin);
Iwat = watershed(Iimpose);
Iseg = label2rgb(Iwat);
subplot(1,2,2); imshow(Iseg);
title('Watershed Segmented Image');
No comments:
Post a Comment