24 #ifndef __TrackerBaseAffine2_hh__
25 #define __TrackerBaseAffine2_hh__
27 #include <Matcher2D/TrackerBaseInterface.hh>
28 #include <Image/PyramidImage.hh>
36 template <
class StorageType>
44 inline void SetOnly4(
bool Only4) { _SimilarityTransformOnly = Only4; }
46 _MaxAffineChange=maxerr;
51 _AffineBrightnessInvariance = bi;
55 return _SimilarityTransformOnly ;
61 affineNormalization_ =
true;
66 affineNormalization_ =
false;
89 _pim2, _pgradim2x, _pgradim2y;
95 virtual void EvaluateResult_(KLT_TYPE& mad,KLT_TYPE& msd,
124 int TrackAffine_(KLT_TYPE p1[2], KLT_TYPE p2[2],
128 KLT_TYPE& mad, KLT_TYPE& msd,
129 bool SimilarityTransformOnly =
false,
133 void GetGradientWinAffine_(
const KLT_TYPE& x,
const KLT_TYPE& y,
134 const KLT_TYPE& Axx,
const KLT_TYPE& Ayx,
135 const KLT_TYPE& Axy,
const KLT_TYPE& Ayy,
136 const int halfwidth,
const int halfheight,
143 void BilinearRegion1_(KLT_TYPE x, KLT_TYPE y,
191 #endif // __TrackerBaseAffine2_hh__
devel version of antialiased affine tracker
virtual void SetAffineBrightnessInvariance(bool bi)
enable brightness variance and offset invariant computation
bool _SimilarityTransformOnly
Estimate all 6 parameters or only 4?
Base class for the different tracking algorithms, defining the interfaces for the tracking functions...
KLT_TYPE _MaxAffineChange
iteration stops if position refinement is less than *_Maxerror
long int ComputeCovariance(long int NumErrors, long int NumParams, double *Jac, int *Permutation, double &SumOfSquaredErrors, Matrix< double > &Cov)
Compute covariance matrix from Levenberg-Marquardt resulting Jacobian matrix J(x) and permutation mat...
bool IsSimilarityTransformOnly()
void SetOnly4(bool Only4)
Estimate all 6 parameters or only 4?
bool affineNormalization_
void SetInitialUncertainty(const Matrix< double > &Cov)
PyramidImage< StorageType > _pim2
Matrix< double > initialCov_
void SetMaxAffineChange(const KLT_TYPE maxerr)
void SetRegion1(const Matrix3x3< double > &R1)
Matrix< KLT_TYPE > Cov_
workaround: save values from Track_ so we dont lose them