How to find the distance between lines in a image in matlab
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sriram Badri
el 29 de Abr. de 2015
Comentada: Jean Luo
el 12 de Jul. de 2016
Hi All, I am trying to learn how to process images in Matlab. I am trying to find the vertical distance from the upper line to the lower one. I have a few questions as to how to start the process. Do I need to convert the image to binary in order to find the edges? How can I get the count of the pixels between these two lines?
Any guidance would be greatly appreciated to get me started in the right direction.
Thanks!
Added a JPG file.
0 comentarios
Respuesta aceptada
Image Analyst
el 29 de Abr. de 2015
They don't look quite perfectly straight to me, so do you want to assume they're perfectly straight, or do you want to fit a curve to them, like a quadratic or something? Also, do you need the average separation, or the separation on a column-by-column basis? And, can we assume that the garbage along the edges is something we can either zero out or crop away? And are the lines roughly horizontal in every single image, or can they be at any arbitrary angle, like 45 degrees or whatever?
9 comentarios
Jean Luo
el 12 de Jul. de 2016
Hi, I actually have a very similar question as this. If you ever got the code to work, could you show it to me?
Más respuestas (1)
Thomas Koelen
el 29 de Abr. de 2015
With this function you can find the lines:
You get the coordinates from both lines and substract the top from the bottom one, that's the distance.
Ver también
Categorías
Más información sobre Image Segmentation and Analysis en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!