Visual Servoing Platform  version 3.5.1 under development (2023-09-22)
vpMeTracker Class Referenceabstract

#include <visp3/me/vpMeTracker.h>

+ Inheritance diagram for vpMeTracker:

Public Member Functions

Public Member Functions Inherited from vpTracker
vpColVector get_p () const
 
vpColVector get_cP () const
 

Public Attributes

Public Attributes Inherited from vpMeTracker
std::list< vpMeSitelist
 
vpMeme
 
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 Inherited from vpMeTracker

vpMeSite::vpMeSiteDisplayType selectDisplay
 
 vpMeTracker ()
 
 vpMeTracker (const vpMeTracker &meTracker)
 
virtual ~vpMeTracker ()
 

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 ()
 
vpMegetMe ()
 
std::list< vpMeSite > & getMeList ()
 
std::list< vpMeSitegetMeList () const
 
int getNbPoints () const
 
void init ()
 
void initTracking (const vpImage< unsigned char > &I)
 
unsigned int numberOfSignal ()
 
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, 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)
 

Detailed Description

Contains abstract elements for a Distance to Feature type feature.

2D state = list of points, 3D state = feature

Definition at line 59 of file vpMeTracker.h.

Constructor & Destructor Documentation

◆ vpMeTracker() [1/2]

vpMeTracker::vpMeTracker ( )

Default constructor.

Definition at line 57 of file vpMeTracker.cpp.

References init().

◆ vpMeTracker() [2/2]

vpMeTracker::vpMeTracker ( const vpMeTracker meTracker)

Copy constructor.

Definition at line 67 of file vpMeTracker.cpp.

References display_point, init(), init_range, list, me, nGoodElement, query_range, and selectDisplay.

◆ ~vpMeTracker()

vpMeTracker::~vpMeTracker ( )
virtual

Destructor.

Definition at line 94 of file vpMeTracker.cpp.

References reset().

Member Function Documentation

◆ display() [1/3]

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 (contrast 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.
Parameters
I: The image.

Definition at line 229 of file vpMeTracker.cpp.

References vpMeSite::display(), and list.

Referenced by display(), vpMeEllipse::initTracking(), vpMeEllipse::track(), and vpMeLine::track().

◆ display() [2/3]

void vpMeTracker::display ( const vpImage< unsigned char > &  I,
vpColVector w,
unsigned int &  index_w 
)

Displays the status of moving edge sites

Parameters
I: The image.
w: vector
index_w: index

Definition at line 245 of file vpMeTracker.cpp.

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

◆ display() [3/3]

void vpMeTracker::display ( const vpImage< vpRGBa > &  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 (contrast 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.
Parameters
I: The image.

Definition at line 237 of file vpMeTracker.cpp.

References vpMeSite::display(), and list.

◆ get_cP()

vpColVector vpTracker::get_cP ( ) const
inlineinherited

Return object parameters expressed in the 3D camera frame.

Definition at line 94 of file vpTracker.h.

◆ get_p()

vpColVector vpTracker::get_p ( ) const
inlineinherited

Return object parameters expressed in the 2D image plane computed by perspective projection.

Definition at line 92 of file vpTracker.h.

◆ getInitRange()

unsigned int vpMeTracker::getInitRange ( )
inline

Return the initial range.

Returns
Value of init_range.

Definition at line 161 of file vpMeTracker.h.

◆ getMe()

vpMe* vpMeTracker::getMe ( )
inline

Return the moving edges initialisation parameters.

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

Definition at line 168 of file vpMeTracker.h.

◆ getMeList() [1/2]

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

Return the list of moving edges

Returns
List of Moving Edges.

Definition at line 175 of file vpMeTracker.h.

◆ getMeList() [2/2]

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

Return the list of moving edges

Returns
List of Moving Edges.

Definition at line 182 of file vpMeTracker.h.

◆ getNbPoints()

int vpMeTracker::getNbPoints ( ) const
inline

Return the number of points that has not been suppressed.

Returns
Number of good points.

Definition at line 189 of file vpMeTracker.h.

◆ init()

void vpMeTracker::init ( void  )

Initialize the tracker.

Definition at line 50 of file vpMeTracker.cpp.

References vpTracker::init(), vpMeSite::NONE, vpTracker::p, vpColVector::resize(), and selectDisplay.

Referenced by vpMeTracker().

◆ initTracking()

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

◆ inMask()

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

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

Parameters
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 123 of file vpMeTracker.cpp.

References vpImage< Type >::getValue().

Referenced by vpMbtFaceDepthDense::computeDesiredFeatures(), vpMbtFaceDepthNormal::computeDesiredFeatures(), vpMbtDistanceKltPoints::computeNbDetectedCurrent(), vpMbtDistanceKltPoints::init(), and track().

◆ numberOfSignal()

unsigned int vpMeTracker::numberOfSignal ( )

Return number of moving-edges that are tracked.

Definition at line 112 of file vpMeTracker.cpp.

References list.

Referenced by vpMeLine::leastSquare(), vpMeEllipse::leastSquareRobust(), vpMeNurbs::localReSample(), vpMeLine::reSample(), and vpMeNurbs::reSample().

◆ operator=()

vpMeTracker & vpMeTracker::operator= ( vpMeTracker f)

Copy operator.

Definition at line 96 of file vpMeTracker.cpp.

References display_point, init_range, list, me, nGoodElement, query_range, and selectDisplay.

◆ outOfImage() [1/2]

int vpMeTracker::outOfImage ( const vpImagePoint iP,
int  half,
int  rows,
int  cols 
)

Check if a pixel i,j is out of the image.

Definition at line 138 of file vpMeTracker.cpp.

References vpImagePoint::get_i(), vpImagePoint::get_j(), and vpMath::round().

◆ outOfImage() [2/2]

int vpMeTracker::outOfImage ( int  i,
int  j,
int  half,
int  row,
int  cols 
)

◆ reset()

void vpMeTracker::reset ( )

Reset the tracker by removing all the moving edges.

Definition at line 88 of file vpMeTracker.cpp.

References list, and nGoodElement.

Referenced by ~vpMeTracker().

◆ sample()

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

Sample pixels at a given interval.

Implemented in vpMeLine, vpMeEllipse, and vpMeNurbs.

◆ setDisplay()

◆ setInitRange()

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

Set the initial range.

Parameters
r: initial range.

Definition at line 245 of file vpMeTracker.h.

◆ setMask()

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

Set the mask.

Parameters
mask: Mask.

Definition at line 252 of file vpMeTracker.h.

◆ setMe()

◆ setMeList()

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

Set the list of moving edges.

Parameters
l: list of Moving Edges.

Definition at line 266 of file vpMeTracker.h.

◆ totalNumberOfSignal()

unsigned int vpMeTracker::totalNumberOfSignal ( )

Return the total number of moving-edges.

Definition at line 121 of file vpMeTracker.cpp.

References list.

◆ track()

Member Data Documentation

◆ cP

◆ cPAvailable

bool vpTracker::cPAvailable
inherited

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

Definition at line 78 of file vpTracker.h.

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

◆ display_point

bool vpMeTracker::display_point

Definition at line 288 of file vpMeTracker.h.

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

◆ init_range

unsigned int vpMeTracker::init_range

Initial range.

Definition at line 76 of file vpMeTracker.h.

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

◆ list

◆ m_mask

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

◆ me

◆ nGoodElement

int vpMeTracker::nGoodElement

Number of good moving-edges that are tracked.

Definition at line 78 of file vpMeTracker.h.

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

◆ p

◆ query_range

int vpMeTracker::query_range

Definition at line 287 of file vpMeTracker.h.

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

◆ selectDisplay