42 #include <visp/vpTemplateTrackerBSpline.h>
44 #ifndef DOXYGEN_SHOULD_SKIP_THIS
46 double vpTemplateTrackerBSpline::getSubPixBspline4(
const vpImage<double> &I,
double r,
double t)
51 double er=(double)r-cr;
52 double et=(double)t-ct;
56 for(
int ir=-1;ir<=2;ir++)
59 for(
int it=-1;it<=2;it++)
62 if(tr>=0 && tr <height && tt>=0 && tt <width)
63 res+=Bspline4((
double)ir-er)*Bspline4((
double)it-et)*I[tr][tt];
69 double vpTemplateTrackerBSpline::Bspline4(
double diff)
74 return (aDiff*aDiff*aDiff/2.-aDiff*aDiff+4./6.);
77 return ((2.-aDiff)*(2.-aDiff)*(2.-aDiff)/6.);
unsigned int getWidth() const
static Type abs(const Type &x)
unsigned int getHeight() const