ViSP
2.9.0
|
#include <vpPoint.h>
Public Types | |
enum | vpForwardProjectionDeallocatorType { user, vpDisplayForwardProjection } |
Public Member Functions | |
vpPoint () | |
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, const unsigned int thickness=1) |
void | display (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &color=vpColor::green, const unsigned int thickness=1) |
void | display (const vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &color=vpColor::green, const 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 &_oP) |
vpColVector | getWorldCoordinates (void) |
void | init () |
vpPoint & | operator= (const vpPoint &vpp) |
void | projection (const vpColVector &_cP, vpColVector &_p) |
void | projection () |
void | set_X (const double X) |
void | set_Y (const double Y) |
void | set_Z (const double Z) |
void | set_W (const double W) |
void | set_oX (const double X) |
void | set_oY (const double Y) |
void | set_oZ (const double Z) |
void | set_oW (const double W) |
void | set_x (const double x) |
void | set_y (const double y) |
void | set_w (const double w) |
void | setWorldCoordinates (const double ox, const double oy, const double oz) |
void | setWorldCoordinates (const vpColVector &_oP) |
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, 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 219 of file vpForwardProjection.h.
vpPoint::vpPoint | ( | ) |
Basic constructor.
Definition at line 67 of file vpPoint.cpp.
References init().
Referenced by duplicate().
|
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 150 of file vpPoint.cpp.
References vpForwardProjection::oP, and vpColVector::resize().
Referenced by vpMbtPolygon::changeFrame(), vpPose::computeResidual(), display(), vpMbtDistanceLine::display(), vpMbtDistanceCylinder::display(), vpMbtDistanceLine::initMovingEdge(), vpMbtDistanceCylinder::initMovingEdge(), vpMbtDistanceLine::updateMovingEdge(), and vpMbtDistanceCylinder::updateMovingEdge().
|
inlinevirtual |
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.
|
virtual |
Display the point in the image.
Implements vpForwardProjection.
Definition at line 309 of file vpPoint.cpp.
References vpFeatureDisplay::displayPoint(), and vpTracker::p.
|
virtual |
Display the point in the image.
Implements vpForwardProjection.
Definition at line 252 of file vpPoint.cpp.
References changeFrame(), vpFeatureDisplay::displayPoint(), and projection().
void vpPoint::display | ( | const vpImage< vpRGBa > & | I, |
const vpHomogeneousMatrix & | cMo, | ||
const vpCameraParameters & | cam, | ||
const vpColor & | color = vpColor::green , |
||
const unsigned int | thickness = 1 |
||
) |
Display the point in the image.
Definition at line 273 of file vpPoint.cpp.
References changeFrame(), vpFeatureDisplay::displayPoint(), and projection().
|
virtual |
For memory issue (used by the vpServo class only).
Implements vpForwardProjection.
Definition at line 242 of file vpPoint.cpp.
References vpPoint().
|
inline |
|
inline |
Get the point X coordinate in the object frame.
Definition at line 127 of file vpPoint.h.
Referenced by vpMbtDistanceLine::buildFrom(), vpMbtDistanceCylinder::buildFrom(), vpPose::coplanar(), vpMbTracker::extractCylinders(), vpMbTracker::getGravityCenter(), vpPose::poseDementhonNonPlan(), vpPose::poseDementhonPlan(), vpPose::poseLagrangeNonPlan(), vpPose::poseLagrangePlan(), vpPose::poseLowe(), vpPose::poseRansac(), and vpPose::ransac().
|
inline |
Get the point Y coordinate in the object frame.
Definition at line 129 of file vpPoint.h.
Referenced by vpMbtDistanceLine::buildFrom(), vpMbtDistanceCylinder::buildFrom(), vpPose::coplanar(), vpMbTracker::extractCylinders(), vpPose::poseDementhonNonPlan(), vpPose::poseDementhonPlan(), vpPose::poseLagrangeNonPlan(), vpPose::poseLagrangePlan(), vpPose::poseLowe(), vpPose::poseRansac(), and vpPose::ransac().
|
inline |
Get the point Z coordinate in the object frame.
Definition at line 131 of file vpPoint.h.
Referenced by vpMbtDistanceLine::buildFrom(), vpMbtDistanceCylinder::buildFrom(), vpPose::coplanar(), vpMbTracker::extractCylinders(), vpPose::poseDementhonNonPlan(), vpPose::poseDementhonPlan(), vpPose::poseLagrangeNonPlan(), vpPose::poseLagrangePlan(), vpPose::poseLowe(), vpPose::poseRansac(), and vpPose::ransac().
|
inline |
Get the point W coordinate in the camera frame.
Definition at line 124 of file vpPoint.h.
Referenced by vpPlane::projectionPointOnPlan().
|
inline |
Get the point w coordinate in the image plane.
|
inline |
Get the point X coordinate in the camera frame.
Definition at line 118 of file vpPoint.h.
Referenced by vpPlane::init(), vpMbtPolygon::isVisible(), vpPlane::projectionPointOnPlan(), vpPlane::rayIntersection(), vpImageSimulator::setCameraPosition(), and vpPlane::vpPlane().
|
inline |
Get the point x coordinate in the image plane.
Definition at line 136 of file vpPoint.h.
Referenced by vpPose::computeResidual(), vpFeatureBuilder::create(), vpPose::poseFromRectangle(), vpPose::poseLagrangeNonPlan(), vpPose::poseLagrangePlan(), vpPose::poseLowe(), vpPose::poseRansac(), vpPose::poseVirtualVS(), vpPose::poseVirtualVSrobust(), vpHomography::project(), vpWireFrameSimulator::projectCameraTrajectory(), vpPose::ransac(), vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().
|
inline |
Get the point Y coordinate in the camera frame.
Definition at line 120 of file vpPoint.h.
Referenced by vpPlane::init(), vpMbtPolygon::isVisible(), vpPlane::projectionPointOnPlan(), vpPlane::rayIntersection(), vpImageSimulator::setCameraPosition(), and vpPlane::vpPlane().
|
inline |
Get the point y coordinate in the image plane.
Definition at line 138 of file vpPoint.h.
Referenced by vpPose::computeResidual(), vpFeatureBuilder::create(), vpPose::poseFromRectangle(), vpPose::poseLagrangeNonPlan(), vpPose::poseLagrangePlan(), vpPose::poseLowe(), vpPose::poseRansac(), vpPose::poseVirtualVS(), vpPose::poseVirtualVSrobust(), vpHomography::project(), vpWireFrameSimulator::projectCameraTrajectory(), vpPose::ransac(), vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().
|
inline |
Get the point Z coordinate in the camera frame.
Definition at line 122 of file vpPoint.h.
Referenced by vpFeatureBuilder::create(), vpProjectionDisplay::displayCamera(), vpPlane::init(), vpMbtPolygon::isVisible(), vpPose::poseVirtualVS(), vpPose::poseVirtualVSrobust(), vpPlane::projectionPointOnPlan(), vpPlane::rayIntersection(), vpImageSimulator::setCameraPosition(), and vpPlane::vpPlane().
|
inlineinherited |
Definition at line 231 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 97 of file vpPoint.cpp.
References vpForwardProjection::oP.
void vpPoint::getWorldCoordinates | ( | vpColVector & | _oP | ) |
Get the point world coordinates. We mean here the coordinates of the point in the object frame.
Definition at line 108 of file vpPoint.cpp.
References vpForwardProjection::oP.
vpColVector vpPoint::getWorldCoordinates | ( | void | ) |
Definition at line 118 of file vpPoint.cpp.
References vpForwardProjection::oP.
|
virtual |
Basic construction.
Implements vpForwardProjection.
Definition at line 57 of file vpPoint.cpp.
References vpTracker::cP, vpForwardProjection::oP, vpTracker::p, vpColVector::resize(), and set_Z().
Referenced by vpPoint().
Definition at line 295 of file vpPoint.cpp.
References vpTracker::cP, vpTracker::cPAvailable, vpForwardProjection::oP, and vpTracker::p.
|
virtualinherited |
Print to stdout the feature parameters in:
Definition at line 63 of file vpForwardProjection.cpp.
References vpTracker::cP, vpForwardProjection::oP, vpTracker::p, and vpColVector::t().
|
inherited |
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 vpForwardProjection::projection().
Referenced by vpForwardProjection::track().
|
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 99 of file vpForwardProjection.cpp.
References vpForwardProjection::changeFrame(), vpForwardProjection::projection(), and vpERROR_TRACE.
|
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 132 of file vpPoint.cpp.
References vpColVector::resize().
Referenced by vpMbtPolygon::changeFrame(), vpPose::computeResidual(), vpMbtPolygon::computeRoiClipped(), vpMbtDistanceCylinder::display(), vpMbtDistanceCylinder::initMovingEdge(), and vpMbtDistanceCylinder::updateMovingEdge().
|
inlinevirtual |
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 167 of file vpPoint.h.
Referenced by display().
|
inline |
|
inline |
Set the point X coordinate in the object frame.
Definition at line 185 of file vpPoint.h.
Referenced by vpPose::poseDementhonNonPlan(), and vpPose::poseDementhonPlan().
|
inline |
Set the point Y coordinate in the object frame.
Definition at line 187 of file vpPoint.h.
Referenced by vpPose::poseDementhonNonPlan(), and vpPose::poseDementhonPlan().
|
inline |
Set the point Z coordinate in the object frame.
Definition at line 189 of file vpPoint.h.
Referenced by vpPose::poseDementhonNonPlan(), and vpPose::poseDementhonPlan().
|
inline |
Set the point W coordinate in the camera frame.
Definition at line 182 of file vpPoint.h.
Referenced by vpPlane::projectionPointOnPlan().
|
inline |
|
inline |
Set the point X coordinate in the camera frame.
Definition at line 176 of file vpPoint.h.
Referenced by vpMbtPolygon::isVisible(), and vpPlane::projectionPointOnPlan().
|
inline |
Set the point x coordinate in the image plane.
Definition at line 194 of file vpPoint.h.
Referenced by vpPose::computeTransformation(), vpPose::findMatch(), vpMbTracker::initClick(), vpMbTracker::initFromPoints(), vpHomography::project(), and vpPose::ransac().
|
inline |
Set the point Y coordinate in the camera frame.
Definition at line 178 of file vpPoint.h.
Referenced by vpMbtPolygon::isVisible(), and vpPlane::projectionPointOnPlan().
|
inline |
Set the point y coordinate in the image plane.
Definition at line 196 of file vpPoint.h.
Referenced by vpPose::computeTransformation(), vpPose::findMatch(), vpMbTracker::initClick(), vpMbTracker::initFromPoints(), vpHomography::project(), and vpPose::ransac().
|
inline |
Set the point Z coordinate in the camera frame.
Definition at line 180 of file vpPoint.h.
Referenced by init(), vpMbtPolygon::isVisible(), and vpPlane::projectionPointOnPlan().
|
inlineinherited |
Definition at line 230 of file vpForwardProjection.h.
void vpPoint::setWorldCoordinates | ( | const double | ox, |
const double | oy, | ||
const double | oz | ||
) |
Set the point world coordinates. We mean here the coordinates of the point in the object frame.
set the point world coordinates
Definition at line 74 of file vpPoint.cpp.
References vpForwardProjection::oP.
Referenced by vpMbtDistanceLine::buildFrom(), vpPose::computeResidual(), vpPose::computeTransformation(), vpDisplay::displayCamera(), vpDisplay::displayFrame(), vpMbTracker::extractCylinders(), vpMbTracker::extractFaces(), vpMbTracker::extractLines(), vpPose::findMatch(), vpMbTracker::getGravityCenter(), vpProjectionDisplay::init(), vpMbTracker::initClick(), vpMbTracker::initFromPoints(), vpMbTracker::loadCAOModel(), vpPose::poseFromRectangle(), vpWireFrameSimulator::projectCameraTrajectory(), vpPose::ransac(), vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().
|
virtual |
Set the point world coordinates. We mean here the coordinates of the point in the object frame.
Implements vpForwardProjection.
Definition at line 86 of file vpPoint.cpp.
References vpForwardProjection::oP.
|
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 130 of file vpForwardProjection.cpp.
References vpForwardProjection::project(), and vpERROR_TRACE.
Referenced by vpPose::computeResidual(), vpProjectionDisplay::displayCamera(), vpDisplay::displayFrame(), vpPose::poseRansac(), vpPose::poseVirtualVS(), vpPose::poseVirtualVSrobust(), vpWireFrameSimulator::projectCameraTrajectory(), vpImageSimulator::setCameraPosition(), vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().
|
friend |
Definition at line 289 of file vpPoint.cpp.
|
inherited |
Feature coordinates expressed in the camera frame cP.
Definition at line 82 of file vpTracker.h.
Referenced by vpFeaturePoint3D::buildFrom(), vpSphere::changeFrame(), vpCircle::changeFrame(), vpCylinder::changeFrame(), vpLine::changeFrame(), vpFeatureBuilder::create(), vpCircle::init(), vpSphere::init(), vpLine::init(), init(), vpCylinder::init(), vpTracker::operator=(), operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpForwardProjection::project(), vpSphere::projection(), vpCircle::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 operator=().
|
inherited |
Feature coordinates expressed in the object frame, also called world frame.
Definition at line 77 of file vpForwardProjection.h.
Referenced by changeFrame(), vpSphere::changeFrame(), vpCircle::changeFrame(), vpCylinder::changeFrame(), vpLine::changeFrame(), getWorldCoordinates(), vpCircle::init(), vpSphere::init(), vpLine::init(), init(), vpCylinder::init(), operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpSphere::setWorldCoordinates(), vpCircle::setWorldCoordinates(), vpLine::setWorldCoordinates(), vpCylinder::setWorldCoordinates(), and 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 vpFeatureBuilder::create(), 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(), init(), vpCylinder::init(), vpTracker::operator=(), operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpForwardProjection::project(), vpSphere::projection(), vpCircle::projection(), vpCylinder::projection(), and vpLine::projection().