Visual Servoing Platform
version 3.0.1
|
#include <visp3/core/vpSphere.h>
Public Types | |
enum | vpForwardProjectionDeallocatorType { user, vpDisplayForwardProjection } |
Public Member Functions | |
void | init () |
vpSphere () | |
virtual | ~vpSphere () |
vpSphere (const vpColVector &oP) | |
vpSphere (const double X0, const double Y0, const double Z0, const double R) | |
void | setWorldCoordinates (const vpColVector &oP) |
void | setWorldCoordinates (const double X0, const double Y0, const double Z0, const double R) |
double | get_x () const |
double | get_y () const |
double | get_mu20 () const |
double | get_mu11 () const |
double | get_mu02 () const |
double | getX () const |
double | getY () const |
double | getZ () const |
double | getR () const |
void | projection () |
void | projection (const vpColVector &cP, vpColVector &p) |
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) |
vpSphere * | duplicate () const |
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 |
Class that defines what is a sphere.
Forward projection of a sphere.
Definition at line 60 of file vpSphere.h.
|
inherited |
Used for memory issue especially in the vpServo class.
Enumerator | |
---|---|
user | |
vpDisplayForwardProjection |
Definition at line 215 of file vpForwardProjection.h.
vpSphere::vpSphere | ( | ) |
|
virtual |
Definition at line 90 of file vpSphere.cpp.
vpSphere::vpSphere | ( | const vpColVector & | oP | ) |
Definition at line 77 of file vpSphere.cpp.
References init(), and setWorldCoordinates().
vpSphere::vpSphere | ( | const double | X0, |
const double | Y0, | ||
const double | Z0, | ||
const double | R | ||
) |
Definition at line 83 of file vpSphere.cpp.
References init(), and setWorldCoordinates().
|
virtual |
Perspective projection of the circle.
Implements vpForwardProjection.
Definition at line 183 of file vpSphere.cpp.
References vpForwardProjection::oP.
Referenced by changeFrame(), and display().
|
virtual |
perspective projection of the circle
Implements vpForwardProjection.
Definition at line 176 of file vpSphere.cpp.
References changeFrame(), and vpTracker::cP.
|
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. |
Implements vpForwardProjection.
Definition at line 224 of file vpSphere.cpp.
References vpFeatureDisplay::displayEllipse(), and vpTracker::p.
|
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. |
Implements vpForwardProjection.
Definition at line 208 of file vpSphere.cpp.
References changeFrame(), vpFeatureDisplay::displayEllipse(), and projection().
|
virtual |
for memory issue (used by the vpServo class only)
Implements vpForwardProjection.
Definition at line 199 of file vpSphere.cpp.
References vpSphere().
|
inline |
Definition at line 83 of file vpSphere.h.
|
inline |
Definition at line 82 of file vpSphere.h.
|
inline |
Definition at line 81 of file vpSphere.h.
|
inline |
Definition at line 79 of file vpSphere.h.
|
inline |
Definition at line 80 of file vpSphere.h.
|
inlineinherited |
Definition at line 227 of file vpForwardProjection.h.
|
inline |
Definition at line 89 of file vpSphere.h.
|
inline |
Definition at line 85 of file vpSphere.h.
|
inline |
Definition at line 86 of file vpSphere.h.
|
inline |
Definition at line 87 of file vpSphere.h.
|
virtual |
Default initialisation of the feature parameters:
Implements vpForwardProjection.
Definition at line 44 of file vpSphere.cpp.
References vpTracker::cP, vpForwardProjection::oP, vpTracker::p, and vpColVector::resize().
Referenced by vpSphere().
|
virtualinherited |
Print to stdout the feature parameters in:
Definition at line 59 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 75 of file vpForwardProjection.cpp.
References vpTracker::cP, vpTracker::p, and vpForwardProjection::projection().
Referenced by vpMbtDistanceKltCylinder::computeInteractionMatrixAndResidu(), vpKeyPoint::matchPointAndDetect(), and 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 95 of file vpForwardProjection.cpp.
References vpForwardProjection::changeFrame(), vpForwardProjection::projection(), and vpERROR_TRACE.
|
virtual |
perspective projection of the sphere
Implements vpForwardProjection.
Definition at line 97 of file vpSphere.cpp.
References vpTracker::cP, and vpTracker::p.
Referenced by display().
|
virtual |
Perspective projection of the circle.
Implements vpForwardProjection.
Definition at line 104 of file vpSphere.cpp.
References vpERROR_TRACE.
|
inlineinherited |
Definition at line 226 of file vpForwardProjection.h.
|
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. |
Implements vpForwardProjection.
Definition at line 54 of file vpSphere.cpp.
References vpForwardProjection::oP.
Referenced by vpSphere().
void vpSphere::setWorldCoordinates | ( | const double | X0, |
const double | Y0, | ||
const double | Z0, | ||
const double | R | ||
) |
Definition at line 60 of file vpSphere.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 126 of file vpForwardProjection.cpp.
References vpForwardProjection::project(), and vpERROR_TRACE.
Referenced by vpPose::computeResidual(), vpProjectionDisplay::displayCamera(), 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 77 of file vpTracker.h.
Referenced by vpFeaturePoint3D::buildFrom(), vpPoint::changeFrame(), vpCircle::changeFrame(), changeFrame(), vpCylinder::changeFrame(), vpLine::changeFrame(), vpFeatureBuilder::create(), vpPoint::get_W(), vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), vpCircle::init(), init(), vpLine::init(), vpPoint::init(), vpCylinder::init(), vpMbtPolygon::isVisible(), vpTracker::operator=(), vpPoint::operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpForwardProjection::project(), vpCircle::projection(), projection(), vpPoint::projection(), vpLine::projection(), vpCylinder::projection(), vpPoint::set_W(), vpPoint::set_X(), vpPoint::set_Y(), and vpPoint::set_Z().
|
inherited |
Flag used to indicate if the feature parameters cP expressed in the camera frame are available.
Definition at line 83 of file vpTracker.h.
Referenced by vpTracker::init(), vpTracker::operator=(), and vpPoint::operator=().
|
inherited |
Feature coordinates expressed in the object frame, also called world frame.
Definition at line 73 of file vpForwardProjection.h.
Referenced by vpPoint::changeFrame(), vpCircle::changeFrame(), changeFrame(), vpCylinder::changeFrame(), vpLine::changeFrame(), vpPoint::get_oW(), vpPoint::get_oX(), vpPoint::get_oY(), vpPoint::get_oZ(), vpPoint::getWorldCoordinates(), vpCircle::init(), init(), vpLine::init(), vpPoint::init(), vpCylinder::init(), vpPoint::operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpPoint::set_oW(), vpPoint::set_oX(), vpPoint::set_oY(), vpPoint::set_oZ(), vpCircle::setWorldCoordinates(), setWorldCoordinates(), vpPoint::setWorldCoordinates(), vpLine::setWorldCoordinates(), and vpCylinder::setWorldCoordinates().
|
inherited |
Feature coordinates expressed in the image plane p. They correspond to 2D normalized coordinates expressed in meters.
Definition at line 73 of file vpTracker.h.
Referenced by vpMbtDistanceCircle::computeInteractionMatrixError(), vpCircle::computeIntersectionPoint(), vpMeterPixelConversion::convertEllipse(), vpFeatureBuilder::create(), vpPoint::display(), display(), vpCircle::display(), vpCylinder::display(), vpProjectionDisplay::display(), vpLine::display(), vpProjectionDisplay::displayCamera(), vpPose::displayModel(), vpPoint::get_w(), vpPoint::get_x(), vpPoint::get_y(), vpCircle::init(), init(), vpMeTracker::init(), vpLine::init(), vpPoint::init(), vpCylinder::init(), vpTracker::operator=(), vpPoint::operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpForwardProjection::project(), vpCircle::projection(), projection(), vpPoint::projection(), vpLine::projection(), vpCylinder::projection(), vpPoint::set_w(), vpPoint::set_x(), and vpPoint::set_y().