![]() |
Visual Servoing Platform version 3.6.0
|
#include <vpFeatureBuilder.h>
Class that defines conversion between trackers and visual features.
Definition at line 88 of file vpFeatureBuilder.h.
|
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. |
blob | : The blob used to create the vpFeatureEllipse. |
Definition at line 135 of file vpFeatureBuilderEllipse.cpp.
References vpFeatureEllipse::buildFrom(), vpPixelMeterConversion::convertPoint(), vpDot::get_nij(), and vpDot::getCog().
|
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. |
blob | : The blob used to create the vpFeatureEllipse. |
Definition at line 161 of file vpFeatureBuilderEllipse.cpp.
References vpFeatureEllipse::buildFrom(), vpPixelMeterConversion::convertPoint(), vpDot2::get_nij(), and vpDot2::getCog().
|
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 meters in the image plane.
[out] | s | : Visual feature to initialize. |
[in] | cam | : The parameters of the camera used to acquire the image containing the vpMeEllipse |
[in] | ellipse | : The tracked vpMeEllipse used to create the vpFeatureEllipse. |
Definition at line 189 of file vpFeatureBuilderEllipse.cpp.
References vpFeatureEllipse::buildFrom(), vpPixelMeterConversion::convertEllipse(), vpMeEllipse::get_nij(), and vpMeEllipse::getCenter().
|
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 59 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 97 of file vpFeatureBuilderEllipse.cpp.
References vpFeatureEllipse::buildFrom(), vpTracker::cP, vpTracker::p, vpFeatureEllipse::setABC(), and vpMath::sqr().
|
static |
Initialize a line feature thanks to a vpMeLine and the parameters of the camera. A vpFeatureLine contains the 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
Definition at line 191 of file vpFeatureBuilderLine.cpp.
References vpFeatureLine::buildFrom(), vpPixelMeterConversion::convertLine(), vpMeLine::getRho(), vpMeLine::getTheta(), and vpERROR_TRACE.
|
static |
Initialize a line feature thanks to a vpCylinder. A vpFeatureLine contains the parameters
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 99 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 vpLine. A vpFeatureLine contains the parameters
s | : Visual feature to initialize. |
t | : The vpLine used to create the vpFeatureLine. |
Definition at line 57 of file vpFeatureBuilderLine.cpp.
References vpTracker::cP, vpLine::getRho(), vpLine::getTheta(), vpFeatureLine::setABCD(), vpFeatureLine::setRhoTheta(), and vpERROR_TRACE.
|
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
s | : Visual feature ![]() ![]() |
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
Definition at line 90 of file vpFeatureBuilderPoint.cpp.
References vpPixelMeterConversion::convertPoint(), vpFeaturePoint::set_x(), vpFeaturePoint::set_y(), and vpERROR_TRACE.
Referenced by vpPoseFeatures::addFeatureEllipse(), vpPoseFeatures::addFeatureEllipse(), vpPoseFeatures::addFeatureLine(), vpPoseFeatures::addFeatureLine(), vpPoseFeatures::addFeaturePoint(), vpPoseFeatures::addFeaturePoint3D(), vpPoseFeatures::addFeatureSegment(), vpPoseFeatures::addFeatureVanishingPoint(), vpPoseFeatures::addFeatureVanishingPoint(), vpMbtDistanceCircle::computeInteractionMatrixError(), 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
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
Definition at line 150 of file vpFeatureBuilderPoint.cpp.
References vpPixelMeterConversion::convertPoint(), 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
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
Definition at line 211 of file vpFeatureBuilderPoint.cpp.
References vpPixelMeterConversion::convertPoint(), vpFeaturePoint::set_x(), vpFeaturePoint::set_y(), 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
This function intends to introduce noise after the initialization of the parameters. Cartesian
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 299 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 |
Create a vpFeaturePoint thanks to a vpPoint. This method uses the point coordinates
s | : The feature point. |
p | : The vpPoint used to create the vpFeaturePoint. |
Definition at line 240 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 |
Initialize a 3D point feature using the coordinates of the point
s | : Visual feature to initialize. |
t | : The vpPoint used to create the vpFeaturePoint. |
Definition at line 59 of file vpFeatureBuilderPoint3D.cpp.
References vpTracker::cP, vpFeaturePoint3D::set_X(), vpFeaturePoint3D::set_Y(), vpFeaturePoint3D::set_Z(), and vpERROR_TRACE.
|
static |
Initialize a point feature with polar coordinates
s | : Visual feature ![]() ![]() |
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
Definition at line 99 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
s | : Visual feature ![]() ![]() |
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
Definition at line 171 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
s | : Visual feature ![]() ![]() |
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
Definition at line 242 of file vpFeatureBuilderPointPolar.cpp.
References vpPixelMeterConversion::convertPoint(), vpFeaturePointPolar::set_rho(), vpFeaturePointPolar::set_theta(), and vpERROR_TRACE.
|
static |
Initialize a point feature with polar coordinates
This function intends to introduce noise in the conversion from cartesian to polar coordinates. Cartesian
s | : Visual feature ![]() ![]() |
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 ![]() ![]() |
Definition at line 346 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 point feature with polar coordinates
s | : Visual feature ![]() ![]() |
p | : A point with ![]() ![]() |
Definition at line 278 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 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 59 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 93 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 128 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 163 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 ![]() ![]() |
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 ![]() ![]() |
Definition at line 193 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 ![]() ![]() |
L1 | : The first vpFeatureLine. |
L2 | : The second vpFeatureLine. |
select | : Use either vpFeatureVanishingPoint::selectX() or vpFeatureVanishingPoint::selectY() to build ![]() ![]() |
Definition at line 99 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(), vpFeatureVanishingPoint::setOneOverRho(), and vpCERROR.
|
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 ![]() ![]() |
L1 | : The first vpLine. |
L2 | : The second vpLine. |
select | : Use either vpFeatureVanishingPoint::selectX() or vpFeatureVanishingPoint::selectY() to build ![]() ![]() |
Definition at line 167 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 ![]() ![]() |
p | : The vpPoint with updated ![]() |
select | : Use either vpFeatureVanishingPoint::selectX() or vpFeatureVanishingPoint::selectY() to build ![]() ![]() |
Definition at line 64 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().