47 #ifndef _MIRA_CRSPLINEINTERPOLATOR_H_ 48 #define _MIRA_CRSPLINEINTERPOLATOR_H_ 71 template <
typename Tx,
typename Ty,
typename ContainerTx,
typename ContainerTy>
72 Ty
apply(
const ContainerTx& x,
const ContainerTy& y,
const Tx& xx)
74 assert(x.size()==y.size());
79 Ty mk = (y[k+1]-y[k-1])/(x[k+1]-x[k-1]);
80 Ty mkp1 = (y[k+2]-y[k])/(x[k+2]-x[k]);
82 Tx scale = (x[k+1]-x[k]);
84 Tx t = (xx-x[k])/scale;
95 return h00*y[k] + h10*y[k+1] + h01*scale*mk + h11*scale*mkp1;
Ty apply(const ContainerTx &x, const ContainerTy &y, const Tx &xx)
Definition: CRSplineInterpolator.h:72
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
int samples() const
Definition: CRSplineInterpolator.h:67
bool canExtrapolate() const
Definition: CRSplineInterpolator.h:66
1D cubic Hermite spline interpolator.
Definition: CRSplineInterpolator.h:63
int samplesBefore() const
Definition: CRSplineInterpolator.h:68
IntervalFilter base class/concept.
Concept and base class for all Interpolators and Filters.
Definition: IntervalFilter.h:61
int samplesAfter() const
Definition: CRSplineInterpolator.h:69