ViSP
2.9.0
|
#include <vpFeatureBuilder.h>
Static Public Member Functions | |
static void | create (vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d) |
static void | create (vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot2 &d) |
static void | create (vpFeaturePoint &s, const vpCameraParameters &cam, const vpImagePoint &t) |
static void | create (vpFeaturePoint &s, const vpPoint &p) |
static void | create (vpFeaturePoint &s, const vpCameraParameters &goodCam, const vpCameraParameters &wrongCam, const vpPoint &p) |
static void | create (vpFeatureSegment &s, const vpCameraParameters &cam, const vpDot &d1, const vpDot &d2) |
static void | create (vpFeatureSegment &s, const vpCameraParameters &cam, const vpDot2 &d1, const vpDot2 &d2) |
static void | create (vpFeatureSegment &s, const vpCameraParameters &cam, const vpImagePoint &ip1, const vpImagePoint &ip2) |
static void | create (vpFeatureSegment &s, vpPoint &P1, vpPoint &P2) |
static void | create (vpFeaturePointPolar &s, const vpCameraParameters &cam, const vpDot &dot) |
static void | create (vpFeaturePointPolar &s, const vpCameraParameters &cam, const vpDot2 &dot) |
static void | create (vpFeaturePointPolar &s, const vpCameraParameters &cam, const vpImagePoint &iP) |
static void | create (vpFeaturePointPolar &s, const vpPoint &p) |
static void | create (vpFeaturePointPolar &s, const vpCameraParameters &goodCam, const vpCameraParameters &wrongCam, const vpPoint &p) |
static void | create (vpFeaturePoint3D &s, const vpPoint &p) |
static void | create (vpFeatureLine &s, const vpLine &l) |
static void | create (vpFeatureLine &s, const vpCylinder &c, const int line) |
static void | create (vpFeatureLine &s, const vpCameraParameters &cam, const vpMeLine &mel) |
static void | create (vpFeatureEllipse &s, const vpCircle &c) |
static void | create (vpFeatureEllipse &s, const vpSphere &sphere) |
static void | create (vpFeatureEllipse &s, const vpCameraParameters &cam, const vpDot &d) |
static void | create (vpFeatureEllipse &s, const vpCameraParameters &cam, const vpDot2 &d) |
static void | create (vpFeatureEllipse &s, const vpCameraParameters &cam, const vpMeEllipse &d) |
static void | create (vpFeatureVanishingPoint &s, const vpPoint &p) |
static void | create (vpFeatureVanishingPoint &s, const vpFeatureLine &l1, const vpFeatureLine &l2) |
static void | create (vpFeatureVanishingPoint &s, const vpLine &l1, const vpLine &l2) |
Class that defines conversion between trackers and visual features.
Definition at line 92 of file vpFeatureBuilder.h.
|
static |
Create a vpFeaturePoint thanks to a vpDot and the parameters of the camera. The vpDot contains only the pixel coordinates of the point in an image. Thus this method uses the camera parameters to compute the meter coordinates and in the image plan. Those coordinates are stored in the vpFeaturePoint.
s | : Visual feature to initialize. Be aware, the 3D depth requested to compute the interaction matrix is not initialized by this function. |
cam | : The parameters of the camera used to acquire the image containing the vpDot. |
d | : The vpDot used to create the vpFeaturePoint. |
The code below shows how to initialize a vpFeaturePoint visual feature. First, we initialize the , and lastly we set the 3D depth of the point which is generally the result of a pose estimation.
Definition at line 93 of file vpFeatureBuilderPoint.cpp.
References vpPixelMeterConversion::convertPoint(), vpDot::getCog(), vpFeaturePoint::set_x(), vpFeaturePoint::set_y(), and vpERROR_TRACE.
Referenced by vpPoseFeatures::addFeatureEllipse(), vpPoseFeatures::addFeatureLine(), vpPoseFeatures::addFeaturePoint(), vpPoseFeatures::addFeaturePoint3D(), vpPoseFeatures::addFeatureSegment(), vpPoseFeatures::addFeatureVanishingPoint(), vpMbtDistanceLine::computeInteractionMatrixError(), vpMbtDistanceCylinder::computeInteractionMatrixError(), and create().
|
static |
Create a vpFeaturePoint thanks to a vpDot2 and the parameters of the camera. The vpDot2 contains only the pixel coordinates of the point in an image. Thus this method uses the camera parameters to compute the meter coordinates and in the image plan. Those coordinates are stored in the vpFeaturePoint.
s | : The feature point. |
cam | : The parameters of the camera used to acquire the image containing the vpDot2. |
d | : The vpDot2 used to create the vpFeaturePoint. |
The code below shows how to initialize a vpFeaturePoint visual feature. First, we initialize the , and lastly we set the 3D depth of the point which is generally the result of a pose estimation.
Definition at line 155 of file vpFeatureBuilderPoint.cpp.
References vpPixelMeterConversion::convertPoint(), vpDot2::getCog(), vpFeaturePoint::set_x(), vpFeaturePoint::set_y(), and vpERROR_TRACE.
|
static |
Create a vpFeaturePoint thanks to a vpImagePoint and the parameters of the camera. The vpImagePoint contains only the pixel coordinates of the point in an image. Thus this method uses the camera parameters to compute the meter coordinates and in the image plan. Those coordinates are stored in the vpFeaturePoint.
s | : The feature point. |
cam | : The parameters of the camera used to acquire the image containing the point. |
ip | : The vpImagePoint used to create the vpFeaturePoint. |
The code below shows how to initialize a vpFeaturePoint visual feature. First, we initialize the , and lastly we set the 3D depth of the point which is generally the result of a pose estimation.
Definition at line 218 of file vpFeatureBuilderPoint.cpp.
References vpPixelMeterConversion::convertPoint(), vpFeaturePoint::set_x(), vpFeaturePoint::set_y(), and vpERROR_TRACE.
|
static |
Create a vpFeaturePoint thanks to a vpPoint. This method uses the point coordinates and in the image plan to set the visual feature parameters. The value of the depth in the camera frame is also computed thanks to the coordinates in the camera frame which are stored in vpPoint.
s | : The feature point. |
p | : The vpPoint used to create the vpFeaturePoint. |
Definition at line 250 of file vpFeatureBuilderPoint.cpp.
References vpFeatureException::badInitializationError, vpTracker::cP, vpPoint::get_x(), vpPoint::get_y(), vpFeaturePoint::get_Z(), vpFeaturePoint::set_x(), vpFeaturePoint::set_y(), vpFeaturePoint::set_Z(), and vpERROR_TRACE.
|
static |
Create a vpFeaturePoint thanks to a vpPoint. In this method noise is introduced during the initialization of the vpFeaturePoint. This method uses the point coordinates and in the image plan to set the visual feature parameters. The value of the depth in the camera frame is also computed thanks to the coordinates in the camera frame which are stored in vpPoint.
This function intends to introduce noise after the initialization of the parameters. Cartesian coordinates are first converted in pixel coordinates in the image using goodCam camera parameters. Then, the pixels coordinates of the point are converted back to cartesian coordinates using the noisy camera parameters wrongCam. These last parameters are stored in the vpFeaturePoint.
s | : The feature point. |
goodCam | : Camera parameters used to introduce noise. These parameters are used to convert cartesian coordinates of the point p in the image plane in pixel coordinates. |
wrongCam | : Camera parameters used to introduce noise. These parameters are used to convert pixel coordinates of the point in cartesian coordinates of the point in the image plane. |
p | : The vpPoint used to create the vpFeaturePoint. |
Definition at line 312 of file vpFeatureBuilderPoint.cpp.
References vpPixelMeterConversion::convertPoint(), vpMeterPixelConversion::convertPoint(), vpTracker::cP, vpTracker::p, vpFeaturePoint::set_x(), vpFeaturePoint::set_y(), vpFeaturePoint::set_Z(), and vpERROR_TRACE.
|
static |
Initialize a segment feature out of vpDots and camera parameters.
s | : Visual feature to initialize. |
cam | : The parameters of the camera used to acquire the image containing the point. |
d1 | : The dot corresponding to the first point of the segment. |
d2 | : The dot corresponding to the second point of the segment. |
Definition at line 62 of file vpFeatureBuilderSegment.cpp.
References vpPixelMeterConversion::convertPoint(), vpDot::getCog(), vpFeatureSegment::isNormalized(), vpFeatureSegment::setAlpha(), vpFeatureSegment::setL(), vpFeatureSegment::setXc(), and vpFeatureSegment::setYc().
|
static |
Initialize a segment feature out of vpDots and camera parameters.
s | : Visual feature to initialize. |
cam | : The parameters of the camera used to acquire the image containing the point. |
d1 | : The dot corresponding to the first point of the segment. |
d2 | : The dot corresponding to the second point of the segment. |
Definition at line 99 of file vpFeatureBuilderSegment.cpp.
References vpPixelMeterConversion::convertPoint(), vpDot2::getCog(), vpFeatureSegment::isNormalized(), vpFeatureSegment::setAlpha(), vpFeatureSegment::setL(), vpFeatureSegment::setXc(), and vpFeatureSegment::setYc().
|
static |
Initialize a segment feature out of image points and camera parameters.
s | : Visual feature to initialize. |
cam | : The parameters of the camera used to acquire the image containing the point. |
ip1 | : The image point corresponding to the first point of the segment. |
ip2 | : The image point corresponding to the second point of the segment. |
Definition at line 136 of file vpFeatureBuilderSegment.cpp.
References vpPixelMeterConversion::convertPoint(), vpFeatureSegment::isNormalized(), vpFeatureSegment::setAlpha(), vpFeatureSegment::setL(), vpFeatureSegment::setXc(), and vpFeatureSegment::setYc().
|
static |
Build a segment visual feature from two points.
s | : Visual feature to initialize. |
P1,P2 | : Two points defining the segment. These points must contain the 3D coordinates in the camera frame (cP) and the projected coordinates in the image plane (p). |
Definition at line 173 of file vpFeatureBuilderSegment.cpp.
References vpFeatureSegment::buildFrom(), vpTracker::cP, vpPoint::get_x(), and vpPoint::get_y().
|
static |
Initialize a point feature with polar coordinates using the coordinates of the point in pixels obtained by image processing. This point is the center of gravity of a dot tracked using vpDot. Using the camera parameters, the pixels coordinates of the dot are first converted in cartesian coordinates in meter in the camera frame and than in polar coordinates by:
s | : Visual feature to initialize. Be aware, the 3D depth requested to compute the interaction matrix is not initialized by this function. |
cam | : Camera parameters. |
dot | : Tracked dot. The center of gravity corresponds to the coordinates of the point in the image plane. |
The code below shows how to initialize a vpFeaturePointPolar visual feature. First, we initialize the , and lastly we set the 3D depth of the point which is generally the result of a pose estimation.
Definition at line 105 of file vpFeatureBuilderPointPolar.cpp.
References vpPixelMeterConversion::convertPoint(), vpDot::getCog(), vpFeaturePointPolar::set_rho(), vpFeaturePointPolar::set_theta(), and vpERROR_TRACE.
|
static |
Initialize a point feature with polar coordinates using the coordinates of the point in pixels obtained by image processing. This point is the center of gravity of a dot tracked using vpDot2. Using the camera parameters, the pixels coordinates of the dot are first converted in cartesian coordinates in meter in the camera frame and than in polar coordinates by:
s | : Visual feature to initialize. Be aware, the 3D depth requested to compute the interaction matrix is not initialized by this function. |
cam | : Camera parameters. |
dot | : Tracked dot. The center of gravity corresponds to the coordinates of the point in the image plane. |
The code below shows how to initialize a vpFeaturePointPolar visual feature. First, we initialize the , and lastly we set the 3D depth of the point which is generally the result of a pose estimation.
Definition at line 181 of file vpFeatureBuilderPointPolar.cpp.
References vpPixelMeterConversion::convertPoint(), vpDot2::getCog(), vpFeaturePointPolar::set_rho(), vpFeaturePointPolar::set_theta(), and vpERROR_TRACE.
|
static |
Initialize a point feature with polar coordinates using the coordinates of the point in pixels obtained by image processing. The points coordinates are stored in a vpImagePoint. Using the camera parameters, the pixels coordinates of the point are first converted in cartesian coordinates in meter in the camera frame and than in polar coordinates by:
s | : Visual feature to initialize. Be aware, the 3D depth requested to compute the interaction matrix is not initialized by this function. |
cam | : Camera parameters. |
iP | : The vpImagePoint used to create the vpFeaturePoint. |
The code below shows how to initialize a vpFeaturePointPolar visual feature. First, we initialize the , and lastly we set the 3D depth of the point which is generally the result of a pose estimation.
Definition at line 256 of file vpFeatureBuilderPointPolar.cpp.
References vpPixelMeterConversion::convertPoint(), vpFeaturePointPolar::set_rho(), vpFeaturePointPolar::set_theta(), and vpERROR_TRACE.
|
static |
Initialize a point feature with polar coordinates using the coordinates of the point , where correspond to the perspective projection of the point in the image plane and the 3D depth of the point in the camera frame. The values of are expressed in meters. From the coordinates in the image plane, the polar coordinates are computed by:
s | : Visual feature and to initialize. |
p | : A point with cartesian coordinates in the image plane corresponding to the camera perspective projection, and with 3D depth . |
Definition at line 297 of file vpFeatureBuilderPointPolar.cpp.
References vpFeatureException::badInitializationError, vpPoint::get_x(), vpPoint::get_y(), vpPoint::get_Z(), vpFeaturePointPolar::get_Z(), vpFeaturePointPolar::set_rho(), vpFeaturePointPolar::set_theta(), vpFeaturePointPolar::set_Z(), and vpERROR_TRACE.
|
static |
Initialize a point feature with polar coordinates using the coordinates of the point , where correspond to the perspective projection of the point in the image plane and the 3D depth of the point in the camera frame. The values of are expressed in meters.
This function intends to introduce noise in the conversion from cartesian to polar coordinates. Cartesian coordinates are first converted in pixel coordinates in the image using goodCam camera parameters. Then, the pixels coordinates of the point are converted back to cartesian coordinates using the noisy camera parameters wrongCam. From these new coordinates in the image plane, the polar coordinates are computed by:
s | : Visual feature and to initialize. |
goodCam | : Camera parameters used to introduce noise. These parameters are used to convert cartesian coordinates of the point p in the image plane in pixel coordinates. |
wrongCam | : Camera parameters used to introduce noise. These parameters are used to convert pixel coordinates of the point in cartesian coordinates of the point in the image plane. |
p | : A point with cartesian coordinates in the image plane corresponding to the camera perspective projection, and with 3D depth . |
Definition at line 370 of file vpFeatureBuilderPointPolar.cpp.
References vpPixelMeterConversion::convertPoint(), vpMeterPixelConversion::convertPoint(), vpPoint::get_x(), vpPoint::get_y(), vpPoint::get_Z(), vpFeaturePointPolar::set_rho(), vpFeaturePointPolar::set_theta(), vpFeaturePointPolar::set_Z(), and vpERROR_TRACE.
|
static |
Initialize a 3D point feature using the coordinates of the point in the camera frame. The values of are expressed in meters.
s | : Visual feature to initialize. |
t | : The vpPoint used to create the vpFeaturePoint. |
Definition at line 67 of file vpFeatureBuilderPoint3D.cpp.
References vpTracker::cP, vpFeaturePoint3D::set_X(), vpFeaturePoint3D::set_Y(), vpFeaturePoint3D::set_Z(), and vpERROR_TRACE.
|
static |
Initialize a line feature thanks to a vpLine. A vpFeatureLine contains the parameters which are expressed in meter. It also contains the parameters of a plan equation . In vpLine there are the parameters of two plans, but the one which have the biggest D parameter is copied in the vpFeatureLine parameters.
s | : Visual feature to initialize. |
t | : The vpLine used to create the vpFeatureLine. |
Definition at line 64 of file vpFeatureBuilderLine.cpp.
References vpTracker::cP, vpLine::getRho(), vpLine::getTheta(), vpFeatureLine::setABCD(), vpFeatureLine::setRhoTheta(), and vpERROR_TRACE.
|
static |
Initialize a line feature thanks to a vpCylinder. A vpFeatureLine contains the parameters which are expressed in meter. It also contains the parameters of a plan equation . These parameters are computed thanks to the parameters that are contained in vpCylinder. It is possible to choose which edge of the cylinder to use to initialize the vpFeatureLine.
s | : Visual feature to initialize. |
t | : The vpLine used to create the vpFeatureLine. |
line | : The cylinder edge used to create the line feature. It can be vpCylinder::line1 or vpCylinder::line2. |
Definition at line 112 of file vpFeatureBuilderLine.cpp.
References vpCylinder::getA(), vpCylinder::getB(), vpCylinder::getC(), vpCylinder::getR(), vpCylinder::getRho1(), vpCylinder::getRho2(), vpCylinder::getTheta1(), vpCylinder::getTheta2(), vpCylinder::getX(), vpCylinder::getY(), vpCylinder::getZ(), vpCylinder::line1, vpFeatureLine::setABCD(), vpFeatureLine::setRhoTheta(), vpMath::sqr(), and vpERROR_TRACE.
|
static |
Initialize a line feature thanks to a vpMeLine and the parameters of the camera. A vpFeatureLine contains the parameters which are expressed in meter. In vpMeLine these parameters are given in pixel. The conversion is done thanks to the camera parameters.
s | : Visual feature to initialize. |
cam | : The parameters of the camera used to acquire the image containing the line. |
t | : The vpLine used to create the vpFeatureLine. |
The code below shows how to initialize a vpFeatureLine visual feature. First, we initialize the , and lastly we set the parameters of the plane which is generally the result of a pose estimation.
Definition at line 214 of file vpFeatureBuilderLine.cpp.
References vpFeatureLine::buildFrom(), vpPixelMeterConversion::convertLine(), vpMeLine::getRho(), vpMeLine::getTheta(), and vpERROR_TRACE.
|
static |
create vpFeatureEllipse feature
Initialize an ellipse feature thanks to a vpCircle. The vpFeatureEllipse is initialized thanks to the parameters of the circle in the camera frame and in the image plan. All the parameters are given in meter.
s | : Visual feature to initialize. |
t | : The vpCircle used to create the vpFeatureEllipse. |
Definition at line 69 of file vpFeatureBuilderEllipse.cpp.
References vpFeatureEllipse::buildFrom(), vpTracker::cP, vpTracker::p, vpFeatureEllipse::setABC(), and vpERROR_TRACE.
|
static |
Initialize an ellipse feature thanks to a vpSphere. The vpFeatureEllipse is initialized thanks to the parameters of the sphere in the camera frame and in the image plan. All the parameters are given in meter.
s | : Visual feature to initialize. |
t | : The vpSphere used to create the vpFeatureEllipse. |
Definition at line 120 of file vpFeatureBuilderEllipse.cpp.
References vpFeatureEllipse::buildFrom(), vpTracker::cP, vpTracker::p, vpFeatureEllipse::setABC(), vpMath::sqr(), and vpERROR_TRACE.
|
static |
Initialize an ellipse feature thanks to a vpDot and camera parameters. The vpFeatureEllipse is initialized thanks to the parameters of the dot given in pixel. The camera parameters are used to convert the pixel parameters to parameters given in meter.
s | : Visual feature to initialize. |
cam | : The parameters of the camera used to acquire the image containing the vpDot. |
t | : The vpDot used to create the vpFeatureEllipse. |
Definition at line 170 of file vpFeatureBuilderEllipse.cpp.
References vpFeatureEllipse::buildFrom(), vpPixelMeterConversion::convertMoment(), vpDot::m00, vpDot::m01, vpDot::m02, vpDot::m10, vpDot::m11, vpDot::m20, vpMath::sqr(), and vpERROR_TRACE.
|
static |
Initialize an ellipse feature thanks to a vpDot2 and camera parameters. The vpFeatureEllipse is initialized thanks to the parameters of the dot given in pixel. The camera parameters are used to convert the pixel parameters to parameters given in meter.
s | : Visual feature to initialize. |
cam | : The parameters of the camera used to acquire the image containing the vpDot2. |
t | : The vpDot2 used to create the vpFeatureEllipse. |
Definition at line 232 of file vpFeatureBuilderEllipse.cpp.
References vpFeatureEllipse::buildFrom(), vpPixelMeterConversion::convertMoment(), vpDot2::m00, vpDot2::m01, vpDot2::m02, vpDot2::m10, vpDot2::m11, vpDot2::m20, vpMath::sqr(), and vpERROR_TRACE.
|
static |
Initialize an ellipse feature thanks to a vpMeEllipse and camera parameters. The vpFeatureEllipse is initialized thanks to the parameters of the ellipse given in pixel. The camera parameters are used to convert the pixel parameters to parameters given in meter.
s | : Visual feature to initialize. |
cam | : The parameters of the camera used to acquire the image containing the vpDot2. |
t | : The vpMeEllipse used to create the vpFeatureEllipse. |
Definition at line 292 of file vpFeatureBuilderEllipse.cpp.
References vpFeatureEllipse::buildFrom(), vpPixelMeterConversion::convertMoment(), vpMeEllipse::get_m00(), vpMeEllipse::get_m01(), vpMeEllipse::get_m02(), vpMeEllipse::get_m10(), vpMeEllipse::get_m11(), vpMeEllipse::get_m20(), vpMath::sqr(), and vpERROR_TRACE.
|
static |
create vpFeatureVanishingPoint feature from the 2D coordinates of a point in the image plane
Initialize a vpFeatureVanishingPoint thanks to a vpPoint. The vpFeatureVanishingPoint is initialized thanks to the parameters of the point in the image plan. All the parameters are given in meter.
s | : Visual feature to initialize. |
t | : The vpPoint used to create the vpFeatureVanishingPoint. |
Definition at line 63 of file vpFeatureBuilderVanishingPoint.cpp.
References vpPoint::get_x(), vpPoint::get_y(), vpFeatureVanishingPoint::set_x(), vpFeatureVanishingPoint::set_y(), and vpERROR_TRACE.
|
static |
create vpFeatureVanishingPoint feature from 2 FeatureLine, ie lines in the image plane (error if the 2 lines are parallel)
Initialize a vpFeatureVanishingPoint thanks to two vpFeatureLine. The vpFeatureVanishingPoint is initialized thanks to the coordinate of the intersection point in the image plan. All the parameters are given in meter.
s | : Visual feature to initialize. |
L1 | : The first vpFeatureLine. |
L2 | : The second vpFeatureLine. |
Definition at line 92 of file vpFeatureBuilderVanishingPoint.cpp.
References vpFeatureException::badInitializationError, vpFeatureLine::getRho(), vpFeatureLine::getTheta(), vpFeatureVanishingPoint::set_x(), vpFeatureVanishingPoint::set_y(), and vpCERROR.
|
static |
create vpFeatureVanishingPoint feature from 2 Lines, (error if the 2 lines are parallel in the image plane)
Initialize a vpFeatureVanishingPoint thanks to two vpLine. The vpFeatureVanishingPoint is initialized thanks to the coordinate of the intersection point in the image plan. All the parameters are given in meter.
Definition at line 147 of file vpFeatureBuilderVanishingPoint.cpp.
References create().