Visual Servoing Platform
version 3.6.1 under development (2025-01-26)
|
#include <visp3/me/vpMeLine.h>
Public Member Functions | |
vpMeLine () | |
vpMeLine (const vpMeLine &meline) | |
virtual | ~vpMeLine () VP_OVERRIDE |
void | display (const vpImage< unsigned char > &I, const vpColor &color, unsigned int thickness=1) |
void | display (const vpImage< vpRGBa > &I, const vpColor &color, unsigned int thickness=1) |
vpColVector | get_ABC () const |
void | getExtremities (vpImagePoint &ip1, vpImagePoint &ip2) const |
double | getRho () const |
vpColVector | getRhoTheta () const |
double | getTheta () const |
void | initTracking (const vpImage< unsigned char > &I) |
void | initTracking (const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2) |
void | setRhoSignFromIntensity (bool useIntensityForRho) |
void | track (const vpImage< unsigned char > &I) |
Public Member Functions Inherited from vpTracker | |
vpColVector | get_p () const |
vpColVector | get_cP () const |
Static Public Member Functions | |
static void | displayLine (const vpImage< unsigned char > &I, const vpMeSite &PExt1, const vpMeSite &PExt2, const double &A, const double &B, const double &C, const vpColor &color=vpColor::green, unsigned int thickness=1) |
static void | displayLine (const vpImage< vpRGBa > &I, const vpMeSite &PExt1, const vpMeSite &PExt2, const double &A, const double &B, const double &C, const vpColor &color=vpColor::green, unsigned int thickness=1) |
static void | displayLine (const vpImage< unsigned char > &I, const vpMeSite &PExt1, const vpMeSite &PExt2, const std::list< vpMeSite > &site_list, const double &A, const double &B, const double &C, const vpColor &color=vpColor::green, unsigned int thickness=1) |
static void | displayLine (const vpImage< vpRGBa > &I, const vpMeSite &PExt1, const vpMeSite &PExt2, const std::list< vpMeSite > &site_list, const double &A, const double &B, const double &C, const vpColor &color=vpColor::green, unsigned int thickness=1) |
static bool | intersection (const vpMeLine &line1, const vpMeLine &line2, vpImagePoint &iP) |
static void | project (double a, double b, double c, const vpMeSite &P, vpImagePoint &iP) |
Public Attributes | |
Public Attributes Inherited from vpTracker | |
vpColVector | p |
vpColVector | cP |
bool | cPAvailable |
Protected Member Functions | |
void | computeDelta (double &delta, double i1, double j1, double i2, double j2) |
void | computeRhoTheta (const vpImage< unsigned char > &I) |
void | leastSquare (const vpImage< unsigned char > &I) |
void | normalizeAngle (double &delta) |
unsigned int | plugHoles (const vpImage< unsigned char > &I) |
void | reSample (const vpImage< unsigned char > &I) |
virtual void | sample (const vpImage< unsigned char > &I, bool doNotTrack=false) VP_OVERRIDE |
virtual unsigned int | seekExtremities (const vpImage< unsigned char > &I) |
void | setExtremities () |
void | updateDelta () |
Protected Attributes | |
vpMeSite | m_PExt [2] |
double | m_rho |
double | m_theta |
double | m_delta |
double | m_delta_1 |
double | m_angle |
double | m_angle_1 |
int | m_sign |
bool | m_useIntensityForRho |
double | m_a |
double | m_b |
double | m_c |
Protected Attributes Inherited from vpMeTracker | |
std::list< vpMeSite > | m_meList |
vpMe * | m_me |
unsigned int | m_init_range |
int | m_nGoodElement |
const vpImage< bool > * | m_mask |
const vpImage< bool > * | m_maskCandidates |
vpMeSite::vpMeSiteDisplayType | m_selectDisplay |
Public Member Functions Inherited from vpMeTracker | |
void | display (const vpImage< unsigned char > &I) |
void | display (const vpImage< vpRGBa > &I) |
void | display (const vpImage< unsigned char > &I, vpColVector &w, unsigned int &index_w) |
unsigned int | getInitRange () |
vpMe * | getMe () |
std::list< vpMeSite > & | getMeList () |
std::list< vpMeSite > | getMeList () const |
int | getNbPoints () const |
void | init () |
unsigned int | numberOfSignal () |
bool | outOfImage (int i, int j, int border, int nrows, int ncols) |
bool | outOfImage (const vpImagePoint &iP, int border, int nrows, int ncols) |
void | reset () |
void | setDisplay (vpMeSite::vpMeSiteDisplayType select) |
void | setInitRange (const unsigned int &r) |
virtual void | setMask (const vpImage< bool > &mask) |
virtual void | setMaskCandidates (const vpImage< bool > *maskCandidates) |
void | setMe (vpMe *me) |
void | setMeList (const std::list< vpMeSite > &meList) |
unsigned int | totalNumberOfSignal () |
static bool | inRoiMask (const vpImage< bool > *mask, unsigned int i, unsigned int j) |
static bool | inMeMaskCandidates (const vpImage< bool > *meMaskCandidates, unsigned int i, unsigned int j) |
Class that tracks in an image a line moving edges.
In this class the line is defined by its equation in the image plane. Two kinds of parametrization are available to describe a 2D line. The first one corresponds to the following equation
where and are the coordinates of the points belonging to the line. The line features are .
The second way to write the line equation is to consider polar coordinates
where and are still the coordinates of the points belonging to the line. But now the line features are . The computation of and is easy thanks to .
The value of is between and . And the value of can be positive or negative. The conventions to find the right values of the two features are illustrated in the following pictures.
The angle is computed thanks to the direction of the arrow. The arrow points to the side of the line which is darker.
The example below available in tutorial-me-line-tracker.cpp and described in Tutorial: Moving-edges tracking shows how to use this class.
The code below shows how to use this class.
Definition at line 152 of file vpMeLine.h.
vpMeLine::vpMeLine | ( | ) |
Basic constructor that calls the constructor of the class vpMeTracker.
Definition at line 101 of file vpMeLine.cpp.
vpMeLine::vpMeLine | ( | const vpMeLine & | meline | ) |
|
virtual |
|
protected |
Definition at line 69 of file vpMeLine.cpp.
References normalizeAngle().
Referenced by initTracking().
|
protected |
Compute the two parameters of the line.
I | : Image in which the line appears. |
Definition at line 727 of file vpMeLine.cpp.
References vpDisplay::displayArrow(), vpException::fatalError, vpTrackingException::fatalError, vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpColor::green, m_a, m_b, m_c, m_PExt, m_rho, m_theta, m_useIntensityForRho, vpColor::red, vpMath::round(), vpImagePoint::set_i(), and vpImagePoint::set_j().
Referenced by reSample(), and track().
|
inherited |
Display the moving edge sites with a color corresponding to their state.
I | : The image. |
Definition at line 254 of file vpMeTracker.cpp.
References vpMeSite::display(), and vpMeTracker::m_meList.
Referenced by vpMeTracker::display(), vpMeEllipse::initTracking(), reSample(), and track().
void vpMeLine::display | ( | const vpImage< unsigned char > & | I, |
const vpColor & | color, | ||
unsigned int | thickness = 1 |
||
) |
Display me line.
I | : Image in which the line appears. |
color | : Color of the displayed line. Note that a moving edge that is considered as an outlier is displayed in green. |
thickness | : Drawings thickness. |
Definition at line 197 of file vpMeLine.cpp.
References displayLine(), m_a, m_b, m_c, vpMeTracker::m_meList, and m_PExt.
Referenced by reSample(), and track().
|
inherited |
Displays the status of moving edge sites
I | : The image. |
w | : vector |
index_w | : index |
Definition at line 272 of file vpMeTracker.cpp.
References vpMeTracker::display(), vpMeSite::getState(), vpMeTracker::m_meList, vpMeSite::NO_SUPPRESSION, and vpMeSite::setWeight().
Display the moving edge sites with a color corresponding to their state.
I | : The image. |
Definition at line 263 of file vpMeTracker.cpp.
References vpMeSite::display(), and vpMeTracker::m_meList.
void vpMeLine::display | ( | const vpImage< vpRGBa > & | I, |
const vpColor & | color, | ||
unsigned int | thickness = 1 |
||
) |
Display me line.
I | : Image in which the line appears. |
color | : Color of the displayed line. Note that a moving edge that is considered as an outlier is displayed in green. |
thickness | : Drawings thickness. |
Definition at line 202 of file vpMeLine.cpp.
References displayLine(), m_a, m_b, m_c, vpMeTracker::m_meList, and m_PExt.
|
static |
Display of a moving line thanks to its equation parameters and its extremities.
I | : The image used as background. |
PExt1 | : First extremity |
PExt2 | : Second extremity |
A | : Parameter a of the line equation a*i + b*j + c = 0 |
B | : Parameter b of the line equation a*i + b*j + c = 0 |
C | : Parameter c of the line equation a*i + b*j + c = 0 |
color | : Color used to display the line. |
thickness | : Thickness of the line. |
Definition at line 953 of file vpMeLine.cpp.
References vpDisplay::displayCross(), vpDisplay::displayLine(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpColor::green, project(), vpImagePoint::set_i(), and vpImagePoint::set_j().
Referenced by display().
|
static |
Display of a moving line thanks to its equation parameters and its extremities with all the site list.
I | : The image used as background. |
PExt1 | : First extremity |
PExt2 | : Second extremity |
site_list | : vpMeSite list |
A | : Parameter a of the line equation a*i + b*j + c = 0 |
B | : Parameter b of the line equation a*i + b*j + c = 0 |
C | : Parameter c of the line equation a*i + b*j + c = 0 |
color | : Color used to display the line. |
thickness | : Thickness of the line. |
Definition at line 1030 of file vpMeLine.cpp.
References vpDisplay::displayCross(), vpDisplay::displayLine(), vpImage< Type >::getHeight(), vpMeSite::getState(), vpImage< Type >::getWidth(), vpColor::green, vpMeSite::M_ESTIMATOR, vpMeSite::m_ifloat, vpMeSite::m_jfloat, project(), vpImagePoint::set_i(), and vpImagePoint::set_j().
|
static |
Display of a moving line thanks to its equation parameters and its extremities.
I | : The image used as background. |
PExt1 | : First extremity |
PExt2 | : Second extremity |
A | : Parameter a of the line equation a*i + b*j + c = 0 |
B | : Parameter b of the line equation a*i + b*j + c = 0 |
C | : Parameter c of the line equation a*i + b*j + c = 0 |
color | : Color used to display the line. |
thickness | : Thickness of the line. |
Definition at line 992 of file vpMeLine.cpp.
References vpDisplay::displayCross(), vpDisplay::displayLine(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpColor::green, project(), vpImagePoint::set_i(), and vpImagePoint::set_j().
|
static |
Display of a moving line thanks to its equation parameters and its extremities with all the site list.
I | : The image used as background. |
PExt1 | : First extremity |
PExt2 | : Second extremity |
site_list | : vpMeSite list |
A | : Parameter a of the line equation a*i + b*j + c = 0 |
B | : Parameter b of the line equation a*i + b*j + c = 0 |
C | : Parameter c of the line equation a*i + b*j + c = 0 |
color | : Color used to display the line. |
thickness | : Thickness of the line. |
Definition at line 1083 of file vpMeLine.cpp.
References vpDisplay::displayCross(), vpDisplay::displayLine(), vpImage< Type >::getHeight(), vpMeSite::getState(), vpImage< Type >::getWidth(), vpColor::green, vpMeSite::M_ESTIMATOR, vpMeSite::m_ifloat, vpMeSite::m_jfloat, project(), vpImagePoint::set_i(), and vpImagePoint::set_j().
|
inline |
Gets the parameters a,b,c of the line with equation a*x + b*y + c = 0 as a 3-dim vector.
Definition at line 200 of file vpMeLine.h.
|
inlineinherited |
Return object parameters expressed in the 3D camera frame.
Definition at line 95 of file vpTracker.h.
|
inlineinherited |
Return object parameters expressed in the 2D image plane computed by perspective projection.
Definition at line 93 of file vpTracker.h.
void vpMeLine::getExtremities | ( | vpImagePoint & | ip1, |
vpImagePoint & | ip2 | ||
) | const |
Get the extremities of the line. These two points strictly belong to the line. They are the projection of m_Pext[2] on the line
ip1 | : Coordinates of the first extremity. |
ip2 | : Coordinates of the second extremity. |
Definition at line 831 of file vpMeLine.cpp.
References m_a, m_b, m_c, vpMeTracker::m_meList, and project().
Referenced by plugHoles(), and seekExtremities().
|
inlineinherited |
|
inlineinherited |
Return the moving edges initialisation parameters.
Definition at line 153 of file vpMeTracker.h.
|
inlineinherited |
Return the list of moving edges
Definition at line 160 of file vpMeTracker.h.
|
inlineinherited |
Return the list of moving edges
Definition at line 167 of file vpMeTracker.h.
|
inlineinherited |
Return the number of points that has not been suppressed.
Definition at line 174 of file vpMeTracker.h.
|
inline |
Returns the value of , the distance between the origin and the point on the line that belongs to the normal to the line passing through the origin.
Depending on the convention described at the beginning of this class, is signed.
Definition at line 227 of file vpMeLine.h.
|
inline |
Returns the value of as a 2-dim vector.
Depending on the convention described at the beginning of this class, is signed.
Definition at line 244 of file vpMeLine.h.
|
inline |
Returns the value of the angle .
Definition at line 257 of file vpMeLine.h.
|
inherited |
Initialize the tracker.
Definition at line 48 of file vpMeTracker.cpp.
References vpTracker::init(), vpMeTracker::m_selectDisplay, vpMeSite::NONE, vpTracker::p, and vpColVector::resize().
Referenced by vpMeTracker::vpMeTracker().
void vpMeLine::initTracking | ( | const vpImage< unsigned char > & | I | ) |
Initialization of the tracking. Ask the user to click on two points from the line to track.
I | : Image in which the line appears. |
Definition at line 207 of file vpMeLine.cpp.
References vpDisplay::displayCross(), vpDisplay::flush(), vpDisplay::getClick(), and vpColor::red.
void vpMeLine::initTracking | ( | const vpImage< unsigned char > & | I, |
const vpImagePoint & | ip1, | ||
const vpImagePoint & | ip2 | ||
) |
Initialization of the tracking. The line is defined thanks to the coordinates of two points.
I | : Image in which the line appears. |
ip1 | : Coordinates of the first point. |
ip2 | : Coordinates of the second point. |
Definition at line 357 of file vpMeLine.cpp.
References computeDelta(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpMeTracker::initTracking(), m_delta, m_delta_1, vpMeSite::m_ifloat, vpMeSite::m_jfloat, m_PExt, and sample().
|
staticinherited |
Test whether the moving-edge (ME) is inside the mask of ME candidates for the initialization. Mask values that are set to true and their 8 neighbors are considered for the initialization.
meMaskCandidates | Mask corresponding the ME location in the image or nullptr if not wanted. Mask values that are set to true are considered for the initialization. To disable a pixel, set false. |
i | : ME coordinate along the rows. |
j | : ME coordinate along the columns. |
Definition at line 115 of file vpMeTracker.cpp.
References vpImage< Type >::getCols(), and vpImage< Type >::getRows().
Referenced by plugHoles(), vpMeEllipse::sample(), sample(), and seekExtremities().
|
staticinherited |
Test whether the pixel is inside the region of interest mask. Mask values that are set to true are considered in the tracking.
mask | Mask corresponding to the region of interest in the image or nullptr if not wanted. Mask values that are set to true are considered in the tracking. To disable a pixel, set false. |
i | : Pixel coordinate along the rows. |
j | : Pixel coordinate along the columns. |
Definition at line 105 of file vpMeTracker.cpp.
References vpImage< Type >::getValue().
Referenced by vpMbtFaceDepthDense::computeDesiredFeatures(), vpMbtFaceDepthNormal::computeDesiredFeatures(), vpMeEllipse::plugHoles(), plugHoles(), vpMeEllipse::sample(), sample(), seekExtremities(), and vpMeTracker::track().
|
static |
Computes the intersection point of two lines. The result is given in the (i,j) frame.
line1 | : The first line. |
line2 | : The second line. |
ip | : The coordinates of the intersection point. |
Definition at line 842 of file vpMeLine.cpp.
References m_a, m_b, m_c, vpImagePoint::set_i(), and vpImagePoint::set_j().
|
protected |
Least squares method used to make the tracking more robust. It ensures that the points taken into account to compute the right equation belong to the line.
I | : Image in which the line appears. |
Definition at line 227 of file vpMeLine.cpp.
References vpException::dimensionError, vpArray2D< Type >::getCols(), vpImage< Type >::getHeight(), vpMeSite::getState(), vpImage< Type >::getWidth(), m_a, m_b, m_c, m_delta, vpMeSite::m_ifloat, vpMeSite::m_jfloat, vpMeTracker::m_meList, vpRobust::MEstimator(), vpMeSite::NO_SUPPRESSION, normalizeAngle(), vpTrackingException::notEnoughPointError, vpMatrix::nullSpace(), vpMeTracker::numberOfSignal(), vpMatrixException::rankDeficient, vpRobust::setMinMedianAbsoluteDeviation(), vpMath::sqr(), and vpRobust::TUKEY.
Referenced by reSample(), and track().
|
protected |
Definition at line 58 of file vpMeLine.cpp.
Referenced by computeDelta(), and leastSquare().
|
inherited |
Return number of moving-edges that are tracked.
Definition at line 94 of file vpMeTracker.cpp.
References vpMeTracker::m_meList.
Referenced by leastSquare(), vpMeEllipse::leastSquareRobust(), vpMeEllipse::leastSquareRobustCircle(), vpMeEllipse::leastSquareRobustEllipse(), vpMeNurbs::localReSample(), and vpMeNurbs::reSample().
|
inherited |
Check if a pixel i,j is out of the image.
[in] | iP | : Pixel coordinates. |
[in] | border | : Number of pixels along the image border to exclude. When border is set to 0, consider the complete image. |
[in] | nrows,ncols | : Size of the image. |
Definition at line 174 of file vpMeTracker.cpp.
References vpImagePoint::get_i(), vpImagePoint::get_j(), and vpMath::round().
|
inherited |
Check if a pixel i,j is out of the image.
[in] | i,j | : Pixel coordinates. |
[in] | border | : Number of pixels along the image border to exclude. When border is set to 0, consider the complete image. |
[in] | nrows,ncols | : Size of the image. |
Definition at line 166 of file vpMeTracker.cpp.
Referenced by vpMeNurbs::localReSample(), vpMeEllipse::plugHoles(), plugHoles(), vpMeNurbs::sample(), vpMeEllipse::sample(), sample(), seekExtremities(), and vpMeNurbs::seekExtremities().
|
protected |
Seek along the line defined by its equation to add points in the detected holes. Useful in case of temporary occlusion
I | : Image in which the line appears. |
vpTrackingException::initializationError | : Moving edges not initialized. |
Definition at line 387 of file vpMeLine.cpp.
References vpColor::blue, vpMeSite::convolution(), vpDisplay::displayCross(), vpTrackingException::fatalError, vpImagePoint::get_i(), vpImagePoint::get_j(), getExtremities(), vpImage< Type >::getHeight(), vpMe::getRange(), vpMe::getSampleStep(), vpMeSite::getState(), vpMe::getThresholdMarginRatio(), vpImage< Type >::getWidth(), vpMeSite::init(), vpTrackingException::initializationError, vpMeTracker::inMeMaskCandidates(), vpMeTracker::inRoiMask(), m_a, m_b, m_c, m_delta, vpMeSite::m_ifloat, vpMeSite::m_jfloat, vpMeTracker::m_mask, vpMeTracker::m_maskCandidates, vpMeTracker::m_me, vpMeTracker::m_meList, m_PExt, vpMeTracker::m_selectDisplay, m_sign, vpMeSite::NO_SUPPRESSION, vpMeTracker::outOfImage(), project(), vpImagePoint::set_ij(), vpMeSite::setContrastThreshold(), vpMeSite::setDisplay(), vpMe::setRange(), vpMeSite::setState(), vpMath::sqr(), and vpMeSite::track().
Referenced by track().
|
static |
Project a ME site on a straight line.
[in] | a,b,c | : Parameters of the line |
[in] | P | : ME site. |
[out] | iP | : Coordinates of the ME site projected on the line. |
Definition at line 86 of file vpMeLine.cpp.
References vpMeSite::m_ifloat, vpMeSite::m_jfloat, vpImagePoint::set_i(), and vpImagePoint::set_j().
Referenced by displayLine(), getExtremities(), plugHoles(), and reSample().
|
protected |
Resample the line if the number of sample is less than 80% of the expected value.
I | : Image in which the line appears. |
Definition at line 596 of file vpMeLine.cpp.
References computeRhoTheta(), vpMeTracker::display(), display(), vpDisplay::flush(), vpImagePoint::get_i(), vpImagePoint::get_j(), vpTrackingException::initializationError, vpMeTracker::initTracking(), leastSquare(), m_a, m_b, m_c, m_delta, m_delta_1, vpMeSite::m_ifloat, vpMeSite::m_jfloat, vpMeTracker::m_me, vpMeTracker::m_meList, m_PExt, project(), vpColor::red, sample(), setExtremities(), vpMeTracker::track(), and updateDelta().
Referenced by track().
|
inherited |
Reset the tracker by removing all the moving edges.
Definition at line 74 of file vpMeTracker.cpp.
References vpMeTracker::m_meList, and vpMeTracker::m_nGoodElement.
Referenced by vpMeTracker::~vpMeTracker().
|
protectedvirtual |
Construct a list of vpMeSite moving edges at a particular sampling step between the two extremities of the line.
I | : Image in which the line appears. |
doNotTrack | : Inherited parameter, not used. |
vpTrackingException::initializationError | : Moving edges not initialized. |
Implements vpMeTracker.
Definition at line 131 of file vpMeLine.cpp.
References vpColor::blue, vpMeSite::convolution(), vpDisplay::displayCross(), vpTrackingException::fatalError, vpImage< Type >::getHeight(), vpMe::getSampleStep(), vpMe::getThresholdMarginRatio(), vpImage< Type >::getWidth(), vpMeSite::init(), vpTrackingException::initializationError, vpMeTracker::inMeMaskCandidates(), vpMeTracker::inRoiMask(), m_delta, vpMeSite::m_ifloat, vpMeSite::m_jfloat, vpMeTracker::m_mask, vpMeTracker::m_maskCandidates, vpMeTracker::m_me, vpMeTracker::m_meList, m_PExt, vpMeTracker::m_selectDisplay, m_sign, vpMeSite::NO_SUPPRESSION, vpMeTracker::outOfImage(), vpMath::round(), vpImagePoint::set_ij(), vpMeSite::setContrastThreshold(), vpMeSite::setDisplay(), vpMeSite::setState(), and vpMath::sqr().
Referenced by initTracking(), and reSample().
|
protectedvirtual |
Try to add points at both extremities of the line
I | : Image in which the line appears. |
vpTrackingException::initializationError | : Moving edges not initialized. |
Definition at line 471 of file vpMeLine.cpp.
References vpColor::blue, vpMeSite::convolution(), vpDisplay::displayCross(), vpImagePoint::get_i(), vpImagePoint::get_j(), getExtremities(), vpImage< Type >::getHeight(), vpMe::getRange(), vpMe::getSampleStep(), vpMeSite::getState(), vpMe::getThresholdMarginRatio(), vpImage< Type >::getWidth(), vpColor::green, vpMeSite::init(), vpMeTracker::inMeMaskCandidates(), vpMeTracker::inRoiMask(), m_delta_1, vpMeSite::m_i, vpMeSite::m_ifloat, vpMeSite::m_j, vpMeSite::m_jfloat, vpMeTracker::m_mask, vpMeTracker::m_maskCandidates, vpMeTracker::m_me, vpMeTracker::m_meList, vpMeTracker::m_selectDisplay, m_sign, vpMeSite::NO_SUPPRESSION, vpMeTracker::outOfImage(), vpImagePoint::set_i(), vpImagePoint::set_ij(), vpImagePoint::set_j(), vpMeSite::setContrastThreshold(), vpMeSite::setDisplay(), vpMe::setRange(), vpMath::sqr(), and vpMeSite::track().
Referenced by track().
|
inlineinherited |
Set type of moving-edges display.
select | : Display type selector. |
Definition at line 232 of file vpMeTracker.h.
|
protected |
Seek in the list of good points its two extremities m_PExt[2] These extremities are not strictly on the line
Definition at line 381 of file vpMeLine.cpp.
References vpMeTracker::m_meList, and m_PExt.
Referenced by reSample(), and track().
|
inlineinherited |
|
inlinevirtualinherited |
|
inlinevirtualinherited |
Set the mask of candidates points for initialization.
maskCandidates | : Pointer towards the mask of candidates points for initialization. |
Definition at line 253 of file vpMeTracker.h.
|
inlineinherited |
Set the moving edges initialisation parameters.
me | : Moving Edges. |
Definition at line 260 of file vpMeTracker.h.
|
inlineinherited |
Set the list of moving edges.
meList | : List of Moving Edges. |
Definition at line 267 of file vpMeTracker.h.
|
inline |
This method allows to disable/enable the calculation of the sign of the rho attribute from the intensity of the central point of the line. When enabled, it allows to distinguish between a black/white edge and a white/black edge, but it can cause problems for example during a visual-servo, when this point can be occluded.
useIntensityForRho | : new value of the flag. |
Definition at line 288 of file vpMeLine.h.
|
inherited |
Return the total number of moving-edges.
Definition at line 103 of file vpMeTracker.cpp.
References vpMeTracker::m_meList.
void vpMeLine::track | ( | const vpImage< unsigned char > & | I | ) |
Track the line in the image I.
I | : Image in which the line appears. |
Definition at line 683 of file vpMeLine.cpp.
References computeRhoTheta(), vpMeTracker::display(), display(), vpDisplay::flush(), leastSquare(), plugHoles(), vpColor::red, reSample(), seekExtremities(), setExtremities(), vpMeTracker::track(), and updateDelta().
|
protected |
Set the alpha value of the different vpMeSite to the value of delta.
Definition at line 647 of file vpMeLine.cpp.
References m_angle_1, m_delta, m_delta_1, vpMeSite::m_mask_sign, vpMeTracker::m_meList, m_sign, vpMath::round(), and vpMeSite::setAlpha().
Referenced by reSample(), and track().
|
inherited |
Feature coordinates expressed in the camera frame cP.
Definition at line 73 of file vpTracker.h.
Referenced by vpFeaturePoint3D::buildFrom(), vpRBSilhouetteControlPoint::buildSilhouettePoint(), vpCircle::changeFrame(), vpCylinder::changeFrame(), vpLine::changeFrame(), vpPoint::changeFrame(), vpSphere::changeFrame(), vpRBSilhouetteControlPoint::computeMeInteractionMatrixError(), vpFeatureBuilder::create(), vpPoint::get_W(), vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), vpCircle::init(), vpCylinder::init(), vpLine::init(), vpPoint::init(), vpSphere::init(), vpMbtPolygon::isVisible(), vpTracker::operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpForwardProjection::project(), vpCircle::projection(), vpCylinder::projection(), vpLine::projection(), vpPoint::projection(), vpSphere::projection(), vpPoint::set_W(), vpPoint::set_X(), vpPoint::set_Y(), and vpPoint::set_Z().
|
inherited |
Flag used to indicate if the feature parameters cP expressed in the camera frame are available.
Definition at line 79 of file vpTracker.h.
Referenced by vpTracker::init(), and vpTracker::operator=().
|
protected |
Parameter a of the line equation a*i + b*j + c = 0.
Definition at line 486 of file vpMeLine.h.
Referenced by computeRhoTheta(), display(), getExtremities(), intersection(), leastSquare(), plugHoles(), reSample(), and vpMeLine().
|
protected |
Angle in deg between the extremities.
Definition at line 478 of file vpMeLine.h.
Referenced by vpMeLine().
|
protected |
Angle in deg between the extremities.
Definition at line 479 of file vpMeLine.h.
Referenced by updateDelta(), and vpMeLine().
|
protected |
Parameter b of the line equation a*i + b*j + c = 0.
Definition at line 487 of file vpMeLine.h.
Referenced by computeRhoTheta(), display(), getExtremities(), intersection(), leastSquare(), plugHoles(), reSample(), and vpMeLine().
|
protected |
Parameter c of the line equation a*i + b*j + c = 0.
Definition at line 488 of file vpMeLine.h.
Referenced by computeRhoTheta(), display(), getExtremities(), intersection(), leastSquare(), plugHoles(), reSample(), and vpMeLine().
|
protected |
Angle in rad between the extremities.
Definition at line 476 of file vpMeLine.h.
Referenced by initTracking(), leastSquare(), plugHoles(), reSample(), sample(), updateDelta(), and vpMeLine().
|
protected |
Angle in rad between the extremities.
Definition at line 477 of file vpMeLine.h.
Referenced by initTracking(), reSample(), seekExtremities(), updateDelta(), and vpMeLine().
|
protectedinherited |
Initial range.
Definition at line 315 of file vpMeTracker.h.
Referenced by vpMeTracker::initTracking(), vpMeTracker::operator=(), and vpMeTracker::vpMeTracker().
|
protectedinherited |
Mask used to disable tracking on a part of image.
Definition at line 319 of file vpMeTracker.h.
Referenced by vpMeEllipse::plugHoles(), plugHoles(), vpMeEllipse::sample(), sample(), seekExtremities(), and vpMeTracker::track().
|
protectedinherited |
Mask used to determine candidate points for initialization in an image.
Definition at line 321 of file vpMeTracker.h.
Referenced by plugHoles(), vpMeEllipse::sample(), sample(), and seekExtremities().
|
protectedinherited |
Moving edges initialisation parameters.
Definition at line 313 of file vpMeTracker.h.
Referenced by vpMeTracker::initTracking(), vpMeEllipse::leastSquareRobust(), vpMeNurbs::localReSample(), vpMeTracker::operator=(), vpMeEllipse::plugHoles(), plugHoles(), reSample(), vpMeNurbs::reSample(), vpMeNurbs::sample(), vpMeEllipse::sample(), sample(), seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpMeNurbs::supressNearPoints(), vpMeTracker::track(), and vpMeTracker::vpMeTracker().
|
protectedinherited |
Tracking dependent variables/functions List of tracked moving edges points.
Definition at line 311 of file vpMeTracker.h.
Referenced by vpMeTracker::display(), display(), getExtremities(), vpMeTracker::initTracking(), leastSquare(), vpMeEllipse::leastSquareRobust(), vpMeEllipse::leastSquareRobustCircle(), vpMeEllipse::leastSquareRobustEllipse(), vpMeNurbs::localReSample(), vpMeTracker::numberOfSignal(), vpMeTracker::operator=(), vpMeEllipse::plugHoles(), plugHoles(), reSample(), vpMeTracker::reset(), vpMeNurbs::sample(), vpMeEllipse::sample(), sample(), seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), setExtremities(), vpMeNurbs::suppressPoints(), vpMeNurbs::supressNearPoints(), vpMeTracker::totalNumberOfSignal(), vpMeNurbs::track(), vpMeTracker::track(), updateDelta(), vpMeNurbs::updateDelta(), vpMeEllipse::updateTheta(), vpMeTracker::vpMeTracker(), vpMeEllipse::~vpMeEllipse(), and ~vpMeLine().
|
protectedinherited |
Number of good moving-edges that are tracked.
Definition at line 317 of file vpMeTracker.h.
Referenced by vpMeTracker::initTracking(), vpMeTracker::operator=(), vpMeTracker::reset(), vpMeTracker::track(), and vpMeTracker::vpMeTracker().
|
protected |
Both extremities of good points in the list. These extremities are not strictly on the line
Definition at line 471 of file vpMeLine.h.
Referenced by computeRhoTheta(), display(), initTracking(), plugHoles(), reSample(), sample(), setExtremities(), and vpMeLine().
|
protected |
rho parameter of the line
Definition at line 474 of file vpMeLine.h.
Referenced by computeRhoTheta(), and vpMeLine().
|
protectedinherited |
Moving-edges display type.
Definition at line 323 of file vpMeTracker.h.
Referenced by vpMeTracker::init(), vpMeNurbs::localReSample(), vpMeTracker::operator=(), vpMeEllipse::plugHoles(), plugHoles(), vpMeNurbs::sample(), vpMeEllipse::sample(), sample(), seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), and vpMeTracker::vpMeTracker().
|
protected |
Sign.
Definition at line 480 of file vpMeLine.h.
Referenced by plugHoles(), sample(), seekExtremities(), updateDelta(), and vpMeLine().
|
protected |
theta parameter of the line
Definition at line 475 of file vpMeLine.h.
Referenced by computeRhoTheta(), and vpMeLine().
|
protected |
Flag to specify wether the intensity of the image at the middle point is used to compute the sign of rho or not.
Definition at line 484 of file vpMeLine.h.
Referenced by computeRhoTheta(), and vpMeLine().
|
inherited |
Feature coordinates expressed in the image plane p. They correspond to 2D normalized coordinates expressed in meters.
Definition at line 69 of file vpTracker.h.
Referenced by vpMbtDistanceCircle::computeInteractionMatrixError(), vpCircle::computeIntersectionPoint(), vpMeterPixelConversion::convertEllipse(), vpFeatureBuilder::create(), vpCircle::display(), vpCylinder::display(), vpLine::display(), vpPoint::display(), vpSphere::display(), vpProjectionDisplay::display(), vpProjectionDisplay::displayCamera(), vpFeatureDisplay::displayEllipse(), vpPose::displayModel(), vpImageDraw::drawFrame(), vpPoint::get_w(), vpPoint::get_x(), vpPoint::get_y(), vpMeTracker::init(), vpCircle::init(), vpCylinder::init(), vpLine::init(), vpPoint::init(), vpSphere::init(), vpTracker::operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpForwardProjection::project(), vpCircle::projection(), vpCylinder::projection(), vpLine::projection(), vpPoint::projection(), vpSphere::projection(), vpPoint::set_w(), vpPoint::set_x(), and vpPoint::set_y().