▍1. Hough变换用来在图象中查找直线。它的原理是:假设有一条与原点距离为s,方向角为θ的一条直线,直线上的每一点都满足方程 s=x*Cosθ+y*Sinθ,利用这...
Hough变换用来在图象中查找直线。它的原理是:假设有一条与原点距离为s,方向角为θ的一条直线,直线上的每一点都满足方程 s=x*Cosθ+y*Sinθ,利用这个事实,我们可以找出某条直线来。这段程序,用来找出图象中最长的直线。-Hough Transformation is used for searching lines in an image . Here is the principle: Assume there is a line whoes direction is "sita" , and the distance from the origin to this line is s. So each point in this line satisfies the equation : s=x*Cos(sita)+ y*Sin(sita) . We can find out the lines based on this fact. And this programme is to find out the longest line in the image.