image space
y = m0x + b0
Hough (parameter) space
b = -x0m + y0
b = -x1m + y1
polar representation for lines
d: perpendicular distance from line to origin
Θ: angle the perpendicular makes with the x-axis
Hough transform algorithm
xcosΘ- ysinΘ = d
Hough transform for circles
Circle: center(a,b) and radius r (xi-a)^2 + (yi-b)^2 = r^2
For every edge pixel (x,y): For each possible radius value r: For each possible gradient direction Θ: %% or use estimated gradient a = x - r cos(Θ) b = y + r sin(Θ) H[a,b,r] += 1 end end end