Math 2.0

Computer science Example

Hough transform

Example

The Hough transform detects straight lines in a finite set of points p1,…,pNp_1, \dots, p_N of the plane, such as the edge pixels of an image. Each line is written as xcos⁡θ+ysin⁡θ=ρx \cos\theta + y \sin\theta = \rho with θ∈[0,π)\theta \in [0, \pi) and ρ∈ℝ\rho \in \R. A point pi=(xi,yi)p_i = (x_i, y_i) lies on this line exactly when ρ=xicos⁡θ+yisin⁡θ\rho = x_i \cos\theta + y_i \sin\theta. So each point gives a sinusoidal curve in the (θ,ρ)(\theta, \rho) plane, and the curves of collinear points meet at the parameters of their common line. The transform is the count H(θ,ρ)=#{i:xicos⁡θ+yisin⁡θ=ρ},H(\theta, \rho) = \#\set{i : x_i \cos\theta + y_i \sin\theta = \rho}, computed in practice on a grid of cells, and lines are found as peaks of HH.

Check on three points: (1,0)(1, 0), (0,1)(0, 1) and (2,−1)(2, -1) lie on the line x+y=1x + y = 1. For θ=π/4\theta = \pi/4 and ρ=1/2\rho = 1/\sqrt{2}, each point satisfies xcos⁡θ+ysin⁡θ=(x+y)/2=1/2x \cos\theta + y \sin\theta = (x + y)/\sqrt{2} = 1/\sqrt{2}. So H(π/4,1/2)=3H(\pi/4, 1/\sqrt{2}) = 3.

The Radon transform integrates a function along each line, and HH counts the given points on each line. So the Hough transform is a discrete analogue of the Radon transform, applied to an edge image.

Further reading

  1. Web https://en.wikipedia.org/wiki/Hough_transform
About this page
Tag3DK4V3A10K
URIm2://3DK4V3A10K
Kindexample
WritingW0 stub
MSC68U10, 44A12, 68T45
IllustratesRadon transform
Same as

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.