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).
Message Edité par TiTou le 02-28-2006 06:16 PM
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.
maybe a recursive calculation leeds to even better results (repeat the steps until center and radius don't change anymore)