Watershed Region Merging

[EDIT: 20110723 20:38 CDT - reformat - WDR]
Hello,
I am trying to implement the watershed algorithm on a color image. The problem I am having now is implementing the region merging/growing algorithm to solve the over-segmentation problem. Could you please help me write a step-by-step algorithm that I can convert into matlab code?
Any help is greatly appreciated.
Thanks!
- Will
This is my current Watershed Algorithm:
function [ f2 ] = WATERSHED( f )
% Marker-Controlled Watershed Segmentation
h = fspecial('sobel');
fd = tofloat(f);
g = (sqrt(imfilter(fd, h, 'replicate')) .^ 2 + sqrt(imfilter(fd, h', 'replicate') .^ 2 ));
imshow(g)
L = watershed(g);
wr = L == 0;
rm = imregionalmin(f);
im = imextendedmin(f, 2);
fim = f;
fim(im) = 175;
Lim = watershed(bwdist(im));
em = Lim == 0;
g2 = imimposemin(g, im | em);
L2 = watershed(g2);
f2 = f;
f2(L2 == 0) = 255;
end

Réponses (0)

Catégories

En savoir plus sur Oceanography and Hydrology dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by