Geometric Computer Vision: Difference between revisions
Line 65: | Line 65: | ||
<pre> | <pre> | ||
for all pixels (x,y) on an edge: | for all pixels (x,y) on an edge: | ||
for all d, theta: | for all (d, theta): | ||
if d = x*cos(theta) + y*sin(theta): | if d = x*cos(theta) + y*sin(theta): | ||
H(d, theta) += 1 | H(d, theta) += 1 | ||
d, theta = argmax(H) | |||
</pre> | </pre> | ||
* Hough transform handles noise better than least squares. | |||
* Each pixel votes for a ''line'' in the Hough space. The line in the image space is the intersection of lines in the Hough space. | |||
;Extensions | |||
* Use image gradient. | |||
* Give more votes for stronger edges | |||
* Change sampling to give more/less resolution | |||
* Same procedure with circles, squares, or other shapes. | |||
;Hough transform for curves | |||
Works with any curve that can be written in a parametric form. | |||
===Finding corners=== | |||
<math> | |||
C = \begin{bmatrix} | |||
\sum I_x^2 & \sum I_x I_y\\ | |||
\sum I_x I_y & \sum I_y^2 | |||
\end{bmatrix} | |||
</math> | |||
Consider <math> | |||
C = \begin{bmatrix} | |||
\lambda_1 & 0 \\ | |||
0 & \lambda_2 | |||
\end{bmatrix} | |||
</math> |