Visual Servoing Platform
version 3.3.0 under development (2020-02-17)
|
#include <visp3/me/vpMeSite.h>
Public Types | |
enum | vpMeSiteDisplayType { NONE, RANGE, RESULT, RANGE_RESULT } |
enum | vpMeSiteState { NO_SUPPRESSION = 0, CONSTRAST = 1, 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_contraste=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 |
int | i_1 |
int | j_1 |
double | ifloat |
double | jfloat |
unsigned char | v |
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 probablility from an ME mask.
Definition at line 71 of file vpMeSite.h.
Enumerator | |
---|---|
NONE | |
RANGE | |
RESULT | |
RANGE_RESULT |
Definition at line 74 of file vpMeSite.h.
Moving-edge site state.
Definition at line 77 of file vpMeSite.h.
vpMeSite::vpMeSite | ( | ) |
Definition at line 95 of file vpMeSite.cpp.
vpMeSite::vpMeSite | ( | double | ip, |
double | jp | ||
) |
Definition at line 105 of file vpMeSite.cpp.
References ifloat, jfloat, and vpMath::round().
vpMeSite::vpMeSite | ( | const vpMeSite & | mesite | ) |
Copy constructor.
Definition at line 122 of file vpMeSite.cpp.
|
inlinevirtual |
Definition at line 114 of file vpMeSite.h.
Definition at line 294 of file vpMeSite.cpp.
References alpha, vpMe::getAngleStep(), vpImage< Type >::getHeight(), vpMe::getMask(), vpMe::getMaskSize(), vpMe::getStrip(), vpImage< Type >::getWidth(), i, j, mask_sign, and vpMath::round().
Referenced by track().
void vpMeSite::display | ( | const vpImage< unsigned char > & | I | ) |
Definition at line 601 of file vpMeSite.cpp.
References ifloat, and jfloat.
Referenced by vpMeTracker::display(), and display().
Definition at line 606 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 631 of file vpMeSite.cpp.
References vpColor::blue, CONSTRAST, vpColor::cyan, vpDisplay::displayCross(), vpColor::green, M_ESTIMATOR, NO_SUPPRESSION, vpColor::purple, vpColor::red, THRESHOLD, TOO_NEAR, and vpColor::yellow.
|
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 677 of file vpMeSite.cpp.
References vpColor::blue, CONSTRAST, vpColor::cyan, vpDisplay::displayCross(), vpColor::green, M_ESTIMATOR, NO_SUPPRESSION, vpColor::purple, vpColor::red, THRESHOLD, TOO_NEAR, and vpColor::yellow.
Compute the distance
S1 | : First site |
S2 | : Second site |
Definition at line 221 of file vpMeSite.h.
References ifloat, jfloat, and vpMath::sqr().
|
inline |
|
inline |
Get the i coordinate (double)
Definition at line 160 of file vpMeSite.h.
Referenced by vpMbtDistanceCircle::getFeaturesForDisplay(), vpMbtDistanceLine::getFeaturesForDisplay(), and vpMbtDistanceCylinder::getFeaturesForDisplay().
|
inline |
|
inline |
Get the j coordinate (double)
Definition at line 167 of file vpMeSite.h.
Referenced by vpMbtDistanceCircle::getFeaturesForDisplay(), vpMbtDistanceLine::getFeaturesForDisplay(), and vpMbtDistanceCylinder::getFeaturesForDisplay().
|
inline |
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 219 of file vpMeSite.cpp.
References alpha, convlt, vpDisplay::displayCross(), ifloat, init(), jfloat, mask_sign, RANGE, RANGE_RESULT, vpImagePoint::set_i(), vpImagePoint::set_j(), setDisplay(), 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 267 of file vpMeSite.cpp.
References alpha, ifloat, jfloat, mask_sign, and vpMath::round().
|
inline |
Get the state of the site
Definition at line 190 of file vpMeSite.h.
Referenced by vpMbEdgeTracker::computeVVSFirstPhase(), vpMbEdgeTracker::computeVVSFirstPhaseFactor(), vpMeTracker::display(), vpMeLine::display(), vpMbtDistanceCircle::getFeaturesForDisplay(), vpMbtDistanceLine::getFeaturesForDisplay(), vpMbtDistanceCylinder::getFeaturesForDisplay(), vpMeTracker::initTracking(), vpMeLine::leastSquare(), vpMeNurbs::localReSample(), vpMeTracker::operator=(), vpMeEllipse::printParameters(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeLine::suppressPoints(), vpMeNurbs::suppressPoints(), vpMbEdgeTracker::testTracking(), vpMeTracker::track(), and vpMbEdgeKltTracker::trackFirstLoop().
|
inline |
void vpMeSite::init | ( | void | ) |
Definition at line 66 of file vpMeSite.cpp.
References alpha, convlt, i, i_1, ifloat, j, j_1, jfloat, mask_sign, NO_SUPPRESSION, NONE, normGradient, suppress, v, and weight.
Referenced by getQueryList(), vpMeNurbs::localReSample(), vpMeLine::sample(), vpMeNurbs::sample(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), and vpMeEllipse::~vpMeEllipse().
void vpMeSite::init | ( | double | ip, |
double | jp, | ||
double | alphap | ||
) |
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 | ) |
Definition at line 589 of file vpMeSite.cpp.
|
inline |
Set the angle of tangent at site
a | : new value of alpha |
Definition at line 130 of file vpMeSite.h.
|
inline |
Definition at line 139 of file vpMeSite.h.
Referenced by getQueryList(), vpMeNurbs::localReSample(), vpMeLine::sample(), vpMeNurbs::sample(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), and vpMeEllipse::~vpMeEllipse().
|
inline |
Set the state of the site
flag | : flag corresponding to vpMeSiteState |
Definition at line 176 of file vpMeSite.h.
Referenced by vpMeLine::leastSquare(), vpMbEdgeKltTracker::postTrackingMbt(), vpMeEllipse::printParameters(), vpMeNurbs::supressNearPoints(), vpMeTracker::track(), vpMbEdgeTracker::updateMovingEdgeWeights(), and vpMeEllipse::~vpMeEllipse().
|
inline |
Set the weight of the site
w | : new value of weight |
Definition at line 197 of file vpMeSite.h.
Compute the distance
S1 | : First site |
S2 | : Second site |
Definition at line 234 of file vpMeSite.h.
References ifloat, jfloat, and vpMath::sqr().
Referenced by vpMeNurbs::localReSample(), vpMeNurbs::seekExtremitiesCanny(), and vpMeNurbs::supressNearPoints().
void vpMeSite::track | ( | const vpImage< unsigned char > & | I, |
const vpMe * | me, | ||
bool | test_contraste = true |
||
) |
Specific function for ME.
Definition at line 355 of file vpMeSite.cpp.
References CONSTRAST, convlt, convolution(), vpDisplay::displayPoint(), vpMe::getMu1(), vpMe::getMu2(), getQueryList(), vpMe::getRange(), vpMe::getThreshold(), vpColor::green, i, i_1, j, j_1, normGradient, RANGE_RESULT, vpColor::red, RESULT, vpImagePoint::set_i(), vpImagePoint::set_j(), vpMath::sqr(), and THRESHOLD.
Referenced by vpMeTracker::initTracking(), vpMeNurbs::localReSample(), vpMeEllipse::printParameters(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), and vpMeTracker::track().
|
friend |
Definition at line 591 of file vpMeSite.cpp.
double vpMeSite::alpha |
Definition at line 93 of file vpMeSite.h.
Referenced by convolution(), getQueryList(), getSign(), init(), operator=(), vpMeEllipse::printParameters(), vpMeLine::updateDelta(), and vpMeNurbs::updateDelta().
double vpMeSite::convlt |
Definition at line 95 of file vpMeSite.h.
Referenced by getQueryList(), init(), operator=(), and track().
int vpMeSite::i |
Definition at line 87 of file vpMeSite.h.
Referenced by convolution(), init(), vpMeTracker::initTracking(), operator!=(), operator=(), vpMeEllipse::printParameters(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeTracker::track(), track(), and vpMeNurbs::updateDelta().
int vpMeSite::i_1 |
Definition at line 88 of file vpMeSite.h.
Referenced by init(), vpMeTracker::initTracking(), operator=(), vpMeTracker::track(), and track().
double vpMeSite::ifloat |
Definition at line 89 of file vpMeSite.h.
Referenced by display(), vpMeLine::display(), distance(), getQueryList(), getSign(), vpNurbs::globalCurveApprox(), vpNurbs::globalCurveInterp(), init(), vpMeLine::initTracking(), vpMeLine::leastSquare(), vpMeNurbs::localReSample(), operator=(), vpMeEllipse::printParameters(), vpMeLine::reSample(), vpMeLine::sample(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpMeLine::setExtremities(), sqrDistance(), and vpMeSite().
int vpMeSite::j |
Definition at line 87 of file vpMeSite.h.
Referenced by vpMbtDistanceCylinder::computeInteractionMatrixError(), convolution(), init(), vpMeTracker::initTracking(), operator!=(), operator=(), vpMeEllipse::printParameters(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeTracker::track(), track(), and vpMeNurbs::updateDelta().
int vpMeSite::j_1 |
Definition at line 88 of file vpMeSite.h.
Referenced by init(), vpMeTracker::initTracking(), operator=(), vpMeTracker::track(), and track().
double vpMeSite::jfloat |
Definition at line 89 of file vpMeSite.h.
Referenced by display(), vpMeLine::display(), distance(), getQueryList(), getSign(), vpNurbs::globalCurveApprox(), vpNurbs::globalCurveInterp(), init(), vpMeLine::initTracking(), vpMeLine::leastSquare(), vpMeNurbs::localReSample(), operator=(), vpMeEllipse::printParameters(), vpMeLine::reSample(), vpMeLine::sample(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpMeLine::setExtremities(), sqrDistance(), and vpMeSite().
int vpMeSite::mask_sign |
Definition at line 91 of file vpMeSite.h.
Referenced by convolution(), getQueryList(), getSign(), init(), operator=(), and vpMeLine::updateDelta().
double vpMeSite::normGradient |
Definition at line 97 of file vpMeSite.h.
Referenced by init(), operator=(), and track().
int vpMeSite::suppress |
Flag to indicate whether point is rejected or not 1 = contrast, 2 = threshold, 3 = M-estimator, 0 = nosupp
Definition at line 249 of file vpMeSite.h.
Referenced by init(), and operator=().
unsigned char vpMeSite::v |
Definition at line 90 of file vpMeSite.h.
Referenced by init(), and operator=().
double vpMeSite::weight |
Definition at line 99 of file vpMeSite.h.
Referenced by vpMeTracker::display(), init(), and operator=().