![]() |
Visual Servoing Platform
version 3.3.0
|
#include <vpCylinder.h>
Public Types | |
enum | vpLineCylinderType { line1, line2 } |
enum | vpForwardProjectionDeallocatorType { user, vpDisplayForwardProjection } |
Public Member Functions | |
vpCylinder () | |
vpCylinder (const vpColVector &oP) | |
vpCylinder (double A, double B, double C, double X0, double Y0, double Z0, double R) | |
virtual | ~vpCylinder () |
void | changeFrame (const vpHomogeneousMatrix &cMo, vpColVector &cP) |
void | changeFrame (const vpHomogeneousMatrix &cMo) |
double | computeZ (double x, double y) const |
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) |
vpCylinder * | duplicate () const |
double | getRho1 () const |
double | getTheta1 () const |
double | getRho2 () const |
double | getTheta2 () const |
double | getA () const |
double | getB () const |
double | getC () const |
double | getX () const |
double | getY () const |
double | getZ () const |
double | getR () const |
void | init () |
void | projection () |
void | projection (const vpColVector &cP, vpColVector &p) |
void | setWorldCoordinates (const vpColVector &oP) |
void | setWorldCoordinates (double A, double B, double C, double X0, double Y0, double Z0, double R) |
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 cylinder.
A cylinder may be represented by the equation: with
where is the radius of the cylinder,
are the coordinates of its direction vector and
are the coordinates of the nearest point belonging to the cylinder axis from the projection center.
Setting the cylinder parameters is achieved throw the constructors with parameters or the setWorldCoordinates() methods.
Considering the set of parameters expressed in the world frame, cylinder coordinates expressed in the camera frame are obtained using changeFrame().
The projection of a cylinder on the image plane is (for non-degenerated cases) a set of two straight lines with equation:
The projection is achieved using projection() methods. The methods getRho1(), getTheta1() and getRho2(), getTheta2() allow to access to the projected line parameters.
Definition at line 95 of file vpCylinder.h.
|
inherited |
Used for memory issue especially in the vpServo class.
Enumerator | |
---|---|
user | |
vpDisplayForwardProjection |
Definition at line 210 of file vpForwardProjection.h.
Enumerator | |
---|---|
line1 | First limb of the cylinder. |
line2 | Second limb of the cylinder. |
Definition at line 98 of file vpCylinder.h.
vpCylinder::vpCylinder | ( | ) |
Default constructor.
Definition at line 94 of file vpCylinder.cpp.
|
explicit |
Create and initialize a cylinder with parameters expressed in the world frame.
o_P | : Vector of parameters ![]() |
Definition at line 117 of file vpCylinder.cpp.
vpCylinder::vpCylinder | ( | double | A, |
double | B, | ||
double | C, | ||
double | X0, | ||
double | Y0, | ||
double | Z0, | ||
double | R | ||
) |
Create and initialize a cylinder with parameters expressed in the world frame.
A,B,C,X0,Y0,Z0,R | : Cylinder parameters ![]() |
Definition at line 133 of file vpCylinder.cpp.
|
virtual |
Default constructor.
Definition at line 142 of file vpCylinder.cpp.
|
virtual |
From the cylinder parameters expressed in the world frame, compute the cylinder internal parameters
expressed in the camera frame.
cMo | : Camera to world frame transformation. |
Implements vpForwardProjection.
Definition at line 256 of file vpCylinder.cpp.
|
virtual |
From the cylinder parameters expressed in the world frame, compute the cylinder parameters
expressed in the camera frame.
cMo | : Camera to world frame transformation. |
cP_ | [out] : Parameters ![]() |
Implements vpForwardProjection.
Definition at line 269 of file vpCylinder.cpp.
double vpCylinder::computeZ | ( | double | x, |
double | y | ||
) | const |
Compute the Z coordinate for the given normalized coordinate in the camera frame.
Definition at line 362 of file vpCylinder.cpp.
|
virtual |
Display the projection of the cylinder in the image as two lines.
Implements vpForwardProjection.
Definition at line 394 of file vpCylinder.cpp.
|
virtual |
Display the projection of the cylinder in the image as two lines.
Implements vpForwardProjection.
Definition at line 381 of file vpCylinder.cpp.
|
virtual |
for memory issue (used by the vpServo class only)
Implements vpForwardProjection.
Definition at line 372 of file vpCylinder.cpp.
|
inline |
Return cylinder parameter expressed in the camera frame.
Definition at line 149 of file vpCylinder.h.
|
inline |
Return cylinder parameter expressed in the camera frame.
Definition at line 153 of file vpCylinder.h.
|
inline |
Return cylinder parameter expressed in the camera frame.
Definition at line 157 of file vpCylinder.h.
|
inlineinherited |
Definition at line 219 of file vpForwardProjection.h.
|
inline |
Return cylinder parameter corresponding to the cylinder radius.
Definition at line 173 of file vpCylinder.h.
|
inline |
Return the parameter of the line corresponding to the projection of the cylinder in the image plane.
Definition at line 125 of file vpCylinder.h.
|
inline |
Return the parameter of the line corresponding to the projection of the cylinder in the image plane.
Definition at line 138 of file vpCylinder.h.
|
inline |
Return the parameter of the line corresponding to the projection of the cylinder in the image plane.
Definition at line 131 of file vpCylinder.h.
|
inline |
Return the parameter of the line corresponding to the projection of the cylinder in the image plane.
Definition at line 144 of file vpCylinder.h.
|
inline |
Return cylinder parameter expressed in the camera frame.
Definition at line 161 of file vpCylinder.h.
|
inline |
Return cylinder parameter expressed in the camera frame.
Definition at line 165 of file vpCylinder.h.
|
inline |
Return cylinder parameter expressed in the camera frame.
Definition at line 169 of file vpCylinder.h.
|
virtual |
Default initialisation of the feature parameters:
Implements vpForwardProjection.
Definition at line 41 of file vpCylinder.cpp.
References vpTracker::cP, vpForwardProjection::oP, vpTracker::p, and vpColVector::resize().
|
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 cylinder.
From the parameters of the cylinder in the camera frame, compute the perspective projection of the cylinder in the image plane.
Implements vpForwardProjection.
Definition at line 164 of file vpCylinder.cpp.
|
virtual |
Perspective projection of the cylinder.
From the parameters of the cylinder in the camera frame , compute the perspective projection of the cylinder in the image plane.
cP_ | [in] : Cylinder parameters in the camera frame. |
p_ | [out] : Parameters of the cylinder in the image plane obtained by perspective projection. |
vpException::fatalError | : The camera is inside the cylinder. |
Implements vpForwardProjection.
Definition at line 194 of file vpCylinder.cpp.
|
inlineinherited |
Definition at line 218 of file vpForwardProjection.h.
|
virtual |
Set the cylinder parameters expressed in the world frame.
o_P | : Vector of parameters ![]() |
Implements vpForwardProjection.
Definition at line 70 of file vpCylinder.cpp.
Referenced by vpMbtDistanceKltCylinder::buildFrom().
void vpCylinder::setWorldCoordinates | ( | double | A, |
double | B, | ||
double | C, | ||
double | X0, | ||
double | Y0, | ||
double | Z0, | ||
double | R | ||
) |
Set the cylinder parameters expressed in the world frame.
A,B,C,X0,Y0,Z0,R | : Cylinder parameters ![]() |
Definition at line 80 of file vpCylinder.cpp.
|
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().
|
inherited |
Feature coordinates expressed in the camera frame cP.
Definition at line 74 of file vpTracker.h.
Referenced by vpCircle::init(), vpSphere::init(), 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(), 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(), init(), vpTracker::operator=(), and vpPose::printPoint().