![]() |
Visual Servoing Platform version 3.6.0
|
#include <vpMeSite.h>
Public Types | |
| enum | vpMeSiteDisplayType { NONE , RANGE , RESULT , RANGE_RESULT } |
| enum | vpMeSiteState { NO_SUPPRESSION = 0 , CONTRAST = 1 , CONSTRAST = CONTRAST , THRESHOLD = 2 , M_ESTIMATOR = 3 , TOO_NEAR = 4 , UNKNOW = 5 } |
Public Member Functions | |
| void | init () |
| void | init (double ip, double jp, double alphap) |
| void | init (double ip, double jp, double alphap, double convltp) |
| void | init (double ip, double jp, double alphap, double convltp, int sign) |
| vpMeSite () | |
| vpMeSite (double ip, double jp) | |
| vpMeSite (const vpMeSite &mesite) | |
| virtual | ~vpMeSite () |
| void | display (const vpImage< unsigned char > &I) |
| void | display (const vpImage< vpRGBa > &I) |
| double | convolution (const vpImage< unsigned char > &ima, const vpMe *me) |
| vpMeSite * | getQueryList (const vpImage< unsigned char > &I, const int range) |
| void | track (const vpImage< unsigned char > &im, const vpMe *me, bool test_likelihood=true) |
| void | setAlpha (const double &a) |
| double | getAlpha () const |
| void | setDisplay (vpMeSiteDisplayType select) |
| int | get_i () const |
| int | get_j () const |
| double | get_ifloat () const |
| double | get_jfloat () const |
| void | setState (const vpMeSiteState &flag) |
| vpMeSiteState | getState () const |
| void | setWeight (const double &w) |
| double | getWeight () const |
| vpMeSite & | operator= (const vpMeSite &m) |
| int | operator!= (const vpMeSite &m) |
| vp_deprecated void | getSign (const vpImage< unsigned char > &I, const int range) |
Static Public Member Functions | |
| static double | distance (const vpMeSite &S1, const vpMeSite &S2) |
| static double | sqrDistance (const vpMeSite &S1, const vpMeSite &S2) |
| static void | display (const vpImage< unsigned char > &I, const double &i, const double &j, const vpMeSiteState &state=NO_SUPPRESSION) |
| static void | display (const vpImage< vpRGBa > &I, const double &i, const double &j, const vpMeSiteState &state=NO_SUPPRESSION) |
Public Attributes | |
| int | i |
| int | j |
| double | ifloat |
| double | jfloat |
| int | mask_sign |
| double | alpha |
| double | convlt |
| double | normGradient |
| double | weight |
| int | suppress |
Friends | |
| VISP_EXPORT std::ostream & | operator<< (std::ostream &os, vpMeSite &vpMeS) |
Performs search in a given direction(normal) for a given distance(pixels) for a given 'site'. Gives the most likely site given the probability from an ME mask.
Definition at line 64 of file vpMeSite.h.
Type moving-edges site of display.
| Enumerator | |
|---|---|
| NONE | Not displayed. |
| RANGE | |
| RESULT | |
| RANGE_RESULT | |
Definition at line 70 of file vpMeSite.h.
Moving-edge site state
Definition at line 81 of file vpMeSite.h.
| vpMeSite::vpMeSite | ( | ) |
Default constructor.
Definition at line 85 of file vpMeSite.cpp.
References alpha, convlt, i, ifloat, j, jfloat, mask_sign, NO_SUPPRESSION, NONE, normGradient, suppress, and weight.
Referenced by distance(), getQueryList(), operator!=(), operator<<, operator=(), sqrDistance(), track(), and vpMeSite().
| vpMeSite::vpMeSite | ( | double | ip, |
| double | jp ) |
Constructor from pixel coordinates.
Definition at line 94 of file vpMeSite.cpp.
References alpha, convlt, i, ifloat, j, jfloat, mask_sign, NO_SUPPRESSION, NONE, normGradient, vpMath::round(), suppress, and weight.
| vpMeSite::vpMeSite | ( | const vpMeSite & | mesite | ) |
Copy constructor.
Definition at line 108 of file vpMeSite.cpp.
References alpha, convlt, i, ifloat, j, jfloat, mask_sign, NO_SUPPRESSION, NONE, normGradient, suppress, vpMeSite(), and weight.
|
inlinevirtual |
Destructor.
Definition at line 157 of file vpMeSite.h.
Compute convolution.
Definition at line 253 of file vpMeSite.cpp.
References alpha, vpMe::getAngleStep(), vpMe::getMask(), vpMe::getMaskSize(), vpMe::getStrip(), i, j, mask_sign, and vpMath::round().
Referenced by track().
| void vpMeSite::display | ( | const vpImage< unsigned char > & | I | ) |
Display moving edges in image I.
| I | : Input image. |
Definition at line 415 of file vpMeSite.cpp.
References display(), ifloat, and jfloat.
Referenced by display(), display(), vpMeTracker::display(), and vpMeTracker::display().
|
static |
Display the moving edge site with a color corresponding to their state.
| I | : The image. |
| i | : Pixel i of the site. |
| j | : Pixel j of the site. |
| state | : State of the site. |
Definition at line 421 of file vpMeSite.cpp.
References vpColor::blue, CONTRAST, vpColor::cyan, vpDisplay::displayCross(), vpColor::green, i, j, M_ESTIMATOR, NO_SUPPRESSION, vpColor::purple, vpColor::red, THRESHOLD, TOO_NEAR, and vpColor::yellow.
Display moving edges in image I.
| I | : Input image. |
Definition at line 417 of file vpMeSite.cpp.
|
static |
Display the moving edge site with a color corresponding to their state.
| I | : The image. |
| i | : Pixel i of the site. |
| j | : Pixel j of the site. |
| state | : State of the site. |
Definition at line 449 of file vpMeSite.cpp.
References vpColor::blue, CONTRAST, vpColor::cyan, vpDisplay::displayCross(), vpColor::green, i, j, M_ESTIMATOR, NO_SUPPRESSION, vpColor::purple, vpColor::red, THRESHOLD, TOO_NEAR, and vpColor::yellow.
Compute the square root distance between two moving-edges sites 
| S1 | : First site |
| S2 | : Second site |
Definition at line 304 of file vpMeSite.h.
References sqrDistance(), and vpMeSite().
|
inline |
Get the i coordinate (integer).
Definition at line 217 of file vpMeSite.h.
References i.
|
inline |
Get the i coordinate (double).
Definition at line 231 of file vpMeSite.h.
References ifloat.
Referenced by vpMbtDistanceCircle::getFeaturesForDisplay(), vpMbtDistanceCylinder::getFeaturesForDisplay(), and vpMbtDistanceLine::getFeaturesForDisplay().
|
inline |
Get the j coordinate (f).
Definition at line 224 of file vpMeSite.h.
References j.
|
inline |
Get the j coordinate (double).
Definition at line 238 of file vpMeSite.h.
References jfloat.
Referenced by vpMbtDistanceCircle::getFeaturesForDisplay(), vpMbtDistanceCylinder::getFeaturesForDisplay(), and vpMbtDistanceLine::getFeaturesForDisplay().
|
inline |
Get the angle of tangent at site.
Definition at line 205 of file vpMeSite.h.
References alpha.
Construct and return the list of vpMeSite along the normal to the contour, in the given range.
| I | : Image in which the display is performed. |
| range | : +/- the range within which the pixel's correspondent will be sought. |
Definition at line 181 of file vpMeSite.cpp.
References alpha, convlt, vpDisplay::displayCross(), ifloat, init(), jfloat, mask_sign, RANGE, RANGE_RESULT, vpImagePoint::set_i(), vpImagePoint::set_j(), setDisplay(), vpMeSite(), and vpColor::yellow.
Referenced by track().
| void vpMeSite::getSign | ( | const vpImage< unsigned char > & | I, |
| const int | range ) |
Get the sign (according to the difference of values of the intensities of the extremities).
| I | : Image in which the sign is computed. |
| range | : +/- the range within which the pixel's correspondent is sought. |
Definition at line 228 of file vpMeSite.cpp.
References alpha, ifloat, jfloat, mask_sign, and vpMath::round().
|
inline |
Get the state of the site.
Definition at line 261 of file vpMeSite.h.
Referenced by vpMbEdgeTracker::computeVVSFirstPhase(), vpMbEdgeTracker::computeVVSFirstPhaseFactor(), vpMeTracker::display(), vpMeLine::displayLine(), vpMeLine::displayLine(), vpMbtDistanceCircle::getFeaturesForDisplay(), vpMbtDistanceCylinder::getFeaturesForDisplay(), vpMbtDistanceLine::getFeaturesForDisplay(), vpMeTracker::initTracking(), vpMeLine::leastSquare(), vpMeEllipse::leastSquareRobust(), vpMeNurbs::localReSample(), vpMeEllipse::plugHoles(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeLine::suppressPoints(), vpMeNurbs::suppressPoints(), vpMbEdgeTracker::testTracking(), vpMeTracker::track(), and vpMbEdgeKltTracker::trackFirstLoop().
|
inline |
Get the weight of the site.
Definition at line 275 of file vpMeSite.h.
References weight.
| void vpMeSite::init | ( | ) |
Initialize moving-edge site with default parameters.
Definition at line 59 of file vpMeSite.cpp.
References alpha, convlt, i, ifloat, j, jfloat, mask_sign, NO_SUPPRESSION, NONE, normGradient, suppress, and weight.
Referenced by getQueryList(), vpMeNurbs::localReSample(), vpMeEllipse::plugHoles(), vpMeEllipse::sample(), vpMeLine::sample(), vpMeNurbs::sample(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), and vpMeNurbs::seekExtremitiesCanny().
| void vpMeSite::init | ( | double | ip, |
| double | jp, | ||
| double | alphap ) |
Initialize moving-edge site parameters.
Definition at line 121 of file vpMeSite.cpp.
References alpha, i, ifloat, j, jfloat, mask_sign, NONE, and vpMath::round().
| void vpMeSite::init | ( | double | ip, |
| double | jp, | ||
| double | alphap, | ||
| double | convltp ) |
| void vpMeSite::init | ( | double | ip, |
| double | jp, | ||
| double | alphap, | ||
| double | convltp, | ||
| int | sign ) |
| int vpMeSite::operator!= | ( | const vpMeSite & | m | ) |
Copy operator.
Definition at line 160 of file vpMeSite.cpp.
References alpha, convlt, i, ifloat, j, jfloat, mask_sign, normGradient, suppress, vpMeSite(), and weight.
|
inline |
Set the angle of tangent at site.
| a | : new value of alpha |
Definition at line 198 of file vpMeSite.h.
References alpha.
|
inline |
Display selector.
Definition at line 210 of file vpMeSite.h.
Referenced by getQueryList(), vpMeNurbs::localReSample(), vpMeEllipse::plugHoles(), vpMeEllipse::sample(), vpMeLine::sample(), vpMeNurbs::sample(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), and vpMeNurbs::seekExtremitiesCanny().
|
inline |
Set the state of the site.
| flag | : flag corresponding to vpMeSiteState |
Definition at line 247 of file vpMeSite.h.
References suppress.
Referenced by vpMeLine::leastSquare(), vpMeEllipse::plugHoles(), vpMbEdgeKltTracker::postTrackingMbt(), vpMeEllipse::sample(), vpMeNurbs::supressNearPoints(), vpMeTracker::track(), and vpMbEdgeTracker::updateMovingEdgeWeights().
|
inline |
Set the weight of the site.
| w | : new value of weight |
Definition at line 268 of file vpMeSite.h.
References weight.
Compute the square distance between two moving-edges sites 
| S1 | : First site |
| S2 | : Second site |
Definition at line 320 of file vpMeSite.h.
References ifloat, jfloat, vpMath::sqr(), and vpMeSite().
Referenced by distance(), vpMeNurbs::localReSample(), vpMeNurbs::seekExtremitiesCanny(), and vpMeNurbs::supressNearPoints().
| void vpMeSite::track | ( | const vpImage< unsigned char > & | im, |
| const vpMe * | me, | ||
| bool | test_likelihood = true ) |
Specific function for moving-edges.
Definition at line 305 of file vpMeSite.cpp.
References CONTRAST, convlt, convolution(), vpDisplay::displayPoint(), vpMe::getLikelihoodThresholdType(), vpMe::getMaskSize(), vpMe::getMu1(), vpMe::getMu2(), getQueryList(), vpMe::getRange(), vpMe::getThreshold(), vpColor::green, i, j, vpMe::NORMALIZED_THRESHOLD, normGradient, RANGE_RESULT, vpColor::red, RESULT, vpImagePoint::set_i(), vpImagePoint::set_j(), vpMath::sqr(), THRESHOLD, and vpMeSite().
Referenced by vpMeTracker::initTracking(), vpMeNurbs::localReSample(), vpMeEllipse::plugHoles(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), and vpMeTracker::track().
|
friend |
ostream operator.
Definition at line 405 of file vpMeSite.cpp.
References alpha, convlt, operator<<, suppress, vpMeSite(), and weight.
Referenced by operator<<.
| double vpMeSite::alpha |
Angle of tangent at site.
Definition at line 106 of file vpMeSite.h.
Referenced by convolution(), getAlpha(), getQueryList(), getSign(), init(), init(), init(), init(), operator<<, operator=(), setAlpha(), vpMeLine::updateDelta(), vpMeNurbs::updateDelta(), vpMeEllipse::updateTheta(), vpMeSite(), vpMeSite(), and vpMeSite().
| double vpMeSite::convlt |
Convolution of Site in previous image.
Definition at line 108 of file vpMeSite.h.
Referenced by getQueryList(), init(), init(), init(), operator<<, operator=(), track(), vpMeSite(), vpMeSite(), and vpMeSite().
| int vpMeSite::i |
Coordinate along i of a site.
Definition at line 96 of file vpMeSite.h.
Referenced by convolution(), display(), display(), get_i(), init(), init(), init(), init(), operator!=(), operator=(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), track(), vpMeTracker::track(), vpMeNurbs::updateDelta(), vpMeSite(), vpMeSite(), and vpMeSite().
| double vpMeSite::ifloat |
Floating coordinates along i of a site.
Definition at line 100 of file vpMeSite.h.
Referenced by display(), display(), vpMeLine::displayLine(), vpMeLine::displayLine(), vpMeLine::displayLine(), vpMeLine::displayLine(), get_ifloat(), getQueryList(), getSign(), vpNurbs::globalCurveApprox(), vpNurbs::globalCurveInterp(), vpNurbs::globalCurveInterp(), init(), init(), init(), init(), vpMeLine::leastSquare(), vpMeEllipse::leastSquareRobust(), vpMeNurbs::localReSample(), operator=(), vpMeEllipse::plugHoles(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpMeLine::setExtremities(), sqrDistance(), vpMeEllipse::updateTheta(), vpMeSite(), vpMeSite(), and vpMeSite().
| int vpMeSite::j |
Coordinates along j of a site.
Definition at line 98 of file vpMeSite.h.
Referenced by convolution(), display(), display(), get_j(), init(), init(), init(), init(), operator!=(), operator=(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), track(), vpMeTracker::track(), vpMeNurbs::updateDelta(), vpMeSite(), vpMeSite(), and vpMeSite().
| double vpMeSite::jfloat |
Floating coordinates along j of a site.
Definition at line 102 of file vpMeSite.h.
Referenced by display(), display(), vpMeLine::displayLine(), vpMeLine::displayLine(), vpMeLine::displayLine(), vpMeLine::displayLine(), get_jfloat(), getQueryList(), getSign(), vpNurbs::globalCurveApprox(), vpNurbs::globalCurveInterp(), vpNurbs::globalCurveInterp(), init(), init(), init(), init(), vpMeLine::leastSquare(), vpMeEllipse::leastSquareRobust(), vpMeNurbs::localReSample(), operator=(), vpMeEllipse::plugHoles(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpMeLine::setExtremities(), sqrDistance(), vpMeEllipse::updateTheta(), vpMeSite(), vpMeSite(), and vpMeSite().
| int vpMeSite::mask_sign |
Mask sign.
Definition at line 104 of file vpMeSite.h.
Referenced by convolution(), getQueryList(), getSign(), init(), init(), init(), init(), operator=(), vpMeLine::updateDelta(), vpMeSite(), vpMeSite(), and vpMeSite().
| double vpMeSite::normGradient |
Convolution of Site in previous image.
Definition at line 110 of file vpMeSite.h.
Referenced by init(), operator=(), track(), vpMeSite(), vpMeSite(), and vpMeSite().
| int vpMeSite::suppress |
Flag to indicate whether point is rejected or not 1 = contrast, 2 = threshold, 3 = M-estimator, 0 = nosupp
Definition at line 366 of file vpMeSite.h.
Referenced by init(), operator<<, operator=(), setState(), vpMeSite(), vpMeSite(), and vpMeSite().
| double vpMeSite::weight |
Uncertainty of point given as a probability between 0 and 1.
Definition at line 112 of file vpMeSite.h.
Referenced by vpMeTracker::display(), getWeight(), init(), operator<<, operator=(), setWeight(), vpMeSite(), vpMeSite(), and vpMeSite().