how do i fill in color (ex. red) specific branch in bw skeleton image
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
daniel
el 1 de Abr. de 2014
Comentada: Image Analyst
el 1 de Abr. de 2014
hey everybody, i've got this image:
as you could see this is skeleton image (1 pixel thick) with 3 branches i remove the node point so i could make calculations (such as length) on each branch separately. assuming i would like to change the color of one of the branches how do i do this (for example branch no. 3 - the long one)?
thanks in advance.
0 comentarios
Respuesta aceptada
Image Analyst
el 1 de Abr. de 2014
You need to label your image, say with bwlabel(). Then find out what label that branch is. Maybe you can call regionprops() and identify it by its length or centroid location, I don't know. But once you've identified it, you can use ind2rgb() with a colormap that identifies that label as red and turns the image into a true color RGB image.
2 comentarios
Image Analyst
el 1 de Abr. de 2014
You'd still have to indicate via a colormap which component gets which color, if you care about that, because label2rgb just applies a default color assignment to all branches unless you pass in a colormap of your own that specifies which branch gets which color.
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!