24 #ifndef __TrackerBaseAffine_hh__
25 #define __TrackerBaseAffine_hh__
27 #include <Matcher2D/TrackerBaseInterface.hh>
35 template <
class StorageType>
43 inline void SetOnly4(
bool Only4) { _SimilarityTransformOnly = Only4; }
45 _MaxAffineChange=maxerr;
50 _AffineBrightnessInvariance = bi;
54 return _SimilarityTransformOnly ;
72 virtual void EvaluateResult_(KLT_TYPE& mad,KLT_TYPE& msd,
101 int TrackAffine_(KLT_TYPE p1[2], KLT_TYPE p2[2],
105 KLT_TYPE& mad, KLT_TYPE& msd,
106 bool SimilarityTransformOnly =
false,
110 void GetGradientWinAffine_(
const KLT_TYPE& x,
const KLT_TYPE& y,
111 const KLT_TYPE& Axx,
const KLT_TYPE& Ayx,
112 const KLT_TYPE& Axy,
const KLT_TYPE& Ayy,
113 const KLT_TYPE& h31,
const KLT_TYPE& h32,
114 const int halfwidth,
const int halfheight,
116 KLT_TYPE* out_grady);
118 void ComputeIntensityDifferenceAffine_(
const KLT_TYPE& x2,
127 const int halfheight,
174 #endif // __TrackerBaseAffine_hh__
void SetMaxAffineChange(const KLT_TYPE maxerr)
Base class for the different tracking algorithms, defining the interfaces for the tracking functions...
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 _SimilarityTransformOnly
Estimate all 6 parameters or only 4?
virtual void SetAffineBrightnessInvariance(bool bi)
enable brightness variance and offset invariant computation
Matrix< KLT_TYPE > Cov_
workaround: save values from Track_ so we dont lose them
bool IsSimilarityTransformOnly()
void SetOnly4(bool Only4)
Estimate all 6 parameters or only 4?
KLT_TYPE _MaxAffineChange
iteration stops if position refinement is less than *_Maxerror