ViSP
2.9.0
|
#include <vpTemplateTrackerTriangle.h>
Public Member Functions | |
vpTemplateTrackerTriangle () | |
vpTemplateTrackerTriangle (const vpTemplateTrackerTriangle &T) | |
vpTemplateTrackerTriangle (const vpColVector &c1, const vpColVector &c2, const vpColVector &c3) | |
vpTemplateTrackerTriangle (const vpImagePoint &c1, const vpImagePoint &c2, const vpImagePoint &c3) | |
vpTemplateTrackerTriangle (int x1, int y1, int x2, int y2, int x3, int y3) | |
vpTemplateTrackerTriangle (double x1, double y1, double x2, double y2, double x3, double y3) | |
vpTemplateTrackerTriangle | getPyramidDown () const |
void | getCorners (vpColVector &c1, vpColVector &c2, vpColVector &c3) const |
void | getCorners (vpImagePoint &c1, vpImagePoint &c2, vpImagePoint &c3) const |
void | getCorners (std::vector< vpImagePoint > &c) const |
vpColVector | getCorner (unsigned int i) const |
void | getCorner (unsigned int i, double &x, double &y) const |
double | getMaxx () const |
double | getMaxy () const |
double | getMinx () const |
double | getMiny () const |
void | getSize (double &w, double &h) const |
void | getSize (int &w, int &h) const |
void | init (const vpColVector &c1, const vpColVector &c2, const vpColVector &c3) |
void | init (const vpImagePoint &c1, const vpImagePoint &c2, const vpImagePoint &c3) |
void | init (int x1, int y1, int x2, int y2, int x3, int y3) |
void | init (double x1, double y1, double x2, double y2, double x3, double y3) |
bool | inTriangle (const vpImagePoint &ip) const |
bool | inTriangle (const int &i, const int &j) const |
bool | inTriangle (const double &i, const double &j) const |
vpTemplateTrackerTriangle & | operator= (const vpTemplateTrackerTriangle &T) |
Protected Attributes | |
double | minx_temp |
double | miny_temp |
vpTemplateTrackerDPoint | C1 |
vpTemplateTrackerDPoint | C2 |
vpTemplateTrackerDPoint | C3 |
double | l_t |
double | h_t |
bool | not_good |
double | uvinv00 |
double | uvinv01 |
double | uvinv10 |
double | uvinv11 |
double | marge_triangle |
Definition at line 59 of file vpTemplateTrackerTriangle.h.
vpTemplateTrackerTriangle::vpTemplateTrackerTriangle | ( | ) |
Default constructor.
Definition at line 47 of file vpTemplateTrackerTriangle.cpp.
vpTemplateTrackerTriangle::vpTemplateTrackerTriangle | ( | const vpTemplateTrackerTriangle & | T | ) |
Copy constructor.
Definition at line 56 of file vpTemplateTrackerTriangle.cpp.
vpTemplateTrackerTriangle::vpTemplateTrackerTriangle | ( | const vpColVector & | c1, |
const vpColVector & | c2, | ||
const vpColVector & | c3 | ||
) |
Create a triangle from 3 corners.
c1 | : First corner. |
c2 | : Second corner. |
c3 | : Third corner. |
The coordinates of the points are defined as a 2 dimension vector with coordinates (x,y).
Definition at line 105 of file vpTemplateTrackerTriangle.cpp.
References init().
vpTemplateTrackerTriangle::vpTemplateTrackerTriangle | ( | const vpImagePoint & | c1, |
const vpImagePoint & | c2, | ||
const vpImagePoint & | c3 | ||
) |
Create a triangle from 3 corners defined as image points.
c1 | : First corner. |
c2 | : Second corner. |
c3 | : Third corner. |
Definition at line 141 of file vpTemplateTrackerTriangle.cpp.
References vpImagePoint::get_u(), vpImagePoint::get_v(), and init().
vpTemplateTrackerTriangle::vpTemplateTrackerTriangle | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
int | x3, | ||
int | y3 | ||
) |
Create a triangle from 3 corners with coordinates (x1,y1), (x2,y2), (x3,y3).
Definition at line 128 of file vpTemplateTrackerTriangle.cpp.
References init().
vpTemplateTrackerTriangle::vpTemplateTrackerTriangle | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2, | ||
double | x3, | ||
double | y3 | ||
) |
Create a triangle from 3 corners with coordinates (x1,y1), (x2,y2), (x3,y3).
Definition at line 153 of file vpTemplateTrackerTriangle.cpp.
References init().
|
inline |
Returns the coordinates of a triangle corner.
i | : Allowed values are 0, 1 or 2. |
The coordinates are returned as a 2 dimension vector (x,y).
Definition at line 106 of file vpTemplateTrackerTriangle.h.
Referenced by vpTemplateTrackerZNCCInverseCompositional::computeEvalRMS(), vpTemplateTrackerSSDInverseCompositional::computeEvalRMS(), vpTemplateTrackerWarp::getDistanceBetweenZoneAndWarpedZone(), vpTemplateTrackerZNCCInverseCompositional::initPosEvalRMS(), and vpTemplateTrackerSSDInverseCompositional::initPosEvalRMS().
|
inline |
Returns the coordinates of a triangle corner.
i | : Allowed values are 0, 1 or 2.
|
x,y | : The coordinates of the corner. |
Definition at line 120 of file vpTemplateTrackerTriangle.h.
References vpTemplateTrackerDPoint::x, and vpTemplateTrackerDPoint::y.
void vpTemplateTrackerTriangle::getCorners | ( | vpColVector & | c1, |
vpColVector & | c2, | ||
vpColVector & | c3 | ||
) | const |
Returns the coordinates of the triangle corners as a 2 dimension vector (x,y).
c1 | : First corner. |
c2 | : Second corner. |
c3 | : Third corner. |
Definition at line 338 of file vpTemplateTrackerTriangle.cpp.
Referenced by vpTemplateTrackerWarp::warpTriangle().
void vpTemplateTrackerTriangle::getCorners | ( | vpImagePoint & | c1, |
vpImagePoint & | c2, | ||
vpImagePoint & | c3 | ||
) | const |
Returns the coordinates of the triangle corners as an image point.
c1 | : First corner. |
c2 | : Second corner. |
c3 | : Third corner. |
Definition at line 313 of file vpTemplateTrackerTriangle.cpp.
References C1, C2, C3, vpImagePoint::set_uv(), vpTemplateTrackerDPoint::x, and vpTemplateTrackerDPoint::y.
void vpTemplateTrackerTriangle::getCorners | ( | std::vector< vpImagePoint > & | c | ) | const |
Returns the coordinates of the triangle corners as a 3 dimension vector of image points.
c | : 3 dimension vector of image points that correspond to the triangle corners. |
Definition at line 324 of file vpTemplateTrackerTriangle.cpp.
References C1, C2, C3, vpTemplateTrackerDPoint::x, and vpTemplateTrackerDPoint::y.
double vpTemplateTrackerTriangle::getMaxx | ( | ) | const |
Definition at line 422 of file vpTemplateTrackerTriangle.cpp.
References l_t, and minx_temp.
Referenced by vpTemplateTrackerZone::add(), vpTemplateTrackerZone::copy(), and vpTemplateTrackerZone::initFromPoints().
double vpTemplateTrackerTriangle::getMaxy | ( | ) | const |
Definition at line 430 of file vpTemplateTrackerTriangle.cpp.
References h_t, and miny_temp.
Referenced by vpTemplateTrackerZone::add(), vpTemplateTrackerZone::copy(), and vpTemplateTrackerZone::initFromPoints().
double vpTemplateTrackerTriangle::getMinx | ( | ) | const |
Definition at line 406 of file vpTemplateTrackerTriangle.cpp.
References minx_temp.
Referenced by vpTemplateTrackerZone::add(), vpTemplateTrackerZone::copy(), and vpTemplateTrackerZone::initFromPoints().
double vpTemplateTrackerTriangle::getMiny | ( | ) | const |
Definition at line 414 of file vpTemplateTrackerTriangle.cpp.
References miny_temp.
Referenced by vpTemplateTrackerZone::add(), vpTemplateTrackerZone::copy(), and vpTemplateTrackerZone::initFromPoints().
vpTemplateTrackerTriangle vpTemplateTrackerTriangle::getPyramidDown | ( | ) | const |
Return a triangle with coordinates that are down scaled by a factor 2.
Definition at line 116 of file vpTemplateTrackerTriangle.cpp.
References C1, C2, C3, init(), vpTemplateTrackerDPoint::x, and vpTemplateTrackerDPoint::y.
Referenced by vpTemplateTrackerZone::getPyramidDown().
void vpTemplateTrackerTriangle::getSize | ( | double & | w, |
double & | h | ||
) | const |
Get the size of the triangle bounding box.
w | : Bounding box width. |
h | : Bounding box height. |
Definition at line 386 of file vpTemplateTrackerTriangle.cpp.
void vpTemplateTrackerTriangle::getSize | ( | int & | w, |
int & | h | ||
) | const |
Get the size of the triangle bounding box.
w | : Bounding box width. |
h | : Bounding box height. |
Definition at line 396 of file vpTemplateTrackerTriangle.cpp.
void vpTemplateTrackerTriangle::init | ( | const vpColVector & | c1, |
const vpColVector & | c2, | ||
const vpColVector & | c3 | ||
) |
Initializes a triangle from 3 corners.
c1 | : First corner. |
c2 | : Second corner. |
c3 | : Third corner. |
The coordinates of the points are defined as a 2 dimension vector with coordinates (x,y).
Definition at line 167 of file vpTemplateTrackerTriangle.cpp.
Referenced by getPyramidDown(), init(), vpTemplateTrackerTriangle(), and vpTemplateTrackerWarp::warpTriangle().
void vpTemplateTrackerTriangle::init | ( | const vpImagePoint & | c1, |
const vpImagePoint & | c2, | ||
const vpImagePoint & | c3 | ||
) |
Initializes a triangle from 3 corners defined as image points.
c1 | : First corner. |
c2 | : Second corner. |
c3 | : Third corner. |
Definition at line 177 of file vpTemplateTrackerTriangle.cpp.
References vpImagePoint::get_u(), vpImagePoint::get_v(), and init().
void vpTemplateTrackerTriangle::init | ( | int | x1, |
int | y1, | ||
int | x2, | ||
int | y2, | ||
int | x3, | ||
int | y3 | ||
) |
Initializes a triangle from 3 corners with coordinates (x1,y1), (x2,y2), (x3,y3).
Definition at line 187 of file vpTemplateTrackerTriangle.cpp.
References init().
void vpTemplateTrackerTriangle::init | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2, | ||
double | x3, | ||
double | y3 | ||
) |
Initializes a triangle from 3 corners with coordinates (x1,y1), (x2,y2), (x3,y3).
Definition at line 197 of file vpTemplateTrackerTriangle.cpp.
References C1, C2, C3, h_t, vpMatrix::inverseByLU(), l_t, marge_triangle, minx_temp, miny_temp, not_good, vpColVector::resize(), uvinv00, uvinv01, uvinv10, uvinv11, vpTemplateTrackerDPoint::x, and vpTemplateTrackerDPoint::y.
bool vpTemplateTrackerTriangle::inTriangle | ( | const vpImagePoint & | ip | ) | const |
Indicates if an image point is in the triangle.
ip | : Image point to consider. |
Definition at line 303 of file vpTemplateTrackerTriangle.cpp.
References vpImagePoint::get_i(), and vpImagePoint::get_j().
Referenced by vpTemplateTrackerZone::fillTriangle().
bool vpTemplateTrackerTriangle::inTriangle | ( | const int & | i, |
const int & | j | ||
) | const |
Indicates if a point with coordinates (i,j) is in the triangle.
i | : Coordinate along the rows. |
j | : Coordinate along the columns. |
Definition at line 260 of file vpTemplateTrackerTriangle.cpp.
References C1, marge_triangle, not_good, uvinv00, uvinv01, uvinv10, uvinv11, vpTemplateTrackerDPoint::x, and vpTemplateTrackerDPoint::y.
bool vpTemplateTrackerTriangle::inTriangle | ( | const double & | i, |
const double & | j | ||
) | const |
Indicates if a point with coordinates (i,j) is in the triangle.
i | : Coordinate along the rows. |
j | : Coordinate along the columns. |
Definition at line 283 of file vpTemplateTrackerTriangle.cpp.
References C1, marge_triangle, not_good, uvinv00, uvinv01, uvinv10, uvinv11, vpTemplateTrackerDPoint::x, and vpTemplateTrackerDPoint::y.
vpTemplateTrackerTriangle & vpTemplateTrackerTriangle::operator= | ( | const vpTemplateTrackerTriangle & | T | ) |
Copy operator.
Definition at line 66 of file vpTemplateTrackerTriangle.cpp.
References C1, C2, C3, h_t, l_t, marge_triangle, minx_temp, miny_temp, not_good, uvinv00, uvinv01, uvinv10, uvinv11, vpTemplateTrackerDPoint::x, and vpTemplateTrackerDPoint::y.
|
protected |
Definition at line 64 of file vpTemplateTrackerTriangle.h.
Referenced by getCorners(), getPyramidDown(), init(), inTriangle(), and operator=().
|
protected |
Corner 1.
Definition at line 65 of file vpTemplateTrackerTriangle.h.
Referenced by getCorners(), getPyramidDown(), init(), and operator=().
|
protected |
Corner 2.
Definition at line 66 of file vpTemplateTrackerTriangle.h.
Referenced by getCorners(), getPyramidDown(), init(), and operator=().
|
protected |
Definition at line 69 of file vpTemplateTrackerTriangle.h.
Referenced by getMaxy(), getSize(), init(), and operator=().
|
protected |
Corner 3.
Definition at line 68 of file vpTemplateTrackerTriangle.h.
Referenced by getMaxx(), getSize(), init(), and operator=().
|
protected |
Definition at line 76 of file vpTemplateTrackerTriangle.h.
Referenced by init(), inTriangle(), and operator=().
|
protected |
Definition at line 62 of file vpTemplateTrackerTriangle.h.
Referenced by getMaxx(), getMinx(), init(), and operator=().
|
protected |
Definition at line 63 of file vpTemplateTrackerTriangle.h.
Referenced by getMaxy(), getMiny(), init(), and operator=().
|
protected |
Definition at line 71 of file vpTemplateTrackerTriangle.h.
Referenced by init(), inTriangle(), and operator=().
|
protected |
Definition at line 72 of file vpTemplateTrackerTriangle.h.
Referenced by init(), inTriangle(), and operator=().
|
protected |
Definition at line 73 of file vpTemplateTrackerTriangle.h.
Referenced by init(), inTriangle(), and operator=().
|
protected |
Definition at line 74 of file vpTemplateTrackerTriangle.h.
Referenced by init(), inTriangle(), and operator=().
|
protected |
Definition at line 75 of file vpTemplateTrackerTriangle.h.
Referenced by init(), inTriangle(), and operator=().