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++) {
54 if (tr >= 0 && tr < height) {
55 for (
int it = -1; it <= 2; it++) {
57 if (tt >= 0 && tt < width)
58 res += Bspline4((
double)ir - er) * Bspline4((
double)it - et) * I[tr][tt];
65 double vpTemplateTrackerBSpline::Bspline4(
double diff)
69 return (aDiff * aDiff * (aDiff / 2. - 1) + 4. / 6.);
70 }
else if (aDiff < 2.) {
71 double a = 2. - aDiff;
72 return (a * a * a / 6.);
unsigned int getWidth() const
unsigned int getHeight() const
static Type abs(const Type &x)