How to test proximity of lines (Hough transform) in OpenCV

≡放荡痞女 提交于 2019-12-03 00:30:56

If you use the standard or multiscale hough, you will end up with the rho and theta coordinates of the lines in polar coordinates. Rho is the distance to the origin, and theta is normally the angle between the detected line and the Y axis. Without looking into the details of the hough transform in opencv, this is a general rule in those coordinates: two lines will be almost parallel and very near one another when: - their thetas are nearly identical AND their rhos are nearly identical OR - their thetas are near 180 degrees apart AND their rhos are near each other's negative

I hope that makes sense.

Denis

That's interesting about the theta being the angle between the line and the y-axis.

Generally, the rho and theta values are visualized as being the angle from the x-axis to the line perpendicular to the line in question. The rho is then the length of this perpendicular line. Thus, a theta = 90 and rho = 20 would mean a horizontal line 20 pixels up from the origin. A nice image is shown on Hough Transform question

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!