ViSP  2.10.0
vpMe.h
1 /****************************************************************************
2  *
3  * $Id: vpMe.h 4649 2014-02-07 14:57:11Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2014 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Moving edges.
36  *
37  * Authors:
38  * Eric Marchand
39  * Andrew Comport
40  * Aurelien Yol
41  *
42  *****************************************************************************/
43 
49 // ====================================================================
58 // ====================================================================
59 // Andrew Comport added functionality - replaced points_to_track with
60 // sample step.
61 
62 #ifndef vpMe_H
63 #define vpMe_H
64 
65 #include <visp/vpMatrix.h>
66 #include <visp/vpMath.h>
67 #include <visp/vpImage.h>
68 
69 
70 class VISP_EXPORT vpMe
71 {
72 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
73 public:
74 #else
75 private:
76 #endif
77  double threshold ;
78  double mu1;
79  double mu2;
81  unsigned int anglestep;
82  int mask_sign;
83  unsigned int range;
84  double sample_step;
88  unsigned int mask_size;
90  unsigned int n_mask;
91  //strip: defines a "security strip" such that Seek_Extremities()
92  //cannot return a new extremity which is too close to the
93  //frame borders which may cause Get_Sampling_Grid to refuse
94  //the that extremity
95  int strip;
96  //int graph ;
98 
99 public:
100  vpMe() ;
101  vpMe(const vpMe &me) ;
102  virtual ~vpMe() ;
103 
104  const vpMe& operator=(const vpMe &me);
105 
106 
107  void initMask() ;// convolution masks - offset computation
108  void checkSamplestep(double &a) { if(a < min_samplestep) a = min_samplestep ; }
109  void print( ) ;
110 
116  inline vpMatrix* getMask() const { return mask; }
117 
125  void setMaskNumber(const unsigned int &a) ;
126 
134  inline unsigned int getMaskNumber() const { return n_mask; }
135 
141  void setMaskSign(const int &a){ mask_sign = a ; }
142 
148  inline int getMaskSign() const { return mask_sign; }
149 
156  void setMaskSize(const unsigned int &a);
157 
164  inline unsigned int getMaskSize() const { return mask_size; }
165 
171  void setMu1(const double &mu_1) { this->mu1 = mu_1 ; }
172 
178  inline double getMu1() const { return mu1; }
179 
185  void setMu2(const double &mu_2) { this->mu2 = mu_2 ; }
186 
192  inline double getMu2() const { return mu2; }
193 
199  void setNbTotalSample(const int &nb) { ntotal_sample = nb; }
200 
206  inline int getNbTotalSample() const { return ntotal_sample; }
207 
215  void setPointsToTrack(const int &n) { points_to_track = n; }
216 
222  inline int getPointsToTrack() const { return points_to_track ; }
223 
229  void setRange(const unsigned int &r) { range = r ; }
230 
236  inline unsigned int getRange() const { return range; }
237 
243  void setAngleStep(const unsigned int &a) { anglestep = a ; }
244 
250  inline unsigned int getAngleStep() const { return anglestep; }
251 
257  void setMinSampleStep(const double &min) { min_samplestep = min ; }
258 
264  inline double getMinSampleStep() const { return min_samplestep; }
265 
271  void setSampleStep(const double &s) { sample_step = s ; }
272 
278  inline double getSampleStep() const { return sample_step ; }
279 
285  void setStrip(const int &a) { strip = a ; }
286 
292  inline int getStrip() const { return strip; }
293 
299  void setThreshold(const double &t) { threshold = t ; }
300 
306  inline double getThreshold() const { return threshold; }
307 
308 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
309 
312 public:
313  double aberration;
315 
326  vp_deprecated void setAberration(const double &a) { aberration = a ; }
327 
334  vp_deprecated void setInitAberration(const double &a) { init_aberration = a ; }
335 
339  vp_deprecated void setMinSamplestep(const double &min) { min_samplestep = min ; } //Little mistake in the method name "step" should be "Step"
340 #endif
341 };
342 
343 
344 #endif
345 
346 
double threshold
Definition: vpMe.h:77
unsigned int getRange() const
Definition: vpMe.h:236
Definition of the vpMatrix class.
Definition: vpMatrix.h:98
unsigned int getMaskSize() const
Definition: vpMe.h:164
vp_deprecated void setInitAberration(const double &a)
Definition: vpMe.h:334
double init_aberration
Definition: vpMe.h:314
void setPointsToTrack(const int &n)
Definition: vpMe.h:215
unsigned int getMaskNumber() const
Definition: vpMe.h:134
void setStrip(const int &a)
Definition: vpMe.h:285
vpMatrix * mask
Definition: vpMe.h:97
unsigned int range
Definition: vpMe.h:83
double getMu1() const
Definition: vpMe.h:178
void setSampleStep(const double &s)
Definition: vpMe.h:271
int ntotal_sample
Distance between sampled points (in pixels)
Definition: vpMe.h:85
void setNbTotalSample(const int &nb)
Definition: vpMe.h:199
Contains predetermined masks for sites and holds moving edges tracking parameters.
Definition: vpMe.h:70
int mask_sign
Definition: vpMe.h:82
void setMu1(const double &mu_1)
Definition: vpMe.h:171
int getNbTotalSample() const
Definition: vpMe.h:206
int getStrip() const
Definition: vpMe.h:292
double getThreshold() const
Definition: vpMe.h:306
vp_deprecated void setMinSamplestep(const double &min)
Definition: vpMe.h:339
unsigned int getAngleStep() const
Definition: vpMe.h:250
unsigned int mask_size
convolution masks' size in pixels (masks are square),
Definition: vpMe.h:88
void setAngleStep(const unsigned int &a)
Definition: vpMe.h:243
int points_to_track
Definition: vpMe.h:86
void checkSamplestep(double &a)
Definition: vpMe.h:108
int getPointsToTrack() const
Definition: vpMe.h:222
vp_deprecated void setAberration(const double &a)
Definition: vpMe.h:326
vpMatrix * getMask() const
Definition: vpMe.h:116
void setMaskSign(const int &a)
Definition: vpMe.h:141
void setMu2(const double &mu_2)
Definition: vpMe.h:185
double getMu2() const
Definition: vpMe.h:192
double min_samplestep
Contrast continuity parameter (right boundary)
Definition: vpMe.h:80
unsigned int n_mask
the number of convolution masks available for tracking ; defines resolution.
Definition: vpMe.h:90
int strip
Definition: vpMe.h:95
double mu1
Likelihood ratio threshold.
Definition: vpMe.h:78
void setThreshold(const double &t)
Definition: vpMe.h:299
double mu2
Contrast continuity parameter (left boundary)
Definition: vpMe.h:79
double getMinSampleStep() const
Definition: vpMe.h:264
unsigned int anglestep
Definition: vpMe.h:81
void setRange(const unsigned int &r)
Definition: vpMe.h:229
int getMaskSign() const
Definition: vpMe.h:148
double getSampleStep() const
Definition: vpMe.h:278
double sample_step
Seek range - on both sides of the reference pixel.
Definition: vpMe.h:84
void setMinSampleStep(const double &min)
Definition: vpMe.h:257
double aberration
Definition: vpMe.h:313