Visual Servoing Platform  version 3.0.0
vpTemplateTrackerMIBSpline.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  * Template tracker.
32  *
33  * Authors:
34  * Amaury Dame
35  * Aurelien Yol
36  * Fabien Spindler
37  *
38  *****************************************************************************/
44 #ifndef vpTemplateTrackerMIBSpline_hh
45 #define vpTemplateTrackerMIBSpline_hh
46 
47 #include <visp3/core/vpConfig.h>
48 
49 #include <visp3/core/vpImage.h>
50 #include <visp3/core/vpMath.h>
51 #include <visp3/tt/vpTemplateTrackerHeader.h>
52 #include <visp3/tt/vpTemplateTrackerBSpline.h>
53 
54 #include <visp3/tt_mi/vpTemplateTrackerMI.h>
55 
56 #ifndef DOXYGEN_SHOULD_SKIP_THIS
57 
58 class VISP_EXPORT vpTemplateTrackerMIBSpline
59 {
60 public:
61  static void PutPVBsplineD(double *Prt, int cr, double er, int ct, double et,int Nc, double val, const int &degre);
62  static void PutPVBsplineD3(double *Prt, int cr, double er, int ct, double et,int Nc, double val);
63  static void PutPVBsplineD4(double *Prt, int cr, double er, int ct, double et,int Nc, double val);
64 
65  static void PutTotPVBspline(double *Prt, int cr, double &er, int ct, double &et,int Nc, double *val, unsigned int &NbParam, int &degree);
66  static void PutTotPVBspline(double *Prt, double *dPrt, double *d2Prt, int cr, double &er, int ct, double &et,int Ncb, double *val, unsigned int &NbParam, int &degree);
67  static void PutTotPVBspline3(double *Prt, int cr, double &er, int ct, double &et,int Nc, double *val, unsigned int &NbParam);
68  static void PutTotPVBspline3(double *Prt, double *dPrt, double *d2Prt, int cr, double &er, int ct, double &et,int Ncb, double *val, unsigned int &NbParam);
69  static void PutTotPVBspline4(double *Prt, int cr, double er, int ct, double et,int Nc, double *val, unsigned int &NbParam);
70  static void PutTotPVBspline4(double *Prt, double *dPrt, double *d2Prt, int cr, double er, int ct, double et,int Ncb, double *val, unsigned int &NbParam);
71 
72  // AY Optimisation
73  static void PutTotPVBspline3(double *Prt, double &er, double *et, unsigned int NbParam);
74  static void PutTotPVBspline4(double *Prt, double &er, double *et, unsigned int NbParam);
75  //
76 
77  static void PutTotPVBsplineNoSecond(double *Prt, int &cr, double &er, int &ct, double &et,int &Nc, double *val, unsigned int &NbParam, int &degree);
78  static void PutTotPVBsplineNoSecond(double *Prt, double *dPrt, int &cr, double &er, int &ct, double &et,int &Ncb, double *val, unsigned int &NbParam, int &degree);
79  static void PutTotPVBspline3NoSecond(double *Prt, int &cr, double &er, int &ct, double &et,int &Nc, double *val, unsigned int &NbParam);
80  static void PutTotPVBspline3NoSecond(double *Prt, double *dPrt, int &cr, double &er, int &ct, double &et,int &Ncb, double *val, unsigned int &NbParam);
81  static void PutTotPVBspline4NoSecond(double *Prt, int &cr, double &er, int &ct, double &et,int &Nc, double *val, unsigned int &NbParam);
82  static void PutTotPVBspline4NoSecond(double *Prt, double *dPrt, int &cr, double &er, int &ct, double &et,int &Ncb, double *val, unsigned int &NbParam);
83 
84  static void PutTotPVBsplinePrtTout(double *Prt, int &cr, double &er, int &ct, double &et,int &Nc, unsigned int &NbParam, int &degree);
85  static void PutTotPVBspline3PrtTout(double *Prt, int &cr, double &er, int &ct, double &et,int &Nc, unsigned int &NbParam);
86  static void PutTotPVBspline4PrtTout(double *Prt, int &cr, double &er, int &ct, double &et,int &Nc, unsigned int &NbParam);
87 
88  static void PutTotPVBsplinePrt(double *Prt, int &cr, double &er, int &ct, double &et,int &Ncb, unsigned int &NbParam, int &degree);
89  static void PutTotPVBspline3Prt(double *Prt, int &cr, double &er, int &ct, double &et,int &Ncb);
90  static void PutTotPVBspline4Prt(double *Prt, int &cr, double &er, int &ct, double &et,int &Ncb);
91 
92  static double Bspline3(double diff);
93  static double Bspline4i(double diff,int &interv);
94 
95  static double dBspline3(double diff);
96  static double dBspline4(double diff);
97 
98  static double d2Bspline3(double diff);
99  static double d2Bspline4(double diff);
100 };
101 
102 #endif
103 #endif