39 #include <visp3/tt/vpTemplateTrackerBSpline.h>
41 #ifndef DOXYGEN_SHOULD_SKIP_THIS
43 double vpTemplateTrackerBSpline::getSubPixBspline4(
const vpImage<double> &I,
double r,
double t)
48 double er=(double)r-cr;
49 double et=(double)t-ct;
52 for(
int ir=-1;ir<=2;ir++)
55 for(
int it=-1;it<=2;it++)
58 if(tr>=0 && tr <height && tt>=0 && tt <width)
59 res+=Bspline4((
double)ir-er)*Bspline4((
double)it-et)*I[tr][tt];
65 double vpTemplateTrackerBSpline::Bspline4(
double diff)
70 return (aDiff*aDiff*aDiff/2.-aDiff*aDiff+4./6.);
73 return ((2.-aDiff)*(2.-aDiff)*(2.-aDiff)/6.);
unsigned int getWidth() const
static Type abs(const Type &x)
unsigned int getHeight() const