ViSP  2.9.0

#include <vpMe.h>

Public Member Functions

 vpMe ()
 
 vpMe (const vpMe &me)
 
virtual ~vpMe ()
 
const vpMeoperator= (const vpMe &me)
 
void initMask ()
 
void checkSamplestep (double &a)
 
void print ()
 
vpMatrixgetMask () const
 
void setMaskNumber (const unsigned int &a)
 
unsigned int getMaskNumber () const
 
void setMaskSign (const int &a)
 
int getMaskSign () const
 
void setMaskSize (const unsigned int &a)
 
unsigned int getMaskSize () const
 
void setMu1 (const double &mu_1)
 
double getMu1 () const
 
void setMu2 (const double &mu_2)
 
double getMu2 () const
 
void setNbTotalSample (const int &nb)
 
int getNbTotalSample () const
 
void setPointsToTrack (const int &n)
 
int getPointsToTrack () const
 
void setRange (const unsigned int &r)
 
unsigned int getRange () const
 
void setAngleStep (const unsigned int &a)
 
unsigned int getAngleStep () const
 
void setMinSampleStep (const double &min)
 
double getMinSampleStep () const
 
void setSampleStep (const double &s)
 
double getSampleStep () const
 
void setStrip (const int &a)
 
int getStrip () const
 
void setThreshold (const double &t)
 
double getThreshold () const
 
Deprecated Functions
vp_deprecated void setAberration (const double &a)
 
vp_deprecated void setInitAberration (const double &a)
 
vp_deprecated void setMinSamplestep (const double &min)
 

Public Attributes

double threshold
 
double mu1
 
double mu2
 
double min_samplestep
 
unsigned int anglestep
 
int mask_sign
 
unsigned int range
 
double sample_step
 
int ntotal_sample
 
int points_to_track
 
unsigned int mask_size
 
unsigned int n_mask
 
int strip
 
vpMatrixmask
 
Deprecated Attributes
double aberration
 
double init_aberration
 

Detailed Description

Constructor & Destructor Documentation

vpMe::vpMe ( )

Array of matrices defining the different masks (one for every angle step).

Definition at line 413 of file vpMe.cpp.

References anglestep, initMask(), and n_mask.

vpMe::vpMe ( const vpMe me)

Definition at line 428 of file vpMe.cpp.

vpMe::~vpMe ( )
virtual

Definition at line 469 of file vpMe.cpp.

References mask.

Member Function Documentation

void vpMe::checkSamplestep ( double &  a)
inline

Definition at line 108 of file vpMe.h.

unsigned int vpMe::getAngleStep ( ) const
inline

Return the angle step.

Returns
Value of anglestep.

Definition at line 250 of file vpMe.h.

Referenced by vpMeSite::convolution().

vpMatrix* vpMe::getMask ( ) const
inline

Get the matrix of the mask.

Returns
the value of mask.

Definition at line 116 of file vpMe.h.

Referenced by vpMeSite::convolution().

unsigned int vpMe::getMaskNumber ( ) const
inline

Return the number of mask applied to determine the object contour. The number of mask determines the precision of the normal of the edge for every sample. If precision is 2deg, then there are 360/2 = 180 masks.

Returns
the current number of mask.

Definition at line 134 of file vpMe.h.

Referenced by vpMbtXmlParser::read_ecm(), vpMbtXmlParser::read_mask(), vpMbtEdgeKltXmlParser::readMainClass(), and vpMbtXmlParser::readMainClass().

int vpMe::getMaskSign ( ) const
inline

Return the mask sign.

Returns
Value of mask_sign.

Definition at line 148 of file vpMe.h.

unsigned int vpMe::getMaskSize ( ) const
inline

Return the actual mask size (in pixel) used to compute the image gradient and determine the object contour. The mask size defines the size of the convolution mask used to detect an edge.

Returns
the current mask size.

Definition at line 164 of file vpMe.h.

Referenced by vpMeSite::convolution(), vpMbtXmlParser::read_ecm(), vpMbtXmlParser::read_mask(), vpMbtEdgeKltXmlParser::readMainClass(), and vpMbtXmlParser::readMainClass().

double vpMe::getMinSampleStep ( ) const
inline

Get the minimum allowed sample step. Useful to specify a lower bound when the sample step is changed.

Returns
Value of min_samplestep.

Definition at line 264 of file vpMe.h.

double vpMe::getMu1 ( ) const
inline

Get the minimum image contrast allowed to detect a contour.

Returns
Value of mu1.

Definition at line 178 of file vpMe.h.

Referenced by vpMbtXmlParser::read_contrast(), vpMbtXmlParser::read_ecm(), vpMbtEdgeKltXmlParser::readMainClass(), vpMbtXmlParser::readMainClass(), and vpMeSite::track().

double vpMe::getMu2 ( ) const
inline

Get the maximum image contrast allowed to detect a contour.

Returns
Value of mu2.

Definition at line 192 of file vpMe.h.

Referenced by vpMbtXmlParser::read_contrast(), vpMbtXmlParser::read_ecm(), vpMbtEdgeKltXmlParser::readMainClass(), vpMbtXmlParser::readMainClass(), and vpMeSite::track().

int vpMe::getNbTotalSample ( ) const
inline

Get how many discretizied points are used to track the feature.

Returns
Value of ntotal_sample.

Definition at line 206 of file vpMe.h.

Referenced by vpMbtXmlParser::read_sample(), vpMbtEdgeKltXmlParser::readMainClass(), and vpMbtXmlParser::readMainClass().

int vpMe::getPointsToTrack ( ) const
inline

Return the number of points to track.

Returns
Value of points_to_track.

Definition at line 222 of file vpMe.h.

Referenced by vpMeNurbs::localReSample(), and vpMeNurbs::sample().

unsigned int vpMe::getRange ( ) const
inline
int vpMe::getStrip ( ) const
inline

Get the number of pixels that are ignored around the image borders.

Returns
the value of strip.

Definition at line 292 of file vpMe.h.

Referenced by vpMeSite::convolution().

double vpMe::getThreshold ( ) const
inline

Return the likelihood threshold used to determined if the moving edge is valid or not.

Returns
Value of threshold.

Definition at line 306 of file vpMe.h.

Referenced by vpMbtXmlParser::read_contrast(), vpMbtXmlParser::read_ecm(), vpMbtEdgeKltXmlParser::readMainClass(), vpMbtXmlParser::readMainClass(), and vpMeSite::track().

void vpMe::initMask ( )

Initialise the array of matrices with the defined size and the number of matrices to create.

Definition at line 368 of file vpMe.cpp.

References mask, mask_size, and n_mask.

Referenced by operator=(), setMaskNumber(), setMaskSize(), and vpMe().

const vpMe & vpMe::operator= ( const vpMe me)
void vpMe::print ( )

Definition at line 392 of file vpMe.cpp.

References aberration, init_aberration, mask_size, min_samplestep, mu1, mu2, n_mask, range, sample_step, strip, and threshold.

vp_deprecated void vpMe::setAberration ( const double &  a)
inline
Deprecated:
since it wasn't used.

Set aberration value.
Parameters
a: new value.

Definition at line 326 of file vpMe.h.

void vpMe::setAngleStep ( const unsigned int &  a)
inline

Set the angle step.

Parameters
a: new angle step.

Definition at line 243 of file vpMe.h.

vp_deprecated void vpMe::setInitAberration ( const double &  a)
inline
Deprecated:
since it wasn't used.

Set initial aberration value.
Parameters
a: new value.

Definition at line 334 of file vpMe.h.

void vpMe::setMaskNumber ( const unsigned int &  a)

Set the number of mask applied to determine the object contour. The number of mask determines the precision of the normal of the edge for every sample. If precision is 2deg, then there are 360/2 = 180 masks.

Parameters
a: the number of mask.
Examples:
mbtEdgeKltTracking.cpp, mbtEdgeTracking.cpp, tutorial-mb-edge-tracker.cpp, and tutorial-mb-hybrid-tracker.cpp.

Definition at line 480 of file vpMe.cpp.

References anglestep, initMask(), and n_mask.

Referenced by vpMbtXmlParser::read_mask().

void vpMe::setMaskSign ( const int &  a)
inline

Set the mask sign.

Parameters
a: new mask sign.

Definition at line 141 of file vpMe.h.

void vpMe::setMaskSize ( const unsigned int &  a)

Set the mask size (in pixel) used to compute the image gradient and determine the object contour. The mask size defines the size of the convolution mask used to detect an edge.

Parameters
a: new mask size.
Examples:
mbtEdgeKltTracking.cpp, mbtEdgeTracking.cpp, tutorial-mb-edge-tracker.cpp, and tutorial-mb-hybrid-tracker.cpp.

Definition at line 488 of file vpMe.cpp.

References initMask(), and mask_size.

Referenced by vpMbtXmlParser::read_mask().

void vpMe::setMinSampleStep ( const double &  min)
inline

Set the minimum allowed sample step. Useful to specify a lower bound when the sample step is changed.

Parameters
min: new minimum sample step.
Examples:
mbtEdgeKltTracking.cpp, and mbtEdgeTracking.cpp.

Definition at line 257 of file vpMe.h.

vp_deprecated void vpMe::setMinSamplestep ( const double &  min)
inline
Deprecated:
Use setMinSampleStep() instead.

Definition at line 339 of file vpMe.h.

void vpMe::setMu1 ( const double &  mu_1)
inline

Set the minimum image contrast allowed to detect a contour.

Parameters
mu_1: new mu1.
Examples:
mbtEdgeKltTracking.cpp, mbtEdgeTracking.cpp, tutorial-mb-edge-tracker.cpp, and tutorial-mb-hybrid-tracker.cpp.

Definition at line 171 of file vpMe.h.

Referenced by vpMbtXmlParser::read_contrast().

void vpMe::setMu2 ( const double &  mu_2)
inline

Set the maximum image contrast allowed to detect a contour.

Parameters
mu_2: new mu2.
Examples:
mbtEdgeKltTracking.cpp, mbtEdgeTracking.cpp, tutorial-mb-edge-tracker.cpp, and tutorial-mb-hybrid-tracker.cpp.

Definition at line 185 of file vpMe.h.

Referenced by vpMbtXmlParser::read_contrast().

void vpMe::setNbTotalSample ( const int &  nb)
inline

Set how many discretizied points are used to track the feature.

Parameters
nb: new total number of sample.
Examples:
mbtEdgeKltTracking.cpp, mbtEdgeTracking.cpp, tutorial-mb-edge-tracker.cpp, and tutorial-mb-hybrid-tracker.cpp.

Definition at line 199 of file vpMe.h.

Referenced by vpMbtXmlParser::read_sample().

void vpMe::setPointsToTrack ( const int &  n)
inline

Set the number of points to track.

Parameters
n: new number of points to track.
Warning
This method is useful only for the vpMeNurbsTracker.
Examples:
servoAfma62DhalfCamVelocity.cpp, servoAfma6Cylinder2DCamVelocity.cpp, servoAfma6Cylinder2DCamVelocitySecondaryTask.cpp, servoAfma6Line2DCamVelocity.cpp, servoAfma6SquareLines2DCamVelocity.cpp, servoAfma6TwoLines2DCamVelocity.cpp, trackMeCircle.cpp, trackMeEllipse.cpp, trackMeLine.cpp, and trackMeNurbs.cpp.

Definition at line 215 of file vpMe.h.

void vpMe::setStrip ( const int &  a)
inline

Set the number of pixels that are ignored around the image borders.

Parameters
a: new strip.

Definition at line 285 of file vpMe.h.

Member Data Documentation

double vpMe::aberration

Definition at line 313 of file vpMe.h.

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

unsigned int vpMe::anglestep

Definition at line 81 of file vpMe.h.

Referenced by operator=(), setMaskNumber(), and vpMe().

double vpMe::init_aberration

Definition at line 314 of file vpMe.h.

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

vpMatrix* vpMe::mask

Definition at line 97 of file vpMe.h.

Referenced by initMask(), operator=(), and ~vpMe().

int vpMe::mask_sign

Definition at line 82 of file vpMe.h.

Referenced by operator=().

unsigned int vpMe::mask_size

convolution masks' size in pixels (masks are square),

Warning
should not be public, use setMaskSize() and getMaskSize() instead (kept public for compatibility reasons).

Definition at line 88 of file vpMe.h.

Referenced by initMask(), operator=(), print(), and setMaskSize().

double vpMe::min_samplestep

Contrast continuity parameter (right boundary)

Definition at line 80 of file vpMe.h.

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

double vpMe::mu1

Likelihood ratio threshold.

Definition at line 78 of file vpMe.h.

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

double vpMe::mu2

Contrast continuity parameter (left boundary)

Definition at line 79 of file vpMe.h.

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

unsigned int vpMe::n_mask

the number of convolution masks available for tracking ; defines resolution.

Warning
Should not be public, use setMaskNumber() and getMaskNumber() instead (kept public for compatibility reasons).

Definition at line 90 of file vpMe.h.

Referenced by initMask(), operator=(), print(), setMaskNumber(), and vpMe().

int vpMe::ntotal_sample

Distance between sampled points (in pixels)

Definition at line 85 of file vpMe.h.

Referenced by operator=().

int vpMe::points_to_track

Definition at line 86 of file vpMe.h.

Referenced by operator=().

unsigned int vpMe::range

Definition at line 83 of file vpMe.h.

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

double vpMe::sample_step

Seek range - on both sides of the reference pixel.

Definition at line 84 of file vpMe.h.

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

int vpMe::strip

Definition at line 95 of file vpMe.h.

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

double vpMe::threshold

Definition at line 77 of file vpMe.h.

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