dicinterp.hpp¶
Functions
-
inline int idx_from_2d(const int x, const int y, const int length)¶
-
struct InterpVals¶
- #include <dicinterp.hpp>
namespace for bicubic spline interpolation.
Based on the implementation by GNU Scientific Library (GSL). Main difference is the removal of the binary search for index lookup. For use in DIC, we only ever need integer locations and therefore its sufficient to get the floor value of the subpixel location.
-
class Interpolator¶
Subclassed by Bspline, Hermite
Public Functions
-
virtual double eval(const int ss_x, const int ss_y, const double subpx_x, const double subpx_y) const = 0¶
Evaluates the bicubic interpolation at a specified point.
Computes the interpolated value at (x,y) using bicubic interpolation from the surrounding pixel values.
- Parameters:
x – The x-coordinate of the interpolation point
y – The y-coordinate of the interpolation point
- Returns:
The interpolated value at (x,y)
-
virtual double eval_dx(const int ss_x, const int ss_y, const double subpx_x, const double subpx_y) const = 0¶
Evaluates the x-derivative of bicubic interpolation at a specified point.
Computes the partial derivative with respect to x at point (x,y).
- Parameters:
x – The x-coordinate of the point
y – The y-coordinate of the point
- Returns:
The x-derivative of the interpolated function at (x,y)
-
virtual double eval_dy(const int ss_x, const int ss_y, const double subpx_x, const double subpx_y) const = 0¶
Evaluates the y-derivative of bicubic interpolation at a specified point.
Computes the partial derivative with respect to y at point (x,y).
- Parameters:
x – The x-coordinate of the point
y – The y-coordinate of the point
- Returns:
The y-derivative of the interpolated function at (x,y)
-
virtual InterpVals eval_and_derivs(const int ss_x, const int ss_y, const double subpx_x, const double subpx_y) const = 0¶
Evaluates the bicubic interpolation and its derivatives at a specified point.
Computes the interpolated value and its partial derivatives at (x,y) in a single call.
- Parameters:
x – The x-coordinate of the point
y – The y-coordinate of the point
- Returns:
Data struct containing the interpolated value and its x and y derivatives
-
virtual ~Interpolator() = default¶
-
virtual double eval(const int ss_x, const int ss_y, const double subpx_x, const double subpx_y) const = 0¶