Hough Transform - Detecting angled lines
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm using the functions hough, hough peaks, and hough lines to detect straight line segments. It's detecting lines that are either horizontal or vertical but it's have trouble picked up angled lines. It also picks up multiple lines of different lengths along the same line.
The attached picture shows an example result. I have rho and thetaresolution set to 0.05. I want it to be able to detect both long and short lines so the "MinLength" is set low. How can I get my code tp detect angled lines?

0 Kommentare
Antworten (2)
Sean de Wolski
am 12 Sep. 2011
I would look at the eccentricity option in regionprops
doc regionprops
0 Kommentare
David Young
am 12 Sep. 2011
I'm not sure how are you setting the theta resolution, but hough and houghpeaks use degrees, and if your theta resolution is 0.05 degrees that's extremely small. Likewise, if you are setting the rho resolution to 0.05 pixels that's also too small to be useful.
Try increasing the resolutions by maybe a factor of 100 and see if you get better results. Once the lines are being detected, you can then try reducing them for more accuracy.
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!