Click here to Skip to main content
15,888,157 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: Hough Circular transform Pin
Alan Balkany16-Sep-09 3:27
Alan Balkany16-Sep-09 3:27 
GeneralRe: Hough Circular transform Pin
Luc Pattyn16-Sep-09 4:08
sitebuilderLuc Pattyn16-Sep-09 4:08 
GeneralRe: Hough Circular transform Pin
Alan Balkany16-Sep-09 4:24
Alan Balkany16-Sep-09 4:24 
GeneralRe: Hough Circular transform Pin
Luc Pattyn16-Sep-09 4:39
sitebuilderLuc Pattyn16-Sep-09 4:39 
GeneralRe: Hough Circular transform Pin
Fatbuddha 116-Sep-09 5:02
Fatbuddha 116-Sep-09 5:02 
GeneralRe: Hough Circular transform Pin
Alan Balkany16-Sep-09 5:17
Alan Balkany16-Sep-09 5:17 
GeneralRe: Hough Circular transform Pin
Luc Pattyn16-Sep-09 5:33
sitebuilderLuc Pattyn16-Sep-09 5:33 
GeneralRe: Hough Circular transform [modified] Pin
Member 419459316-Sep-09 5:12
Member 419459316-Sep-09 5:12 
Luc,

That was also my immediate question. What might be done is to just scan the image for the white (or black) pixels and set the array values just to a 1 for the pixel position itself. Once done, look for adjacent pixels in the first array (horizontally, vertically, or diagnally), either immediately adjacent or separated by 1 pixel (or two or three or ... if a very sparse image). Once such a pair is found, walk the adjacent pixels at both ends to extend the string, then create the equation of a line through the endpoints (a chord), and more importantly, the equation of the perpendicular bisector of the chord, saving this bisector's equation (y = mx+b, slope intercept form). Watch out for a joined line (a complete circular arc - on a clear disk you can seek forever), if found, take the lowest (or highest) 1/4 of the pixels as one arc, and the leftmost (or rightmost) 1/4 of the pixels as the other arc (saving these two arcs in a special array of pairs). Erase the found points in the array, and look for other arcs (connected or not). Now for the fun. Calculate the intersections of the bisectors, starting with the circular pairs (giving the center of the circle and the distance from the center to all ends, averaged, as the radius), then on to the disjointed arcs. For the disjointed arcs, calculate a possible center for all combinations, and choose the closest groupings as a center, eliminate these arcs and repeat (maybe more than 1 circle in the image). Caution, since this is an image, the image of a circular disk could appear as an ellipse and not a circle.

Think this might work?

Dave.

Edit: all of the other answers came in while I was writing this up!

modified on Wednesday, September 16, 2009 11:29 AM

GeneralRe: Hough Circular transform Pin
Luc Pattyn16-Sep-09 5:29
sitebuilderLuc Pattyn16-Sep-09 5:29 
GeneralRe: Hough Circular transform Pin
lcssiva16-Sep-09 4:34
lcssiva16-Sep-09 4:34 
QuestionImage circle counting Pin
lcssiva16-Sep-09 1:14
lcssiva16-Sep-09 1:14 
AnswerRe: Image circle counting Pin
Alan Balkany16-Sep-09 3:31
Alan Balkany16-Sep-09 3:31 
AnswerRe: Image circle counting Pin
Fatbuddha 116-Sep-09 5:03
Fatbuddha 116-Sep-09 5:03 
QuestionNeed cut optimization algorith Pin
xx77abs14-Sep-09 1:42
xx77abs14-Sep-09 1:42 
QuestionRe: Need cut optimization algorith Pin
harold aptroot14-Sep-09 1:49
harold aptroot14-Sep-09 1:49 
AnswerRe: Need cut optimization algorith Pin
xx77abs14-Sep-09 1:54
xx77abs14-Sep-09 1:54 
GeneralRe: Need cut optimization algorith Pin
harold aptroot14-Sep-09 2:22
harold aptroot14-Sep-09 2:22 
GeneralRe: Need cut optimization algorith Pin
xx77abs14-Sep-09 2:40
xx77abs14-Sep-09 2:40 
GeneralRe: Need cut optimization algorith Pin
harold aptroot14-Sep-09 2:57
harold aptroot14-Sep-09 2:57 
GeneralRe: Need cut optimization algorith Pin
xx77abs14-Sep-09 3:21
xx77abs14-Sep-09 3:21 
GeneralRe: Need cut optimization algorith Pin
harold aptroot14-Sep-09 3:39
harold aptroot14-Sep-09 3:39 
AnswerRe: Need cut optimization algorith Pin
IdUnknown14-Sep-09 5:46
IdUnknown14-Sep-09 5:46 
GeneralRe: Need cut optimization algorith Pin
xx77abs14-Sep-09 6:50
xx77abs14-Sep-09 6:50 
QuestionSearch for repeated character combinations algorithm Pin
khalidelmeknesi9-Sep-09 2:31
khalidelmeknesi9-Sep-09 2:31 
AnswerRe: Search for repeated character combinations algorithm Pin
Richard MacCutchan9-Sep-09 3:01
mveRichard MacCutchan9-Sep-09 3:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.