Visual Servoing Platform  version 3.2.0
vpMeTracker Class Referenceabstract

#include <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
 
vpMeme
 
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 64 of file vpMeTracker.h.

Constructor & Destructor Documentation

◆ vpMeTracker() [1/2]

vpMeTracker::vpMeTracker ( )

Definition at line 61 of file vpMeTracker.cpp.

References init().

◆ vpMeTracker() [2/2]

vpMeTracker::vpMeTracker ( const vpMeTracker meTracker)

Definition at line 71 of file vpMeTracker.cpp.

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

◆ ~vpMeTracker()

vpMeTracker::~vpMeTracker ( )
virtual

Definition at line 101 of file vpMeTracker.cpp.

References reset().

Member Function Documentation

◆ display() [1/3]

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

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

Reimplemented in vpMeEllipse.

Definition at line 325 of file vpMeTracker.cpp.

◆ display() [2/3]

virtual void vpMeTracker::display ( const vpImage< unsigned char > &  I,
vpColor  col 
)
pure virtual

Implemented in vpMeNurbs, vpMeLine, and vpMeEllipse.

Referenced by vpMeEllipse::initTracking().

◆ display() [3/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 345 of file vpMeTracker.cpp.

◆ getInitRange()

unsigned int vpMeTracker::getInitRange ( )
inline

Return the initial range.

Returns
Value of init_range.

Definition at line 129 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 150 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 164 of file vpMeTracker.h.

◆ getMeList() [2/2]

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

Definition at line 165 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 172 of file vpMeTracker.h.

◆ init()

void vpMeTracker::init ( void  )

Definition at line 54 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)

Virtual function that is called by lower classes vpMeEllipse, vpMeLine and vpMeNurbs.

Exceptions
vpTrackingException::initializationError: Moving edges not initialized.

Definition at line 168 of file vpMeTracker.cpp.

Referenced by vpMeEllipse::initTracking().

◆ inMask()

bool vpMeTracker::inMask ( const vpImage< bool > *  mask,
const unsigned int  i,
const 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 139 of file vpMeTracker.cpp.

Referenced by vpMbtFaceDepthDense::computeDesiredFeatures(), and vpMbtFaceDepthNormal::computeDesiredFeatures().

◆ numberOfSignal()

unsigned int vpMeTracker::numberOfSignal ( )

Definition at line 119 of file vpMeTracker.cpp.

References list.

◆ operator=()

vpMeTracker & vpMeTracker::operator= ( vpMeTracker f)

Definition at line 103 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 
)

Definition at line 154 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 
)

Definition at line 149 of file vpMeTracker.cpp.

◆ reset()

void vpMeTracker::reset ( )

Reset the tracker by removing all the moving edges.

Definition at line 95 of file vpMeTracker.cpp.

Referenced by ~vpMeTracker().

◆ sample()

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.

◆ setDisplay()

◆ setInitRange()

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

Set the initial range.

Parameters
r: initial range.

Definition at line 122 of file vpMeTracker.h.

◆ setMask()

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

Set the mask

Parameters
mask: Mask.

Definition at line 136 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 157 of file vpMeTracker.h.

◆ totalNumberOfSignal()

unsigned int vpMeTracker::totalNumberOfSignal ( )

Definition at line 128 of file vpMeTracker.cpp.

References list.

◆ track()

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

Track sampled pixels.

Track moving-edges.

Parameters
I: Image.
Exceptions
vpTrackingException::initializationError: Moving edges not initialized.

Definition at line 249 of file vpMeTracker.cpp.

Member Data Documentation

◆ cP

vpColVector vpTracker::cP
inherited

Feature coordinates expressed in the camera frame cP.

Definition at line 74 of file vpTracker.h.

Referenced by vpCircle::init(), vpSphere::init(), vpCylinder::init(), vpTracker::operator=(), vpPoint::operator=(), and vpPose::printPoint().

◆ cPAvailable

bool vpTracker::cPAvailable
inherited

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

Definition at line 80 of file vpTracker.h.

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

◆ display_point

bool vpMeTracker::display_point

Definition at line 177 of file vpMeTracker.h.

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

◆ init_range

unsigned int vpMeTracker::init_range

Definition at line 76 of file vpMeTracker.h.

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

◆ list

std::list<vpMeSite> vpMeTracker::list

Tracking dependent variables/functions List of tracked moving edges points.

Definition at line 73 of file vpMeTracker.h.

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

◆ m_mask

const vpImage<bool>* vpMeTracker::m_mask

Mask used to disable tracking on a part of image.

Definition at line 79 of file vpMeTracker.h.

◆ me

vpMe* vpMeTracker::me

Moving edges initialisation parameters.

Definition at line 75 of file vpMeTracker.h.

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

◆ nGoodElement

int vpMeTracker::nGoodElement

Definition at line 77 of file vpMeTracker.h.

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

◆ p

vpColVector vpTracker::p
inherited

Feature coordinates expressed in the image plane p. They correspond to 2D normalized coordinates expressed in meters.

Definition at line 70 of file vpTracker.h.

Referenced by vpCircle::display(), vpSphere::display(), vpProjectionDisplay::display(), vpProjectionDisplay::displayCamera(), vpCircle::init(), vpSphere::init(), init(), vpCylinder::init(), vpTracker::operator=(), vpPoint::operator=(), and vpPose::printPoint().

◆ query_range

int vpMeTracker::query_range

Definition at line 176 of file vpMeTracker.h.

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

◆ selectDisplay

vpMeSite::vpMeSiteDisplayType vpMeTracker::selectDisplay
protected

Definition at line 82 of file vpMeTracker.h.

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