Visual Servoing Platform  version 3.6.1 under development (2024-10-14)

#include <visp3/visual_features/vpFeatureBuilder.h>

Static Public Member Functions

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 vpImagePoint &ip1, const vpImagePoint &ip2)
 
static void create (vpFeatureSegment &s, vpPoint &P1, vpPoint &P2)
 
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, int line)
 
static void create (vpFeatureEllipse &s, const vpCircle &c)
 
static void create (vpFeatureEllipse &s, const vpSphere &sphere)
 
static void create (vpFeatureVanishingPoint &s, const vpPoint &p, unsigned int select=(vpFeatureVanishingPoint::selectX()|vpFeatureVanishingPoint::selectY()))
 
static void create (vpFeatureVanishingPoint &s, const vpFeatureLine &l1, const vpFeatureLine &l2, unsigned int select=(vpFeatureVanishingPoint::selectX()|vpFeatureVanishingPoint::selectY()))
 
static void create (vpFeatureVanishingPoint &s, const vpLine &l1, const vpLine &l2, unsigned int select=(vpFeatureVanishingPoint::selectX()|vpFeatureVanishingPoint::selectY()))
 
static void create (vpFeatureVanishingPoint &s, const vpCameraParameters &cam, const vpImagePoint &line1_ip1, const vpImagePoint &line1_ip2, const vpImagePoint &line2_ip1, const vpImagePoint &line2_ip2, unsigned int select)
 

Detailed Description

Class that defines conversion between trackers and visual features.

Definition at line 91 of file vpFeatureBuilder.h.

Member Function Documentation

◆ create() [1/17]

BEGIN_VISP_NAMESPACE void vpFeatureBuilder::create ( vpFeatureEllipse s,
const vpCircle t 
)
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.

Warning
To be sure that the vpFeatureEllipse is well initialized, you have to be sure that at least the circle coordinates in the image plane and in the camera frame are computed and stored in the vpCircle.
Parameters
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().

◆ create() [2/17]

void vpFeatureBuilder::create ( vpFeatureEllipse s,
const vpSphere t 
)
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.

Warning
To be sure that the vpFeatureEllipse is well initialized, you have to be sure that at least the sphere coordinates in the image plan and in the camera frame are computed and stored in the vpSphere.
Parameters
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().

◆ create() [3/17]

void vpFeatureBuilder::create ( vpFeatureLine s,
const vpCylinder t,
int  line 
)
static

Initialize a line feature thanks to a vpCylinder. A vpFeatureLine contains the parameters $(\rho,\theta)$ which are expressed in meter. It also contains the parameters of a plan equation $(A,B,C,D)$. 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.

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 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().

◆ create() [4/17]

BEGIN_VISP_NAMESPACE void vpFeatureBuilder::create ( vpFeatureLine s,
const vpLine t 
)
static

Initialize a line feature thanks to a vpLine. A vpFeatureLine contains the parameters $(\rho,\theta)$ which are expressed in meter. It also contains the parameters of a plan equation $(A,B,C,D)$. In vpLine there are the parameters of two plans, but the one which have the biggest D parameter is copied in the vpFeatureLine parameters.

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().

◆ create() [5/17]

BEGIN_VISP_NAMESPACE void vpFeatureBuilder::create ( vpFeaturePoint s,
const vpCameraParameters cam,
const vpImagePoint ip 
)
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 $ x $ and $ y $ in the image plan. Those coordinates are stored in the vpFeaturePoint.

Warning
It is not possible to compute the depth of the point $ Z $ in the camera frame thanks to a vpImagePoint. This coordinate is needed in vpFeaturePoint to compute the interaction matrix. So this value must be computed outside this function.
Parameters
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 $x,y$, and lastly we set the 3D depth $Z$ of the point which is generally the result of a pose estimation.

vpImage<unsigned char> I; // Image container
vpCameraParameters cam; // Default intrinsic camera parameters
vpImagePoint iP; // the point in the image
vpFeaturePoint s; // Point feature
...
// Set the point coordinates in the image (here the coordinates are given in
the (i,j) frame iP.set_i(0); iP.set_j(0);
// Initialize rho,theta visual feature
// A pose estimation is requested to initialize Z, the depth of the
// point in the camera frame.
double Z = 1; // Depth of the point in meters
....
s.set_Z(Z);
Generic class defining intrinsic camera parameters.
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpImagePoint &t)
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
void set_Z(double Z)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition: vpImagePoint.h:82
void set_j(double jj)
Definition: vpImagePoint.h:309
void set_i(double ii)
Definition: vpImagePoint.h:298
Examples
manServo4PointsDisplay.cpp, manSimu4Dots.cpp, manSimu4Points.cpp, mbot-apriltag-2D-half-vs.cpp, servoAfma4Point2DArtVelocity.cpp, servoAfma4Point2DCamVelocity.cpp, servoAfma4Point2DCamVelocityKalman.cpp, servoAfma62DhalfCamVelocity.cpp, servoAfma6AprilTagIBVS.cpp, servoAfma6Cylinder2DCamVelocity.cpp, servoAfma6Cylinder2DCamVelocitySecondaryTask.cpp, servoAfma6Ellipse2DCamVelocity.cpp, servoAfma6FourPoints2DArtVelocity.cpp, servoAfma6FourPoints2DCamVelocityLs_cur.cpp, servoAfma6FourPoints2DCamVelocityLs_cur_integrator.cpp, servoAfma6FourPoints2DCamVelocityLs_des.cpp, servoAfma6Line2DCamVelocity.cpp, servoAfma6Point2DArtVelocity.cpp, servoAfma6Point2DCamVelocity.cpp, servoAfma6Segment2DCamVelocity.cpp, servoAfma6SquareLines2DCamVelocity.cpp, servoAfma6TwoLines2DCamVelocity.cpp, servoBebop2.cpp, servoBiclopsPoint2DArtVelocity.cpp, servoFrankaIBVS.cpp, servoPioneerPanSegment3D.cpp, servoPioneerPoint2DDepth.cpp, servoPioneerPoint2DDepthWithoutVpServo.cpp, servoPololuPtuPoint2DJointVelocity.cpp, servoPtu46Point2DArtVelocity.cpp, servoSimu4Points.cpp, servoSimuAfma6FourPoints2DCamVelocity.cpp, servoSimuCircle2DCamVelocity.cpp, servoSimuCircle2DCamVelocityDisplay.cpp, servoSimuCylinder.cpp, servoSimuCylinder2DCamVelocityDisplay.cpp, servoSimuCylinder2DCamVelocityDisplaySecondaryTask.cpp, servoSimuFourPoints2DCamVelocity.cpp, servoSimuFourPoints2DCamVelocityDisplay.cpp, servoSimuFourPoints2DPolarCamVelocityDisplay.cpp, servoSimuLine2DCamVelocityDisplay.cpp, servoSimuPoint2DCamVelocity1.cpp, servoSimuPoint2DCamVelocity2.cpp, servoSimuPoint2DCamVelocity3.cpp, servoSimuPoint2DhalfCamVelocity1.cpp, servoSimuPoint2DhalfCamVelocity2.cpp, servoSimuPoint2DhalfCamVelocity3.cpp, servoSimuSphere2DCamVelocity.cpp, servoSimuSphere2DCamVelocityDisplay.cpp, servoSimuSphere2DCamVelocityDisplaySecondaryTask.cpp, servoSimuSquareLine2DCamVelocityDisplay.cpp, servoSimuViper850FourPoints2DCamVelocity.cpp, servoUniversalRobotsIBVS.cpp, servoViper650FourPoints2DArtVelocityLs_cur.cpp, servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp, servoViper650FourPoints2DCamVelocityLs_cur.cpp, servoViper650Point2DCamVelocity.cpp, servoViper850FourPoints2DArtVelocityLs_cur.cpp, servoViper850FourPoints2DArtVelocityLs_des.cpp, servoViper850FourPoints2DCamVelocityLs_cur.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity-jointAvoidance-large.cpp, servoViper850Point2DArtVelocity.cpp, servoViper850Point2DCamVelocity.cpp, servoViper850Point2DCamVelocityKalman.cpp, simulateCircle2DCamVelocity.cpp, simulateFourPoints2DCartesianCamVelocity.cpp, simulateFourPoints2DPolarCamVelocity.cpp, testFeatureSegment.cpp, testPoint.cpp, testPoseFeatures.cpp, testTrackDot.cpp, trackMeLine.cpp, tutorial-ibvs-4pts-display.cpp, tutorial-ibvs-4pts-image-tracking.cpp, tutorial-ibvs-4pts-json.cpp, tutorial-ibvs-4pts-ogre-tracking.cpp, tutorial-ibvs-4pts-ogre.cpp, tutorial-ibvs-4pts-plotter-continuous-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter-gain-adaptive.cpp, tutorial-ibvs-4pts-plotter.cpp, tutorial-ibvs-4pts-wireframe-camera.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, tutorial-ibvs-4pts-wireframe-robot-viper.cpp, tutorial-ibvs-4pts.cpp, tutorial-simu-pioneer-continuous-gain-adaptive.cpp, tutorial-simu-pioneer-continuous-gain-constant.cpp, tutorial-simu-pioneer-pan.cpp, and tutorial-simu-pioneer.cpp.

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().

◆ create() [6/17]

void vpFeatureBuilder::create ( vpFeaturePoint s,
const vpCameraParameters goodCam,
const vpCameraParameters wrongCam,
const vpPoint p 
)
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 $ x $ and $ y $ in the image plan to set the visual feature parameters. The value of the depth $ Z $ 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 $(x,y)$ 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 $(x^{'},y^{'})$ using the noisy camera parameters wrongCam. These last parameters are stored in the vpFeaturePoint.

Warning
To be sure that the vpFeaturePoint is well initialized, you have to be sure that at least the point coordinates in the image plan and in the camera frame are computed and stored in the vpPoint.
Parameters
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().

◆ create() [7/17]

void vpFeatureBuilder::create ( vpFeaturePoint s,
const vpPoint p 
)
static

Create a vpFeaturePoint thanks to a vpPoint. This method uses the point coordinates $ x $ and $ y $ in the image plan to set the visual feature parameters. The value of the depth $ Z $ in the camera frame is also computed thanks to the coordinates in the camera frame which are stored in vpPoint.

Warning
To be sure that the vpFeaturePoint is well initialized, you have to be sure that at least the point coordinates in the image plan and in the camera frame are computed and stored in the vpPoint.
Parameters
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().

◆ create() [8/17]

BEGIN_VISP_NAMESPACE void vpFeatureBuilder::create ( vpFeaturePoint3D s,
const vpPoint t 
)
static

Initialize a 3D point feature using the coordinates of the point $(X,Y,Z)$ in the camera frame. The values of $(X,Y,Z)$ are expressed in meters.

Warning
To be sure that the vpFeaturePoint is well initialized, you have to be sure that at least the point coordinates in the camera frame are computed and stored in the vpPoint.
Parameters
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().

◆ create() [9/17]

BEGIN_VISP_NAMESPACE void vpFeatureBuilder::create ( vpFeaturePointPolar s,
const vpCameraParameters cam,
const vpImagePoint iP 
)
static

Initialize a point feature with polar coordinates $(\rho,\theta)$ 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 $(x,y)$ coordinates in meter in the camera frame and than in polar coordinates by:

\[\rho = \sqrt{x^2+y^2} \hbox{,}\; \; \theta = \arctan \frac{y}{x}\]

Warning
This function does not initialize $Z$ which is requested to compute the interaction matrix by vpfeaturePointPolar::interaction().
Parameters
s: Visual feature $(\rho,\theta)$ to initialize. Be aware, the 3D depth $Z$ 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 $\rho,\theta$, and lastly we set the 3D depth $Z$ of the point which is generally the result of a pose estimation.

vpImage<unsigned char> I; // Image container
vpCameraParameters cam; // Default intrinsic camera parameters
vpImagePoint iP; // the point in the image
vpFeaturePointPolar s; // Point feature with polar coordinates
...
// Set the point coordinates in the image (here the coordinates are given in
the (i,j) frame iP.set_i(0); iP.set_j(0);
// Initialize rho,theta visual feature
// A pose estimation is requested to initialize Z, the depth of the
// point in the camera frame.
double Z = 1; // Depth of the point in meters
....
s.set_Z(Z);
Class that defines 2D image point visual feature with polar coordinates described in .

Definition at line 244 of file vpFeatureBuilderPointPolar.cpp.

References vpPixelMeterConversion::convertPoint(), vpFeaturePointPolar::set_rho(), and vpFeaturePointPolar::set_theta().

◆ create() [10/17]

void vpFeatureBuilder::create ( vpFeaturePointPolar s,
const vpCameraParameters goodCam,
const vpCameraParameters wrongCam,
const vpPoint p 
)
static

Initialize a point feature with polar coordinates $(\rho,\theta)$ using the coordinates of the point $(x,y,Z)$, where $(x,y)$ correspond to the perspective projection of the point in the image plane and $Z$ the 3D depth of the point in the camera frame. The values of $(x,y,Z)$ are expressed in meters.

This function intends to introduce noise in the conversion from cartesian to polar coordinates. Cartesian $(x,y)$ 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 $(x^{'},y^{'})$ using the noisy camera parameters wrongCam. From these new coordinates in the image plane, the polar coordinates are computed by:

\[\rho = \sqrt{x^2+y^2} \hbox{,}\; \; \theta = \arctan \frac{y}{x}\]

Parameters
s: Visual feature $(\rho,\theta)$ and $Z$ 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 $(x,y)$ cartesian coordinates in the image plane corresponding to the camera perspective projection, and with 3D depth $Z$.

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().

◆ create() [11/17]

void vpFeatureBuilder::create ( vpFeaturePointPolar s,
const vpPoint p 
)
static

Initialize a point feature with polar coordinates $(\rho,\theta)$ using the coordinates of the point $(x,y,Z)$, where $(x,y)$ correspond to the perspective projection of the point in the image plane and $Z$ the 3D depth of the point in the camera frame. The values of $(x,y,Z)$ are expressed in meters. From the coordinates in the image plane, the polar coordinates are computed by:

\[\rho = \sqrt{x^2+y^2} \hbox{,}\; \; \theta = \arctan \frac{y}{x}\]

Parameters
s: Visual feature $(\rho,\theta)$ and $Z$ to initialize.
p: A point with $(x,y)$ cartesian coordinates in the image plane corresponding to the camera perspective projection, and with 3D depth $Z$.

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().

◆ create() [12/17]

BEGIN_VISP_NAMESPACE void vpFeatureBuilder::create ( vpFeatureSegment s,
const vpCameraParameters cam,
const vpImagePoint ip1,
const vpImagePoint ip2 
)
static

Initialize a segment feature out of image points and camera parameters.

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().

◆ create() [13/17]

void vpFeatureBuilder::create ( vpFeatureSegment s,
vpPoint P1,
vpPoint P2 
)
static

Build a segment visual feature from two points.

Parameters
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().

◆ create() [14/17]

void vpFeatureBuilder::create ( vpFeatureVanishingPoint s,
const vpCameraParameters cam,
const vpImagePoint line1_ip1,
const vpImagePoint line1_ip2,
const vpImagePoint line2_ip1,
const vpImagePoint line2_ip2,
unsigned int  select 
)
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.

Parameters
s: Visual feature to initialize; either $ {\bf s} = (x, y) $ or rather $ {\bf s} = (1/\rho, \alpha) $ 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 $ {\bf s} = (x, y) $ visual feature, or use rather select vpFeatureVanishingPoint::selectOneOverRho() or vpFeatureVanishingPoint::selectAlpha() to build $ {\bf s} = (1/\rho, \alpha) $ 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().

◆ create() [15/17]

void vpFeatureBuilder::create ( vpFeatureVanishingPoint s,
const vpFeatureLine L1,
const vpFeatureLine L2,
unsigned int  select = (vpFeatureVanishingPoint::selectX() | vpFeatureVanishingPoint::selectY()) 
)
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.

Parameters
s: Visual feature to initialize; either $ {\bf s} = (x, y) $ or rather $ {\bf s} = (1/\rho, \alpha) $ depending on select parameter.
L1: The first vpFeatureLine.
L2: The second vpFeatureLine.
select: Use either vpFeatureVanishingPoint::selectX() or vpFeatureVanishingPoint::selectY() to build $ {\bf s} = (x, y) $ visual feature, or use rather select vpFeatureVanishingPoint::selectOneOverRho() or vpFeatureVanishingPoint::selectAlpha() to build $ {\bf s} = (1/\rho, \alpha) $ visual feature.
Warning
An exception is thrown if the two lines are parallel when cartesian coordinates $ {\bf s} = (x, y) $ are used.

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().

◆ create() [16/17]

void vpFeatureBuilder::create ( vpFeatureVanishingPoint s,
const vpLine L1,
const vpLine L2,
unsigned int  select = (vpFeatureVanishingPoint::selectX() | vpFeatureVanishingPoint::selectY()) 
)
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.

Parameters
s: Visual feature to initialize; either $ {\bf s} = (x, y) $ or rather $ {\bf s} = (1/\rho, \alpha) $ depending on select parameter.
L1: The first vpLine.
L2: The second vpLine.
select: Use either vpFeatureVanishingPoint::selectX() or vpFeatureVanishingPoint::selectY() to build $ {\bf s} = (x, y) $ visual feature, or use rather select vpFeatureVanishingPoint::selectOneOverRho() or vpFeatureVanishingPoint::selectAlpha() to build $ {\bf s} = (1/\rho, \alpha) $ visual feature.
Warning
An exception is thrown if the two lines are parallel when cartesian coordinates $ {\bf s} = (x, y) $ are used.

Definition at line 170 of file vpFeatureBuilderVanishingPoint.cpp.

References create().

◆ create() [17/17]

BEGIN_VISP_NAMESPACE void vpFeatureBuilder::create ( vpFeatureVanishingPoint s,
const vpPoint p,
unsigned int  select = (vpFeatureVanishingPoint::selectX() | vpFeatureVanishingPoint::selectY()) 
)
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.

Parameters
s: Visual feature to initialize; either $ {\bf s} = (x, y) $ or either $ {\bf s} = (1/\rho, \alpha) $ depending on select parameter.
p: The vpPoint with updated $ (x, y) $ coordinates in the image plane that are used to create the vpFeatureVanishingPoint.
select: Use either vpFeatureVanishingPoint::selectX() or vpFeatureVanishingPoint::selectY() to build $ {\bf s} = (x, y) $ visual feature, or use rather select vpFeatureVanishingPoint::selectOneOverRho() or vpFeatureVanishingPoint::selectAlpha() to build $ {\bf s} = (1/\rho, \alpha) $ 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().