**1 Answer**

written 8.1 years ago by |

Hough transform can be used for pixel linking and curve detection. The straight line represented by y=mx+c can be expressed in polar coordinate system as,

ρ = xcos(θ)+ ysin(θ) …………………..(i)

Where ρ,θ defines a vector from the origin to the nearest pointon the straight line y=mx+c. this vector will be perpendicular from the origin to the nearest point to the line as shown in the below figure.

Any line in the x, y plane corresponds to the point in the 2D space defined by the parameter and θ. This the Hough transform of a straight line in the x,y plane is a single point in the ρ, θ space and these points should satisfy the given equation with x1,y1 as constants. Thus the locus of all such lines in the x, y plane corresponds to the particular sinusoidal curve in the ρ, θ space.

Suppose we have the edge points xi,yi that lie along the straight line having parameters ρ0,θ0. Each edge point plots to a sinusoidal curve in the ρ,θ space, but these curves must intersect at a point ρ0,θ0. Since this is a line they all have in common.

For example considering the equation of a line: y1= ax1+b

Using this equation and varying the values of a and b, infinite lines can pass through this point (x1,y1).

However, if we write the equation as

B= -ax1+y1

And then consider the ab plane instead of xy plane, we get a straight line for a point (xi,yi). This entire line in the ab plane is due to a single point in the xy plane and different values of and b. Now consider another point (x2, y2) in the xy plane. The slope intercept equation of this line is,

Y2= ax2+ b………………….(1)

Writing the equation in terms of the ab plane we get,

B= -ax2+y2………………..(2)

This is another line in the ab plane. These two line will intersect each other somewhere in the ab plane only if they are part of a straight line in the xy plane. The point of intersection in the ab plane is noted as (a’,b’). using this (a’,b’) in the standard slope-intercept form i.e. y=a’x+b’, we get a line that passes through the points (x1 , y1) and (x2, y2) in the xy plane.