Visual Servoing Platform  version 3.1.0

#include <visp3/me/vpMe.h>

Public Member Functions

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

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
 

Detailed Description

Constructor & Destructor Documentation

◆ vpMe() [1/2]

vpMe::vpMe ( )

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

Definition at line 376 of file vpMe.cpp.

References anglestep, initMask(), and n_mask.

◆ vpMe() [2/2]

vpMe::vpMe ( const vpMe me)

Definition at line 387 of file vpMe.cpp.

◆ ~vpMe()

vpMe::~vpMe ( )
virtual

Definition at line 446 of file vpMe.cpp.

References mask.

Member Function Documentation

◆ checkSamplestep()

void vpMe::checkSamplestep ( double &  a)
inline

Definition at line 104 of file vpMe.h.

◆ getAngleStep()

unsigned int vpMe::getAngleStep ( ) const
inline

Return the angle step.

Returns
Value of anglestep.

Definition at line 114 of file vpMe.h.

Referenced by vpMeSite::convolution().

◆ getMask()

vpMatrix* vpMe::getMask ( ) const
inline

Get the matrix of the mask.

Returns
the value of mask.

Definition at line 120 of file vpMe.h.

Referenced by vpMeSite::convolution().

◆ getMaskNumber()

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 128 of file vpMe.h.

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

◆ getMaskSign()

int vpMe::getMaskSign ( ) const
inline

Return the mask sign.

Returns
Value of mask_sign.

Definition at line 134 of file vpMe.h.

◆ getMaskSize()

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 142 of file vpMe.h.

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

◆ getMinSampleStep()

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 149 of file vpMe.h.

◆ getMu1()

◆ getMu2()

◆ getNbTotalSample()

int vpMe::getNbTotalSample ( ) const
inline

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

Returns
Value of ntotal_sample.

Definition at line 167 of file vpMe.h.

◆ getPointsToTrack()

int vpMe::getPointsToTrack ( ) const
inline

Return the number of points to track.

Returns
Value of points_to_track.

Definition at line 173 of file vpMe.h.

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

◆ getRange()

◆ getSampleStep()

◆ getStrip()

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 185 of file vpMe.h.

Referenced by vpMeSite::convolution().

◆ getThreshold()

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 193 of file vpMe.h.

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

◆ initMask()

void vpMe::initMask ( )

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

Definition at line 340 of file vpMe.cpp.

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

◆ operator=() [1/2]

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

Copy operator.

Definition at line 395 of file vpMe.cpp.

References anglestep, initMask(), mask, mask_sign, mask_size, min_samplestep, mu1, mu2, n_mask, ntotal_sample, points_to_track, range, sample_step, strip, and threshold.

◆ operator=() [2/2]

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

Move operator.

Definition at line 421 of file vpMe.cpp.

◆ print()

void vpMe::print ( )

Definition at line 360 of file vpMe.cpp.

◆ setAngleStep()

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

Set the angle step.

Parameters
a: new angle step.

Definition at line 203 of file vpMe.h.

◆ setMaskNumber()

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

◆ setMaskSign()

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

Set the mask sign.

Parameters
a: new mask sign.

Definition at line 218 of file vpMe.h.

◆ setMaskSize()

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

◆ setMinSampleStep()

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.

Definition at line 234 of file vpMe.h.

◆ setMu1()

◆ setMu2()

◆ setNbTotalSample()

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:
testKeyPoint-2.cpp, testKeyPoint-4.cpp, tutorial-detection-object-mbt.cpp, and tutorial-detection-object-mbt2.cpp.

Definition at line 255 of file vpMe.h.

◆ setPointsToTrack()

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 264 of file vpMe.h.

◆ setRange()

◆ setSampleStep()

◆ setStrip()

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 292 of file vpMe.h.

◆ setThreshold()

Member Data Documentation

◆ anglestep

unsigned int vpMe::anglestep

Definition at line 71 of file vpMe.h.

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

◆ mask

vpMatrix* vpMe::mask

Definition at line 91 of file vpMe.h.

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

◆ mask_sign

int vpMe::mask_sign

Definition at line 72 of file vpMe.h.

Referenced by operator=().

◆ mask_size

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 80 of file vpMe.h.

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

◆ min_samplestep

double vpMe::min_samplestep

Contrast continuity parameter (right boundary)

Definition at line 70 of file vpMe.h.

Referenced by operator=().

◆ mu1

double vpMe::mu1

Likelihood ratio threshold.

Definition at line 68 of file vpMe.h.

Referenced by operator=().

◆ mu2

double vpMe::mu2

Contrast continuity parameter (left boundary)

Definition at line 69 of file vpMe.h.

Referenced by operator=().

◆ n_mask

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 84 of file vpMe.h.

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

◆ ntotal_sample

int vpMe::ntotal_sample

Distance between sampled points (in pixels)

Definition at line 75 of file vpMe.h.

Referenced by operator=().

◆ points_to_track

int vpMe::points_to_track

Definition at line 76 of file vpMe.h.

Referenced by operator=().

◆ range

unsigned int vpMe::range

Definition at line 73 of file vpMe.h.

Referenced by operator=().

◆ sample_step

double vpMe::sample_step

Seek range - on both sides of the reference pixel.

Definition at line 74 of file vpMe.h.

Referenced by operator=().

◆ strip

int vpMe::strip

Definition at line 89 of file vpMe.h.

Referenced by operator=().

◆ threshold

double vpMe::threshold

Definition at line 67 of file vpMe.h.

Referenced by operator=().