ViSP
2.10.0
|
#include <vpForwardProjection.h>
Public Types | |
enum | vpForwardProjectionDeallocatorType { user, vpDisplayForwardProjection } |
Public Member Functions | |
virtual void | init ()=0 |
virtual | ~vpForwardProjection () |
virtual void | setWorldCoordinates (const vpColVector &oP)=0 |
virtual void | changeFrame (const vpHomogeneousMatrix &cMo, vpColVector &cP)=0 |
virtual void | changeFrame (const vpHomogeneousMatrix &cMo)=0 |
virtual void | projection (const vpColVector &cP, vpColVector &p)=0 |
virtual void | projection ()=0 |
void | project () |
void | project (const vpHomogeneousMatrix &cMo) |
void | track (const vpHomogeneousMatrix &cMo) |
virtual void | display (const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpColor &color=vpColor::green, const unsigned int thickness=1)=0 |
virtual void | display (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &color=vpColor::green, const unsigned int thickness=1)=0 |
virtual void | print () const |
virtual vpForwardProjection * | duplicate () const =0 |
vpForwardProjection () | |
void | setDeallocate (vpForwardProjectionDeallocatorType d) |
vpForwardProjectionDeallocatorType | getDeallocate () |
Public Attributes | |
vpColVector | oP |
vpColVector | p |
vpColVector | cP |
bool | cPAvailable |
Class that defines what is a generic geometric feature.
Each geometric feature has parameters expressed:
Definition at line 71 of file vpForwardProjection.h.
Used for memory issue especially in the vpServo class.
Enumerator | |
---|---|
user | |
vpDisplayForwardProjection |
Definition at line 219 of file vpForwardProjection.h.
|
inlinevirtual |
Destructor.
Definition at line 89 of file vpForwardProjection.h.
|
inline |
Definition at line 228 of file vpForwardProjection.h.
|
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 vpLine, vpCylinder, vpCircle, vpSphere, and vpPoint.
Referenced by project().
|
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 vpLine, vpCylinder, vpCircle, vpSphere, and vpPoint.
|
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 vpLine, vpCylinder, vpCircle, vpPoint, and vpSphere.
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 vpLine, vpCylinder, vpCircle, vpPoint, and vpSphere.
|
pure virtual |
Create an object with the same type.
Implemented in vpLine, vpCylinder, vpPoint, vpCircle, and vpSphere.
|
inline |
Definition at line 231 of file vpForwardProjection.h.
|
pure virtual |
Default initialisation of the feature parameters:
Implemented in vpCylinder, vpPoint, vpLine, vpSphere, and vpCircle.
|
virtual |
Print to stdout the feature parameters in:
Definition at line 63 of file vpForwardProjection.cpp.
References vpTracker::cP, oP, vpTracker::p, and vpColVector::t().
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 79 of file vpForwardProjection.cpp.
References vpTracker::cP, vpTracker::p, and projection().
Referenced by vpMbTracker::getPolygonFaces(), vpKeyPoint::matchPointAndDetect(), 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 99 of file vpForwardProjection.cpp.
References changeFrame(), projection(), and vpERROR_TRACE.
|
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 vpLine, vpCylinder, vpPoint, vpCircle, and vpSphere.
|
pure virtual |
Computes the feature parameters in the image plane. These parameters are than updated in the vpTracker::p public attribute.
Implemented in vpLine, vpCylinder, vpPoint, vpCircle, and vpSphere.
Referenced by project().
|
inline |
Definition at line 230 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 vpPoint, vpLine, vpCylinder, vpSphere, and vpCircle.
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 130 of file vpForwardProjection.cpp.
References project(), and vpERROR_TRACE.
Referenced by vpPose::computeResidual(), vpProjectionDisplay::displayCamera(), vpDisplay::displayFrame(), vpPose::poseRansac(), vpPose::poseVirtualVS(), vpPose::poseVirtualVSrobust(), vpWireFrameSimulator::projectCameraTrajectory(), vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().
|
inherited |
Feature coordinates expressed in the camera frame cP.
Definition at line 82 of file vpTracker.h.
Referenced by vpFeaturePoint3D::buildFrom(), vpCircle::changeFrame(), vpSphere::changeFrame(), vpCylinder::changeFrame(), vpLine::changeFrame(), vpFeatureBuilder::create(), vpCircle::init(), vpSphere::init(), vpLine::init(), vpPoint::init(), vpCylinder::init(), vpMbtPolygon::isVisible(), vpTracker::operator=(), vpPoint::operator=(), print(), vpPose::printPoint(), project(), vpCircle::projection(), vpSphere::projection(), vpCylinder::projection(), and vpLine::projection().
|
inherited |
Flag used to indicate if the feature parameters cP expressed in the camera frame are available.
Definition at line 88 of file vpTracker.h.
Referenced by vpTracker::init(), vpTracker::operator=(), and vpPoint::operator=().
vpColVector vpForwardProjection::oP |
Feature coordinates expressed in the object frame, also called world frame.
Definition at line 77 of file vpForwardProjection.h.
Referenced by vpPoint::changeFrame(), vpSphere::changeFrame(), vpCircle::changeFrame(), vpCylinder::changeFrame(), vpLine::changeFrame(), vpPoint::getWorldCoordinates(), vpCircle::init(), vpSphere::init(), vpLine::init(), vpPoint::init(), vpCylinder::init(), vpPoint::operator=(), print(), vpPose::printPoint(), vpCircle::setWorldCoordinates(), vpSphere::setWorldCoordinates(), vpLine::setWorldCoordinates(), vpCylinder::setWorldCoordinates(), and vpPoint::setWorldCoordinates().
|
inherited |
Feature coordinates expressed in the image plane p. They correspond to 2D normalized coordinates expressed in meters.
Definition at line 78 of file vpTracker.h.
Referenced by vpMbtDistanceCircle::computeInteractionMatrixError(), vpMeterPixelConversion::convertEllipse(), vpFeatureBuilder::create(), vpPoint::display(), vpSphere::display(), vpCircle::display(), vpCylinder::display(), vpProjectionDisplay::display(), vpLine::display(), vpProjectionDisplay::displayCamera(), vpDisplay::displayFrame(), vpPose::displayModel(), vpCircle::init(), vpSphere::init(), vpMeTracker::init(), vpLine::init(), vpPoint::init(), vpCylinder::init(), vpTracker::operator=(), vpPoint::operator=(), print(), vpPose::printPoint(), project(), vpCircle::projection(), vpSphere::projection(), vpCylinder::projection(), and vpLine::projection().