Visual Servoing Platform
version 3.6.1 under development (2024-03-18)
|
#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 | track (const vpImage< unsigned char > &I) |
virtual void | sample (const vpImage< unsigned char > &I, bool doNotTrack=false) vp_override |
void | reSample (const vpImage< unsigned char > &I) |
void | leastSquare () |
void | updateDelta () |
void | setExtremities () |
void | seekExtremities (const vpImage< unsigned char > &I) |
void | suppressPoints () |
void | initTracking (const vpImage< unsigned char > &I) |
void | initTracking (const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2) |
void | computeRhoTheta (const vpImage< unsigned char > &I) |
double | getRho () const |
double | getTheta () const |
void | getExtremities (vpImagePoint &ip1, vpImagePoint &ip2) |
void | getEquationParam (double &A, double &B, double &C) |
double | getA () const |
double | getB () const |
double | getC () const |
void | computeRhoSignFromIntensity (bool useIntensityForRho) |
Public Member Functions Inherited from vpTracker | |
vpColVector | get_p () const |
vpColVector | get_cP () const |
Static Public Member Functions | |
static bool | intersection (const vpMeLine &line1, const vpMeLine &line2, vpImagePoint &ip) |
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 vp_deprecated void | display (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 vp_deprecated void | display (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 vp_deprecated void | display (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 vp_deprecated void | display (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) |
Deprecated functions | |
static vp_deprecated bool | inMask (const vpImage< bool > *mask, unsigned int i, unsigned int j) |
Public Attributes | |
Public Attributes Inherited from vpTracker | |
vpColVector | p |
vpColVector | cP |
bool | cPAvailable |
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 146 of file vpMeLine.h.
vpMeLine::vpMeLine | ( | ) |
Basic constructor that calls the constructor of the class vpMeTracker.
Definition at line 89 of file vpMeLine.cpp.
vpMeLine::vpMeLine | ( | const vpMeLine & | meline | ) |
|
virtual |
|
inline |
This method allows to turn off the computation of the sign of the rho attribute based on the intensity near the middle point of the line. This is usually done to distinguish between a black/white and a white/black edge but it may be source of problem (ex. for a servoing example) when this point can be occluded.
useIntensityForRho | : new value of the flag. |
Definition at line 359 of file vpMeLine.h.
void vpMeLine::computeRhoTheta | ( | const vpImage< unsigned char > & | I | ) |
Compute the two parameters of the line.
I | : Image in which the line appears. |
Definition at line 729 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(), vpImagePoint::set_j(), vpDEBUG_ENABLE, and vpERROR_TRACE.
Referenced by track().
|
inherited |
Display the moving edge sites with a color corresponding to their state.
I | : The image. |
Definition at line 258 of file vpMeTracker.cpp.
References vpMeSite::display(), and vpMeTracker::m_meList.
Referenced by vpMeTracker::display(), vpMeEllipse::initTracking(), vpMeEllipse::track(), and track().
void vpMeLine::display | ( | const vpImage< unsigned char > & | I, |
const vpColor & | color, | ||
unsigned int | thickness = 1 |
||
) |
Display 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 192 of file vpMeLine.cpp.
References displayLine(), m_a, m_b, m_c, vpMeTracker::m_meList, and m_PExt.
Referenced by track().
|
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 921 of file vpMeLine.cpp.
References displayLine().
|
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 977 of file vpMeLine.cpp.
References displayLine().
|
inherited |
Displays the status of moving edge sites
I | : The image. |
w | : vector |
index_w | : index |
Definition at line 276 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 267 of file vpMeTracker.cpp.
References vpMeSite::display(), and vpMeTracker::m_meList.
|
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 948 of file vpMeLine.cpp.
References displayLine().
|
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 1007 of file vpMeLine.cpp.
References displayLine().
|
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 1016 of file vpMeLine.cpp.
References vpDisplay::displayCross(), vpDisplay::displayLine(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpColor::green, vpMeSite::m_ifloat, vpMeSite::m_jfloat, 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 1098 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, 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 1057 of file vpMeLine.cpp.
References vpDisplay::displayCross(), vpDisplay::displayLine(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpColor::green, vpMeSite::m_ifloat, vpMeSite::m_jfloat, 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 1153 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, vpImagePoint::set_i(), and vpImagePoint::set_j().
|
inlineinherited |
Return object parameters expressed in the 3D camera frame.
Definition at line 93 of file vpTracker.h.
|
inlineinherited |
Return object parameters expressed in the 2D image plane computed by perspective projection.
Definition at line 91 of file vpTracker.h.
|
inline |
Gets parameter a of the line equation a*i + b*j + c = 0
Definition at line 325 of file vpMeLine.h.
|
inline |
Gets parameter b of the line equation a*i + b*j + c = 0
Definition at line 330 of file vpMeLine.h.
|
inline |
Gets parameter c of the line equation a*i + b*j + c = 0
Definition at line 335 of file vpMeLine.h.
|
inline |
Gets the equation parameters of the line
Definition at line 315 of file vpMeLine.h.
void vpMeLine::getExtremities | ( | vpImagePoint & | ip1, |
vpImagePoint & | ip2 | ||
) |
Get the extremities of the line.
ip1 | : Coordinates of the first extremity. |
ip2 | : Coordinates of the second extremity. |
Definition at line 836 of file vpMeLine.cpp.
References m_PExt, vpImagePoint::set_i(), and vpImagePoint::set_j().
|
inlineinherited |
|
inlineinherited |
Return the moving edges initialisation parameters.
Definition at line 171 of file vpMeTracker.h.
|
inlineinherited |
Return the list of moving edges
Definition at line 178 of file vpMeTracker.h.
|
inlineinherited |
Return the list of moving edges
Definition at line 185 of file vpMeTracker.h.
|
inlineinherited |
Return the number of points that has not been suppressed.
Definition at line 192 of file vpMeTracker.h.
double vpMeLine::getRho | ( | ) | const |
Get the value of , the distance between the origin and the point on the line with belong to the normal to the line crossing the origin.
Depending on the convention described at the beginning of this class, is signed.
Definition at line 832 of file vpMeLine.cpp.
References m_rho.
Referenced by vpFeatureBuilder::create().
double vpMeLine::getTheta | ( | ) | const |
Get the value of the angle .
Definition at line 834 of file vpMeLine.cpp.
References m_theta.
Referenced by vpFeatureBuilder::create().
|
inherited |
Initialize the tracker.
Definition at line 50 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 197 of file vpMeLine.cpp.
References vpDisplay::displayCross(), vpDisplay::flush(), vpDisplay::getClick(), vpColor::red, and vpERROR_TRACE.
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 373 of file vpMeLine.cpp.
References vpImagePoint::get_i(), vpImagePoint::get_j(), vpMeTracker::initTracking(), m_a, m_b, m_delta, m_delta_1, vpMeSite::m_ifloat, vpMeSite::m_jfloat, m_PExt, vpMath::round(), sample(), track(), vpCDEBUG, and vpERROR_TRACE.
|
inlinestaticinherited |
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 317 of file vpMeTracker.h.
|
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 116 of file vpMeTracker.cpp.
References vpImage< Type >::getCols(), and vpImage< Type >::getRows().
Referenced by 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 106 of file vpMeTracker.cpp.
References vpImage< Type >::getValue().
Referenced by vpMbtFaceDepthDense::computeDesiredFeatures(), vpMbtFaceDepthNormal::computeDesiredFeatures(), vpMbtDistanceKltPoints::computeNbDetectedCurrent(), vpMbtDistanceKltPoints::init(), vpMeEllipse::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 845 of file vpMeLine.cpp.
References m_a, m_b, m_c, vpImagePoint::set_i(), and vpImagePoint::set_j().
void vpMeLine::leastSquare | ( | ) |
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.
Definition at line 223 of file vpMeLine.cpp.
References vpMeSite::getState(), m_a, m_b, m_c, m_delta, vpMeSite::M_ESTIMATOR, vpMeSite::m_ifloat, vpMeSite::m_jfloat, vpMeTracker::m_meList, vpRobust::MEstimator(), vpMeSite::NO_SUPPRESSION, vpTrackingException::notEnoughPointError, vpMeTracker::numberOfSignal(), vpMatrix::pseudoInverse(), vpRobust::setMinMedianAbsoluteDeviation(), vpMeSite::setState(), vpMath::sqr(), vpRobust::TUKEY, and vpCDEBUG.
Referenced by track().
|
inherited |
Return number of moving-edges that are tracked.
Definition at line 95 of file vpMeTracker.cpp.
References vpMeTracker::m_meList.
Referenced by leastSquare(), vpMeEllipse::leastSquareRobust(), vpMeNurbs::localReSample(), reSample(), 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 175 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 167 of file vpMeTracker.cpp.
Referenced by vpMeNurbs::localReSample(), vpMeEllipse::plugHoles(), vpMeNurbs::sample(), vpMeEllipse::sample(), sample(), seekExtremities(), and vpMeNurbs::seekExtremities().
void vpMeLine::reSample | ( | const vpImage< unsigned char > & | I | ) |
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 594 of file vpMeLine.cpp.
References vpMe::getSampleStep(), vpTrackingException::initializationError, vpMeTracker::initTracking(), m_a, m_b, m_c, m_delta, m_delta_1, vpMeSite::m_ifloat, vpMeSite::m_jfloat, vpMeTracker::m_me, m_PExt, vpMeTracker::numberOfSignal(), sample(), vpMath::sqr(), and vpDERROR_TRACE.
Referenced by track().
|
inherited |
Reset the tracker by removing all the moving edges.
Definition at line 75 of file vpMeTracker.cpp.
References vpMeTracker::m_meList, and vpMeTracker::m_nGoodElement.
Referenced by vpMeTracker::~vpMeTracker().
|
virtual |
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 120 of file vpMeLine.cpp.
References vpColor::blue, vpMeSite::convolution(), vpDisplay::displayCross(), vpTrackingException::fatalError, vpImagePoint::get_i(), vpImagePoint::get_j(), 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_i(), vpImagePoint::set_j(), vpMeSite::setContrastThreshold(), vpMeSite::setDisplay(), vpMeSite::setState(), vpMath::sqr(), vpCDEBUG, vpDEBUG_ENABLE, vpDERROR_TRACE, and vpERROR_TRACE.
Referenced by initTracking(), and reSample().
void vpMeLine::seekExtremities | ( | const vpImage< unsigned char > & | I | ) |
Seek along the line defined by its equation, the two extremities of the line. This function is useful in case of translation of the line.
I | : Image in which the line appears. |
vpTrackingException::initializationError | : Moving edges not initialized. |
Definition at line 483 of file vpMeLine.cpp.
References vpColor::blue, vpDisplay::displayCross(), vpTrackingException::fatalError, vpImage< Type >::getHeight(), vpMe::getRange(), vpMe::getSampleStep(), vpMeSite::getState(), vpImage< Type >::getWidth(), vpColor::green, vpMeSite::init(), vpTrackingException::initializationError, 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, m_PExt, vpMeTracker::m_selectDisplay, m_sign, vpMeSite::NO_SUPPRESSION, vpMeTracker::outOfImage(), vpImagePoint::set_i(), vpImagePoint::set_j(), vpMeSite::setDisplay(), vpMe::setRange(), vpMath::sqr(), vpMeSite::track(), vpCDEBUG, vpDEBUG_ENABLE, vpDERROR_TRACE, and vpERROR_TRACE.
Referenced by track().
|
inlineinherited |
Set type of moving-edges display.
select | : Display type selector. |
Definition at line 250 of file vpMeTracker.h.
void vpMeLine::setExtremities | ( | ) |
Seek in the list of available points the two extremities of the line.
Definition at line 437 of file vpMeLine.cpp.
References vpMeSite::m_ifloat, vpMeSite::m_jfloat, vpMeTracker::m_meList, and m_PExt.
Referenced by 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 271 of file vpMeTracker.h.
|
inlineinherited |
Set the moving edges initialisation parameters.
me | : Moving Edges. |
Definition at line 278 of file vpMeTracker.h.
|
inlineinherited |
Set the list of moving edges.
meList | : List of Moving Edges. |
Definition at line 285 of file vpMeTracker.h.
void vpMeLine::suppressPoints | ( | ) |
Suppression of the points which belong no more to the line.
Definition at line 424 of file vpMeLine.cpp.
References vpMeSite::getState(), vpMeTracker::m_meList, and vpMeSite::NO_SUPPRESSION.
Referenced by track().
|
inherited |
Return the total number of moving-edges.
Definition at line 104 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 662 of file vpMeLine.cpp.
References computeRhoTheta(), vpMeTracker::display(), display(), vpDisplay::flush(), leastSquare(), vpColor::red, reSample(), seekExtremities(), setExtremities(), suppressPoints(), vpMeTracker::track(), updateDelta(), vpCDEBUG, vpDEBUG_ENABLE, and vpERROR_TRACE.
Referenced by initTracking().
void vpMeLine::updateDelta | ( | ) |
Set the alpha value of the different vpMeSite to the value of delta.
Definition at line 627 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 track().
|
inherited |
Feature coordinates expressed in the camera frame cP.
Definition at line 71 of file vpTracker.h.
Referenced by vpFeaturePoint3D::buildFrom(), vpCircle::changeFrame(), vpCylinder::changeFrame(), vpLine::changeFrame(), vpPoint::changeFrame(), vpSphere::changeFrame(), 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 77 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 166 of file vpMeLine.h.
Referenced by computeRhoTheta(), display(), initTracking(), intersection(), leastSquare(), reSample(), and vpMeLine().
|
protected |
Angle in deg between the extremities.
Definition at line 158 of file vpMeLine.h.
Referenced by vpMeLine().
|
protected |
Angle in deg between the extremities.
Definition at line 159 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 167 of file vpMeLine.h.
Referenced by computeRhoTheta(), display(), initTracking(), intersection(), leastSquare(), reSample(), and vpMeLine().
|
protected |
Parameter c of the line equation a*i + b*j + c = 0.
Definition at line 168 of file vpMeLine.h.
Referenced by computeRhoTheta(), display(), intersection(), leastSquare(), reSample(), and vpMeLine().
|
protected |
Angle in rad between the extremities.
Definition at line 156 of file vpMeLine.h.
Referenced by initTracking(), leastSquare(), reSample(), sample(), updateDelta(), and vpMeLine().
|
protected |
Angle in rad between the extremities.
Definition at line 157 of file vpMeLine.h.
Referenced by initTracking(), reSample(), seekExtremities(), updateDelta(), and vpMeLine().
|
protectedinherited |
Initial range.
Definition at line 70 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 74 of file vpMeTracker.h.
Referenced by vpMeEllipse::plugHoles(), vpMeEllipse::sample(), sample(), seekExtremities(), and vpMeTracker::track().
|
protectedinherited |
Mask used to determine candidate points for initialization in an image.
Definition at line 76 of file vpMeTracker.h.
Referenced by vpMeEllipse::sample(), sample(), and seekExtremities().
|
protectedinherited |
Moving edges initialisation parameters.
Definition at line 68 of file vpMeTracker.h.
Referenced by vpMeTracker::initTracking(), vpMeEllipse::leastSquareRobust(), vpMeNurbs::localReSample(), vpMeTracker::operator=(), vpMeEllipse::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 66 of file vpMeTracker.h.
Referenced by vpMeTracker::display(), display(), vpMeTracker::initTracking(), leastSquare(), vpMeEllipse::leastSquareRobust(), vpMeNurbs::localReSample(), vpMeTracker::numberOfSignal(), vpMeTracker::operator=(), vpMeEllipse::plugHoles(), vpMeTracker::reset(), vpMeNurbs::sample(), vpMeEllipse::sample(), sample(), seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), setExtremities(), suppressPoints(), 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 72 of file vpMeTracker.h.
Referenced by vpMeTracker::initTracking(), vpMeTracker::operator=(), vpMeTracker::reset(), vpMeTracker::track(), and vpMeTracker::vpMeTracker().
|
protected |
Line extremities.
Definition at line 152 of file vpMeLine.h.
Referenced by computeRhoTheta(), display(), getExtremities(), initTracking(), reSample(), sample(), seekExtremities(), setExtremities(), and vpMeLine().
|
protected |
rho parameter of the line
Definition at line 154 of file vpMeLine.h.
Referenced by computeRhoTheta(), getRho(), and vpMeLine().
|
protectedinherited |
Moving-edges display type.
Definition at line 78 of file vpMeTracker.h.
Referenced by vpMeTracker::init(), vpMeNurbs::localReSample(), vpMeTracker::operator=(), vpMeEllipse::plugHoles(), vpMeNurbs::sample(), vpMeEllipse::sample(), sample(), seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), and vpMeTracker::vpMeTracker().
|
protected |
Sign.
Definition at line 160 of file vpMeLine.h.
Referenced by sample(), seekExtremities(), updateDelta(), and vpMeLine().
|
protected |
theta parameter of the line
Definition at line 155 of file vpMeLine.h.
Referenced by computeRhoTheta(), getTheta(), 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 164 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 67 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().