Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how to detect an ellipse's center?

Here is an image taken by a DC. How to fit the ellipse and to find the ellipse's center using vision module automatically? Can someone please help me a simple vi?

Regards.
0 Kudos
Message 1 of 4
(3,785 Views)
Addition, In fact what i need is that which processings before the detection are usefull to the insurance of the accuracy.

i have intended to post the message here as i post it to the "LabVIEW" board for a mistake, and i couldn't find a way to delete it. Sorry for that.
0 Kudos
Message 2 of 4
(3,778 Views)
I took a crack at it. I've attached a VI which finds the center. Give it a try.

It's not really clear what pixels would be considered as being part of the actual ellipse. I assumed that the brightest pixels were on the ellipse so I did an simple adpative threshold of the image. There still remained some small noise spots outside and two big splotches inside of the ellipse so I used a particle filter by area to get rid of the small spots and used the compactness measure to get rid of the big splotches. All that remains are points on the ellipse, so I did an elliptical fit using all of those remaining points.

You may need to perform some morphological operations to do further processing before fitting the ellipse to include or not include other areas. Your probably going to need to play with this VI some to make it work on all of your sample images.

Good Luck.

Ken Pietrzak
Dragonfly Computing
www.dragonflycomputing.com
Message 3 of 4
(3,772 Views)
I did it a little bit differently. The results between the Ellipse Fit and the Center of Mass are very similar. It's always nice to have options.

KyleV
0 Kudos
Message 4 of 4
(3,765 Views)