Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
vpMe.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2017 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ViSP with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * See http://visp.inria.fr for more information.
17  *
18  * This software was developed at:
19  * Inria Rennes - Bretagne Atlantique
20  * Campus Universitaire de Beaulieu
21  * 35042 Rennes Cedex
22  * France
23  *
24  * If you have questions regarding the use of this file, please contact
25  * Inria at visp@inria.fr
26  *
27  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29  *
30  * Description:
31  * Moving edges.
32  *
33  * Authors:
34  * Eric Marchand
35  * Andrew Comport
36  * Aurelien Yol
37  *
38  *****************************************************************************/
39 
45 #ifndef vpMe_H
46 #define vpMe_H
47 
48 #include <visp3/core/vpMatrix.h>
49 #include <visp3/core/vpMath.h>
50 #include <visp3/core/vpImage.h>
51 
59 class VISP_EXPORT vpMe
60 {
61 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
62 public:
63 #else
64 private:
65 #endif
66  double threshold ;
67  double mu1;
68  double mu2;
70  unsigned int anglestep;
71  int mask_sign;
72  unsigned int range;
73  double sample_step;
77  unsigned int mask_size;
79  unsigned int n_mask;
80  //strip: defines a "security strip" such that Seek_Extremities()
81  //cannot return a new extremity which is too close to the
82  //frame borders which may cause Get_Sampling_Grid to refuse
83  //the that extremity
84  int strip;
85  //int graph ;
87 
88 public:
89  vpMe() ;
90  vpMe(const vpMe &me) ;
91  virtual ~vpMe() ;
92 
93  const vpMe& operator=(const vpMe &me);
94 #ifdef VISP_HAVE_CPP11_COMPATIBILITY
95  const vpMe& operator=(const vpMe &&me);
96 #endif
97 
98  void checkSamplestep(double &a) { if(a < min_samplestep) a = min_samplestep ; }
104  inline unsigned int getAngleStep() const { return anglestep; }
110  inline vpMatrix* getMask() const { return mask; }
118  inline unsigned int getMaskNumber() const { return n_mask; }
124  inline int getMaskSign() const { return mask_sign; }
131  inline unsigned int getMaskSize() const { return mask_size; }
137  inline double getMinSampleStep() const { return min_samplestep; }
143  inline double getMu1() const { return mu1; }
149  inline double getMu2() const { return mu2; }
155  inline int getNbTotalSample() const { return ntotal_sample; }
161  inline int getPointsToTrack() const { return points_to_track ; }
167  inline unsigned int getRange() const { return range; }
173  inline int getStrip() const { return strip; }
174 
180  inline double getThreshold() const { return threshold; }
181 
182  void initMask() ;// convolution masks - offset computation
183  void print( ) ;
184 
190  void setAngleStep(const unsigned int &a) { anglestep = a ; }
198  void setMaskNumber(const unsigned int &a) ;
199 
205  void setMaskSign(const int &a){ mask_sign = a ; }
206 
213  void setMaskSize(const unsigned int &a);
219  void setMinSampleStep(const double &min) { min_samplestep = min ; }
220 
226  void setMu1(const double &mu_1) { this->mu1 = mu_1 ; }
227 
233  void setMu2(const double &mu_2) { this->mu2 = mu_2 ; }
234 
240  void setNbTotalSample(const int &nb) { ntotal_sample = nb; }
241 
249  void setPointsToTrack(const int &n) { points_to_track = n; }
250 
256  void setRange(const unsigned int &r) { range = r ; }
257 
263  void setSampleStep(const double &s) { sample_step = s ; }
264 
270  inline double getSampleStep() const { return sample_step ; }
271 
277  void setStrip(const int &a) { strip = a ; }
278 
284  void setThreshold(const double &t) { threshold = t ; }
285  };
286 
287 
288 #endif
289 
290 
double threshold
Definition: vpMe.h:66
unsigned int getRange() const
Definition: vpMe.h:167
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:97
unsigned int getMaskSize() const
Definition: vpMe.h:131
void setPointsToTrack(const int &n)
Definition: vpMe.h:249
unsigned int getMaskNumber() const
Definition: vpMe.h:118
void setStrip(const int &a)
Definition: vpMe.h:277
vpMatrix * mask
Definition: vpMe.h:86
unsigned int range
Definition: vpMe.h:72
double getMu1() const
Definition: vpMe.h:143
void setSampleStep(const double &s)
Definition: vpMe.h:263
int ntotal_sample
Distance between sampled points (in pixels)
Definition: vpMe.h:74
void setNbTotalSample(const int &nb)
Definition: vpMe.h:240
Definition: vpMe.h:59
int mask_sign
Definition: vpMe.h:71
void setMu1(const double &mu_1)
Definition: vpMe.h:226
int getNbTotalSample() const
Definition: vpMe.h:155
int getStrip() const
Definition: vpMe.h:173
double getThreshold() const
Definition: vpMe.h:180
unsigned int getAngleStep() const
Definition: vpMe.h:104
unsigned int mask_size
convolution masks' size in pixels (masks are square),
Definition: vpMe.h:77
void setAngleStep(const unsigned int &a)
Definition: vpMe.h:190
int points_to_track
Definition: vpMe.h:75
void checkSamplestep(double &a)
Definition: vpMe.h:98
int getPointsToTrack() const
Definition: vpMe.h:161
vpMatrix * getMask() const
Definition: vpMe.h:110
void setMaskSign(const int &a)
Definition: vpMe.h:205
void setMu2(const double &mu_2)
Definition: vpMe.h:233
double getMu2() const
Definition: vpMe.h:149
double min_samplestep
Contrast continuity parameter (right boundary)
Definition: vpMe.h:69
unsigned int n_mask
the number of convolution masks available for tracking ; defines resolution.
Definition: vpMe.h:79
int strip
Definition: vpMe.h:84
double mu1
Likelihood ratio threshold.
Definition: vpMe.h:67
void setThreshold(const double &t)
Definition: vpMe.h:284
double mu2
Contrast continuity parameter (left boundary)
Definition: vpMe.h:68
double getMinSampleStep() const
Definition: vpMe.h:137
unsigned int anglestep
Definition: vpMe.h:70
void setRange(const unsigned int &r)
Definition: vpMe.h:256
int getMaskSign() const
Definition: vpMe.h:124
double getSampleStep() const
Definition: vpMe.h:270
double sample_step
Seek range - on both sides of the reference pixel.
Definition: vpMe.h:73
void setMinSampleStep(const double &min)
Definition: vpMe.h:219