![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpForwardProjection.h>
Public Types | |
| enum | vpForwardProjectionDeallocatorType { user , vpDisplayForwardProjection } |
Public Member Functions | |
Public Member Functions Inherited from vpForwardProjection | |
| vpForwardProjection () | |
| virtual void | changeFrame (const vpHomogeneousMatrix &cMo, vpColVector &cP) const =0 |
| virtual void | changeFrame (const vpHomogeneousMatrix &cMo)=0 |
| virtual void | display (const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpColor &color=vpColor::green, unsigned int thickness=1)=0 |
| virtual void | display (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &color=vpColor::green, unsigned int thickness=1)=0 |
| virtual vpForwardProjection * | duplicate () const =0 |
| vpColVector | get_oP () const |
| vpForwardProjectionDeallocatorType | getDeallocate () |
| virtual void | print () const |
| virtual void | projection (const vpColVector &cP, vpColVector &p) const =0 |
| virtual void | projection ()=0 |
| void | project () |
| void | project (const vpHomogeneousMatrix &cMo) |
| void | setDeallocate (vpForwardProjectionDeallocatorType d) |
| virtual void | setWorldCoordinates (const vpColVector &oP)=0 |
| 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 Inherited from vpForwardProjection | |
| virtual void | init ()=0 |
Class that defines what is a generic geometric feature.
Each geometric feature has parameters expressed:
Definition at line 64 of file vpForwardProjection.h.
Used for memory issue especially in the vpServo class.
| Enumerator | |
|---|---|
| user | |
| vpDisplayForwardProjection | |
Definition at line 70 of file vpForwardProjection.h.
|
inline |
Definition at line 74 of file vpForwardProjection.h.
Referenced by duplicate().
|
pure virtual |
Computes the features parameters in the camera frame (cP) thanks to the parameters given in the object frame (vpForwardProjection::oP) and the homogeneous matrix relative to the pose (cMo) between the object frame and the camera frame.
To set the parameters in the object frame you need to call setWorldCoordinates().
| cMo | : The homogeneous matrix corresponding to the pose between the camera frame and the object frame. |
The features parameters in the camera frame (cP) are updated in the vpTracker::cP public attribute.
Implemented in vpCircle, vpCylinder, vpLine, vpPoint, and vpSphere.
|
pure virtual |
Computes the features parameters in the camera frame (cP) thanks to the parameters given in the object frame (vpForwardProjection::oP) and the homogeneous matrix relative to the pose (cMo) between the object frame and the camera frame.
To set the parameters in the object frame you need to call setWorldCoordinates().
| cMo | : The homogeneous matrix corresponding to the pose between the camera frame and the object frame. |
| cP | : The vector which will contain the feature parameters expressed in the camera frame. |
With this method, the vpTracker::cP public attribute is not updated.
Implemented in vpCircle, vpCylinder, vpLine, vpPoint, and vpSphere.
References vpTracker::cP.
Referenced by project().
|
pure virtual |
Displays the feature in the image I thanks to the 2D feature parameters in the image plane (vpTracker::p) and the camera parameters which enable to convert the features from meter to pixel.
| I | : The image where the feature must be displayed in overlay. |
| cam | : The camera parameters to enable the conversion from meter to pixel. |
| color | : The desired color to display the line in the image. |
| thickness | : Thickness of the feature representation. |
Implemented in vpCircle, vpCylinder, vpLine, vpPoint, and vpSphere.
References vpColor::green.
Referenced by vpProjectionDisplay::display().
|
pure virtual |
Displays the feature in the image I thanks to the features in the object frame (vpForwardProjection::oP), the homogeneous matrix relative to the pose between the object frame and the camera frame and the camera parameters which enable to convert the features from meter to pixel.
| I | : The image where the line must be displayed in overlay. |
| cMo | : The homogeneous matrix corresponding to the pose between the camera frame and the object frame. |
| cam | : The camera parameters to enable the conversion from meter to pixel. |
| color | : The desired color to display the line in the image. |
| thickness | : Thickness of the feature representation. |
Implemented in vpCircle, vpCylinder, vpLine, vpPoint, and vpSphere.
References vpColor::green.
|
pure virtual |
Create an object with the same type.
Implemented in vpCircle, vpCylinder, vpLine, vpPoint, and vpSphere.
References vpForwardProjection().
|
inlineinherited |
Return object parameters expressed in the 3D camera frame.
Definition at line 95 of file vpTracker.h.
References cP.
|
inline |
Return object parameters expressed in the 3D object frame.
Definition at line 155 of file vpForwardProjection.h.
References oP.
|
inlineinherited |
Return object parameters expressed in the 2D image plane computed by perspective projection.
Definition at line 93 of file vpTracker.h.
References p.
|
inline |
Definition at line 157 of file vpForwardProjection.h.
|
protectedpure virtual |
Default initialisation of the feature parameters:
Implemented in vpCircle, vpCylinder, vpLine, vpPoint, and vpSphere.
|
virtual |
Print to stdout the feature parameters in:
Definition at line 48 of file vpForwardProjection.cpp.
References vpTracker::cP, oP, and vpTracker::p.
| void vpForwardProjection::project | ( | ) |
Compute the feature parameters in the image plane (vpTracker::p) from the parameters in the camera frame (vpTracker::cP).
Definition at line 63 of file vpForwardProjection.cpp.
References vpTracker::cP, vpTracker::p, and projection().
Referenced by vpMbtDistanceKltCylinder::computeInteractionMatrixAndResidu(), vpMbtFaceDepthNormal::computeNormalVisibility(), vpMbtFaceDepthNormal::displayFeature(), vpMbtFaceDepthNormal::displayFeature(), vpMbtFaceDepthNormal::getFeaturesForDisplay(), vpKeyPoint::matchPointAndDetect(), vpMbtFaceDepthNormal::planeIsInvalid(), projection(), and track().
| void vpForwardProjection::project | ( | const vpHomogeneousMatrix & | cMo | ) |
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 79 of file vpForwardProjection.cpp.
References changeFrame(), and projection().
|
pure virtual |
Computes the feature parameters in the image plane. These parameters are than updated in the vpTracker::p public attribute.
Implemented in vpCircle, vpCylinder, vpLine, vpPoint, and vpSphere.
References project().
|
pure virtual |
Computes the feature parameters in the image plane from the parameters expressed in the camera frame.
| cP | [input] : Feature parameters expressed in the camera frame. |
| p | [output] : Feature parameters expressed in the image plane. |
Implemented in vpCircle, vpCylinder, vpLine, vpPoint, and vpSphere.
References vpTracker::cP, and vpTracker::p.
|
inline |
Definition at line 185 of file vpForwardProjection.h.
|
pure virtual |
Sets the parameters which define the feature in the object frame.
| oP | : Feature parameters expressed in the object frame used to set the vpForwardProjection::oP public attribute. |
Implemented in vpCircle, vpCylinder, vpLine, vpPoint, and vpSphere.
| void vpForwardProjection::track | ( | const vpHomogeneousMatrix & | cMo | ) |
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 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().
|
inherited |
Feature coordinates expressed in the camera frame cP.
Definition at line 73 of file vpTracker.h.
Referenced by vpCircle::changeFrame(), vpCylinder::changeFrame(), vpForwardProjection::changeFrame(), vpLine::changeFrame(), vpPoint::changeFrame(), vpSphere::changeFrame(), vpFeatureBuilder::create(), get_cP(), vpPoint::get_W(), vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), vpCircle::getA(), vpCylinder::getA(), vpCircle::getB(), vpCylinder::getB(), vpCircle::getC(), vpCylinder::getC(), vpCircle::getR(), vpCylinder::getR(), vpSphere::getR(), vpCircle::getX(), vpCylinder::getX(), vpSphere::getX(), vpCircle::getY(), vpCylinder::getY(), vpSphere::getY(), vpCircle::getZ(), vpCylinder::getZ(), vpSphere::getZ(), vpCircle::init(), vpCylinder::init(), vpLine::init(), vpPoint::init(), vpSphere::init(), vpCircle::operator=(), operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpForwardProjection::project(), vpCircle::projection(), vpCylinder::projection(), vpForwardProjection::projection(), vpLine::projection(), vpLine::projection(), vpPoint::projection(), vpSphere::projection(), vpPoint::set_W(), vpPoint::set_X(), vpPoint::set_Y(), vpPoint::set_Z(), vpTracker(), and vpTracker().
|
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().
| vpColVector vpForwardProjection::oP |
Feature coordinates expressed in the object frame.
Definition at line 205 of file vpForwardProjection.h.
Referenced by vpCircle::changeFrame(), vpCircle::changeFrame(), vpCylinder::changeFrame(), vpLine::changeFrame(), vpPoint::changeFrame(), vpPoint::changeFrame(), vpSphere::changeFrame(), get_oP(), vpPoint::get_oW(), vpPoint::get_oX(), vpPoint::get_oY(), vpPoint::get_oZ(), vpPoint::getWorldCoordinates(), vpPoint::getWorldCoordinates(), vpPoint::getWorldCoordinates(), vpPoint::getWorldCoordinates(), vpCircle::init(), vpCylinder::init(), vpLine::init(), vpPoint::init(), vpSphere::init(), vpCircle::operator=(), print(), vpPose::printPoint(), vpPoint::set_oW(), vpPoint::set_oX(), vpPoint::set_oY(), vpPoint::set_oZ(), vpCircle::setWorldCoordinates(), vpCircle::setWorldCoordinates(), vpCylinder::setWorldCoordinates(), vpCylinder::setWorldCoordinates(), setWorldCoordinates(), vpLine::setWorldCoordinates(), vpLine::setWorldCoordinates(), vpLine::setWorldCoordinates(), vpPoint::setWorldCoordinates(), vpPoint::setWorldCoordinates(), vpPoint::setWorldCoordinates(), vpSphere::setWorldCoordinates(), vpSphere::setWorldCoordinates(), and vpForwardProjection().
|
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().