Visual Servoing Platform  version 3.2.0 under development (2019-01-22)
vpTemplateTrackerMIBSpline.h
1 /****************************************************************************
2  *
3  * ViSP, open source Visual Servoing Platform software.
4  * Copyright (C) 2005 - 2019 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  * See the file LICENSE.txt at the root directory of this source
11  * distribution for additional information about the GNU GPL.
12  *
13  * For using ViSP with software that can not be combined with the GNU
14  * GPL, please contact Inria about acquiring a ViSP Professional
15  * Edition License.
16  *
17  * See http://visp.inria.fr for more information.
18  *
19  * This software was developed at:
20  * Inria Rennes - Bretagne Atlantique
21  * Campus Universitaire de Beaulieu
22  * 35042 Rennes Cedex
23  * France
24  *
25  * If you have questions regarding the use of this file, please contact
26  * Inria at visp@inria.fr
27  *
28  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30  *
31  * Description:
32  * Template tracker.
33  *
34  * Authors:
35  * Amaury Dame
36  * Aurelien Yol
37  * Fabien Spindler
38  *
39  *****************************************************************************/
45 #ifndef vpTemplateTrackerMIBSpline_hh
46 #define vpTemplateTrackerMIBSpline_hh
47 
48 #include <visp3/core/vpConfig.h>
49 
50 #include <visp3/core/vpImage.h>
51 #include <visp3/core/vpMath.h>
52 #include <visp3/tt/vpTemplateTrackerBSpline.h>
53 #include <visp3/tt/vpTemplateTrackerHeader.h>
54 
55 #include <visp3/tt_mi/vpTemplateTrackerMI.h>
56 
57 #ifndef DOXYGEN_SHOULD_SKIP_THIS
58 
59 class VISP_EXPORT vpTemplateTrackerMIBSpline
60 {
61 public:
62  static void PutPVBsplineD(double *Prt, int cr, double er, int ct, double et, int Nc, double val, const int &degre);
63  static void PutPVBsplineD3(double *Prt, int cr, double er, int ct, double et, int Nc, double val);
64  static void PutPVBsplineD4(double *Prt, int cr, double er, int ct, double et, int Nc, double val);
65 
66  static void PutTotPVBspline(double *Prt, int cr, double &er, int ct, double &et, int Nc, double *val,
67  unsigned int &NbParam, int &degree);
68  static void PutTotPVBspline(double *Prt, double *dPrt, double *d2Prt, int cr, double &er, int ct, double &et, int Ncb,
69  double *val, unsigned int &NbParam, int &degree);
70  static void PutTotPVBspline3(double *Prt, int cr, double &er, int ct, double &et, int Nc, double *val,
71  unsigned int &NbParam);
72  static void PutTotPVBspline3(double *Prt, double *dPrt, double *d2Prt, int cr, double &er, int ct, double &et,
73  int Ncb, double *val, unsigned int &NbParam);
74  static void PutTotPVBspline4(double *Prt, int cr, double er, int ct, double et, int Nc, double *val,
75  unsigned int &NbParam);
76  static void PutTotPVBspline4(double *Prt, double *dPrt, double *d2Prt, int cr, double er, int ct, double et, int Ncb,
77  double *val, unsigned int &NbParam);
78 
79  // AY Optimisation
80  static void PutTotPVBspline3(double *Prt, double &er, double *et, unsigned int NbParam);
81  static void PutTotPVBspline4(double *Prt, double &er, double *et, unsigned int NbParam);
82  //
83 
84  static void PutTotPVBsplineNoSecond(double *Prt, int &cr, double &er, int &ct, double &et, int &Nc, double *val,
85  unsigned int &NbParam, int &degree);
86  static void PutTotPVBsplineNoSecond(double *Prt, double *dPrt, int &cr, double &er, int &ct, double &et, int &Ncb,
87  double *val, unsigned int &NbParam, int &degree);
88  static void PutTotPVBspline3NoSecond(double *Prt, int &cr, double &er, int &ct, double &et, int &Nc, double *val,
89  unsigned int &NbParam);
90  static void PutTotPVBspline3NoSecond(double *Prt, double *dPrt, int &cr, double &er, int &ct, double &et, int &Ncb,
91  double *val, unsigned int &NbParam);
92  static void PutTotPVBspline4NoSecond(double *Prt, int &cr, double &er, int &ct, double &et, int &Nc, double *val,
93  unsigned int &NbParam);
94  static void PutTotPVBspline4NoSecond(double *Prt, double *dPrt, int &cr, double &er, int &ct, double &et, int &Ncb,
95  double *val, unsigned int &NbParam);
96 
97  static void PutTotPVBsplinePrtTout(double *Prt, int &cr, double &er, int &ct, double &et, int &Nc,
98  unsigned int &NbParam, int &degree);
99  static void PutTotPVBspline3PrtTout(double *Prt, int &cr, double &er, int &ct, double &et, int &Nc,
100  unsigned int &NbParam);
101  static void PutTotPVBspline4PrtTout(double *Prt, int &cr, double &er, int &ct, double &et, int &Nc,
102  unsigned int &NbParam);
103 
104  static void PutTotPVBsplinePrt(double *Prt, int &cr, double &er, int &ct, double &et, int &Ncb, unsigned int &NbParam,
105  int &degree);
106  static void PutTotPVBspline3Prt(double *Prt, int &cr, double &er, int &ct, double &et, int &Ncb);
107  static void PutTotPVBspline4Prt(double *Prt, int &cr, double &er, int &ct, double &et, int &Ncb);
108 
109  static double Bspline3(double diff);
110  static double Bspline4i(double diff, int &interv);
111 
112  static double dBspline3(double diff);
113  static double dBspline4(double diff);
114 
115  static double d2Bspline3(double diff);
116  static double d2Bspline4(double diff);
117 };
118 
119 #endif
120 #endif