Visual Servoing Platform
version 3.6.1 under development (2024-11-21)
|
#include <visp3/visual_features/vpFeatureBuilder.h>
Class that defines conversion between trackers and visual features.
Definition at line 91 of file vpFeatureBuilder.h.
|
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 plane. All the parameters are given in meter.
s | : Visual feature to initialize. |
t | : The vpCircle used to create the vpFeatureEllipse. |
Definition at line 60 of file vpFeatureBuilderEllipse.cpp.
References vpFeatureEllipse::buildFrom(), vpTracker::cP, vpTracker::p, and vpFeatureEllipse::setABC().
|
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 98 of file vpFeatureBuilderEllipse.cpp.
References vpFeatureEllipse::buildFrom(), vpTracker::cP, vpTracker::p, vpFeatureEllipse::setABC(), and vpMath::sqr().
|
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 103 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(), and vpMath::sqr().
|
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 59 of file vpFeatureBuilderLine.cpp.
References vpTracker::cP, vpLine::getRho(), vpLine::getTheta(), vpFeatureLine::setABCD(), and vpFeatureLine::setRhoTheta().
|
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 213 of file vpFeatureBuilderPoint.cpp.
References vpPixelMeterConversion::convertPoint(), vpFeaturePoint::set_x(), and vpFeaturePoint::set_y().
Referenced by vpMbtDistanceCircle::computeInteractionMatrixError(), vpMbtDistanceLine::computeInteractionMatrixError(), vpMbtDistanceCylinder::computeInteractionMatrixError(), and create().
|
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 303 of file vpFeatureBuilderPoint.cpp.
References vpPixelMeterConversion::convertPoint(), vpMeterPixelConversion::convertPoint(), vpTracker::cP, vpTracker::p, vpFeaturePoint::set_x(), vpFeaturePoint::set_y(), and vpFeaturePoint::set_Z().
|
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 243 of file vpFeatureBuilderPoint.cpp.
References vpFeatureException::badInitializationError, vpTracker::cP, vpPoint::get_x(), vpPoint::get_y(), vpFeaturePoint::get_Z(), vpFeaturePoint::set_x(), vpFeaturePoint::set_y(), and vpFeaturePoint::set_Z().
|
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 62 of file vpFeatureBuilderPoint3D.cpp.
References vpTracker::cP, vpFeaturePoint3D::set_X(), vpFeaturePoint3D::set_Y(), and vpFeaturePoint3D::set_Z().
|
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 244 of file vpFeatureBuilderPointPolar.cpp.
References vpPixelMeterConversion::convertPoint(), vpFeaturePointPolar::set_rho(), and vpFeaturePointPolar::set_theta().
|
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 350 of file vpFeatureBuilderPointPolar.cpp.
References vpPixelMeterConversion::convertPoint(), vpMeterPixelConversion::convertPoint(), vpPoint::get_x(), vpPoint::get_y(), vpPoint::get_Z(), vpFeaturePointPolar::set_rho(), vpFeaturePointPolar::set_theta(), and vpFeaturePointPolar::set_Z().
|
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 281 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(), and vpFeaturePointPolar::set_Z().
|
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 120 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 154 of file vpFeatureBuilderSegment.cpp.
References vpFeatureSegment::buildFrom(), vpTracker::cP, vpPoint::get_x(), and vpPoint::get_y().
|
static |
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.
s | : Visual feature to initialize; either or rather depending on select parameter. |
cam | : Camera parameters used to convert image point coordinates from pixel in meter in the image plane. |
line1_ip1,line1_ip2 | : The first line defined by 2 image points with pixel coordinates in the image. |
line2_ip1,line2_ip2 | : The second line defined by 2 image points with pixel coordinates in the image. |
select | : Use either vpFeatureVanishingPoint::selectX() or vpFeatureVanishingPoint::selectY() to build visual feature, or use rather select vpFeatureVanishingPoint::selectOneOverRho() or vpFeatureVanishingPoint::selectAlpha() to build visual feature. |
Definition at line 196 of file vpFeatureBuilderVanishingPoint.cpp.
References vpPixelMeterConversion::convertPoint(), vpException::fatalError, vpFeatureVanishingPoint::selectAtanOneOverRho(), vpFeatureVanishingPoint::selectOneOverRho(), vpFeatureVanishingPoint::selectX(), vpFeatureVanishingPoint::selectY(), vpFeatureVanishingPoint::set_x(), vpFeatureVanishingPoint::set_y(), vpFeatureVanishingPoint::setAlpha(), vpFeatureVanishingPoint::setAtanOneOverRho(), and vpFeatureVanishingPoint::setOneOverRho().
|
static |
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; either or rather depending on select parameter. |
L1 | : The first vpFeatureLine. |
L2 | : The second vpFeatureLine. |
select | : Use either vpFeatureVanishingPoint::selectX() or vpFeatureVanishingPoint::selectY() to build visual feature, or use rather select vpFeatureVanishingPoint::selectOneOverRho() or vpFeatureVanishingPoint::selectAlpha() to build visual feature. |
Definition at line 101 of file vpFeatureBuilderVanishingPoint.cpp.
References vpFeatureException::badInitializationError, vpFeatureLine::getRho(), vpFeatureLine::getTheta(), vpFeatureVanishingPoint::selectAlpha(), vpFeatureVanishingPoint::selectOneOverRho(), vpFeatureVanishingPoint::selectX(), vpFeatureVanishingPoint::selectY(), vpFeatureVanishingPoint::set_x(), vpFeatureVanishingPoint::set_y(), vpFeatureVanishingPoint::setAlpha(), and vpFeatureVanishingPoint::setOneOverRho().
|
static |
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.
s | : Visual feature to initialize; either or rather depending on select parameter. |
L1 | : The first vpLine. |
L2 | : The second vpLine. |
select | : Use either vpFeatureVanishingPoint::selectX() or vpFeatureVanishingPoint::selectY() to build visual feature, or use rather select vpFeatureVanishingPoint::selectOneOverRho() or vpFeatureVanishingPoint::selectAlpha() to build visual feature. |
Definition at line 170 of file vpFeatureBuilderVanishingPoint.cpp.
References create().
|
static |
Initialize a vpFeatureVanishingPoint thanks to a vpPoint. The vpFeatureVanishingPoint is initialized thanks to the parameters of the point in the image plane. All the parameters are given in meter.
s | : Visual feature to initialize; either or either depending on select parameter. |
p | : The vpPoint with updated coordinates in the image plane that are used to create the vpFeatureVanishingPoint. |
select | : Use either vpFeatureVanishingPoint::selectX() or vpFeatureVanishingPoint::selectY() to build visual feature, or use rather select vpFeatureVanishingPoint::selectOneOverRho() or vpFeatureVanishingPoint::selectAlpha() to build visual feature. |
Definition at line 65 of file vpFeatureBuilderVanishingPoint.cpp.
References vpPoint::get_x(), vpPoint::get_y(), vpFeatureVanishingPoint::selectAlpha(), vpFeatureVanishingPoint::selectOneOverRho(), vpFeatureVanishingPoint::selectX(), vpFeatureVanishingPoint::selectY(), vpFeatureVanishingPoint::set_x(), vpFeatureVanishingPoint::set_y(), vpFeatureVanishingPoint::setAlpha(), and vpFeatureVanishingPoint::setOneOverRho().