33 #include <Base/Common/BIASpragma.hh>
35 #include <MathAlgo/Interpolator.hh>
47 vector<double> AngleCorrX,AngleCorrY;
49 AngleCorrX.push_back(0); AngleCorrY.push_back(0);
50 AngleCorrX.push_back(0.138); AngleCorrY.push_back(0.138);
51 AngleCorrX.push_back(0.424); AngleCorrY.push_back(0.421032);
52 AngleCorrX.push_back(0.757); AngleCorrY.push_back(0.737318);
53 AngleCorrX.push_back(1.045); AngleCorrY.push_back(0.983345);
54 AngleCorrX.push_back(1.342); AngleCorrY.push_back(1.20646);
55 AngleCorrX.push_back(1.436); AngleCorrY.push_back(1.26512);
56 AngleCorrX.push_back(1.652); AngleCorrY.push_back(1.36786);
63 spline.
Spline(MinAngle, AngleCorrX[0],4);
64 double MaxCamAngle = AngleCorrX[AngleCorrX.size()-1];
66 cout <<
"CamAngle range: ["<<MinAngle<<
" , "<<MaxCamAngle*180.0/M_PI<<
"]"<<endl;
71 if (res <0) cout <<
"Out of range"<<endl;
void InitSpline()
call this for restart at t= first knot point initiates recalculation of all polynom coefficients at f...
void SetKnotPoints(const std::vector< double > &kPnt)
set the additional knot points, if you want nonuniform interpolation.
this class interpolates a function y=f(t) between given control points (the y-values) ...
int SplineFromLuT(double &res, double t) const
Get spline interpolation using Look-up-Table.
int Spline(double &res, double t, unsigned int k=3)
these functions do the Spline interpolation which reaches each control point.
void SetControlPoints(const std::vector< double > &cPnt1)
set the control points, which control the interpolating curve
int PrepareLuTSpline(double min, double max, unsigned int N, unsigned int k=3)
Prepare Look-up-Table in range [min,max] with N samples.