Two canvases, permanently linked: whatever happens in Image Space instantly redraws Hough Space next to it. Place a point, watch its curve appear. Add two more in a row, watch the curves lock onto one glowing peak — that peak is the line.
Curves cross where votes agree
Each point casts a sinusoidal curve into (θ,ρ) space. Points on the same real line all cross at one shared point — discovered purely by counting agreement, never by solving equations directly.
Raw point / edge pixelHough-space curveAccumulator peakDetected line / circle
📷 Image Space
📊 Hough Space
Ready.
Live Explanation
Loading…
Click empty space on Image Space to drop a point. Click-drag an existing point to move it. Watch Hough Space update at 60fps as you drag.
A single straight rod is hidden in this noisy scene. Tune all three controls until the heatmap collapses to one sharp peak and the system locks on.
Canny (real-time)
Low
25
High
70
Hough resolution
θ step
1°
ρ step
1px
Vote threshold
60
Vote histogram — cutoff line slides as you raise the threshold
🔒 SYSTEM LINK ONLINE — target line acquired
Radius
45px
Vote threshold
55
Every edge pixel votes for every point exactly radius away from it. Wrong radius → votes scatter and no peak forms anywhere. Right radius → a sharp yellow peak snaps in right at the true centre.
Voting instead of solving▾
Why polar form (ρ,θ)
y=mx+c breaks on vertical lines. ρ=x·cosθ+y·sinθ describes every possible line with no special cases — essential for a voting scheme that can't afford exceptions.
Only hysteresis needs to be live
Blur and gradient only depend on the image, not your threshold choice — computed once. Moving Low/High only reruns the cheap flood-fill classification step, which is why the sliders here feel instant.
Resolution is a trade-off
Coarser θ/ρ steps merge nearby votes into bigger, more forgiving bins — good against noise, bad for precision. Finer steps are precise but split real votes across more bins, weakening every peak.
Predict, then verify
In Laser Target Lock, you set the θ/ρ resolution extremely fine (1° and 1px) on a genuinely noisy image, without touching Canny. What happens to the heatmap?