Visual Servoing Platform  version 3.0.0
vpMe.h
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2015 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 
95 
96  void initMask() ;// convolution masks - offset computation
97  void checkSamplestep(double &a) { if(a < min_samplestep) a = min_samplestep ; }
98  void print( ) ;
99 
105  inline vpMatrix* getMask() const { return mask; }
106 
114  void setMaskNumber(const unsigned int &a) ;
115 
123  inline unsigned int getMaskNumber() const { return n_mask; }
124 
130  void setMaskSign(const int &a){ mask_sign = a ; }
131 
137  inline int getMaskSign() const { return mask_sign; }
138 
145  void setMaskSize(const unsigned int &a);
146 
153  inline unsigned int getMaskSize() const { return mask_size; }
154 
160  void setMu1(const double &mu_1) { this->mu1 = mu_1 ; }
161 
167  inline double getMu1() const { return mu1; }
168 
174  void setMu2(const double &mu_2) { this->mu2 = mu_2 ; }
175 
181  inline double getMu2() const { return mu2; }
182 
188  void setNbTotalSample(const int &nb) { ntotal_sample = nb; }
189 
195  inline int getNbTotalSample() const { return ntotal_sample; }
196 
204  void setPointsToTrack(const int &n) { points_to_track = n; }
205 
211  inline int getPointsToTrack() const { return points_to_track ; }
212 
218  void setRange(const unsigned int &r) { range = r ; }
219 
225  inline unsigned int getRange() const { return range; }
226 
232  void setAngleStep(const unsigned int &a) { anglestep = a ; }
233 
239  inline unsigned int getAngleStep() const { return anglestep; }
240 
246  void setMinSampleStep(const double &min) { min_samplestep = min ; }
247 
253  inline double getMinSampleStep() const { return min_samplestep; }
254 
260  void setSampleStep(const double &s) { sample_step = s ; }
261 
267  inline double getSampleStep() const { return sample_step ; }
268 
274  void setStrip(const int &a) { strip = a ; }
275 
281  inline int getStrip() const { return strip; }
282 
288  void setThreshold(const double &t) { threshold = t ; }
289 
295  inline double getThreshold() const { return threshold; }
296 };
297 
298 
299 #endif
300 
301 
double threshold
Definition: vpMe.h:66
unsigned int getRange() const
Definition: vpMe.h:225
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:92
unsigned int getMaskSize() const
Definition: vpMe.h:153
void setPointsToTrack(const int &n)
Definition: vpMe.h:204
unsigned int getMaskNumber() const
Definition: vpMe.h:123
void setStrip(const int &a)
Definition: vpMe.h:274
vpMatrix * mask
Definition: vpMe.h:86
unsigned int range
Definition: vpMe.h:72
double getMu1() const
Definition: vpMe.h:167
void setSampleStep(const double &s)
Definition: vpMe.h:260
int ntotal_sample
Distance between sampled points (in pixels)
Definition: vpMe.h:74
void setNbTotalSample(const int &nb)
Definition: vpMe.h:188
Definition: vpMe.h:59
int mask_sign
Definition: vpMe.h:71
void setMu1(const double &mu_1)
Definition: vpMe.h:160
int getNbTotalSample() const
Definition: vpMe.h:195
int getStrip() const
Definition: vpMe.h:281
double getThreshold() const
Definition: vpMe.h:295
unsigned int getAngleStep() const
Definition: vpMe.h:239
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:232
int points_to_track
Definition: vpMe.h:75
void checkSamplestep(double &a)
Definition: vpMe.h:97
int getPointsToTrack() const
Definition: vpMe.h:211
vpMatrix * getMask() const
Definition: vpMe.h:105
void setMaskSign(const int &a)
Definition: vpMe.h:130
void setMu2(const double &mu_2)
Definition: vpMe.h:174
double getMu2() const
Definition: vpMe.h:181
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:288
double mu2
Contrast continuity parameter (left boundary)
Definition: vpMe.h:68
double getMinSampleStep() const
Definition: vpMe.h:253
unsigned int anglestep
Definition: vpMe.h:70
void setRange(const unsigned int &r)
Definition: vpMe.h:218
int getMaskSign() const
Definition: vpMe.h:137
double getSampleStep() const
Definition: vpMe.h:267
double sample_step
Seek range - on both sides of the reference pixel.
Definition: vpMe.h:73
void setMinSampleStep(const double &min)
Definition: vpMe.h:246