Visual Servoing Platform
version 3.3.0 under development (2020-02-17)
|
#include <visp3/tt/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) | |
double | getArea () const |
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 |
double | area |
Definition at line 61 of file vpTemplateTrackerTriangle.h.
vpTemplateTrackerTriangle::vpTemplateTrackerTriangle | ( | ) |
Default constructor.
Definition at line 45 of file vpTemplateTrackerTriangle.cpp.
vpTemplateTrackerTriangle::vpTemplateTrackerTriangle | ( | const vpTemplateTrackerTriangle & | T | ) |
Copy constructor.
Definition at line 54 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 140 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 127 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 |
Return the area of the triangle.
Definition at line 99 of file vpTemplateTrackerTriangle.h.
Referenced by vpTemplateTrackerZone::getArea().
|
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 116 of file vpTemplateTrackerTriangle.h.
Referenced by vpTemplateTracker::computeEvalRMS(), vpTemplateTrackerWarp::getDistanceBetweenZoneAndWarpedZone(), and vpTemplateTracker::initPosEvalRMS().
|
inline |
Returns the coordinates of a triangle corner.
i | : Allowed values are 0, 1 or 2.
|
x | : The coordinate of the corner along horizontal axis. |
y | : The coordinate of the corner along vertical axis. |
Definition at line 135 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 340 of file vpTemplateTrackerTriangle.cpp.
References C1, C2, C3, vpTemplateTrackerDPoint::x, and vpTemplateTrackerDPoint::y.
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 315 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 327 of file vpTemplateTrackerTriangle.cpp.
References C1, C2, C3, vpTemplateTrackerDPoint::x, and vpTemplateTrackerDPoint::y.
double vpTemplateTrackerTriangle::getMaxx | ( | ) | const |
Definition at line 421 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 426 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 411 of file vpTemplateTrackerTriangle.cpp.
References minx_temp.
Referenced by vpTemplateTrackerZone::add(), vpTemplateTrackerZone::copy(), and vpTemplateTrackerZone::initFromPoints().
double vpTemplateTrackerTriangle::getMiny | ( | ) | const |
Definition at line 416 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 115 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 391 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 401 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 168 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 178 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 189 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 200 of file vpTemplateTrackerTriangle.cpp.
References area, C1, C2, C3, vpMatrix::det(), 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 308 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 265 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 288 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 64 of file vpTemplateTrackerTriangle.cpp.
References area, 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 79 of file vpTemplateTrackerTriangle.h.
Referenced by init(), and operator=().
|
protected |
Definition at line 66 of file vpTemplateTrackerTriangle.h.
Referenced by getCorners(), getPyramidDown(), init(), inTriangle(), and operator=().
|
protected |
Corner 1.
Definition at line 67 of file vpTemplateTrackerTriangle.h.
Referenced by getCorners(), getPyramidDown(), init(), and operator=().
|
protected |
Corner 2.
Definition at line 68 of file vpTemplateTrackerTriangle.h.
Referenced by getCorners(), getPyramidDown(), init(), and operator=().
|
protected |
Definition at line 71 of file vpTemplateTrackerTriangle.h.
Referenced by getMaxy(), getSize(), init(), and operator=().
|
protected |
Corner 3.
Definition at line 70 of file vpTemplateTrackerTriangle.h.
Referenced by getMaxx(), getSize(), init(), and operator=().
|
protected |
Definition at line 78 of file vpTemplateTrackerTriangle.h.
Referenced by init(), inTriangle(), and operator=().
|
protected |
Definition at line 64 of file vpTemplateTrackerTriangle.h.
Referenced by getMaxx(), getMinx(), init(), and operator=().
|
protected |
Definition at line 65 of file vpTemplateTrackerTriangle.h.
Referenced by getMaxy(), getMiny(), init(), 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=().
|
protected |
Definition at line 76 of file vpTemplateTrackerTriangle.h.
Referenced by init(), inTriangle(), and operator=().
|
protected |
Definition at line 77 of file vpTemplateTrackerTriangle.h.
Referenced by init(), inTriangle(), and operator=().