ViSP
 All Classes Functions Variables Enumerations Enumerator Friends Groups Pages
vpMe.h
1 /****************************************************************************
2  *
3  * $Id: vpMe.h 4056 2013-01-05 13:04:42Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2013 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 &mu1) { this->mu1 = mu1 ; }
172 
178  inline double getMu1() const { return mu1; }
179 
185  void setMu2(const double &mu2) { this->mu2 = mu2 ; }
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