Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cubic Spline Interpolation in C++

Tags:

c++

opencv

I am working in image processing in C++ using OpenCV. I've a problem that requires cubic interpolation of a set of data. Are there any library files that I can use for this in OpenCV?

like image 934
RUMMY Avatar asked Feb 07 '10 07:02

RUMMY


People also ask

What is cubic spline formula?

The cubic spline is a function S(x) on [a, b] with the following properties. S(x)∣∣[xi,xi+1] = Si(x) is a cubic polynomial for i = 0,1,2,...,n − 1. Si(xi) = f(xi) for i = 0,1,2,...,n − 1. Si(xi+1) = f(xi+1) for i = 0,1,2,...,n − 1.

Why do we use cubic spline interpolation?

Cubic spline interpolation is a special case for Spline interpolation that is used very often to avoid the problem of Runge's phenomenon. This method gives an interpolating polynomial that is smoother and has smaller error than some other interpolating polynomials such as Lagrange polynomial and Newton polynomial.

Is cubic spline interpolation the best?

Runge's phenomenon tells us that such an approximation often has large oscillations near the ends of the interpolating interval. On the other hand, cubic spline interpolation is often considered a better approximation method because it is not prone to such oscillations.


1 Answers

This might be what you're looking for:

http://ubaa.net/shared/processing/opencv/opencv_interpolation.html

like image 81
danuker Avatar answered Sep 19 '22 20:09

danuker