The BOTTOM LINE Quote Of The Day

The BOTTOM LINE Quote Of The Day

Don't Ever Tell GOD How BIG Your Problems are.
Just Tell Your Problems How BIG your GOD is ;)

Sunday, May 12, 2013

Applying Watershed Segmentation to the Original Image



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