Borrar filtros
Borrar filtros

close lines after edge detection

18 visualizaciones (últimos 30 días)
Elad
Elad el 28 de Mayo de 2012
Comentada: Stelios Fanourakis el 21 de Ag. de 2019
Hi all, After edge detection and adding some circular object, I like to close the lines and fill each area. this is an example : http://i48.tinypic.com/35hq0cg.jpg
is there a way to close the lines without dilation or morfological operations? those would modify the accuracy of the detection.
  2 comentarios
Stephen
Stephen el 29 de Mayo de 2012
what was the original image?
Elad
Elad el 30 de Mayo de 2012
Its fungi on a leaf , but this image is after a few manipulations allready.

Iniciar sesión para comentar.

Respuestas (2)

Image Analyst
Image Analyst el 28 de Mayo de 2012
Other options would be convex hull or restricted convex hull, or Sean's shrink wrap: http://www.mathworks.com/matlabcentral/fileexchange/29175-shrinkwrap
  4 comentarios
Image Analyst
Image Analyst el 10 de Ag. de 2019
Using a convex hull may not always be a good choice - it won't give the right shape in some situations. For a banana shape, it convex hull would give a D-shape. One must really look at the image and not just make blanket generalizations.
Stelios Fanourakis
Stelios Fanourakis el 21 de Ag. de 2019
Image Analyst. I want to apply convex hull to a closed contour shape. Thus, the convex hull shape is more or less defined when applied to a closed contour. Isn't it?

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 28 de Mayo de 2012
imfill( YourBWArray, 'holes' )
  3 comentarios
Walter Roberson
Walter Roberson el 28 de Mayo de 2012
The example where the line leaves a gap: where should it attach to the main body? If the "accuracy of the detection" is an issue, every choice is wrong, unless there is external information available.
Elad
Elad el 29 de Mayo de 2012
Yes, you are right , I guess I would like to complete the closing in a circular way.
I found this answer that works sometimes, if the gap is small:
http://www.mathworks.com/matlabcentral/answers/23467-filling-the-objects-found-by-canny-edge

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by