Example for Interpolator with look up table (LuT)
- Author
- MIP
#include <Base/Common/BIASpragma.hh>
#include <MathAlgo/Interpolator.hh>
#include <iostream>
#include <vector>
using namespace BIAS;
using namespace std;
int main()
{
vector<double> AngleCorrX,AngleCorrY;
AngleCorrX.push_back(0); AngleCorrY.push_back(0);
AngleCorrX.push_back(0.138); AngleCorrY.push_back(0.138);
AngleCorrX.push_back(0.424); AngleCorrY.push_back(0.421032);
AngleCorrX.push_back(0.757); AngleCorrY.push_back(0.737318);
AngleCorrX.push_back(1.045); AngleCorrY.push_back(0.983345);
AngleCorrX.push_back(1.342); AngleCorrY.push_back(1.20646);
AngleCorrX.push_back(1.436); AngleCorrY.push_back(1.26512);
AngleCorrX.push_back(1.652); AngleCorrY.push_back(1.36786);
double MinAngle;
spline.
Spline(MinAngle, AngleCorrX[0],4);
double MaxCamAngle = AngleCorrX[AngleCorrX.size()-1];
cout <<"CamAngle range: ["<<MinAngle<<" , "<<MaxCamAngle*180.0/M_PI<<"]"<<endl;
double ang;
if (res <0) cout <<"Out of range"<<endl;
return 0;
}