LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced circle centre detection

Hello all,

I have a black image with a white circle (see attached), I need to find the centre and the radius as accurately as possible. As you can see the circle is not really nice and all the imperfections are on the inside part of the circle, this results in an under-estimated radius and the centre position error will depend on “how asymmetric” the imperfections are.




I have no particular experience in image processing so any idea will be greatly appreciated.

I was thinking of finding a centre with “IMAQ Circle Edge”, then drawing 360 radius from the centre (every degree), in order to do some statistics on their length.

This way I should get something like 70% of the radius with the same length (with just a few pix difference).

 


So my questions are :
 does it sound sensible ?
 if yes, what tool should I use to draw my 360 radius ?
 any other/better idea ?



Message Edité par TiTou le 02-28-2006 06:16 PM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 1 of 8
(2,942 Views)
Hey Titou,

I don't have IMAQ.   If you can get x,y coordinates you can use "Fitting on a Sphere" to find the centre.
Message 2 of 8
(2,924 Views)
Thanks for the idea Jason, but my problem is more on how to get these points and also, the problem remains... if all the imperfections are on the inside part of the circle, the radius will be under-estimated.

thanks anyway for the idea 😉

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 3 of 8
(2,919 Views)

hi there

try this:

1. take all points with a value higher than a threshold (say 50% of the (maximum-minimum) in the picture)
2. get the mean x/y coordinates of these points
3. calculate the distance between the mean x/y for all the points above the threshold
4. select the (lets say) 10% of the points with the highest distance to the average x/y
5. pass the coordinates of these points to the "Fitting on a sphere.vi"

this gives you a center and a radius of a circle.

let us know.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 4 of 8
(2,913 Views)
Thanks for the idea Chris, I will try that and compare the result with what I mentioned earlier and let you know. 😉

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 8
(2,908 Views)
Hi Chris,

I will go for your solution, indeed the results appear to be better and above al, more reproductible ; I assume this is due to the fact that the other method uses calculations based on a centre position which is not accurate enough.

Thanks alot Smiley Wink

We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 6 of 8
(2,888 Views)

hi there,

maybe a recursive calculation leeds to even better results (repeat the steps until center and radius don't change anymore)

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 7 of 8
(2,885 Views)
Do you expect there to just be imperfections or are there some other issues like off axis rotation (rotation about the image plane) to worry about.  Using the mean value of the object pixels will yield a very good approximation of the center of a symmetric body.  I used this to find a quick center of a human form for a project in the past and even with the only loose symmetry of the human form it did quite well.  I circle should perform much better since it has full symmetry.  Additional hystoresis can help optimize the exact center of the circle.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 8 of 8
(2,879 Views)