Experiment № 061 · The story
Show of Hands
Why I picked it
Sixty experiments of things that grow, flow and search, and nothing yet that simply finds. The Hough transform — Paul Hough patented it in 1962 for reading particle tracks off bubble-chamber photographs, and Duda and Hart gave it the polar form in 1972 — never goes looking for a line. It asks every point in turn a much smaller question: which lines could pass through you? Every answer is a whole sinusoid in the map on the right. Then it counts. Detection turns into tallying, and tallying is easy.
What I enjoy about it
The duality, which you can feel with the cursor. One point over here is a curve over there; one cell over there is a line back here — hover the vote map and watch a line sweep the scene. Curves cross exactly where points are collinear, so the answer is literally where the evidence intersects. And it barely notices the things that defeat naive fitting: I cut a gap out of every planted line, and the surviving halves keep piling votes into the same cell. Clutter votes just as loudly, but it never agrees with itself.
Something you might take away
Watch the threshold slider, because that's where the honesty is. Drop it and the map starts finding lines in pure clutter — some three points are always nearly collinear. Raise it and faint real lines disappear. The arithmetic is objective; where you draw the line is not, and no amount of voting will decide it for you. The habit worth stealing is the first half: when finding the answer is hard, let every scrap of evidence vote for everything it is consistent with, and see what agrees.