![]() |
Visual Servoing Platform
version 3.2.0
|
#include <vpImagePoint.h>
Public Member Functions | |
vpImagePoint () | |
vpImagePoint (double ii, double jj) | |
vpImagePoint (const vpImagePoint &ip) | |
virtual | ~vpImagePoint () |
vpImagePoint & | operator= (const vpImagePoint &ip) |
vpImagePoint & | operator= (const vpImagePoint &&ip) |
vpImagePoint & | operator+= (const vpImagePoint &ip) |
vpImagePoint & | operator-= (const vpImagePoint &ip) |
vpImagePoint & | operator/= (const double scale) |
vpImagePoint & | operator*= (const double scale) |
void | set_i (const double ii) |
void | set_j (const double jj) |
void | set_ij (const double ii, const double jj) |
double | get_i () const |
double | get_j () const |
void | set_u (const double u) |
void | set_v (const double v) |
void | set_uv (const double u, const double v) |
double | get_u () const |
double | get_v () const |
bool | inRectangle (const vpRect &rect) const |
Static Public Member Functions | |
static double | distance (const vpImagePoint &iP1, const vpImagePoint &iP2) |
static vpRect | getBBox (const std::vector< vpImagePoint > &ipVec) |
static double | sqrDistance (const vpImagePoint &iP1, const vpImagePoint &iP2) |
Friends | |
VISP_EXPORT bool | operator== (const vpImagePoint &ip1, const vpImagePoint &ip2) |
VISP_EXPORT bool | operator!= (const vpImagePoint &ip1, const vpImagePoint &ip2) |
VISP_EXPORT vpImagePoint | operator+= (const vpImagePoint &ip1, const vpImagePoint &ip2) |
VISP_EXPORT vpImagePoint | operator+ (const vpImagePoint &ip1, const vpImagePoint &ip2) |
VISP_EXPORT vpImagePoint | operator+ (const vpImagePoint &ip1, const int offset) |
VISP_EXPORT vpImagePoint | operator+ (const vpImagePoint &ip1, const unsigned int offset) |
VISP_EXPORT vpImagePoint | operator+ (const vpImagePoint &ip1, const double offset) |
VISP_EXPORT vpImagePoint | operator- (const vpImagePoint &ip1, const vpImagePoint &ip2) |
VISP_EXPORT vpImagePoint | operator- (const vpImagePoint &ip1, const int offset) |
VISP_EXPORT vpImagePoint | operator- (const vpImagePoint &ip1, const unsigned int offset) |
VISP_EXPORT vpImagePoint | operator- (const vpImagePoint &ip1, const double offset) |
VISP_EXPORT vpImagePoint | operator* (const vpImagePoint &ip1, const double scale) |
VISP_EXPORT vpImagePoint | operator/ (const vpImagePoint &ip1, const double scale) |
VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpImagePoint &ip) |
Class that defines a 2D point in an image. This class is useful for image processing and stores only the 2D coordinates given in sub-pixel.
In this class, the 2D coordinates are not necessary integer values. It is easy to manipulate the given coordinates in the two frames used in ViSP : the (i,j) coordinates and the (u,v) coordinates. The two following images illustrate the two coordinate systems.
Definition at line 87 of file vpImagePoint.h.
|
inline |
Default constructor that initialize the coordinates of the image point to zero.
Definition at line 94 of file vpImagePoint.h.
|
inline |
Default constructor that initialize the coordinates of the image thanks to the parameters and
.
Definition at line 99 of file vpImagePoint.h.
|
inline |
Copy constructor.
Initialize the coordinates of the image point with ip.
ip | : An image point. |
Definition at line 107 of file vpImagePoint.h.
|
inlinevirtual |
Destructor.
Definition at line 109 of file vpImagePoint.h.
|
inlinestatic |
Compute the distance
iP1 | : First point |
iP2 | : Second point |
Definition at line 284 of file vpImagePoint.h.
|
inline |
Gets the point coordinate corresponding to the axes in the frame (i,j).
Definition at line 203 of file vpImagePoint.h.
Referenced by vpImageTools::crop(), vpWireFrameSimulator::navigation(), vpMeTracker::outOfImage(), and vpMeNurbs::seekExtremitiesCanny().
|
inline |
Gets the point coordinate corresponding to the axes in the frame (i,j).
Definition at line 214 of file vpImagePoint.h.
Referenced by vpImageTools::crop(), vpWireFrameSimulator::navigation(), vpMeTracker::outOfImage(), and vpMeNurbs::seekExtremitiesCanny().
|
inline |
Gets the point coordinate corresponding to the axes in the frame (u,v).
Definition at line 262 of file vpImagePoint.h.
|
inline |
Gets the point coordinate corresponding to the axes in the frame (u,v).
Definition at line 273 of file vpImagePoint.h.
|
static |
Computes and returns the bounding box.
ipVec | : Vector of input image points. |
Definition at line 441 of file vpImagePoint.cpp.
bool vpImagePoint::inRectangle | ( | const vpRect & | rect | ) | const |
Check if an image point belongs to a rectangle.
rect | : the rectangle. |
Definition at line 52 of file vpImagePoint.cpp.
|
inline |
Operator *=.
Definition at line 150 of file vpImagePoint.h.
vpImagePoint & vpImagePoint::operator+= | ( | const vpImagePoint & | ip | ) |
Operator +=.
This operator can be used to compute the center of gravity of a set of image points.
Definition at line 86 of file vpImagePoint.cpp.
|
inline |
Operator -=.
Definition at line 139 of file vpImagePoint.h.
vpImagePoint & vpImagePoint::operator/= | ( | const double | scale | ) |
Operator /=.
This operator can be used to compute the center of gravity of a set of image points.
Definition at line 120 of file vpImagePoint.cpp.
|
inline |
Move operator.
Definition at line 124 of file vpImagePoint.h.
|
inline |
Copy operator.
Definition at line 114 of file vpImagePoint.h.
|
inline |
Sets the point coordinate corresponding to the axes in the frame (i,j).
ii | : The desired value for the coordinate along the ![]() |
Definition at line 166 of file vpImagePoint.h.
Referenced by vpMeSite::getQueryList(), and vpMeEllipse::initTracking().
|
inline |
Sets the point coordinates in the frame (i,j).
ii | : The desired value for the coordinate along the ![]() |
jj | : The desired value for the coordinate along the ![]() |
Definition at line 188 of file vpImagePoint.h.
Referenced by vpMbtDistanceKltCylinder::display(), and vpImage< bool >::getMinMaxLoc().
|
inline |
Sets the point coordinate corresponding to the axes in the frame (i,j).
jj | : The desired value for the coordinate along the ![]() |
Definition at line 177 of file vpImagePoint.h.
Referenced by vpMeSite::getQueryList(), and vpMeEllipse::initTracking().
|
inline |
Sets the point coordinate corresponding to the axes in the frame (u,v).
u | : The desired value for the coordinate along the ![]() |
Definition at line 225 of file vpImagePoint.h.
|
inline |
Sets the point coordinates in the frame (u,v).
u | : The desired value for the coordinate along the ![]() |
v | : The desired value for the coordinate along the ![]() |
Definition at line 247 of file vpImagePoint.h.
|
inline |
Sets the point coordinate corresponding to the axes in the frame (u,v).
v | : The desired value for the coordinate along the ![]() |
Definition at line 236 of file vpImagePoint.h.
|
inlinestatic |
Compute the distance
iP1 | : First point |
iP2 | : Second point |
Definition at line 300 of file vpImagePoint.h.
|
friend |
Returns true if ip1 and ip2 are different; otherwire returns true.
Definition at line 154 of file vpImagePoint.cpp.
|
friend |
Returns a vpImagePoint with coordinates multiplied by a scale factor.
Definition at line 369 of file vpImagePoint.cpp.
|
friend |
Returns a vpImagePoint with an offset added to the two coordinates.
Definition at line 259 of file vpImagePoint.cpp.
|
friend |
Returns a vpImagePoint with an offset added to the two coordinates.
Definition at line 209 of file vpImagePoint.cpp.
|
friend |
Returns a vpImagePoint with an offset added to the two coordinates.
Definition at line 234 of file vpImagePoint.cpp.
|
friend |
Returns a vpImagePoint wich is the sum of and
.
Definition at line 174 of file vpImagePoint.cpp.
|
friend |
Returns a vpImagePoint wich is the sum of and
.
Definition at line 185 of file vpImagePoint.cpp.
|
friend |
Returns a vpImagePoint with an offset substracted to the two coordinates.
Definition at line 345 of file vpImagePoint.cpp.
|
friend |
Returns a vpImagePoint with an offset substracted to the two coordinates.
Definition at line 296 of file vpImagePoint.cpp.
|
friend |
Returns a vpImagePoint with an offset substracted to the two coordinates.
Definition at line 320 of file vpImagePoint.cpp.
|
friend |
Returns a vpImagePoint wich is the difference between and
.
Definition at line 272 of file vpImagePoint.cpp.
|
friend |
Returns a vpImagePoint with coordinates divided by a scale factor.
Definition at line 393 of file vpImagePoint.cpp.
|
friend |
Writes the image point coordinates ip to the stream os, and returns a reference to the stream. Writes the first coordinate along the i axis and then the second one along the j axis. The coordinates are separated by a comma.
The following code
produces the output:
Image point with coordinates: 10, 11.1
Definition at line 430 of file vpImagePoint.cpp.
|
friend |
Returns true if ip1 and ip2 are equal; otherwire returns false.
Definition at line 133 of file vpImagePoint.cpp.