40 #include <visp3/tt/vpTemplateTrackerBSpline.h> 42 #ifndef DOXYGEN_SHOULD_SKIP_THIS 44 double vpTemplateTrackerBSpline::getSubPixBspline4(
const vpImage<double> &I,
double r,
double t)
49 double er = (double)r - cr;
50 double et = (double)t - ct;
53 for (
int ir = -1; ir <= 2; ir++) {
55 for (
int it = -1; it <= 2; it++) {
57 if (tr >= 0 && tr < height && tt >= 0 && tt < width)
58 res += Bspline4((
double)ir - er) * Bspline4((
double)it - et) * I[tr][tt];
64 double vpTemplateTrackerBSpline::Bspline4(
double diff)
69 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