Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpPoint Class Reference

#include <vpPoint.h>

Inheritance diagram for vpPoint:

Public Types

enum  vpForwardProjectionDeallocatorType { user , vpDisplayForwardProjection }

Public Member Functions

 vpPoint ()
 vpPoint (double oX, double oY, double oZ)
VP_EXPLICIT vpPoint (const vpColVector &oP)
VP_EXPLICIT vpPoint (const std::vector< double > &oP)
void changeFrame (const vpHomogeneousMatrix &cMo, vpColVector &cP) const VP_OVERRIDE
void changeFrame (const vpHomogeneousMatrix &cMo) VP_OVERRIDE
void display (const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpColor &color=vpColor::green, unsigned int thickness=1) VP_OVERRIDE
void display (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &color=vpColor::green, unsigned int thickness=1) VP_OVERRIDE
void display (const vpImage< vpRGBa > &I, const vpCameraParameters &cam, const vpColor &color=vpColor::green, unsigned int thickness=1)
void display (const vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &color=vpColor::green, unsigned int thickness=1)
vpPointduplicate () const VP_OVERRIDE
double get_X () const
double get_Y () const
double get_Z () const
double get_W () const
double get_oX () const
double get_oY () const
double get_oZ () const
double get_oW () const
double get_x () const
double get_y () const
double get_w () const
void getWorldCoordinates (double &oX, double &oY, double &oZ)
void getWorldCoordinates (vpColVector &oP)
vpColVector getWorldCoordinates (void)
void getWorldCoordinates (std::vector< double > &oP)
void projection (const vpColVector &_cP, vpColVector &_p) const VP_OVERRIDE
void projection () VP_OVERRIDE
void set_X (double cX)
void set_Y (double cY)
void set_Z (double cZ)
void set_W (double cW)
void set_oX (double oX)
void set_oY (double oY)
void set_oZ (double oZ)
void set_oW (double oW)
void set_x (double x)
void set_y (double y)
void set_w (double w)
void setWorldCoordinates (double oX, double oY, double oZ)
void setWorldCoordinates (const vpColVector &oP) VP_OVERRIDE
void setWorldCoordinates (const std::vector< double > &oP)
Public Member Functions Inherited from vpForwardProjection
vpColVector get_oP () const
vpForwardProjectionDeallocatorType getDeallocate ()
virtual void print () const
void project ()
void project (const vpHomogeneousMatrix &cMo)
void setDeallocate (vpForwardProjectionDeallocatorType d)
void track (const vpHomogeneousMatrix &cMo)
Public Member Functions Inherited from vpTracker
vpColVector get_p () const
vpColVector get_cP () const

Public Attributes

Public Attributes Inherited from vpForwardProjection
vpColVector oP
Public Attributes Inherited from vpTracker
vpColVector p
vpColVector cP
bool cPAvailable

Protected Member Functions

void init () VP_OVERRIDE

Friends

VISP_EXPORT std::ostream & operator<< (std::ostream &os, const vpPoint &vpp)

Detailed Description

Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the camera frame and in the 2D image plane by perspective projection. All the parameters must be set in meter.

A 3D point has the followings parameters:

Examples
AROgre.cpp, AROgreBasic.cpp, catchAprilTag.cpp, catchGenericTrackerCAOParsing.cpp, catchPoseRansac2.cpp, homographyHLM2DObject.cpp, homographyHLM3DObject.cpp, homographyHartleyDLT2DObject.cpp, manGeometricFeatures.cpp, manServo4PointsDisplay.cpp, manServoMomentsSimple.cpp, manSimu4Dots.cpp, manSimu4Points.cpp, mbot-apriltag-ibvs.cpp, poseVirtualVS.cpp, servoAfma62DhalfCamVelocity.cpp, servoAfma6FourPoints2DCamVelocityLs_des.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoBebop2.cpp, servoPioneerPanSegment3D.cpp, servoPixhawkDroneIBVS.cpp, servoSimu4Points.cpp, servoSimuAfma6FourPoints2DCamVelocity.cpp, servoSimuFourPoints2DCamVelocity.cpp, servoSimuFourPoints2DCamVelocityDisplay.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, servoSimuPoint2DCamVelocity1.cpp, servoSimuPoint2DCamVelocity2.cpp, servoSimuPoint2DCamVelocity3.cpp, servoSimuPoint2DhalfCamVelocity1.cpp, servoSimuPoint2DhalfCamVelocity2.cpp, servoSimuPoint2DhalfCamVelocity3.cpp, servoSimuPoint3DCamVelocity.cpp, servoSimuViper850FourPoints2DCamVelocity.cpp, servoViper850FourPoints2DArtVelocityLs_cur.cpp, servoViper850FourPoints2DCamVelocityLs_cur.cpp, servoViper850FourPointsKinect.cpp, simulateFourPoints2DCartesianCamVelocity.cpp, simulateFourPoints2DPolarCamVelocity.cpp, testConvert.cpp, testFeatureMoment.cpp, testFeatureSegment.cpp, testFindMatch.cpp, testKeyPoint-4.cpp, testPoint.cpp, testPoseFeatures.cpp, testPoseRansac.cpp, testRobotAfma6Pose.cpp, testRobotViper850Pose.cpp, tutorial-count-coins.cpp, tutorial-homography-from-points.cpp, tutorial-ibvs-4pts-display.cpp, tutorial-ibvs-4pts-image-tracking.cpp, tutorial-ibvs-4pts-ogre-tracking.cpp, tutorial-ibvs-4pts-ogre.cpp, tutorial-ibvs-4pts-plotter-continuous-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, tutorial-ibvs-4pts-wireframe-robot-viper.cpp, tutorial-ibvs-4pts.cpp, tutorial-pf.cpp, tutorial-pose-from-points-image.cpp, tutorial-pose-from-points-live.cpp, tutorial-pose-from-points-realsense-T265.cpp, tutorial-pose-from-qrcode-image.cpp, tutorial-simu-pioneer-continuous-gain-adaptive.cpp, tutorial-simu-pioneer-continuous-gain-constant.cpp, tutorial-simu-pioneer-pan.cpp, tutorial-simu-pioneer.cpp, tutorial-ukf.cpp, visp-calibrate-camera.cpp, and visp-compute-chessboard-poses.cpp.

Definition at line 78 of file vpPoint.h.

Member Enumeration Documentation

◆ vpForwardProjectionDeallocatorType

Used for memory issue especially in the vpServo class.

Enumerator
user 
vpDisplayForwardProjection 

Definition at line 70 of file vpForwardProjection.h.

Constructor & Destructor Documentation

◆ vpPoint() [1/4]

vpPoint::vpPoint ( )

Basic constructor.

Definition at line 63 of file vpPoint.cpp.

References init().

Referenced by duplicate(), and operator<<.

◆ vpPoint() [2/4]

vpPoint::vpPoint ( double oX,
double oY,
double oZ )

Construction from a 3D point with coordinates in object frame.

Parameters
oX: Coordinates along X-axis of a 3D point in object frame.
oY: Coordinates along Y-axis of a 3D point in object frame.
oZ: Coordinates along Z-axis of a 3D point in object frame.

Definition at line 71 of file vpPoint.cpp.

References init(), and setWorldCoordinates().

◆ vpPoint() [3/4]

vpPoint::vpPoint ( const vpColVector & oP_)

Construction from a 3D point with coordinates in object frame.

Parameters
oP_: Vector containing the coordinates of the 3D point in the object frame. This vector could be of dimension 3 or 4.
  • If dimension is 3, oP corresponds to the normalized coordinates oP = (oX, oY, oZ, 1) where oP[0]=oX, oP[1]=oY, oP[2]=oZ.
  • If dimension is 4, oP corresponds to the normalized coordinates oP = (oX, oY, oZ, oW) where oP[0]=oX, oP[1]=oY, oP[2]=oZ and oP[3]=oW.

Definition at line 87 of file vpPoint.cpp.

References init(), and setWorldCoordinates().

◆ vpPoint() [4/4]

vpPoint::vpPoint ( const std::vector< double > & oP_)

Construction from a 3D point with coordinates in object frame.

Parameters
oP_: Vector containing the coordinates of the 3D point in the object frame. This vector could be of dimension 3 or 4.
  • If dimension is 3, oP corresponds to the normalized coordinates oP = (oX, oY, oZ, 1) where oP[0]=oX, oP[1]=oY, oP[2]=oZ.
  • If dimension is 4, oP corresponds to the normalized coordinates oP = (oX, oY, oZ, oW) where oP[0]=oX, oP[1]=oY, oP[2]=oZ and oP[3]=oW.

Definition at line 103 of file vpPoint.cpp.

References init(), and setWorldCoordinates().

Member Function Documentation

◆ changeFrame() [1/2]

void vpPoint::changeFrame ( const vpHomogeneousMatrix & cMo)
virtual

From the 3D coordinates of the point in the object frame oP that are set using for example setWorldCoordinates() or set_oX(), set_oY(), set_oZ(), compute the 3D coordinates of the point in the camera frame cP = cMo * oP.

Parameters
cMo: Transformation from camera to object frame.

Implements vpForwardProjection.

Definition at line 302 of file vpPoint.cpp.

References vpTracker::cP, and vpForwardProjection::oP.

◆ changeFrame() [2/2]

void vpPoint::changeFrame ( const vpHomogeneousMatrix & cMo,
vpColVector & v_cP ) const
virtual

From the 3D coordinates of the point in the object frame oP that are set using for example setWorldCoordinates() or set_oX(), set_oY(), set_oZ(), compute the 3D coordinates of the point in the camera frame cP = cMo * oP.

Parameters
cMo: Transformation from camera to object frame.
v_cP: 3D normalized coordinates of the point in the camera frame cP = (cX, cY, cZ, 1).

Implements vpForwardProjection.

Examples
servoAfma6FourPoints2DCamVelocityLs_des.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoPioneerPanSegment3D.cpp, servoViper850FourPoints2DArtVelocityLs_cur.cpp, servoViper850FourPoints2DCamVelocityLs_cur.cpp, servoViper850FourPointsKinect.cpp, and simulateFourPoints2DPolarCamVelocity.cpp.

Definition at line 273 of file vpPoint.cpp.

References vpForwardProjection::oP, and vpColVector::resize().

Referenced by vpMbtDistanceKltCylinder::computeInteractionMatrixAndResidu(), display(), display(), vpMbtFaceDepthNormal::displayFeature(), vpMbtFaceDepthNormal::displayFeature(), vpMbtFaceDepthNormal::getFeaturesForDisplay(), and vpMbtFaceDepthNormal::planeIsInvalid().

◆ display() [1/4]

void vpPoint::display ( const vpImage< unsigned char > & I,
const vpCameraParameters & cam,
const vpColor & color = vpColor::green,
unsigned int thickness = 1 )
virtual

Display the projection of a 3D point in image I.

Parameters
I: Image used as background.
cam: Camera parameters.
color: Color used to draw the point.
thickness: Thickness used to draw the point.

Implements vpForwardProjection.

Examples
manGeometricFeatures.cpp, servoAfma62DhalfCamVelocity.cpp, and servoAfma6Points2DCamVelocityEyeToHand.cpp.

Definition at line 387 of file vpPoint.cpp.

References vpFeatureDisplay::displayPoint(), and vpTracker::p.

◆ display() [2/4]

void vpPoint::display ( const vpImage< unsigned char > & I,
const vpHomogeneousMatrix & cMo,
const vpCameraParameters & cam,
const vpColor & color = vpColor::green,
unsigned int thickness = 1 )
virtual

Display the projection of a 3D point in image I. This method is non destructive wrt. cP and p internal 3D point parameters.

Parameters
I: Image used as background.
cMo: Homogeneous transformation from camera frame to object frame. The point is considered as viewed from this camera position.
cam: Camera parameters.
color: Color used to draw the sphere.
thickness: Thickness used to draw the sphere.

Implements vpForwardProjection.

Definition at line 338 of file vpPoint.cpp.

References changeFrame(), vpFeatureDisplay::displayPoint(), and projection().

◆ display() [3/4]

void vpPoint::display ( const vpImage< vpRGBa > & I,
const vpCameraParameters & cam,
const vpColor & color = vpColor::green,
unsigned int thickness = 1 )

Display the projection of a 3D point in image I.

Parameters
I: Image used as background.
cam: Camera parameters.
color: Color used to draw the point.
thickness: Thickness used to draw the point.

Definition at line 401 of file vpPoint.cpp.

References vpFeatureDisplay::displayPoint(), and vpTracker::p.

◆ display() [4/4]

void vpPoint::display ( const vpImage< vpRGBa > & I,
const vpHomogeneousMatrix & cMo,
const vpCameraParameters & cam,
const vpColor & color = vpColor::green,
unsigned int thickness = 1 )

Display the projection of a 3D point in image I. This method is non destructive wrt. cP and p internal 3D point parameters.

Parameters
I: Image used as background.
cMo: Homogeneous transformation from camera frame to object frame. The point is considered as viewed from this camera position.
cam: Camera parameters.
color: Color used to draw the sphere.
thickness: Thickness used to draw the sphere.

Definition at line 364 of file vpPoint.cpp.

References changeFrame(), vpFeatureDisplay::displayPoint(), and projection().

◆ duplicate()

vpPoint * vpPoint::duplicate ( ) const
virtual

For memory issue (used by the vpServo class only).

Implements vpForwardProjection.

Definition at line 321 of file vpPoint.cpp.

References vpPoint().

◆ get_cP()

vpColVector vpTracker::get_cP ( ) const
inlineinherited

Return object parameters expressed in the 3D camera frame.

Definition at line 95 of file vpTracker.h.

References cP.

◆ get_oP()

vpColVector vpForwardProjection::get_oP ( ) const
inlineinherited

Return object parameters expressed in the 3D object frame.

Definition at line 155 of file vpForwardProjection.h.

References oP.

◆ get_oW()

double vpPoint::get_oW ( ) const

Get the point oW coordinate in the object frame.

Definition at line 424 of file vpPoint.cpp.

References vpForwardProjection::oP.

Referenced by operator<<, and vpPlane::projectionPointOnPlan().

◆ get_oX()

◆ get_oY()

◆ get_oZ()

◆ get_p()

vpColVector vpTracker::get_p ( ) const
inlineinherited

Return object parameters expressed in the 2D image plane computed by perspective projection.

Definition at line 93 of file vpTracker.h.

References p.

◆ get_W()

double vpPoint::get_W ( ) const

Get the point cW coordinate in the camera frame.

Definition at line 415 of file vpPoint.cpp.

References vpTracker::cP.

Referenced by vpHomogeneousMatrix::operator*(), operator<<, and vpPlane::projectionPointOnPlan().

◆ get_w()

double vpPoint::get_w ( ) const

Get the point w coordinate in the image plane.

Examples
homographyHLM2DObject.cpp, homographyHLM3DObject.cpp, and homographyHartleyDLT2DObject.cpp.

Definition at line 431 of file vpPoint.cpp.

References vpTracker::p.

Referenced by vpHomography::operator*(), and operator<<.

◆ get_X()

◆ get_x()

◆ get_Y()

◆ get_y()

◆ get_Z()

◆ getDeallocate()

vpForwardProjectionDeallocatorType vpForwardProjection::getDeallocate ( )
inlineinherited

Definition at line 157 of file vpForwardProjection.h.

◆ getWorldCoordinates() [1/4]

void vpPoint::getWorldCoordinates ( double & oX,
double & oY,
double & oZ )

Get the point object frame coordinates.

Definition at line 203 of file vpPoint.cpp.

References vpForwardProjection::oP.

◆ getWorldCoordinates() [2/4]

void vpPoint::getWorldCoordinates ( std::vector< double > & oP_)

Get the point object frame normalized coordinates.

Parameters
oP_: Normalized coordinates of the point in the object frame oP = (oX, oY, oZ, oW) as a 4-dim vector.

Definition at line 227 of file vpPoint.cpp.

References vpForwardProjection::oP, and vpColVector::resize().

◆ getWorldCoordinates() [3/4]

vpColVector vpPoint::getWorldCoordinates ( void )

Return the point object frame normalized coordinates.

Returns
Normalized coordinates of the point in the object frame oP = (oX, oY, oZ, oW) as a 4-dim vector.

Definition at line 242 of file vpPoint.cpp.

References vpForwardProjection::oP.

◆ getWorldCoordinates() [4/4]

void vpPoint::getWorldCoordinates ( vpColVector & oP_)

Get the point object frame normalized coordinates.

Parameters
oP_: Normalized coordinates of the point in the object frame oP = (oX, oY, oZ, oW) as a 4-dim vector.

Definition at line 219 of file vpPoint.cpp.

References vpForwardProjection::oP.

◆ init()

BEGIN_VISP_NAMESPACE void vpPoint::init ( )
protectedvirtual

Basic construction.

Implements vpForwardProjection.

Definition at line 43 of file vpPoint.cpp.

References vpTracker::cP, vpForwardProjection::oP, vpTracker::p, and set_Z().

Referenced by vpPoint(), vpPoint(), vpPoint(), and vpPoint().

◆ print()

BEGIN_VISP_NAMESPACE void vpForwardProjection::print ( ) const
virtualinherited

Print to stdout the feature parameters in:

  • the object frame
  • the camera frame
  • the image plane.
Examples
servoSimuCircle2DCamVelocityDisplay.cpp, servoSimuLine2DCamVelocityDisplay.cpp, and servoSimuSquareLine2DCamVelocityDisplay.cpp.

Definition at line 48 of file vpForwardProjection.cpp.

References vpTracker::cP, oP, and vpTracker::p.

◆ project() [1/2]

◆ project() [2/2]

void vpForwardProjection::project ( const vpHomogeneousMatrix & cMo)
inherited

Compute the feature parameters in the camera frame (vpTracker::cP) and than compute the projection of these parameters in the image plane (vpTracker::p).

Warning
The feature parameters in the object frame (vpForwardProjection:oP) need to be set prior the use of this method. To initialize these parameters see setWorldCoordinates().
Parameters
cMo: The homogeneous matrix corresponding to the pose between the camera frame and the object frame.

Definition at line 79 of file vpForwardProjection.cpp.

References changeFrame(), and projection().

◆ projection() [1/2]

void vpPoint::projection ( )
virtual

Perspective projection of the 3D point.

Projection onto the image plane of the point. Update the object attribute p (2D homogeneous coordinates) according to object attribute cP (current 3D coordinates in the camera frame).

Implements vpForwardProjection.

Definition at line 441 of file vpPoint.cpp.

References vpTracker::cP, and vpTracker::p.

Referenced by display(), and display().

◆ projection() [2/2]

void vpPoint::projection ( const vpColVector & v_cP,
vpColVector & v_p ) const
virtual

Projection onto the image plane of a point. Input: the 3D coordinates in the camera frame _cP, output : the 2D coordinates _p.

Compute the perspective projection of a point _cP.

Parameters
v_cP: 3-dim vector cP = (cX, cY, cZ) or 4-dim vector cP = (cX, cY, cZ, 1) corresponding to the normalized coordinates of the 3D point in the camera frame.
v_p: Coordinates of the point in the image plane obtained by perspective projection.

Implements vpForwardProjection.

Examples
servoAfma6FourPoints2DCamVelocityLs_des.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoViper850FourPoints2DArtVelocityLs_cur.cpp, servoViper850FourPoints2DCamVelocityLs_cur.cpp, and servoViper850FourPointsKinect.cpp.

Definition at line 252 of file vpPoint.cpp.

References vpColVector::resize().

Referenced by vpPolygon3D::computePolygonClipped().

◆ set_oW()

void vpPoint::set_oW ( double oW)

Set the point oW coordinate in the object frame.

Definition at line 468 of file vpPoint.cpp.

References vpForwardProjection::oP.

Referenced by vpHomogeneousMatrix::operator*(), and vpPlane::projectionPointOnPlan().

◆ set_oX()

void vpPoint::set_oX ( double oX)

◆ set_oY()

void vpPoint::set_oY ( double oY)

◆ set_oZ()

void vpPoint::set_oZ ( double oZ)

◆ set_W()

void vpPoint::set_W ( double cW)

Set the point cW coordinate in the camera frame.

Definition at line 459 of file vpPoint.cpp.

References vpTracker::cP.

Referenced by vpHomogeneousMatrix::operator*(), and vpPlane::projectionPointOnPlan().

◆ set_w()

void vpPoint::set_w ( double w)

Set the point w coordinate in the image plane.

Definition at line 475 of file vpPoint.cpp.

References vpTracker::p.

Referenced by vpHomography::operator*().

◆ set_X()

◆ set_x()

◆ set_Y()

◆ set_y()

◆ set_Z()

◆ setDeallocate()

void vpForwardProjection::setDeallocate ( vpForwardProjectionDeallocatorType d)
inlineinherited

Definition at line 185 of file vpForwardProjection.h.

◆ setWorldCoordinates() [1/3]

void vpPoint::setWorldCoordinates ( const std::vector< double > & oP_)

Set the 3D point object frame coordinates.

Parameters
oP_: Vector containing the coordinates of the 3D point in the object frame. This vector could be of dimension 3 or 4.
  • If dimension is 3, oP corresponds to the normalized coordinates oP = (oX, oY, oZ, 1) where oP[0]=oX, oP[1]=oY, oP[2]=oZ.
  • If dimension is 4, oP corresponds to the normalized coordinates oP = (oX, oY, oZ, oW) where oP[0]=oX, oP[1]=oY, oP[2]=oZ and oP[3]=oW.

Definition at line 175 of file vpPoint.cpp.

References vpException::dimensionError, and vpForwardProjection::oP.

◆ setWorldCoordinates() [2/3]

void vpPoint::setWorldCoordinates ( const vpColVector & oP_)
virtual

Set the 3D point object frame coordinates.

Parameters
oP_: Vector containing the coordinates of the 3D point in the object frame. This vector could be of dimension 3 or 4.
  • If dimension is 3, oP corresponds to the normalized coordinates oP = (oX, oY, oZ, 1) where oP[0]=oX, oP[1]=oY, oP[2]=oZ.
  • If dimension is 4, oP corresponds to the normalized coordinates oP = (oX, oY, oZ, oW) where oP[0]=oX, oP[1]=oY, oP[2]=oZ and oP[3]=oW.

Implements vpForwardProjection.

Definition at line 138 of file vpPoint.cpp.

References vpException::dimensionError, vpForwardProjection::oP, and vpArray2D< Type >::size().

◆ setWorldCoordinates() [3/3]

void vpPoint::setWorldCoordinates ( double oX,
double oY,
double oZ )

Set the 3D point object frame coordinates oP = (oX, oY, oZ, 1).

Parameters
oX: Coordinates along X-axis of a 3D point in object frame.
oY: Coordinates along Y-axis of a 3D point in object frame.
oZ: Coordinates along Z-axis of a 3D point in object frame.
Examples
AROgre.cpp, AROgreBasic.cpp, homographyHLM2DObject.cpp, homographyHLM3DObject.cpp, homographyHartleyDLT2DObject.cpp, manGeometricFeatures.cpp, manServo4PointsDisplay.cpp, manSimu4Dots.cpp, manSimu4Points.cpp, poseVirtualVS.cpp, servoAfma62DhalfCamVelocity.cpp, servoAfma6FourPoints2DCamVelocityLs_des.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoPioneerPanSegment3D.cpp, servoSimu4Points.cpp, servoSimuAfma6FourPoints2DCamVelocity.cpp, servoSimuFourPoints2DCamVelocity.cpp, servoSimuFourPoints2DCamVelocityDisplay.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, servoSimuViper850FourPoints2DCamVelocity.cpp, servoViper850FourPoints2DArtVelocityLs_cur.cpp, servoViper850FourPoints2DCamVelocityLs_cur.cpp, servoViper850FourPointsKinect.cpp, simulateFourPoints2DCartesianCamVelocity.cpp, simulateFourPoints2DPolarCamVelocity.cpp, testFeatureSegment.cpp, testPoint.cpp, testRobotAfma6Pose.cpp, testRobotViper850Pose.cpp, tutorial-ibvs-4pts-json.cpp, tutorial-ibvs-4pts-ogre.cpp, tutorial-ibvs-4pts-plotter-continuous-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter.cpp, and tutorial-ibvs-4pts.cpp.

Definition at line 116 of file vpPoint.cpp.

References vpForwardProjection::oP.

Referenced by vpMbTracker::addPolygon(), vpMbTracker::addProjectionErrorPolygon(), vpKeyPoint::compute3D(), vpKeyPoint::compute3DForPointsOnCylinders(), vpKeyPoint::compute3DForPointsOnCylinders(), vpMbTracker::extractCylinders(), vpMbTracker::extractFaces(), vpMbTracker::extractLines(), vpMbTracker::getGravityCenter(), vpMbTracker::initFromPoints(), vpKeyPoint::matchPoint(), vpPose::poseFromRectangle(), vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::projectCameraTrajectory(), vpPoint(), vpPoint(), and vpPoint().

◆ track()

void vpForwardProjection::track ( const vpHomogeneousMatrix & cMo)
inherited

Track the feature parameters in the camera frame (vpTracker::cP) and than compute the projection of these parameters in the image plane (vpTracker::p).

This method is similar to project(const vpHomogeneousMatrix &).

Warning
The feature parameters in the object frame (vpForwardProjection:oP) need to be set prior the use of this method. To initialize these parameters see setWorldCoordinates().
Parameters
cMo: The homogeneous matrix corresponding to the pose between the camera frame and the object frame.
Examples
servoSimu4Points.cpp, servoSimuAfma6FourPoints2DCamVelocity.cpp, servoSimuCircle2DCamVelocity.cpp, servoSimuCircle2DCamVelocityDisplay.cpp, servoSimuFourPoints2DCamVelocity.cpp, servoSimuFourPoints2DCamVelocityDisplay.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, servoSimuLine2DCamVelocityDisplay.cpp, servoSimuSphere.cpp, servoSimuSphere2DCamVelocity.cpp, servoSimuSphere2DCamVelocityDisplay.cpp, servoSimuSphere2DCamVelocityDisplaySecondaryTask.cpp, servoSimuSquareLine2DCamVelocityDisplay.cpp, servoSimuViper850FourPoints2DCamVelocity.cpp, simulateCircle2DCamVelocity.cpp, simulateFourPoints2DCartesianCamVelocity.cpp, simulateFourPoints2DPolarCamVelocity.cpp, testPoint.cpp, tutorial-ibvs-4pts-json.cpp, tutorial-ibvs-4pts-ogre.cpp, tutorial-ibvs-4pts-plotter-continuous-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter.cpp, tutorial-ibvs-4pts.cpp, tutorial-simu-pioneer-continuous-gain-adaptive.cpp, tutorial-simu-pioneer-continuous-gain-constant.cpp, tutorial-simu-pioneer-pan.cpp, and tutorial-simu-pioneer.cpp.

Definition at line 101 of file vpForwardProjection.cpp.

References project().

Referenced by vpPose::computeResidual(), vpPose::computeResidual(), vpImageDraw::drawFrame(), vpImageDraw::drawFrame(), vpPose::poseVirtualVS(), vpPose::poseVirtualVSrobust(), vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::projectCameraTrajectory(), setWorldCoordinates(), vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().

◆ operator<<

VISP_EXPORT std::ostream & operator<< ( std::ostream & os,
const vpPoint & vpp )
friend

Overload of the stream operator for vpPoint.

Parameters
os: The output stream that will contain the vpPoint information:
  • oP : the normalized 3D point coordinates in the object frame,
  • cP : the normalized 3D point coordinates in the camera frame,
  • ip : the normalized 2D point coordinates in the image plane.
vpp: The vpPoint to output.

The following code snippet shows how to use this operator.

#include <visp3/core/vpPoint.h>
int main() {
vpPoint obj0(-0.1, -0.1, 0);
std::cout << "obj0:\n" << obj0 << std::endl;
}
vpPoint()
Basic constructor.
Definition vpPoint.cpp:63

It produces the following output:

obj0:
oP=(-0.1, -0.1, 0, 1)
cP=(0, 0, 0, 1)
ip=(0, 0, 1)

Definition at line 502 of file vpPoint.cpp.

References get_oW(), get_oX(), get_oY(), get_oZ(), get_W(), get_w(), get_X(), get_x(), get_Y(), get_y(), get_Z(), operator<<, and vpPoint().

Referenced by operator<<.

Member Data Documentation

◆ cP

◆ cPAvailable

bool vpTracker::cPAvailable
inherited

Flag used to indicate if the feature parameters cP expressed in the camera frame are available.

Definition at line 79 of file vpTracker.h.

Referenced by init(), operator=(), vpTracker(), and vpTracker().

◆ oP

◆ p

vpColVector vpTracker::p
inherited

Feature coordinates expressed in the image plane p. They correspond to 2D normalized coordinates expressed in meters.

Definition at line 69 of file vpTracker.h.

Referenced by vpCircle::computeIntersectionPoint(), vpMeterPixelConversion::convertEllipse(), vpMeterPixelConversion::convertEllipse(), vpMeterPixelConversion::convertEllipse(), vpMeterPixelConversion::convertEllipse(), vpCircle::display(), vpCircle::display(), vpCylinder::display(), vpCylinder::display(), vpLine::display(), vpLine::display(), vpPoint::display(), vpPoint::display(), vpSphere::display(), vpSphere::display(), vpFeatureDisplay::displayEllipse(), vpFeatureDisplay::displayEllipse(), vpPose::displayModel(), vpPose::displayModel(), vpImageDraw::drawFrame(), vpImageDraw::drawFrame(), vpCircle::get_mu02(), vpSphere::get_mu02(), vpCircle::get_mu11(), vpSphere::get_mu11(), vpCircle::get_mu20(), vpSphere::get_mu20(), vpCircle::get_n02(), vpSphere::get_n02(), vpCircle::get_n11(), vpSphere::get_n11(), vpCircle::get_n20(), vpSphere::get_n20(), get_p(), vpPoint::get_w(), vpCircle::get_x(), vpPoint::get_x(), vpSphere::get_x(), vpCircle::get_y(), vpPoint::get_y(), vpSphere::get_y(), vpLine::getRho(), vpCylinder::getRho1(), vpCylinder::getRho2(), vpLine::getTheta(), vpCylinder::getTheta1(), vpCylinder::getTheta2(), vpCircle::init(), vpCylinder::init(), vpLine::init(), vpMeTracker::init(), vpPoint::init(), vpSphere::init(), vpCircle::operator=(), operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpForwardProjection::project(), vpCircle::projection(), vpCylinder::projection(), vpForwardProjection::projection(), vpLine::projection(), vpPoint::projection(), vpSphere::projection(), vpPoint::set_w(), vpPoint::set_x(), vpPoint::set_y(), vpLine::setRho(), vpLine::setTheta(), vpTracker(), and vpTracker().