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