Visual Servoing Platform  version 3.2.0 under development (2018-08-20)
vpMeTracker Class Referenceabstract

#include <visp3/me/vpMeTracker.h>

+ Inheritance diagram for vpMeTracker:

Public Member Functions

 vpMeTracker ()
 vpMeTracker (const vpMeTracker &meTracker)
virtual ~vpMeTracker ()
void init ()
void initTracking (const vpImage< unsigned char > &I)
void track (const vpImage< unsigned char > &I)
unsigned int numberOfSignal ()
unsigned int totalNumberOfSignal ()
virtual void display (const vpImage< unsigned char > &I, vpColor col)=0
virtual void display (const vpImage< unsigned char > &I)
void display (const vpImage< unsigned char > &I, vpColVector &w, unsigned int &index_w)
void setDisplay (vpMeSite::vpMeSiteDisplayType select)
vpMeTrackeroperator= (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, const bool doNotTrack=false)=0
void setInitRange (const unsigned int &r)
unsigned int getInitRange ()
virtual void setMask (const vpImage< bool > &mask)
void setMe (vpMe *p_me)
vpMegetMe ()
void setMeList (const std::list< vpMeSite > &l)
std::list< vpMeSite > & getMeList ()
std::list< vpMeSitegetMeList () const
int getNbPoints () const

Static Public Member Functions

static bool inMask (const vpImage< bool > *mask, const unsigned int i, const unsigned int j)

Public Attributes

std::list< vpMeSitelist
unsigned int init_range
int nGoodElement
const vpImage< bool > * m_mask
int query_range
bool display_point
vpColVector p
vpColVector cP
bool cPAvailable

Protected Attributes

vpMeSite::vpMeSiteDisplayType selectDisplay

Detailed Description

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.

Constructor & Destructor Documentation

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.

vpMeTracker::~vpMeTracker ( )

Definition at line 102 of file vpMeTracker.cpp.

References reset().

Member Function Documentation

void vpMeTracker::display ( const vpImage< unsigned char > &  I)

Display the moving edge sites with a color corresponding to their state.

  • If green : The vpMeSite is a good point.
  • If blue : The point is removed because of the vpMeSite tracking phase (constrast problem).
  • If purple : The point is removed because of the vpMeSite tracking phase (threshold problem).
  • If red : The point is removed because of the robust method in the virtual visual servoing (M-Estimator problem).
  • If cyan : The point is removed because it's too close to another.
  • Yellow otherwise
I: The image.

Reimplemented in vpMeEllipse.

Definition at line 327 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 347 of file vpMeTracker.cpp.

References display(), vpMeSite::getState(), list, vpMeSite::NO_SUPPRESSION, and vpMeSite::weight.

unsigned int vpMeTracker::getInitRange ( )

Return the initial range.

Value of init_range.

Definition at line 130 of file vpMeTracker.h.

vpMe* vpMeTracker::getMe ( )

Return the moving edges initialisation parameters

Moving Edges.
trackMeCircle.cpp, and trackMeEllipse.cpp.

Definition at line 151 of file vpMeTracker.h.

std::list<vpMeSite>& vpMeTracker::getMeList ( )

Return the list of moving edges

List of Moving Edges.

Definition at line 165 of file vpMeTracker.h.

std::list<vpMeSite> vpMeTracker::getMeList ( ) const

Definition at line 166 of file vpMeTracker.h.

int vpMeTracker::getNbPoints ( ) const

Return the number of points that has not been suppressed.

Number of good points.

Definition at line 173 of file vpMeTracker.h.

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().

bool vpMeTracker::inMask ( const vpImage< bool > *  mask,
const unsigned int  i,
const unsigned int  j 

Test whether the pixel is inside the mask. Mask values that are set to true are considered in the tracking.

maskMask 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 ( )
vpMeTracker & vpMeTracker::operator= ( vpMeTracker f)
int vpMeTracker::outOfImage ( int  i,
int  j,
int  half,
int  row,
int  cols 
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().

virtual void vpMeTracker::sample ( const vpImage< unsigned char > &  image,
const bool  doNotTrack = false 
pure virtual

Sample pixels at a given interval.

Implemented in vpMeNurbs, and vpMeLine.

Referenced by vpMeNurbs::setCannyThreshold().

void vpMeTracker::setInitRange ( const unsigned int &  r)

Set the initial range.

r: initial range.

Definition at line 123 of file vpMeTracker.h.

virtual void vpMeTracker::setMask ( const vpImage< bool > &  mask)

Set the mask

mask: Mask.

Definition at line 137 of file vpMeTracker.h.

void vpMeTracker::setMeList ( const std::list< vpMeSite > &  l)

Set the list of moving edges

l: list of Moving Edges.

Definition at line 158 of file vpMeTracker.h.

unsigned int vpMeTracker::totalNumberOfSignal ( )

Definition at line 129 of file vpMeTracker.cpp.

References list.

Member Data Documentation

bool vpTracker::cPAvailable

Flag used to indicate if the feature parameters cP expressed in the camera frame are available.

Definition at line 81 of file vpTracker.h.

Referenced by vpTracker::init(), vpTracker::operator=(), and vpPoint::operator=().

bool vpMeTracker::display_point

Definition at line 178 of file vpMeTracker.h.

Referenced by operator=(), and vpMeTracker().

unsigned int vpMeTracker::init_range

Definition at line 77 of file vpMeTracker.h.

Referenced by initTracking(), operator=(), and vpMeTracker().

const vpImage<bool>* vpMeTracker::m_mask

Mask used to disable tracking on a part of image.

Definition at line 80 of file vpMeTracker.h.

Referenced by track().

int vpMeTracker::nGoodElement

Definition at line 78 of file vpMeTracker.h.

Referenced by initTracking(), operator=(), reset(), track(), and vpMeTracker().

int vpMeTracker::query_range

Definition at line 177 of file vpMeTracker.h.

Referenced by operator=(), and vpMeTracker().