37#include <visp3/tt/vpTemplateTrackerTriangle.h>
44 :
minx_temp(0),
miny_temp(0),
C1(),
C2(),
C3(),
l_t(0),
h_t(0),
not_good(false),
uvinv00(0.),
uvinv01(0.),
52 :
minx_temp(0),
miny_temp(0),
C1(),
C2(),
C3(),
l_t(0),
h_t(0),
not_good(false),
uvinv00(0.),
uvinv01(0.),
104 :
minx_temp(0),
miny_temp(0),
C1(),
C2(),
C3(),
l_t(0),
h_t(0),
not_good(false),
uvinv00(0.),
uvinv01(0.),
107 init(c1[0], c1[1], c2[0], c2[1], c3[0], c3[1]);
115 Ttemp.
init(
C1.x / 2.,
C1.y / 2.,
C2.x / 2.,
C2.y / 2.,
C3.x / 2.,
C3.y / 2.);
125 :
minx_temp(0),
miny_temp(0),
C1(),
C2(),
C3(),
l_t(0),
h_t(0),
not_good(false),
uvinv00(0.),
uvinv01(0.),
128 init(x1, y1, x2, y2, x3, y3);
139 :
minx_temp(0),
miny_temp(0),
C1(),
C2(),
C3(),
l_t(0),
h_t(0),
not_good(false),
uvinv00(0.),
uvinv01(0.),
151 :
minx_temp(0),
miny_temp(0),
C1(),
C2(),
C3(),
l_t(0),
h_t(0),
not_good(false),
uvinv00(0.),
uvinv01(0.),
154 init(x1, y1, x2, y2, x3, y3);
167 init(c1[0], c1[1], c2[0], c2[1], c3[0], c3[1]);
188 init(
static_cast<double>(x1),
static_cast<double>(y1),
static_cast<double>(x2),
static_cast<double>(y2),
static_cast<double>(x3),
static_cast<double>(y3));
206 double minx, miny, maxx, maxy;
208 minx = (x1 < x2) ? x1 : x2;
209 miny = (y1 < y2) ? y1 : y2;
210 minx = (minx < x3) ? minx : x3;
211 miny = (miny < y3) ? miny : y3;
212 maxx = (x1 > x2) ? x1 : x2;
213 maxy = (y1 > y2) ? y1 : y2;
214 maxx = (maxx > x3) ? maxx : x3;
215 maxy = (maxy > y3) ? maxy : y3;
240 std::cout <<
"Triangle vide" << std::endl;
274 double ptempo0 = j -
C1.x;
275 double ptempo1 = i -
C1.y;
295 double ptempo0 = j -
C1.x;
296 double ptempo1 = i -
C1.y;
328 c[0].set_uv(
C1.x,
C1.y);
329 c[1].set_uv(
C2.x,
C2.y);
330 c[2].set_uv(
C3.x,
C3.y);
350vpColVector vpTemplateTrackerTriangle::getCorner1()
const
363vpColVector vpTemplateTrackerTriangle::getCorner2()
const
376vpColVector vpTemplateTrackerTriangle::getCorner3()
const
401 w =
static_cast<int>(
l_t) + 1;
402 h =
static_cast<int>(
h_t) + 1;
Implementation of column vector and the associated operations.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
void set_uv(double u, double v)
Implementation of a matrix and operations on matrices.
vpMatrix inverseByLU() const
double det(vpDetMethod method=LU_DECOMPOSITION) const
vpTemplateTrackerDPoint C3
Corner 2.
bool inTriangle(const vpImagePoint &ip) const
void getSize(double &w, double &h) const
vpTemplateTrackerDPoint C2
Corner 1.
vpTemplateTrackerTriangle()
vpTemplateTrackerTriangle getPyramidDown() const
void init(const vpColVector &c1, const vpColVector &c2, const vpColVector &c3)
vpTemplateTrackerTriangle & operator=(const vpTemplateTrackerTriangle &T)
void getCorners(vpColVector &c1, vpColVector &c2, vpColVector &c3) const
vpTemplateTrackerDPoint C1