LabVIEW

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 find the ellipse's center automatically? Can someone please help me a simple vi?

Regards.
0 Kudos
Message 1 of 4
(2,400 Views)
hi,

you can find the center by calculating the mean coordinates of all pixels which values are above a threshold. see attachment (LV 7.1)


best regards
chris
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 2 of 4
(2,385 Views)
I think one simple method of finding the center of a symetrical 2d body (probably any convex body)is to average the coordinates of points at the boundary. Threshold the image (it looks like it is already done somewhat) and sum all the x coordinates into an accumulator variable and divide by the total number of sampled points, this is the canter coordinate for the x axis, do the same for the y-value. any non boundary noise pixels will skew values. This method should give a decent center of your elipse (note the coordinates are in respect to the origin at the top left of the picture). The vision addonns most likely have prebuilt functions to do something like thiss but in a more complex and powerful way. This is just a quick thought on the topic but I could be wrong.

-Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 4
(2,378 Views)
Yes, it works. Thank both of you, chrisger and falkpl. 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 to the "Machine Vision" board as i post it here for a mistake, and i couldn't find a way to delete it. Sorry for that.

Regards.
0 Kudos
Message 4 of 4
(2,373 Views)