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?
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.
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.
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.
This might be what you're looking for:
http://ubaa.net/shared/processing/opencv/opencv_interpolation.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With