Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to find a best fitted curve from a group of curves (points)

Status
Not open for further replies.

96742zs

Mechanical
Jan 3, 2012
3
I am using a 2D laser scanner to scan a curved surface along it's longitude direction (y). This operation results in a point cloud in 3D space. At each y position, I can use least square to find a best fit curve in x,z axis, eg. a functin f(x). However, because of measurement noise, the parameters of each f(x) are slightly different to others. How can I find a best fitted curve from all those curves? and this best fitted curve will be the mathematical model of this surface.
 
Replies continue below

Recommended for you

Least squares would be one way. You try to minimize the aggregate sum of all the deviations from the model. A more nuanced approach would weight the more critical areas to achieve a better fit in those areas.

TTFN

FAQ731-376
Chinese prisoner wins Nobel Peace Prize
 
You have provided no criteria as to what the "best" model is... least squares is one approach, but only you can decide what method will provide you with the best solution given the data at hand.

What other models have you looked at using? Why did you select them? Why did you select LS over the others?

Dan - Owner
Footwell%20Animation%20Tiny.gif
 
thanks everyone's suggestion. I didn't have data in hand yesterday, so I tried to make it simple to understand. I have got some ideas for this question, but not sure this is good or not.

The image attached show how the measurement data looks like. The object being scanned is not a smoothed, regular surface. It's a sand pile. All this data groups, eg. x1 v.s. z1 were firstly filtered using Gaussian smooth filter.

getfile.aspx


I can use least square to fit every curve, but I don't know how to use the leasr square to minimize the aggregate sum of all the deviations of these 44 data-set. At the moment, I don't have any criterias to evaulate the fitting result. Only one information I have is the repose angle of the sand. However, it is not a fixed constant, and slope angle of those curves are about the same.

My solution is:
1) K-mean clustering. This results a centroid of each (x,z) pair. Highlighted by 'X' in the image.

2) least square curve fitting.

Any suggestions?
 
For an equation to fit your curve, using least square try several "Nth " degree polynomial curves and select the curve that has the highest coefficient of correlation the highest value would be "1" one.
 
Id probably generate akima splines from the data, since akima will hold true to its outliers (which i figure you care about). To compare one spline to the next, compare the coefficients table.

Give the ALGLIB library a shot. I've written quite a few data analysis programs which required curve fitting and interpolation for Q.C. data on manufactured parts, and have not found something that couldn't be accomplished through some clever application of ALGLIB. Brutally quick algorithms, and flexible to implement.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor