How to increase the thickness of a line according to the value at each point?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
HAMED LAMEI RAMANDI
el 17 de Mzo. de 2015
Respondida: Hamed Lamei Ramandi
el 8 de Oct. de 2018
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147987/image.jpeg)
I have a medial axis on which each pixel is specified with a certain value. I am going to increase the thickness of my line according to these values. for example, where the value is 23 the code make 11 pixels in each side of the center pixel (11+1+11 =23) or where is 12 it create 6 pixels in one side and 5 pixels on the other side of the center pixel to give me 12-pixel width.
Cheers
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147989/image.jpeg)
0 comentarios
Respuestas (4)
Image Analyst
el 17 de Mzo. de 2015
How did you get the medial axis? Normally it comes from a binary image where the width is what you're trying to do. So you should already have what you want. If not, show us your gray scale image, your binary image, and your distance transform.
0 comentarios
HAMED LAMEI RAMANDI
el 17 de Mzo. de 2015
Editada: HAMED LAMEI RAMANDI
el 17 de Mzo. de 2015
0 comentarios
Hamed Lamei Ramandi
el 8 de Oct. de 2018
Yes, it was for 3.5 years ago. Image Analyst is right. Each pixel has a value (say 0-100) and the line/pixel needs to be widen according to that value. For example if the value of a pixel is 5, 5 pixel should be there, i.e. including the pixel itself 2 pixels needs to be added in each side (2+2+1=5).
0 comentarios
Mohammadreza
el 6 de Oct. de 2018
you can change this image to binary, find ones and making each one double!
1 comentario
Image Analyst
el 6 de Oct. de 2018
By "the thickness of my line according to these values" I think he meant to not simply widen the line by 2 at each point in the binary image, but to widen it according to some factor times the Gray Level of the original gray scale image. But since it's been 3.5 years since then, I don't think he cares anymore.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!