25 #ifndef __UnVignette_hh__
26 #define __UnVignette_hh__
28 #include <Base/Common/BIASpragmaStart.hh>
30 #include <Base/Image/Image.hh>
31 #include <Base/Geometry/HomgPoint2D.hh>
32 #include <Base/Geometry/KMatrix.hh>
33 #include <MathAlgo/Interpolator.hh>
34 #include <Image/CameraParam.hh>
35 #include <Base/Math/Matrix.hh>
36 #include <Base/Math/Vector.hh>
41 #define UNDIST_EPS 1e-9
45 enum BIASImage_EXPORT INTERPOLATION_METHOD
81 int Init(
const std::vector<double> ControlPoints,
82 std::vector<double> PercentageValues,
83 unsigned int dImageWidth ,
unsigned int dImageHeight,
84 int dPPX,
int dPPY,INTERPOLATION_METHOD method = LEAST_SQUARES,
bool bUseLuT =
true);
92 int Init(
BIAS::CameraParam cParam, INTERPOLATION_METHOD method = LEAST_SQUARES,
bool bUseLuT =
true);
95 INTERPOLATION_METHOD dInterPolationMethod_;
96 double CalcRadius_(
double x,
double y);
97 int PrepareLuImage_();
98 int PrepareLeastSquaresMin_();
99 int LeastSquares_(
double &res,
double radius);
102 std::vector<double> ControlPoints_;
103 std::vector<double> PercentageValues_;
109 bool bLeastSquaresPrepared_;
112 double dWidthHalfMPPX_;
113 double dHeightHalfMPPY_;
118 double PrinciplePointX_;
119 double PrinciplePointY_;
120 unsigned int dWidth_;
121 unsigned int dHeight_;
122 unsigned int dChannelCount_;
124 bool bIsInitialized_;
130 std::vector<int> IlluCorrX_;
131 std::vector<double> IlluCorrY_;
135 #include <Base/Common/BIASpragmaEnd.hh>
Unvignette algorithm for images.
this class interpolates a function y=f(t) between given control points (the y-values) ...