Visual Servoing Platform
version 3.5.0 under development (2022-02-15)
|
#include <visp3/me/vpMeTracker.h>
Public Member Functions | |
vpMeTracker () | |
vpMeTracker (const vpMeTracker &meTracker) | |
virtual | ~vpMeTracker () |
Public Member Functions Inherited from vpTracker | |
vpColVector | get_p () const |
vpColVector | get_cP () const |
Public Attributes | |
Public Attributes Inherited from vpMeTracker | |
std::list< vpMeSite > | list |
vpMe * | me |
unsigned int | init_range |
int | nGoodElement |
const vpImage< bool > * | m_mask |
int | query_range |
bool | display_point |
Public Attributes Inherited from vpTracker | |
vpColVector | p |
vpColVector | cP |
bool | cPAvailable |
Protected Attributes | |
Protected Attributes Inherited from vpMeTracker | |
vpMeSite::vpMeSiteDisplayType | selectDisplay |
Public Member Functions Inherited from vpMeTracker | |
virtual void | display (const vpImage< unsigned char > &I, vpColor col)=0 |
virtual void | display (const vpImage< unsigned char > &I) |
virtual 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 () |
void | initTracking (const vpImage< unsigned char > &I) |
unsigned int | numberOfSignal () |
vpMeTracker & | operator= (vpMeTracker &f) |
int | outOfImage (int i, int j, int half, int row, int cols) |
int | outOfImage (const vpImagePoint &iP, int half, int rows, int cols) |
void | reset () |
virtual void | sample (const vpImage< unsigned char > &image, bool doNotTrack=false)=0 |
void | setDisplay (vpMeSite::vpMeSiteDisplayType select) |
void | setInitRange (const unsigned int &r) |
virtual void | setMask (const vpImage< bool > &mask) |
void | setMe (vpMe *p_me) |
void | setMeList (const std::list< vpMeSite > &l) |
unsigned int | totalNumberOfSignal () |
void | track (const vpImage< unsigned char > &I) |
static bool | inMask (const vpImage< bool > *mask, unsigned int i, unsigned int j) |
Contains abstract elements for a Distance to Feature type feature.
2D state = list of points, 3D state = feature
Definition at line 65 of file vpMeTracker.h.
vpMeTracker::vpMeTracker | ( | ) |
Definition at line 62 of file vpMeTracker.cpp.
References init().
vpMeTracker::vpMeTracker | ( | const vpMeTracker & | meTracker | ) |
Definition at line 72 of file vpMeTracker.cpp.
References display_point, init(), init_range, list, me, nGoodElement, query_range, and selectDisplay.
|
virtual |
Definition at line 102 of file vpMeTracker.cpp.
References reset().
Implemented in vpMeNurbs, vpMeLine, and vpMeEllipse.
Referenced by vpMeLine::computeRhoSignFromIntensity(), display(), vpMeNurbs::getNurbs(), vpMeEllipse::initTracking(), vpMeLine::track(), and vpMeEllipse::track().
|
virtual |
Display the moving edge sites with a color corresponding to their state.
I | : The image. |
Definition at line 326 of file vpMeTracker.cpp.
References vpMeSite::display(), and list.
Definition at line 340 of file vpMeTracker.cpp.
References vpMeSite::display(), and list.
void vpMeTracker::display | ( | const vpImage< unsigned char > & | I, |
vpColVector & | w, | ||
unsigned int & | index_w | ||
) |
Displays the status of moving edge sites
I | : The image. |
w | : vector |
index_w | : index |
Definition at line 354 of file vpMeTracker.cpp.
References display(), vpMeSite::getState(), list, vpMeSite::NO_SUPPRESSION, and vpMeSite::weight.
|
inlineinherited |
Return object parameters expressed in the 3D camera frame.
Definition at line 99 of file vpTracker.h.
|
inlineinherited |
Return object parameters expressed in the 2D image plane computed by perspective projection.
Definition at line 97 of file vpTracker.h.
|
inline |
|
inline |
Return the moving edges initialisation parameters
Definition at line 120 of file vpMeTracker.h.
|
inline |
Return the list of moving edges
Definition at line 127 of file vpMeTracker.h.
|
inline |
Definition at line 128 of file vpMeTracker.h.
|
inline |
Return the number of points that has not been suppressed.
Definition at line 135 of file vpMeTracker.h.
References vpTracker::init(), and vpTracker::operator=().
void vpMeTracker::init | ( | void | ) |
Definition at line 55 of file vpMeTracker.cpp.
References vpTracker::init(), vpMeSite::NONE, vpTracker::p, vpColVector::resize(), and selectDisplay.
Referenced by vpMeTracker().
void vpMeTracker::initTracking | ( | const vpImage< unsigned char > & | I | ) |
Virtual function that is called by lower classes vpMeEllipse, vpMeLine and vpMeNurbs.
vpTrackingException::initializationError | : Moving edges not initialized. |
Definition at line 169 of file vpMeTracker.cpp.
References vpDisplay::displayArrow(), vpMe::getRange(), vpMeSite::getState(), vpColor::green, vpMeSite::i, vpMeSite::i_1, init_range, vpTrackingException::initializationError, vpMeSite::j, vpMeSite::j_1, list, me, nGoodElement, vpMeSite::NO_SUPPRESSION, vpImagePoint::set_i(), vpImagePoint::set_j(), vpMe::setRange(), vpMeSite::track(), vpDERROR_TRACE, and vpERROR_TRACE.
Referenced by vpMeEllipse::getEquationParam(), vpMeEllipse::getSmallestAngle(), vpMeNurbs::initTracking(), vpMeLine::initTracking(), vpMeLine::reSample(), vpMeNurbs::reSample(), vpMeEllipse::sample(), and vpMeNurbs::setCannyThreshold().
|
static |
Test whether the pixel is inside the mask. Mask values that are set to true are considered in the tracking.
mask | Mask image or NULL 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 140 of file vpMeTracker.cpp.
References vpImage< Type >::getValue().
Referenced by vpMbtFaceDepthDense::computeDesiredFeatures(), vpMbtFaceDepthNormal::computeDesiredFeatures(), vpMbtDistanceKltPoints::computeNbDetectedCurrent(), vpMbtDistanceKltPoints::init(), and track().
unsigned int vpMeTracker::numberOfSignal | ( | ) |
Definition at line 120 of file vpMeTracker.cpp.
References list.
Referenced by vpMeLine::leastSquare(), vpMeEllipse::leastSquareRobust(), vpMeNurbs::localReSample(), vpMeLine::reSample(), and vpMeNurbs::reSample().
vpMeTracker & vpMeTracker::operator= | ( | vpMeTracker & | f | ) |
Definition at line 104 of file vpMeTracker.cpp.
References display_point, vpMeSite::getState(), init_range, list, me, nGoodElement, vpMeSite::NO_SUPPRESSION, query_range, and selectDisplay.
int vpMeTracker::outOfImage | ( | int | i, |
int | j, | ||
int | half, | ||
int | row, | ||
int | cols | ||
) |
Definition at line 150 of file vpMeTracker.cpp.
Referenced by vpMeNurbs::localReSample(), vpMeEllipse::plugHoles(), vpMeLine::sample(), vpMeNurbs::sample(), vpMeEllipse::sample(), vpMeLine::seekExtremities(), and vpMeNurbs::seekExtremities().
int vpMeTracker::outOfImage | ( | const vpImagePoint & | iP, |
int | half, | ||
int | rows, | ||
int | cols | ||
) |
Definition at line 155 of file vpMeTracker.cpp.
References vpImagePoint::get_i(), vpImagePoint::get_j(), and vpMath::round().
void vpMeTracker::reset | ( | ) |
Reset the tracker by removing all the moving edges.
Definition at line 96 of file vpMeTracker.cpp.
References list, and nGoodElement.
Referenced by ~vpMeTracker().
|
pure virtual |
Sample pixels at a given interval.
Implemented in vpMeEllipse, vpMeNurbs, and vpMeLine.
Referenced by vpMeNurbs::setCannyThreshold().
|
inline |
Definition at line 152 of file vpMeTracker.h.
|
inline |
|
inlinevirtual |
|
inline |
Set the moving edges initialisation parameters
p_me | : Moving Edges. |
Definition at line 173 of file vpMeTracker.h.
|
inline |
Set the list of moving edges
l | : list of Moving Edges. |
Definition at line 180 of file vpMeTracker.h.
unsigned int vpMeTracker::totalNumberOfSignal | ( | ) |
Definition at line 129 of file vpMeTracker.cpp.
References list.
void vpMeTracker::track | ( | const vpImage< unsigned char > & | I | ) |
Track sampled pixels.
Track moving-edges.
I | : Image. |
vpTrackingException::initializationError | : Moving edges not initialized. |
Definition at line 250 of file vpMeTracker.cpp.
References vpColor::black, vpDisplay::displayArrow(), vpMeSite::getState(), vpMeSite::i, vpMeSite::i_1, vpTrackingException::initializationError, inMask(), vpMeSite::j, vpMeSite::j_1, list, m_mask, me, nGoodElement, vpMeSite::NO_SUPPRESSION, vpTrackingException::notEnoughPointError, vpMeSite::setState(), vpMeSite::THRESHOLD, vpMeSite::track(), and vpDERROR_TRACE.
Referenced by vpMeNurbs::setCannyThreshold(), vpMeEllipse::setThresholdRobust(), vpMeLine::track(), vpMeNurbs::track(), and vpMeEllipse::track().
|
inherited |
Feature coordinates expressed in the camera frame cP.
Definition at line 77 of file vpTracker.h.
Referenced by vpFeaturePoint3D::buildFrom(), vpSphere::changeFrame(), vpPoint::changeFrame(), vpCircle::changeFrame(), vpLine::changeFrame(), vpCylinder::changeFrame(), vpFeatureBuilder::create(), vpPoint::get_W(), vpPoint::get_X(), vpPoint::get_Y(), vpPoint::get_Z(), vpSphere::init(), vpCircle::init(), vpPoint::init(), vpLine::init(), vpCylinder::init(), vpMbtPolygon::isVisible(), vpTracker::operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpForwardProjection::project(), vpSphere::projection(), vpCircle::projection(), vpPoint::projection(), vpLine::projection(), vpCylinder::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 83 of file vpTracker.h.
Referenced by vpTracker::init(), and vpTracker::operator=().
bool vpMeTracker::display_point |
Definition at line 193 of file vpMeTracker.h.
Referenced by operator=(), and vpMeTracker().
unsigned int vpMeTracker::init_range |
Definition at line 81 of file vpMeTracker.h.
Referenced by initTracking(), operator=(), and vpMeTracker().
std::list<vpMeSite> vpMeTracker::list |
Tracking dependent variables/functions List of tracked moving edges points.
Definition at line 78 of file vpMeTracker.h.
Referenced by display(), vpMeLine::display(), initTracking(), vpMeLine::leastSquare(), vpMeEllipse::leastSquareRobust(), vpMeNurbs::localReSample(), numberOfSignal(), operator=(), vpMeEllipse::plugHoles(), reset(), vpMeLine::sample(), vpMeNurbs::sample(), vpMeEllipse::sample(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), vpMeLine::setExtremities(), vpMeLine::suppressPoints(), vpMeNurbs::suppressPoints(), vpMeNurbs::supressNearPoints(), totalNumberOfSignal(), track(), vpMeNurbs::track(), vpMeLine::updateDelta(), vpMeNurbs::updateDelta(), vpMeEllipse::updateTheta(), vpMeTracker(), vpMeEllipse::~vpMeEllipse(), and vpMeLine::~vpMeLine().
const vpImage<bool>* vpMeTracker::m_mask |
Mask used to disable tracking on a part of image.
Definition at line 84 of file vpMeTracker.h.
Referenced by track().
vpMe* vpMeTracker::me |
Moving edges initialisation parameters.
Definition at line 80 of file vpMeTracker.h.
Referenced by initTracking(), vpMeEllipse::leastSquareRobust(), operator=(), vpMeEllipse::plugHoles(), vpMeLine::reSample(), vpMeLine::sample(), vpMeEllipse::sample(), vpMeLine::seekExtremities(), track(), and vpMeTracker().
int vpMeTracker::nGoodElement |
Definition at line 82 of file vpMeTracker.h.
Referenced by initTracking(), operator=(), reset(), track(), and vpMeTracker().
|
inherited |
Feature coordinates expressed in the image plane p. They correspond to 2D normalized coordinates expressed in meters.
Definition at line 73 of file vpTracker.h.
Referenced by vpMbtDistanceCircle::computeInteractionMatrixError(), vpCircle::computeIntersectionPoint(), vpMeterPixelConversion::convertEllipse(), vpFeatureBuilder::create(), vpSphere::display(), vpPoint::display(), vpCircle::display(), vpLine::display(), vpProjectionDisplay::display(), vpCylinder::display(), vpProjectionDisplay::displayCamera(), vpFeatureDisplay::displayEllipse(), vpPose::displayModel(), vpImageDraw::drawFrame(), vpPoint::get_w(), vpPoint::get_x(), vpPoint::get_y(), vpSphere::init(), init(), vpCircle::init(), vpPoint::init(), vpLine::init(), vpCylinder::init(), vpTracker::operator=(), vpForwardProjection::print(), vpPose::printPoint(), vpForwardProjection::project(), vpSphere::projection(), vpCircle::projection(), vpPoint::projection(), vpLine::projection(), vpCylinder::projection(), vpPoint::set_w(), vpPoint::set_x(), and vpPoint::set_y().
int vpMeTracker::query_range |
Definition at line 192 of file vpMeTracker.h.
Referenced by operator=(), and vpMeTracker().
|
protected |
Definition at line 90 of file vpMeTracker.h.
Referenced by init(), vpMeNurbs::localReSample(), operator=(), vpMeEllipse::plugHoles(), vpMeLine::sample(), vpMeNurbs::sample(), vpMeEllipse::sample(), vpMeLine::seekExtremities(), vpMeNurbs::seekExtremities(), vpMeNurbs::seekExtremitiesCanny(), and vpMeTracker().