Randomized Hough transform: Difference between revisions

Content deleted Content added
Davguez (talk | contribs)
m Termination: I guess a typo, one have to continue searching while there's still ellipse AND (no OR) the max nb of epoch is not reached
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>
 
'''while''' (we find ellipses AND not reached the maximum epoch) {
<source lang="cpp">
'''for''' (a fixed number of iterations) {
while (we find ellipses AND 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.
if(the ellipse is similar to anReplace ellipsethe one in the accumulator) with the average of two ellipses and add 1 to the score;
'''else'''
Replace the one in the accumulator with the average of two ellipses and add 1 to the score;
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;
}
Select Eliminate the ellipsepixels withof the best scoreellipse andfrom save it in a best ellipsethe tableimage;
Empty the accumulator;
Eliminate the pixels of the best ellipse from the image;
}
Empty the accumulator;
 
</source>
 
==References==