![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpPlane.h>
Public Types | |
| enum | vpPlaneFrame { object_frame , camera_frame } |
Public Member Functions | |
| vpPlane () | |
| vpPlane (const vpPlane &P) | |
| vpPlane (double A, double B, double C, double D) | |
| vpPlane (const vpPoint &P, const vpColVector &normal, const vpPlaneFrame &frame=camera_frame) | |
| vpPlane (const vpPoint &P, const vpPoint &Q, const vpPoint &R, const vpPlaneFrame &frame=camera_frame) | |
| double | computeZ (double x, double y) const |
| vpPlane & | init (const vpPoint &P, const vpColVector &normal, const vpPlaneFrame &frame=camera_frame) |
| vpPlane & | init (const vpPoint &P, const vpPoint &Q, const vpPoint &R, const vpPlaneFrame &frame=camera_frame) |
| vpPlane & | init (const vpColVector &P, const vpColVector &n) |
| vpPlane & | init (const vpPlane &P) |
| void | setA (double a) |
| void | setB (double b) |
| void | setC (double c) |
| void | setD (double d) |
| void | setABCD (double a, double b, double c, double d) |
| vpPlane & | operator= (const vpPlane &f) |
| double | getA () const |
| double | getB () const |
| double | getC () const |
| double | getD () const |
| vpColVector | getABCD () const |
| vpColVector | abcd () const |
| vpColVector | getNormal () const |
| void | getNormal (vpColVector &n) const |
| void | projectionPointOnPlan (const vpPoint &P, vpPoint &Pproj, const vpPlaneFrame &frame=camera_frame) const |
| double | rayIntersection (const vpPoint &M0, const vpPoint &M1, vpColVector &H) const |
| double | getIntersection (const vpColVector &M1, vpColVector &H) const |
| void | changeFrame (const vpHomogeneousMatrix &cMo) |
Public Attributes | |
| double | A |
| double | B |
| double | C |
| double | D |
Friends | |
| VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpPlane &p) |
This class defines the container for a plane geometrical structure.
A plane is given by the equation
where (X,Y,Z) are the coordinates of a point and where
is the normal vector of the plane.
| vpPlane::vpPlane | ( | ) |
Basic constructor that set the plane parameters A, B, C, D to zero.
Definition at line 61 of file vpPlane.cpp.
Referenced by init(), init(), init(), init(), operator<<, operator=(), and vpPlane().
| vpPlane::vpPlane | ( | const vpPlane & | P | ) |
| vpPlane::vpPlane | ( | double | a, |
| double | b, | ||
| double | c, | ||
| double | d ) |
Plane constructor from A, B, C, D parameters.
A plane is given by the equation
where (X,Y,Z) are the coordinates of a point and
is the normal vector of the plane.
| [in] | a | : Plane |
| [in] | b | : Plane |
| [in] | c | : Plane |
| [in] | d | : Plane |
Definition at line 75 of file vpPlane.cpp.
| vpPlane::vpPlane | ( | const vpPoint & | P, |
| const vpColVector & | normal, | ||
| const vpPlaneFrame & | frame = camera_frame ) |
Plane constructor from a point P on the plane and the normal to the plane.
A plane is given by the equation
where (X,Y,Z) are the coordinates of a point and
is the normal vector of the plane.
| P | : A point with coordinates (X,Y,Z) on the plane. The frame parameter indicates if the coordinates of this point are expressed in the camera or object frame. |
| normal | : The normal to the plane. |
| frame | : Indicates if the plane should be initialized from the point P coordinates expressed in the camera or object frame.
|
Definition at line 108 of file vpPlane.cpp.
References A, B, C, camera_frame, D, vpPoint::get_oX(), vpPoint::get_oY(), vpPoint::get_oZ(), vpPoint::get_X(), vpPoint::get_Y(), and vpPoint::get_Z().
| vpPlane::vpPlane | ( | const vpPoint & | P, |
| const vpPoint & | Q, | ||
| const vpPoint & | R, | ||
| const vpPlaneFrame & | frame = camera_frame ) |
Compute the equation of a plane given three point P, Q, R.
The normal to the plane is given by: n = PQ x PR
| [in] | P | : First points on the plane. |
| [in] | Q | : Second points on the plane. |
| [in] | R | : Third points on the plane. |
| [in] | frame | : Indicates if the plane should be initialized from the points coordinates expressed in the camera or object frame. |
Definition at line 285 of file vpPlane.cpp.
|
inline |
| void vpPlane::changeFrame | ( | const vpHomogeneousMatrix & | cMo | ) |
Considering the plane in the Ro frame computes the equation of the plane in the Rc frame.
| cMo | : Homogeneous transformation from Rc to Ro frames. |
Definition at line 465 of file vpPlane.cpp.
Referenced by vpMbKltTracker::setPose().
| double vpPlane::computeZ | ( | double | x, |
| double | y ) const |
Compute Z value of a 3D point located on the plane from its perspective projection coordinates.
| [in] | x | : Coordinate of a point in the image plane along x-axis. This coordinate is the one obtained by perspective projection of a 3D point. |
| [in] | y | : Coordinate of a point in the image plane along y-axis. This coordinate is the one obtained by perspective projection of a 3D point. |
Definition at line 298 of file vpPlane.cpp.
References getA(), getB(), getC(), and getD().
Referenced by vpPose::computePlanarObjectPoseFromRGBD(), vpPose::computePlanarObjectPoseFromRGBD(), and vpPose::computePlanarObjectPoseWithAtLeast3Points().
|
inline |
Definition at line 100 of file vpPlane.h.
References A.
Referenced by vpMbTracker::addPolygon(), vpMbTracker::addProjectionErrorPolygon(), vpMbtDistanceCircle::buildFrom(), vpKeyPoint::compute3D(), vpKeyPoint::compute3D(), computeZ(), init(), rayIntersection(), and vpPlane().
|
inline |
|
inline |
Definition at line 102 of file vpPlane.h.
References B.
Referenced by vpMbTracker::addPolygon(), vpMbTracker::addProjectionErrorPolygon(), vpMbtDistanceCircle::buildFrom(), vpKeyPoint::compute3D(), vpKeyPoint::compute3D(), computeZ(), init(), rayIntersection(), and vpPlane().
|
inline |
Definition at line 104 of file vpPlane.h.
References C.
Referenced by vpMbTracker::addPolygon(), vpMbTracker::addProjectionErrorPolygon(), vpMbtDistanceCircle::buildFrom(), vpKeyPoint::compute3D(), vpKeyPoint::compute3D(), computeZ(), init(), rayIntersection(), and vpPlane().
|
inline |
Definition at line 106 of file vpPlane.h.
References D.
Referenced by vpKeyPoint::compute3D(), vpKeyPoint::compute3D(), computeZ(), getIntersection(), vpMbtDistanceKltPoints::init(), init(), rayIntersection(), vpMbKltTracker::setPose(), and vpPlane().
| double vpPlane::getIntersection | ( | const vpColVector & | M1, |
| vpColVector & | H ) const |
| vpColVector vpPlane::getNormal | ( | ) | const |
Return the normal to the plane.
A plane is given by the equation
where (x,y,z) is a point of R^3 and (A,B,C) are the coordinates of the normal.
Definition at line 311 of file vpPlane.cpp.
Referenced by vpMbtDistanceKltPoints::init(), and vpMbKltTracker::setPose().
| void vpPlane::getNormal | ( | vpColVector & | n | ) | const |
Return the normal to the plane.
A plane is given by the equation
where (X,Y,Z) are the coordinates of a point and
is the normal vector of the plane.
Definition at line 335 of file vpPlane.cpp.
References A, B, C, and vpColVector::resize().
| vpPlane & vpPlane::init | ( | const vpColVector & | P, |
| const vpColVector & | normal ) |
Initialize the plane from a point P on the plane and the normal n to the plane.
| P | : A point with coordinates (x,y,z) on the plane. The size of the vector should be 3, with P[0]=x, with P[1]=y, with P[2]=z. |
| normal | : The normal to the plane. |
Definition at line 190 of file vpPlane.cpp.
| vpPlane & vpPlane::init | ( | const vpPoint & | P, |
| const vpColVector & | normal, | ||
| const vpPlaneFrame & | frame = camera_frame ) |
Initialize the plane from a point P on the plane and the normal to the plane.
| P | : A point with coordinates (X,Y,Z) on the plane. The frame parameter indicates if the coordinates of this point are expressed in the camera or object frame. |
| normal | : The normal to the plane. |
| frame | : Indicates if the plane should be initialized from the point P coordinates expressed in the camera (X, Y, Z) or object frame (oX, oY, oZ).
|
Definition at line 159 of file vpPlane.cpp.
References A, B, C, camera_frame, D, vpPoint::get_oX(), vpPoint::get_oY(), vpPoint::get_oZ(), vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), and vpPlane().
Referenced by vpPlane().
| vpPlane & vpPlane::init | ( | const vpPoint & | P, |
| const vpPoint & | Q, | ||
| const vpPoint & | R, | ||
| const vpPlaneFrame & | frame = camera_frame ) |
Compute the equation of a plane given three point P, Q, R.
The normal to the plane is given by: n = PQ x PR
| [in] | P | : First points on the plane. |
| [in] | Q | : Second points on the plane. |
| [in] | R | : Third points on the plane. |
| [in] | frame | : Indicates if the plane should be initialized from the points coordinates expressed in the camera or object frame. |
Definition at line 218 of file vpPlane.cpp.
References A, B, C, camera_frame, vpColVector::cross(), D, vpPoint::get_oX(), vpPoint::get_oY(), vpPoint::get_oZ(), vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), and vpPlane().
| BEGIN_VISP_NAMESPACE vpPlane & vpPlane::operator= | ( | const vpPlane & | p | ) |
| void vpPlane::projectionPointOnPlan | ( | const vpPoint & | P, |
| vpPoint & | Pproj, | ||
| const vpPlaneFrame & | frame = camera_frame ) const |
Compute the coordinates of the projection of a point on the plane.
| [in] | P | : Point to be projected on the plane. |
| [out] | Pproj | : Projected point. |
| [in] | frame | : Indicates if the point P coordinates are expressed in the camera or object frame.
|
Definition at line 358 of file vpPlane.cpp.
References A, B, C, camera_frame, D, vpPoint::get_oW(), vpPoint::get_oX(), vpPoint::get_oY(), vpPoint::get_oZ(), vpPoint::get_W(), vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), vpPoint::set_oW(), vpPoint::set_oX(), vpPoint::set_oY(), vpPoint::set_oZ(), vpPoint::set_W(), vpPoint::set_X(), vpPoint::set_Y(), and vpPoint::set_Z().
| double vpPlane::rayIntersection | ( | const vpPoint & | M0, |
| const vpPoint & | M1, | ||
| vpColVector & | H ) const |
Definition at line 389 of file vpPlane.cpp.
References vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), getA(), getB(), getC(), and getD().
|
inline |
|
inline |
Set plane parameters A, B, C, D.
|
inline |
|
inline |
|
inline |
|
friend |
Print the plane parameters as a stream like "(A,B,C,D) " where A,B,C and D correspond to the parameters of the plane.
Definition at line 488 of file vpPlane.cpp.
References operator<<, and vpPlane().
Referenced by operator<<.
| double vpPlane::A |
Definition at line 60 of file vpPlane.h.
Referenced by abcd(), changeFrame(), getA(), getABCD(), getIntersection(), getNormal(), getNormal(), init(), init(), init(), operator=(), projectionPointOnPlan(), vpPlane(), vpPlane(), vpPlane(), vpPlane(), and vpPlane().
| double vpPlane::B |
Definition at line 60 of file vpPlane.h.
Referenced by abcd(), changeFrame(), getABCD(), getB(), getIntersection(), getNormal(), getNormal(), init(), init(), init(), operator=(), projectionPointOnPlan(), vpPlane(), vpPlane(), vpPlane(), vpPlane(), and vpPlane().
| double vpPlane::C |
Definition at line 60 of file vpPlane.h.
Referenced by abcd(), changeFrame(), getABCD(), getC(), getIntersection(), getNormal(), getNormal(), init(), init(), init(), operator=(), projectionPointOnPlan(), vpPlane(), vpPlane(), vpPlane(), vpPlane(), and vpPlane().