Content deleted Content added
typo |
|||
(4 intermediate revisions by 4 users not shown) | |||
Line 12:
===Ellipse fitting===
One general equation for defining [[ellipse]]s is:
<math>a (x - p)^2+ 2b (x-p) (y-q) + c (y-q)^2
with restriction: <math>ac-b^2>0</math>
However, an ellipse can be fully determined if one knows three points on it and the
RHT starts by randomly selecting three points on the ellipse. Let them be
The next step is to find the intersection points of the tangent lines. This can be easily done by solving the line equations found in the previous step. Then let the intersection points be
Let the coordinates of ellipse center found in previous step be
<math>ax'^2+2bx'y'+cy'^2=1</math>
Now we can solve for the rest of ellipse parameters: <math>a</math>, <math>b</math> and <math>c</math> by substituting the coordinates of
===Accumulating===
Line 36:
Pseudo code for RHT:<ref>S. Inverso, “Ellipse Detection Using Randomized Hough Transform”, www.saminverso.com/res/vision/EllipseDetectionOld.pdf, May 20, 2002</ref>
'''for''' (a fixed number of iterations) {▼
▲while (we find ellipses OR not reached the maximum epoch) {
Find a potential ellipse.▼
▲ for(a fixed number of iterations) {
'''if''' (the ellipse is similar to an ellipse in the accumulator) '''then'''
▲ Find a potential ellipse.
'''else'''▼
Insert the ellipse into an empty position in the accumulator with a score of 1;▼
▲ else
}▼
▲ Insert the ellipse into an empty position in the accumulator with a score of 1;
Select the ellipse with the best score and save it in a best ellipse table;
▲ }
Empty the accumulator;▼
}▼
▲ Empty the accumulator;
▲}
==References==
|