Spline interpolation degree question

1 reply · 1K views · last reply
sandon
Messages
15
Reaction score
1
Hi,

I working on code that does image tracking with missing pixels, but I noticed that higher ordered spline interpolation is unstable. Found through trial and error that the best result is degree 3, picture related. I always thought that spline interpolation does not display behaviours shown in the picture because they are conducted piece by piece over the data set. Is there a numerical explanation for this behaviour?

P.S interpolation done in python with scipy library
 
Attachments
  • Line plot titled 'Image number: 4079, row: 28' with four interpolated curves (Degree = 2, 3, 4, 5) through scattered red data points, x-axis 10 to 50, y-axis about 90 to 200; the degree 5 curve dips sharply near x = 8 to 14 while the others stay close together.
    BSpline4079_28.png
    15.3 KB · Views: 573
If the distances between your data points differ by large factors I'm not surprised that high order splines do strange things. It is the same behavior you see outside the interpolation range (as extrapolation).