How can I create structuring element arbitrarily in marker control watershed?
Mostrar comentarios más antiguos
% here a sample code and I wolud like to set structuring element arbitrarily
.
.
.
se = strel('disk',10);
Io = imopen(I, se);
Ie = imerode(I, se);
Iobr = imreconstruct(Ie, I);
Ioc = imclose(Io, se);
Iobrd = imdilate(Iobr, se);
Iobrcbr = imreconstruct(imcomplement(Iobrd), imcomplement(Iobr));
Iobrcbr = imcomplement(Iobrcbr);
fgm = imregionalmax(Iobrcbr);
I2 = I;
I2(fgm) = 255;
%clean the edges of the marker blobs
se2 = strel(ones(5,5));
fgm2 = imclose(fgm, se2);
fgm3 = imerode(fgm2, se2);
fgm4 = bwareaopen(fgm3,10); %shink them a bit e.g 20
.
.
.
%please help me ,how can i set arbitrarily
2 comentarios
Walter Roberson
el 6 de En. de 2014
What is the difference between this question and your previous http://www.mathworks.co.uk/matlabcentral/answers/111276-how-many-ways-to-define-shape-and-size-of-structuring-element-depend-on-images-in-watershed-segmenta ?
In that previous one I already pointed out that strel() can take arbitrary neighbourhoods for the shape. Look at the documentation: it is the second sample syntax http://www.mathworks.com/help/images/ref/strel.html
kyawt kyawt
el 6 de En. de 2014
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Image Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!