Is this possible to convert a thick line or curve into its thinner version
Mostrar comentarios más antiguos
Is this possible to convert a thick line or curve into its thinner version in an image using Matlab / Octave? Please view the image. Right side curves (alphabets) are thicker and need to be converted into the left ones. i.e., a single line version is needed.
thanks

Respuesta aceptada
Más respuestas (2)
Image Analyst
el 18 de Nov. de 2014
You can skeletonize it after thresholding.
binaryImage = grayImage < 128; % or whatever.
skeletonImage = bwmorph(binaryImage, 'skel', inf);
You cannot use imerode() because it will break apart your object into multiple objects. You cannot use bwulterode because it will shrink the blob down to a single point.
2 comentarios
baby
el 20 de Nov. de 2014
Image Analyst
el 20 de Nov. de 2014
Editada: Image Analyst
el 20 de Nov. de 2014
It did not work because you did not do what I recommended . Look at the line where I thresholded. It will take everything that is darker than 128 and turn it white. Why did you not do that? You should notice that I even specifically said NOT to use bwulterode() or imerode(). All I can figure is that this reply was really meant for Ahmet, not for me. I know you accepted his answer already, but if you need any more help, feel free to ask.
baby
el 24 de Nov. de 2014
1 comentario
Image Analyst
el 24 de Nov. de 2014
Again, this is not my code. You took the skeleton of a2, which is not the binary image. The binary image is the badly-named "a". So you're still not doing what I suggested - perhaps the poor variable names confused you, that's why I recommend using descriptive variable names like grayImage, binaryImage, skeletonImage, etc. Please attach your original B image that you used so I can try it.
Categorías
Más información sobre Image Segmentation and 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!

