36 #include <visp3/core/vpDebug.h>
37 #include <visp3/core/vpFeatureDisplay.h>
38 #include <visp3/core/vpPoint.h>
130 if (oP_.
size() == 3) {
136 else if (oP_.
size() == 4) {
160 if (oP_.size() == 3) {
166 else if (oP_.size() == 4) {
203 unsigned int oP_size =
oP.
size();
204 for (
unsigned int i = 0; i < oP_size; ++i) {
229 v_p[0] = v_cP[0] / v_cP[2];
230 v_p[1] = v_cP[1] / v_cP[2];
246 v_cP[0] = (cMo[0][0] *
oP[0]) + (cMo[0][1] *
oP[1]) + (cMo[0][2] *
oP[2]) + (cMo[0][3] *
oP[3]);
247 v_cP[1] = (cMo[1][0] *
oP[0]) + (cMo[1][1] *
oP[1]) + (cMo[1][2] *
oP[2]) + (cMo[1][3] *
oP[3]);
248 v_cP[2] = (cMo[2][0] *
oP[0]) + (cMo[2][1] *
oP[1]) + (cMo[2][2] *
oP[2]) + (cMo[2][3] *
oP[3]);
249 v_cP[3] = (cMo[3][0] *
oP[0]) + (cMo[3][1] *
oP[1]) + (cMo[3][2] *
oP[2]) + (cMo[3][3] *
oP[3]);
251 double d = 1 / v_cP[3];
268 double X = (cMo[0][0] *
oP[0]) + (cMo[0][1] *
oP[1]) + (cMo[0][2] *
oP[2]) + (cMo[0][3] *
oP[3]);
269 double Y = (cMo[1][0] *
oP[0]) + (cMo[1][1] *
oP[1]) + (cMo[1][2] *
oP[2]) + (cMo[1][3] *
oP[3]);
270 double Z = (cMo[2][0] *
oP[0]) + (cMo[2][1] *
oP[1]) + (cMo[2][2] *
oP[2]) + (cMo[2][3] *
oP[3]);
271 double W = (cMo[3][0] *
oP[0]) + (cMo[3][1] *
oP[1]) + (cMo[3][2] *
oP[2]) + (cMo[3][3] *
oP[3]);
303 v1[0] = aMb[0][0]*v[0] + aMb[0][1]*v[1]+ aMb[0][2]*v[2]+ aMb[0][3]*v[3];
304 v1[1] = aMb[1][0]*v[0] + aMb[1][1]*v[1]+ aMb[1][2]*v[2]+ aMb[1][3]*v[3];
305 v1[2] = aMb[2][0]*v[0] + aMb[2][1]*v[1]+ aMb[2][2]*v[2]+ aMb[2][3]*v[3];
306 v1[3] = aMb[3][0]*v[0] + aMb[3][1]*v[1]+ aMb[3][2]*v[2]+ aMb[3][3]*v[3];
343 v1[0] = aHb[0][0]*v[0] + aHb[0][1]*v[1]+ aHb[0][2]*v[2];
344 v1[1] = aHb[1][0]*v[0] + aHb[1][1]*v[1]+ aHb[1][2]*v[2];
345 v1[2] = aHb[2][0]*v[0] + aHb[2][1]*v[1]+ aHb[2][2]*v[2];
374 const vpColor &color,
unsigned int thickness)
400 const vpColor &color,
unsigned int thickness)
413 VISP_EXPORT std::ostream &
operator<<(std::ostream &os,
const vpPoint & ) {
return (os <<
"vpPoint"); }
424 unsigned int thickness)
438 unsigned int thickness)
479 double d = 1 /
cP[2];
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
unsigned int size() const
Return the number of elements of the 2D array.
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
vpColVector operator*(const double &x, const vpColVector &v)
void resize(unsigned int i, bool flagNullify=true)
Class to define RGB colors available for display functionalities.
error that can be emitted by ViSP classes.
@ dimensionError
Bad dimension.
static void displayPoint(double x, double y, const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1)
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of an homography and operations on homographies.
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
double get_oW() const
Get the point oW coordinate in the object frame.
double get_oX() const
Get the point oX coordinate in the object frame.
double get_w() const
Get the point w coordinate in the image plane.
void set_x(double x)
Set the point x coordinate in the image plane.
void set_W(double cW)
Set the point cW coordinate in the camera frame.
vpPoint * duplicate() const vp_override
For memory issue (used by the vpServo class only).
void set_oW(double oW)
Set the point oW coordinate in the object frame.
double get_y() const
Get the point y coordinate in the image plane.
double get_Y() const
Get the point cY coordinate in the camera frame.
double get_oZ() const
Get the point oZ coordinate in the object frame.
void set_oY(double oY)
Set the point oY coordinate in the object frame.
void set_X(double cX)
Set the point cX coordinate in the camera frame.
double get_x() const
Get the point x coordinate in the image plane.
double get_W() const
Get the point cW coordinate in the camera frame.
void set_Y(double cY)
Set the point cY coordinate in the camera frame.
double get_Z() const
Get the point cZ coordinate in the camera frame.
void projection() vp_override
void set_oZ(double oZ)
Set the point oZ coordinate in the object frame.
vpColVector getWorldCoordinates(void)
void set_Z(double cZ)
Set the point cZ coordinate in the camera frame.
void set_oX(double oX)
Set the point oX coordinate in the object frame.
double get_oY() const
Get the point oY coordinate in the object frame.
double get_X() const
Get the point cX coordinate in the camera frame.
void init() vp_override
Basic construction.
void display(const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpColor &color=vpColor::green, unsigned int thickness=1) vp_override
void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &cP) const vp_override
vpPoint()
Basic constructor.
void setWorldCoordinates(double oX, double oY, double oZ)
void set_y(double y)
Set the point y coordinate in the image plane.
void set_w(double w)
Set the point w coordinate in the image plane.