39 #include <visp3/core/vpPoint.h>
40 #include <visp3/core/vpDebug.h>
41 #include <visp3/core/vpFeatureDisplay.h>
137 else if (P.
size() == 4) {
146 "Cannot initialize vpPoint from vector with size %d", P.
size()));
168 else if (P.size() == 4) {
177 "Cannot initialize vpPoint from vector with size %d", P.size()));
208 for(
unsigned int i = 0; i <
oP.
size(); i++)
233 _p[0] = _cP[0]/_cP[2] ;
234 _p[1] = _cP[1]/_cP[2] ;
252 _cP[0] = cMo[0][0]*
oP[0]+ cMo[0][1]*
oP[1]+ cMo[0][2]*
oP[2]+ cMo[0][3]*
oP[3] ;
253 _cP[1] = cMo[1][0]*oP[0]+ cMo[1][1]*oP[1]+ cMo[1][2]*oP[2]+ cMo[1][3]*oP[3] ;
254 _cP[2] = cMo[2][0]*oP[0]+ cMo[2][1]*oP[1]+ cMo[2][2]*oP[2]+ cMo[2][3]*oP[3] ;
255 _cP[3] = cMo[3][0]*oP[0]+ cMo[3][1]*oP[1]+ cMo[3][2]*oP[2]+ cMo[3][3]*oP[3] ;
257 double d = 1/_cP[3] ;
273 double X = cMo[0][0]*
oP[0]+ cMo[0][1]*
oP[1]+ cMo[0][2]*
oP[2]+ cMo[0][3]*
oP[3] ;
274 double Y = cMo[1][0]*oP[0]+ cMo[1][1]*oP[1]+ cMo[1][2]*oP[2]+ cMo[1][3]*oP[3] ;
275 double Z = cMo[2][0]*oP[0]+ cMo[2][1]*oP[1]+ cMo[2][2]*oP[2]+ cMo[2][3]*oP[3] ;
276 double W = cMo[3][0]*oP[0]+ cMo[3][1]*oP[1]+ cMo[3][2]*oP[2]+ cMo[3][3]*oP[3] ;
308 v1[0] = aMb[0][0]*v[0] + aMb[0][1]*v[1]+ aMb[0][2]*v[2]+ aMb[0][3]*v[3] ;
309 v1[1] = aMb[1][0]*v[0] + aMb[1][1]*v[1]+ aMb[1][2]*v[2]+ aMb[1][3]*v[3] ;
310 v1[2] = aMb[2][0]*v[0] + aMb[2][1]*v[1]+ aMb[2][2]*v[2]+ aMb[2][3]*v[3] ;
311 v1[3] = aMb[3][0]*v[0] + aMb[3][1]*v[1]+ aMb[3][2]*v[2]+ aMb[3][3]*v[3] ;
348 v1[0] = aHb[0][0]*v[0] + aHb[0][1]*v[1]+ aHb[0][2]*v[2] ;
349 v1[1] = aHb[1][0]*v[0] + aHb[1][1]*v[1]+ aHb[1][2]*v[2] ;
350 v1[2] = aHb[2][0]*v[0] + aHb[2][1]*v[1]+ aHb[2][2]*v[2] ;
375 const unsigned int thickness)
396 const unsigned int thickness)
410 return( os<<
"vpPoint" );
431 const unsigned int thickness)
vpPoint()
Basic constructor.
void set_oZ(const double oZ)
Set the point Z coordinate in the object frame.
void init()
Basic construction.
vpColVector getWorldCoordinates(void)
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpColVector operator*(const double &x, const vpColVector &v)
Class to define colors available for display functionnalities.
void display(const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpColor &color=vpColor::green, const unsigned int thickness=1)
double get_oY() const
Get the point Y coordinate in the object frame.
error that can be emited by ViSP classes.
void set_x(const double x)
Set the point x coordinate in the image plane.
unsigned int size() const
Return the number of elements of the 2D array.
double get_y() const
Get the point y coordinate in the image plane.
double get_w() const
Get the point w coordinate in the image plane.
void set_X(const double X)
Set the point X coordinate in the camera frame.
double get_W() const
Get the point W coordinate in the camera frame.
static void displayPoint(double x, double y, const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1)
Class that defines what is a point.
void set_oW(const double oW)
Set the point W coordinate in the object frame.
Implementation of an homography and operations on homographies.
void set_Z(const double Z)
Set the point Z coordinate in the camera frame.
vpPoint & operator=(const vpPoint &vpp)
void set_W(const double W)
Set the point W coordinate in the camera frame.
Generic class defining intrinsic camera parameters.
double get_oZ() const
Get the point Z coordinate in the object frame.
void set_y(const double y)
Set the point y coordinate in the image plane.
void set_oX(const double oX)
Set the point X coordinate in the object frame.
void set_Y(const double Y)
Set the point Y coordinate in the camera frame.
void set_w(const double w)
Set the point w coordinate in the image plane.
double get_x() const
Get the point x coordinate in the image plane.
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
vpPoint * duplicate() const
For memory issue (used by the vpServo class only).
double get_Y() const
Get the point Y coordinate in the camera frame.
double get_Z() const
Get the point Z coordinate in the camera frame.
double get_oX() const
Get the point X coordinate in the object frame.
void setWorldCoordinates(const double oX, const double oY, const double oZ)
Implementation of column vector and the associated operations.
void set_oY(const double oY)
Set the point Y coordinate in the object frame.
void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &_cP)
double get_X() const
Get the point X coordinate in the camera frame.
double get_oW() const
Get the point W coordinate in the object frame.
void resize(const unsigned int i, const bool flagNullify=true)