06-27-2013 07:23 AM
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?
06-27-2013 07:29 AM
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
06-28-2013 05:20 AM
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!
06-28-2013 07:31 AM
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.
06-28-2013 07:58 AM
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.
06-28-2013 08:18 AM
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%.
06-30-2013 08:31 AM
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:
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.
06-30-2013 01:29 PM
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?
07-02-2013 08:11 AM
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.
07-02-2013 08:15 AM - edited 07-02-2013 08:16 AM
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.