LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find parameters for an ellipse with some points of it's perimeter?

Hallo,

 

I have points in XY coordinates representing the profile of a tool. I'd like to approximate this profile to an ellipse and get it's parameters. From where do I begin? Which main concept should I follow?

0 Kudos
Message 1 of 12
(5,202 Views)

i dont know exactly which parametres you have but possibly the fount of all knowledge 

 

http://en.wikipedia.org/wiki/Ellipse

 

there is a section on the maths involved which could help you with the how to do it. if you can work out a method from this it becomes much easier in LV

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 2 of 12
(5,198 Views)

I think Akiel is quite right. You should think how many points you need on this elipse, and calculate in a for loop the xy Points, bundle these points in a cluster, use autoindexing and give the output to the XY Graph. That should do the magic.

Any more question? Please fire away!

0 Kudos
Message 3 of 12
(5,154 Views)

Thank you until now, but it didn't solved the problem yet.

 

Well, I already have the profiles plotted and I already wrote program that confirms that it is a profile from an ellipse. I wanted now to know which are A and B (the two radius of an ellipse) from the profile I have. I add here that I have around 900 profiles to evaluate.

 

I hope I was more specific right now, if is there any info missing, please, please, ask me.

0 Kudos
Message 4 of 12
(5,144 Views)

Do you have only some sample points or the complete profile? Do you want to reach high accuracy or not?

Let's suppose you have the complete profile; the axes lenghts are the minimum and maximum distance between any pair of points on the border; so a rough method may be to compute such extrema. You don't actually need to calculate all the distances, only those belonging to approximately "opposed" pairs.

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 12
(5,136 Views)

The main problem is that, I don't have a whole profile AND I don't know how much percent of the total the points represent. I estimate 10-20%.

0 Kudos
Message 6 of 12
(5,126 Views)

That would mean you have about 0 to 70 Degree of the "circle" of Data points?

You already confirmed the structure is a Elipse. How did you do that, without calculating the semi-major and semi-minor axis? When you have these, you can use the standart equation:

CodeCogsEqn(2).gif

where p is your poinz, f1 the vector to the minor axis, f2 the vector of major axis, and alpha the angle.

 

If you do not have calculated the symmetry axis, there is a itinerating tool which can do that.

http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_fit_ellipse_2/

Note that this is an iteration! About the regression of an ellipse there is a long discussion going on and some papers have been wrote, because the least square fit is not very "trivial". The best solution I found turned out to be an eigenvector problem, and quite unefficient, I might add, nevertheless rather intriguing.

 

 

0 Kudos
Message 7 of 12
(5,094 Views)

It wold help if you could attach a typical dataset so we get an idea of the problem.

 

Are the main axes aligned with the xy axes or can there be a tilt?

Are the data points sorted around the arc?

How much noise is there?

0 Kudos
Message 8 of 12
(5,083 Views)

Here are the samples. X values in one file, Y values in another. If you plot them is easy to see that they form a profile. Those are 10 samples with 9 points each. That's I that I have and wanted to take the equation that defines the profile - not necessarily an ellipse, but I think it is a good approximation.

 

I don't know how much noise and how could I estimate that.

 

There may be a tilt.

Download All
0 Kudos
Message 9 of 12
(5,044 Views)

Answering Johannes:

 

I made a program that calculates de center of a circle taking 3 points of the ellipse. If it was a circle, the points would be together (or at least randomly dispersed around a common point). The profile of these centers was in a "V" format, the same that hapens to ellipses.

0 Kudos
Message 10 of 12
(5,041 Views)