LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best way to find the center of a circle

Hello!

I have a project where I have to identify a green circle and the center of it. So far I have filtered out the green particles (using color threshold and erosion &dilation) so I have a binary image of a more-or-less circle. I have been looking at solutions to identify my object and get the center coordinates. Can you help me explain a little which method would be the easiest/best and why

1. IMAq Find Edge.vi : where I adjust the line fit to Hough Edge Rake

2. at Help->Find Solutions under the Vision option I found a Particle Analysis Report.VI

3. Machine Vision> Searching & Matching > IMAQ Detect Shapes

 

Thank you in advance!

0 Kudos
Message 1 of 4
(2,788 Views)

Which have you tried?  Have they worked?  Note that you can "test" the algorithms by creating an image with a known Circle and verify that your "find the center" routine finds the "right answer" (what good is an algorithm if it gives the wrong answer?).

 

Bob Schor

0 Kudos
Message 2 of 4
(2,768 Views)

You can convert all your circle points to xy coordinates then use "fitting on a sphere" with a matching z array that is all zeroes. (For z=0, it will fit a circle). It will give you the radius and center.

The algorithm is plain linear algebra and has been discussed several times.

Message 3 of 4
(2,764 Views)

@accy44 wrote:

I have a project where I have to identify a green circle and the center of it. So far I have filtered out the green particles (using color threshold and erosion &dilation) so I have a binary image of a more-or-less circle.


Posting an image of that might be useful...

0 Kudos
Message 4 of 4
(2,710 Views)