![]() |
Visual Servoing Platform
version 3.3.0
|
#include <vpPoint.h>
Public Types | |
enum | vpForwardProjectionDeallocatorType { user, vpDisplayForwardProjection } |
Public Member Functions | |
vpPoint () | |
vpPoint (double oX, double oY, double oZ) | |
vpPoint (const vpColVector &P) | |
vpPoint (const std::vector< double > &P) | |
virtual | ~vpPoint () |
void | changeFrame (const vpHomogeneousMatrix &cMo, vpColVector &_cP) |
void | changeFrame (const vpHomogeneousMatrix &cMo) |
void | display (const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpColor &color=vpColor::green, unsigned int thickness=1) |
void | display (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, 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) |
vpPoint * | duplicate () const |
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 &P) |
vpColVector | getWorldCoordinates (void) |
void | getWorldCoordinates (std::vector< double > &P) |
void | init () |
vpPoint & | operator= (const vpPoint &vpp)=default |
void | projection (const vpColVector &_cP, vpColVector &_p) |
void | projection () |
void | set_X (double X) |
void | set_Y (double Y) |
void | set_Z (double Z) |
void | set_W (double W) |
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 &P) |
void | setWorldCoordinates (const std::vector< double > &P) |
void | project () |
void | project (const vpHomogeneousMatrix &cMo) |
void | track (const vpHomogeneousMatrix &cMo) |
virtual void | print () const |
void | setDeallocate (vpForwardProjectionDeallocatorType d) |
vpForwardProjectionDeallocatorType | getDeallocate () |
Public Attributes | |
vpColVector | oP |
vpColVector | p |
vpColVector | cP |
bool | cPAvailable |
Friends | |
VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpPoint &vpp) |
Class that defines what is a point.
|
inherited |
Used for memory issue especially in the vpServo class.
Enumerator | |
---|---|
user | |
vpDisplayForwardProjection |
Definition at line 210 of file vpForwardProjection.h.
vpPoint::vpPoint | ( | ) |
Basic constructor.
Definition at line 63 of file vpPoint.cpp.
References init().
Referenced by duplicate().
vpPoint::vpPoint | ( | double | oX, |
double | oY, | ||
double | oZ | ||
) |
Construction from 3D coordinates in the object frame.
oX,oY,oZ | Coordinates of a 3D point in the object frame. |
Definition at line 69 of file vpPoint.cpp.
|
explicit |
Construction from 3D point world coordinates. We mean here the coordinates of the point in the object frame.
P | Vector containing the coordinates of the 3D point in the object frame. This vector could be of dimension 3 or 4.
|
Definition at line 85 of file vpPoint.cpp.
|
explicit |
Construction from 3D point world coordinates. We mean here the coordinates of the point in the object frame.
P | Vector containing the coordinates of the 3D point in the object frame. This vector could be of dimension 3 or 4.
|
Definition at line 101 of file vpPoint.cpp.
|
virtual |
From the 3D coordinates of the point in the object frame set using for example setWorldCoordinates() or set_oX(), set_oY(), set_oZ(), compute the 3D coordinates of the point in the camera frame.
cMo | : Transformation from camera to object frame. |
Implements vpForwardProjection.
Definition at line 258 of file vpPoint.cpp.
|
virtual |
From the 3D coordinates of the point in the object frame set using for example setWorldCoordinates() or set_oX(), set_oY(), set_oZ(), compute the 3D coordinates of the point in the camera frame.
cMo | : Transformation from camera to object frame. |
_cP | : 3D coordinates of the point in the camera frame. |
Implements vpForwardProjection.
Definition at line 232 of file vpPoint.cpp.
Referenced by vpMbtFaceDepthNormal::displayFeature().
|
virtual |
Display the point in the image.
Implements vpForwardProjection.
Definition at line 404 of file vpPoint.cpp.
|
virtual |
Display the point in the image.
Implements vpForwardProjection.
Definition at line 357 of file vpPoint.cpp.
void vpPoint::display | ( | const vpImage< vpRGBa > & | I, |
const vpHomogeneousMatrix & | cMo, | ||
const vpCameraParameters & | cam, | ||
const vpColor & | color = vpColor::green , |
||
unsigned int | thickness = 1 |
||
) |
Display the point in the image.
Definition at line 374 of file vpPoint.cpp.
|
virtual |
For memory issue (used by the vpServo class only).
Implements vpForwardProjection.
Definition at line 348 of file vpPoint.cpp.
References vpPoint().
double vpPoint::get_oW | ( | ) | const |
Get the point W coordinate in the object frame.
Definition at line 427 of file vpPoint.cpp.
double vpPoint::get_oX | ( | ) | const |
Get the point X coordinate in the object frame.
Definition at line 421 of file vpPoint.cpp.
Referenced by vpMbTracker::addPolygon(), vpMbTracker::addProjectionErrorPolygon(), vpMbtDistanceKltCylinder::buildFrom(), vpMbTracker::createCylinderBBox(), and vpPose::poseLagrangeNonPlan().
double vpPoint::get_oY | ( | ) | const |
Get the point Y coordinate in the object frame.
Definition at line 423 of file vpPoint.cpp.
Referenced by vpMbTracker::addPolygon(), vpMbTracker::addProjectionErrorPolygon(), vpMbtDistanceKltCylinder::buildFrom(), vpMbTracker::createCylinderBBox(), and vpPose::poseLagrangeNonPlan().
double vpPoint::get_oZ | ( | ) | const |
Get the point Z coordinate in the object frame.
Definition at line 425 of file vpPoint.cpp.
Referenced by vpMbTracker::addPolygon(), vpMbTracker::addProjectionErrorPolygon(), vpMbtDistanceKltCylinder::buildFrom(), vpMbTracker::createCylinderBBox(), and vpPose::poseLagrangeNonPlan().
double vpPoint::get_W | ( | ) | const |
Get the point W coordinate in the camera frame.
Definition at line 418 of file vpPoint.cpp.
double vpPoint::get_w | ( | ) | const |
Get the point w coordinate in the image plane.
Definition at line 434 of file vpPoint.cpp.
double vpPoint::get_X | ( | ) | const |
Get the point X coordinate in the camera frame.
Definition at line 412 of file vpPoint.cpp.
Referenced by vpMbtFaceDepthNormal::computeNormalVisibility(), vpMbtFaceDepthNormal::computePolygonCentroid(), vpMbtFaceDepthDense::computeROI(), vpMbtFaceDepthNormal::displayFeature(), and vpPlane::rayIntersection().
double vpPoint::get_x | ( | ) | const |
Get the point x coordinate in the image plane.
Definition at line 430 of file vpPoint.cpp.
Referenced by vpMbtFaceDepthNormal::displayFeature(), vpPose::poseLagrangeNonPlan(), vpWireFrameSimulator::projectCameraTrajectory(), and vpSimulatorAfma6::updateArticularPosition().
double vpPoint::get_Y | ( | ) | const |
Get the point Y coordinate in the camera frame.
Definition at line 414 of file vpPoint.cpp.
Referenced by vpMbtFaceDepthNormal::computeNormalVisibility(), vpMbtFaceDepthDense::computeROI(), vpMbtFaceDepthNormal::displayFeature(), and vpPlane::rayIntersection().
double vpPoint::get_y | ( | ) | const |
Get the point y coordinate in the image plane.
Definition at line 432 of file vpPoint.cpp.
Referenced by vpMbtFaceDepthNormal::displayFeature(), vpPose::poseLagrangeNonPlan(), vpWireFrameSimulator::projectCameraTrajectory(), and vpSimulatorAfma6::updateArticularPosition().
double vpPoint::get_Z | ( | ) | const |
Get the point Z coordinate in the camera frame.
Definition at line 416 of file vpPoint.cpp.
Referenced by vpMbtFaceDepthNormal::computeNormalVisibility(), vpMbtFaceDepthDense::computeROI(), vpProjectionDisplay::displayCamera(), vpMbtFaceDepthNormal::displayFeature(), and vpPlane::rayIntersection().
|
inlineinherited |
Definition at line 219 of file vpForwardProjection.h.
void vpPoint::getWorldCoordinates | ( | double & | oX, |
double & | oY, | ||
double & | oZ | ||
) |
Get the point world coordinates. We mean here the coordinates of the point in the object frame.
Definition at line 176 of file vpPoint.cpp.
void vpPoint::getWorldCoordinates | ( | std::vector< double > & | P | ) |
Get the point world coordinates. We mean here the coordinates of the point in the object frame.
P | Normalized coordinates of the point in the object frame P = (X, Y, Z, 1) |
Definition at line 194 of file vpPoint.cpp.
vpColVector vpPoint::getWorldCoordinates | ( | void | ) |
Return the point world coordinates. We mean here the coordinates of the point in the object frame.
Definition at line 206 of file vpPoint.cpp.
void vpPoint::getWorldCoordinates | ( | vpColVector & | P | ) |
Get the point world coordinates. We mean here the coordinates of the point in the object frame.
P | Normalized coordinates of the point in the object frame P = (X, Y, Z, 1) |
Definition at line 188 of file vpPoint.cpp.
|
virtual |
Basic construction.
Implements vpForwardProjection.
Definition at line 47 of file vpPoint.cpp.
Referenced by vpPoint().
|
virtualinherited |
Print to stdout the feature parameters in:
Definition at line 52 of file vpForwardProjection.cpp.
|
inherited |
Compute the feature parameters in the image plane (vpTracker::p) from the parameters in the camera frame (vpTracker::cP).
Definition at line 67 of file vpForwardProjection.cpp.
Referenced by vpMbtFaceDepthNormal::computeNormalVisibility(), vpMbtFaceDepthDense::computeROI(), and vpMbtFaceDepthNormal::displayFeature().
|
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).
cMo | : The homogeneous matrix corresponding to the pose between the camera frame and the object frame. |
Definition at line 83 of file vpForwardProjection.cpp.
|
virtual |
Perspective projection of the 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 444 of file vpPoint.cpp.
|
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.
_cP | : Three dimension vector that corresponds to the coordinates of the point in the camera frame. |
_p | : Coordinates of the point in the image plane obtained by perspective projection. |
Implements vpForwardProjection.
Definition at line 215 of file vpPoint.cpp.
void vpPoint::set_oW | ( | double | oW | ) |
Set the point W coordinate in the object frame.
Definition at line 468 of file vpPoint.cpp.
void vpPoint::set_oX | ( | double | oX | ) |
Set the point X coordinate in the object frame.
Definition at line 462 of file vpPoint.cpp.
void vpPoint::set_oY | ( | double | oY | ) |
Set the point Y coordinate in the object frame.
Definition at line 464 of file vpPoint.cpp.
void vpPoint::set_oZ | ( | double | oZ | ) |
Set the point Z coordinate in the object frame.
Definition at line 466 of file vpPoint.cpp.
void vpPoint::set_W | ( | double | W | ) |
Set the point W coordinate in the camera frame.
Definition at line 459 of file vpPoint.cpp.
void vpPoint::set_w | ( | double | w | ) |
Set the point w coordinate in the image plane.
Definition at line 475 of file vpPoint.cpp.
void vpPoint::set_X | ( | double | X | ) |
Set the point X coordinate in the camera frame.
Definition at line 453 of file vpPoint.cpp.
Referenced by vpMbtFaceDepthNormal::computeNormalVisibility(), vpMbtFaceDepthNormal::computePolygonCentroid(), vpMbtFaceDepthDense::computeROI(), and vpMbtFaceDepthNormal::displayFeature().
void vpPoint::set_x | ( | double | x | ) |
Set the point x coordinate in the image plane.
Definition at line 471 of file vpPoint.cpp.
Referenced by vpMbTracker::initFromPoints().
void vpPoint::set_Y | ( | double | Y | ) |
Set the point Y coordinate in the camera frame.
Definition at line 455 of file vpPoint.cpp.
Referenced by vpMbtFaceDepthNormal::computeNormalVisibility(), vpMbtFaceDepthNormal::computePolygonCentroid(), vpMbtFaceDepthDense::computeROI(), and vpMbtFaceDepthNormal::displayFeature().
void vpPoint::set_y | ( | double | y | ) |
Set the point y coordinate in the image plane.
Definition at line 473 of file vpPoint.cpp.
Referenced by vpMbTracker::initFromPoints().
void vpPoint::set_Z | ( | double | Z | ) |
Set the point Z coordinate in the camera frame.
Definition at line 457 of file vpPoint.cpp.
Referenced by vpMbtFaceDepthNormal::computeNormalVisibility(), vpMbtFaceDepthNormal::computePolygonCentroid(), vpMbtFaceDepthDense::computeROI(), and vpMbtFaceDepthNormal::displayFeature().
|
inlineinherited |
Definition at line 218 of file vpForwardProjection.h.
void vpPoint::setWorldCoordinates | ( | const std::vector< double > & | P | ) |
Set the 3D point world coordinates. We mean here the coordinates of the point in the object frame.
P | Vector containing the coordinates of the 3D point in the object frame. This vector could be of dimension 3 or 4.
|
Definition at line 156 of file vpPoint.cpp.
|
virtual |
Set the 3D point world coordinates. We mean here the coordinates of the point in the object frame.
P | Vector containing the coordinates of the 3D point in the object frame. This vector could be of dimension 3 or 4.
|
Implements vpForwardProjection.
Definition at line 129 of file vpPoint.cpp.
void vpPoint::setWorldCoordinates | ( | double | oX, |
double | oY, | ||
double | oZ | ||
) |
Set the 3D point world coordinates. We mean here the coordinates of the point in the object frame.
oX,oY,oZ | Coordinates of a 3D point in the object frame. |
Definition at line 112 of file vpPoint.cpp.
Referenced by vpMbTracker::addPolygon(), vpMbTracker::addProjectionErrorPolygon(), vpMbtFaceDepthNormal::computeDesiredNormalAndCentroid(), vpProjectionDisplay::init(), vpMbTracker::initFromPoints(), and vpWireFrameSimulator::projectCameraTrajectory().
|
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 &).
cMo | : The homogeneous matrix corresponding to the pose between the camera frame and the object frame. |
Definition at line 110 of file vpForwardProjection.cpp.
Referenced by vpProjectionDisplay::displayCamera(), vpWireFrameSimulator::projectCameraTrajectory(), and vpSimulatorAfma6::updateArticularPosition().
|
friend |
Definition at line 387 of file vpPoint.cpp.
|
inherited |
Feature coordinates expressed in the camera frame cP.
Definition at line 74 of file vpTracker.h.
Referenced by vpCircle::init(), vpSphere::init(), vpCylinder::init(), vpTracker::operator=(), and vpPose::printPoint().
|
inherited |
Flag used to indicate if the feature parameters cP expressed in the camera frame are available.
Definition at line 80 of file vpTracker.h.
Referenced by vpTracker::operator=().
|
inherited |
Feature coordinates expressed in the object frame, also called world frame.
Definition at line 73 of file vpForwardProjection.h.
Referenced by vpCircle::init(), vpSphere::init(), vpCylinder::init(), vpPose::printPoint(), and vpSphere::setWorldCoordinates().
|
inherited |
Feature coordinates expressed in the image plane p. They correspond to 2D normalized coordinates expressed in meters.
Definition at line 70 of file vpTracker.h.
Referenced by vpCircle::display(), vpSphere::display(), vpProjectionDisplay::display(), vpProjectionDisplay::displayCamera(), vpCircle::init(), vpSphere::init(), vpMeTracker::init(), vpCylinder::init(), vpTracker::operator=(), and vpPose::printPoint().