The Hough transform turns a geometric search — "is there a line or circle hidden in these points?" — into a voting problem. Every edge point in image space (left) doesn't just sit there: it casts a vote for every shape parameter that could have produced it. Those votes land in Hough (parameter) space (right). Real shapes get many consistent votes and pile up into a sharp peak; noise scatters its votes thinly across the whole space and never builds a peak.
θ and perpendicular distance from the origin ρ, using ρ = x·cosθ + y·sinθ. Each image point traces a sinusoid curve through θ–ρ space (one vote per θ); the curves from collinear points all cross at the same (θ, ρ), building a tall peak there.r, every point votes for all the centres (a, b) that are exactly r away from it — a circle of votes in a–b space. Points that truly lie on a circle of radius r all vote for the same true centre, which piles up a peak exactly there.The Hough transform was patented in 1962 for finding straight-line tracks in bubble chamber photographs, and its robustness to noise and broken edges is exactly why it's still a standard tool in computer vision for reading road lane markings, detecting coins, and finding circular parts on an assembly line.
Scattered, noisy edge points on the left cast votes into a 3D Hough parameter-space accumulator on the right; where real lines or circles hide in the noise, votes pile up into a sharp orange peak that gets converted straight back into a detected shape.
Each image point traces a curve of every parameter combination consistent with it — a sinusoid in θ–ρ space for lines, a circle in a–b space for circles. Points that truly lie on the same shape have curves that all cross at one bin, so votes accumulate; random noise points cast votes that scatter and never agree.
Switch between line and circle detection, add noise and watch the peak get shorter and fuzzier, and drag the detection threshold to see how many bars clear the cut. In circle mode, sweep the assumed radius through the true hidden radius to watch the peak sharpen and collapse again.
Because it works by voting rather than exhaustively fitting shapes, the Hough transform tolerates broken, gapped or noisy edges remarkably well — which is exactly why it's still used to read lane markings and locate circular parts decades after it was first patented.