- Using the function intline from the DIPUM Toolbox, create a binary image containing foreground pixels along the line given by houghlines. (The DIPUM Toolbox contains the MATLAB code from the book Digital Image Processing Using MATLAB, 3rd ed.)
- Dilate that binary image using imdilate and a structuring element with the desired radius (2 or 3 pixels). You could use a circular structuring element, although with a radius that small, it won't really be close to a circle.
- Use a logical AND operator (&) with your dilated binary image and your edge image to identify the edge pixels that are close to the line identified by houghlines.
Get edge points from a hough line
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
mikel lasa
el 26 de Oct. de 2020
Comentada: Steve Eddins
el 27 de Oct. de 2020
Hello,
After processing an image, I get 5 lines using houghlines. These lines arent perfect fited to the original image, so my intention is to get edge points near my line ( 2 or 3 pixel distance) and then, using those points, make a least square fitting.
My problem is that having the equation y=mx+n of my houghlines, I dont know how to get the nearest points of those lines.
Hope you can understand my explanation.
Regards,
0 comentarios
Respuesta aceptada
Steve Eddins
el 26 de Oct. de 2020
I think I understand your question. Here is one possibility.
2 comentarios
Steve Eddins
el 27 de Oct. de 2020
To try the solution I suggested, you'll need to create a binary image that has foreground pixels along the lines returned by houghlines. That is what the intline function is for. Once you have that binary image, you can call imdilate to perform the dilation.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!