Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::TrackerBaseInterface< StorageType > Class Template Referenceabstract

Base class for the different tracking algorithms, defining the interfaces for the tracking functions. More...

#include <Matcher2D/TrackerBaseInterface.hh>

+ Inheritance diagram for BIAS::TrackerBaseInterface< StorageType >:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
int GetHalfWinSize ()
 
KLT_TYPE GetMaxError ()
 
int GetMaxIterations ()
 
int GetRejectionType ()
 
void Init (Image< StorageType > &im1, Image< StorageType > &im2, Image< StorageType > &gradx1, Image< StorageType > &grady1, Image< StorageType > &gradx2, Image< StorageType > &grady2)
 Prepare for tracking with prefiltered images. More...
 
void Init (Image< StorageType > &im1, Image< StorageType > &im2, FilterMask &lowpass_mask, FilterMask &gradx_mask, FilterMask &grady_mask)
 Prepare for tracking with on-demand filtering. More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
virtual void SetAffineBrightnessInvariance (bool bi)
 enable brightness variance and offset invariant computation More...
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void SetHalfWinSize (const int hws)
 
void SetMaxError (const KLT_TYPE maxerr)
 
void SetMaxIterations (const int maxiter)
 
void SetMaxResiduumMAD (const KLT_TYPE maxres)
 !!! Also used for X84M as maximal residuum. More...
 
void SetRejectionType (const int rejection_type)
 
virtual void SetWeightMatrix (const BIAS::Matrix< KLT_TYPE > &weight)
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
int Track (HomgPoint2D &p1, HomgPoint2D &p2, HomgPoint2D &p2tracked, KLT_TYPE &error, int &iter, KLT_TYPE &residuumMAD, KLT_TYPE &residuumMSD, Matrix< KLT_TYPE > &cov, const Matrix2x2< KLT_TYPE > &AffinePred=Matrix2x2< KLT_TYPE >(MatrixIdentity), Matrix2x2< KLT_TYPE > *AffineResult=NULL)
 Calculates correspondence from image1 to image2. More...
 
void Track (std::vector< HomgPoint2D > &p1, std::vector< HomgPoint2D > &p2, std::vector< HomgPoint2D > &p2tracked, std::vector< KLT_TYPE > &error, std::vector< int > &numiter, std::vector< KLT_TYPE > &residuiMAD, std::vector< KLT_TYPE > &residuiMSD, std::vector< int > &res, std::vector< Matrix< KLT_TYPE > > &cov, const std::vector< Matrix2x2< KLT_TYPE > > &AffinePred=std::vector< Matrix2x2< KLT_TYPE > >(), std::vector< Matrix2x2< KLT_TYPE > > *AffineResult=NULL)
 Same as Track(), but a correspondence is searched for every point in the vector p1. More...
 
 TrackerBaseInterface ()
 
virtual ~TrackerBaseInterface ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Protected Types

enum  GradientFilter { GRAD_SOBEL3X3, GRAD_FILTERMASK, GRAD_FILTERMASK_SEPARABLE }
 
enum  LowpassFilter { LOWPASS_BINOMIAL3X3, LOWPASS_FILTERMASK, LOWPASS_FILTERMASK_SEPARABLE }
 

Protected Member Functions

void BilinearRegion1_ (KLT_TYPE x, KLT_TYPE y, int hws)
 Fills the matrices _gx1, _gy1 and _bl1 by interpolating gradients and lowpass filtered image at positions between (x-hws, y-hws) and (x+hws, y+hws). More...
 
void BilinearRegion2_ (KLT_TYPE x, KLT_TYPE y, int hws)
 Fills the matrices _gx2, _gy2 and _bl2 by interpolating gradients and lowpass filtered image at positions between (x-hws, y-hws) and (x+hws, y+hws). More...
 
KLT_TYPE BilinearRegionFromImages_ (KLT_TYPE x, KLT_TYPE y, int hws, Image< StorageType > &image, Image< StorageType > &gradx, Image< StorageType > &grady, Matrix< KLT_TYPE > &bl, Matrix< KLT_TYPE > &gx, Matrix< KLT_TYPE > &gy)
 Bilinear filtering using images as source (for prefiltered images) More...
 
KLT_TYPE BilinearRegionFromMatrices_ (KLT_TYPE x, KLT_TYPE y, int hws, const Matrix< KLT_TYPE > &image, const Matrix< KLT_TYPE > &gradx, const Matrix< KLT_TYPE > &grady, Matrix< KLT_TYPE > &bl, Matrix< KLT_TYPE > &gx, Matrix< KLT_TYPE > &gy)
 Bilinear filtering using matrices as source. More...
 
KLT_TYPE ComputeMaskSum (const FilterMask &mask)
 
long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
virtual void EvaluateResult_ (KLT_TYPE &mad, KLT_TYPE &msd, Matrix< KLT_TYPE > &cov)
 Uses bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui and covariance matrix and must hence be called immediatly after the Track() function call!! More...
 
KLT_TYPE NormalizeRegion_ (Matrix< KLT_TYPE > &bl, Matrix< KLT_TYPE > &gx, Matrix< KLT_TYPE > &gy, const KLT_TYPE &min_value=-1e9)
 bring region to mean zero and stddev 1 for brightness invariance More...
 
int RejectMAD_ (std::vector< KLT_TYPE > &sad, std::vector< int > &res)
 
int RejectX84_ (std::vector< KLT_TYPE > &ssd, std::vector< KLT_TYPE > &sad, std::vector< int > &res)
 
void Resize_ (const int halfwinsize)
 resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2 More...
 
virtual int Track_ (Vector2< KLT_TYPE > &p1, Vector2< KLT_TYPE > &p2, Vector2< KLT_TYPE > &result, KLT_TYPE &error, int &iter, const Matrix2x2< KLT_TYPE > &AffinePred, Matrix2x2< KLT_TYPE > &AffineResult)=0
 Interface of all tracking algorithms implemented in derived classes. More...
 
void FilterLowpass_ByMask (int minX, int minY, int rows, int cols, const Image< StorageType > &image, Matrix< KLT_TYPE > &out, const FilterMask &mask, KLT_TYPE maskSum)
 The lowpass filter functions apply a filter to a window of the source image and store the result in a matrix. More...
 
void FilterLowpass_BySeparableMask (int minX, int minY, int rows, int cols, const Image< StorageType > &image, Matrix< KLT_TYPE > &out, const FilterMask &mask, KLT_TYPE maskSum)
 Lowpass filtering using a separable filter mask. More...
 
void FilterLowpass_Binomial3x3 (int minX, int minY, int rows, int cols, const Image< StorageType > &image, Matrix< KLT_TYPE > &out)
 Optimized lowpass filtering using the binomial 3x3 filter. More...
 
void Filter_GradXSobel3x3 (const Matrix< KLT_TYPE > &in, Matrix< KLT_TYPE > &out)
 The gradient filter functions apply a filter to an image window stored in a matrix and store the result in another matrix. More...
 
void Filter_GradYSobel3x3 (const Matrix< KLT_TYPE > &in, Matrix< KLT_TYPE > &out)
 Optimized gradient Y sobel3x3 filter. More...
 
void Filter_ByMask (const Matrix< KLT_TYPE > &in, Matrix< KLT_TYPE > &out, const FilterMask &mask, KLT_TYPE maskSum)
 Generic gradient filter. More...
 
void Filter_BySeparableMask (const Matrix< KLT_TYPE > &in, Matrix< KLT_TYPE > &out, const FilterMask &mask, KLT_TYPE maskSum)
 Generic gradient filter using separable filter mask. More...
 

Protected Attributes

bool _AffineBrightnessInvariance
 compute brightness "invariant" More...
 
Matrix< KLT_TYPE > _bl1
 
Matrix< KLT_TYPE > _bl2
 
bool _ComputeFilteredImages
 
Vector2< KLT_TYPE > _d
 
Vector2< KLT_TYPE > _disp
 
Vector2< KLT_TYPE > _e
 
Matrix2x2< KLT_TYPE > _G
 
Matrix2x2< KLT_TYPE > _Ginv
 
Image< StorageType > * _gradim1x
 
Image< StorageType > * _gradim1y
 
Image< StorageType > * _gradim2x
 
Image< StorageType > * _gradim2y
 
GradientFilter _GradXFilter
 
FilterMask _GradXMask
 
KLT_TYPE _GradXMaskSum
 
GradientFilter _GradYFilter
 
FilterMask _GradYMask
 
KLT_TYPE _GradYMaskSum
 
Matrix< KLT_TYPE > _gsx
 
Matrix< KLT_TYPE > _gsy
 
Matrix< KLT_TYPE > _gx
 
Matrix< KLT_TYPE > _gx1
 
Matrix< KLT_TYPE > _gx2
 
KLT_TYPE _gxx
 
KLT_TYPE _gxy
 
Matrix< KLT_TYPE > _gy
 
Matrix< KLT_TYPE > _gy1
 
Matrix< KLT_TYPE > _gy2
 
KLT_TYPE _gyy
 
int _HalfWinSize
 use support window of size 2*hws+1 More...
 
KLT_TYPE _idet
 
Image< StorageType > * _im1
 
Image< StorageType > * _im2
 
int _LastHalfWinSize
 
long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
LowpassFilter _LowpassFilter
 
FilterMask _LowpassMask
 
KLT_TYPE _LowpassMaskSum
 
int _LowpassWindowExtraSize
 
KLT_TYPE _MaxError
 iteration stops if position refinement is less than *_MaxError More...
 
int _MaxIterations
 iteration stops after _MaxIterations More...
 
KLT_TYPE _MaxResiduumMAD
 outlier rejection via MAD and More...
 
int _maxx1
 
int _maxx2
 
int _maxy1
 
int _maxy2
 
int _minx1
 
int _minx2
 
int _miny1
 
int _miny2
 
int _RejectionType
 The rejection type: RT_MAD,RT_X84 or RT_X84M. More...
 
std::map< std::string, long int > _String2Debuglevel
 
Matrix< KLT_TYPE > _weight
 
int _WinSize
 
KLT_TYPE dev1_
 
KLT_TYPE dev2_
 
KLT_TYPE mean1_
 mean and std deviation of image patch More...
 
KLT_TYPE mean2_
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

template<class StorageType>
class BIAS::TrackerBaseInterface< StorageType >

Base class for the different tracking algorithms, defining the interfaces for the tracking functions.

Also stores some basic options and datas, i.e. the pointer to the image datas. See ExampleTrackerBaseInterface for brief exemplary usage.

Author
woelk 09/2004, kollmann 07/2006
Examples:
ExampleTrackerBase.cpp.

Definition at line 75 of file TrackerBaseInterface.hh.

Member Enumeration Documentation

template<class StorageType>
enum BIAS::TrackerBaseInterface::GradientFilter
protected
Enumerator
GRAD_SOBEL3X3 
GRAD_FILTERMASK 
GRAD_FILTERMASK_SEPARABLE 

Definition at line 234 of file TrackerBaseInterface.hh.

template<class StorageType>
enum BIAS::TrackerBaseInterface::LowpassFilter
protected
Enumerator
LOWPASS_BINOMIAL3X3 
LOWPASS_FILTERMASK 
LOWPASS_FILTERMASK_SEPARABLE 

Definition at line 226 of file TrackerBaseInterface.hh.

Constructor & Destructor Documentation

template<class StorageType >
TrackerBaseInterface::TrackerBaseInterface ( )
template<class StorageType >
TrackerBaseInterface::~TrackerBaseInterface ( )
virtual

Definition at line 139 of file TrackerBaseInterface.cpp.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

template<class StorageType >
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegion1_ ( KLT_TYPE  x,
KLT_TYPE  y,
int  hws 
)
inlineprotected

Fills the matrices _gx1, _gy1 and _bl1 by interpolating gradients and lowpass filtered image at positions between (x-hws, y-hws) and (x+hws, y+hws).

Definition at line 653 of file TrackerBaseInterface.hh.

template<class StorageType >
void BIAS::TrackerBaseInterface< StorageType >::BilinearRegion2_ ( KLT_TYPE  x,
KLT_TYPE  y,
int  hws 
)
inlineprotected

Fills the matrices _gx2, _gy2 and _bl2 by interpolating gradients and lowpass filtered image at positions between (x-hws, y-hws) and (x+hws, y+hws).

Definition at line 728 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFromImages_ ( KLT_TYPE  x,
KLT_TYPE  y,
int  hws,
Image< StorageType > &  image,
Image< StorageType > &  gradx,
Image< StorageType > &  grady,
Matrix< KLT_TYPE > &  bl,
Matrix< KLT_TYPE > &  gx,
Matrix< KLT_TYPE > &  gy 
)
inlineprotected

Bilinear filtering using images as source (for prefiltered images)

Definition at line 802 of file TrackerBaseInterface.hh.

References BIAS::Image< StorageType >::GetImageDataArray().

template<class StorageType >
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::BilinearRegionFromMatrices_ ( KLT_TYPE  x,
KLT_TYPE  y,
int  hws,
const Matrix< KLT_TYPE > &  image,
const Matrix< KLT_TYPE > &  gradx,
const Matrix< KLT_TYPE > &  grady,
Matrix< KLT_TYPE > &  bl,
Matrix< KLT_TYPE > &  gx,
Matrix< KLT_TYPE > &  gy 
)
inlineprotected

Bilinear filtering using matrices as source.

Definition at line 852 of file TrackerBaseInterface.hh.

template<class StorageType >
KLT_TYPE TrackerBaseInterface::ComputeMaskSum ( const FilterMask mask)
protected
long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

template<class StorageType >
void TrackerBaseInterface::EvaluateResult_ ( KLT_TYPE &  mad,
KLT_TYPE &  msd,
Matrix< KLT_TYPE > &  cov 
)
protectedvirtual

Uses bl1, _bl2, _gxx, _gxy and _gyy to calculate the residui and covariance matrix and must hence be called immediatly after the Track() function call!!

Author
woelk

Reimplemented in BIAS::TrackerBaseAffine2< StorageType >, BIAS::TrackerBaseAffine< StorageType >, and BIAS::TrackerBaseHomography< StorageType >.

Definition at line 426 of file TrackerBaseInterface.cpp.

References BIAS::TimeMeasure::GetCycleCount(), BIAS::Matrix< T >::GetData(), BIAS::TimeMeasure::GetRealTime(), TNT::Matrix< T >::newsize(), BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

template<class StorageType >
void BIAS::TrackerBaseInterface< StorageType >::Filter_ByMask ( const Matrix< KLT_TYPE > &  in,
Matrix< KLT_TYPE > &  out,
const FilterMask mask,
KLT_TYPE  maskSum 
)
inlineprotected
template<class StorageType >
void BIAS::TrackerBaseInterface< StorageType >::Filter_BySeparableMask ( const Matrix< KLT_TYPE > &  in,
Matrix< KLT_TYPE > &  out,
const FilterMask mask,
KLT_TYPE  maskSum 
)
inlineprotected
template<class StorageType >
void BIAS::TrackerBaseInterface< StorageType >::Filter_GradXSobel3x3 ( const Matrix< KLT_TYPE > &  in,
Matrix< KLT_TYPE > &  out 
)
inlineprotected

The gradient filter functions apply a filter to an image window stored in a matrix and store the result in another matrix.

Optimized gradient X sobel3x3 filter.

Definition at line 529 of file TrackerBaseInterface.hh.

References BIAS::Matrix< T >::GetCols(), BIAS::Matrix< T >::GetRows(), and TNT::Matrix< T >::newsize().

template<class StorageType >
void BIAS::TrackerBaseInterface< StorageType >::Filter_GradYSobel3x3 ( const Matrix< KLT_TYPE > &  in,
Matrix< KLT_TYPE > &  out 
)
inlineprotected

Optimized gradient Y sobel3x3 filter.

Definition at line 554 of file TrackerBaseInterface.hh.

References BIAS::Matrix< T >::GetCols(), BIAS::Matrix< T >::GetRows(), and TNT::Matrix< T >::newsize().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::FilterLowpass_Binomial3x3 ( int  minX,
int  minY,
int  rows,
int  cols,
const Image< StorageType > &  image,
Matrix< KLT_TYPE > &  out 
)
inlineprotected

Optimized lowpass filtering using the binomial 3x3 filter.

Definition at line 500 of file TrackerBaseInterface.hh.

References BIAS::Image< StorageType >::GetImageDataArray(), and TNT::Matrix< T >::newsize().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::FilterLowpass_ByMask ( int  minX,
int  minY,
int  rows,
int  cols,
const Image< StorageType > &  image,
Matrix< KLT_TYPE > &  out,
const FilterMask mask,
KLT_TYPE  maskSum 
)
inlineprotected

The lowpass filter functions apply a filter to a window of the source image and store the result in a matrix.

Lowpass filtering using a kernel filter mask.

Definition at line 424 of file TrackerBaseInterface.hh.

References BIAS::Image< StorageType >::GetImageDataArray(), BIAS::FilterMask::GetKernelf(), BIAS::FilterMask::IsSeparable(), and TNT::Matrix< T >::newsize().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::FilterLowpass_BySeparableMask ( int  minX,
int  minY,
int  rows,
int  cols,
const Image< StorageType > &  image,
Matrix< KLT_TYPE > &  out,
const FilterMask mask,
KLT_TYPE  maskSum 
)
inlineprotected
int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::GetHalfWinSize ( )
inline

Definition at line 188 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::GetMaxError ( )
inline

Definition at line 190 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::GetMaxIterations ( )
inline

Definition at line 189 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::GetRejectionType ( )
inline

Definition at line 191 of file TrackerBaseInterface.hh.

template<class StorageType>
void TrackerBaseInterface::Init ( Image< StorageType > &  im1,
Image< StorageType > &  im2,
Image< StorageType > &  gradx1,
Image< StorageType > &  grady1,
Image< StorageType > &  gradx2,
Image< StorageType > &  grady2 
)

Prepare for tracking with prefiltered images.

The ROI must be set correctly in gradient images (representing the gradient filter mask size). For good results im1 and im2 should be lowpass filtered images.

Parameters
im1(low-pass filtered) image 1
im2(low-pass filtered) image 2
gradx1horizontal gradient image of im1
grady1vertical gradient image of im1
gradx2horizontal gradient image of im2
grady2vertical gradient image of im2

Definition at line 145 of file TrackerBaseInterface.cpp.

References BIAS::ROI::GetCorners(), BIAS::ImageBase::GetROI(), and BIAS::ImageBase::SamePixelAndChannelCount().

Referenced by BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::Disp2Depth().

template<class StorageType>
void TrackerBaseInterface::Init ( Image< StorageType > &  im1,
Image< StorageType > &  im2,
FilterMask lowpass_mask,
FilterMask gradx_mask,
FilterMask grady_mask 
)

Prepare for tracking with on-demand filtering.

Lowpass and gradient filtering is done only where needed, using the given filter masks. All filter masks must have odd size.

Parameters
im1(low-pass filtered) image 1
im2(low-pass filtered) image 2
lowpass_maskfilter mask for lowpass filtering
gradx_maskfilter mask for horizontal gradient computation
grady_maskfilter mask for vertical gradient computation

Definition at line 209 of file TrackerBaseInterface.cpp.

References BIAS::Matrix< T >::GetCols(), BIAS::ImageBase::GetHeight(), BIAS::FilterMask::GetKernelf(), BIAS::Matrix< T >::GetRows(), BIAS::FilterMask::GetSepfh(), BIAS::FilterMask::GetSepfv(), BIAS::ImageBase::GetWidth(), BIAS::FilterMask::IsSeparable(), BIAS::ImageBase::SamePixelAndChannelCount(), and BIAS::Vector< T >::Size().

long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
template<class StorageType >
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::NormalizeRegion_ ( Matrix< KLT_TYPE > &  bl,
Matrix< KLT_TYPE > &  gx,
Matrix< KLT_TYPE > &  gy,
const KLT_TYPE &  min_value = -1e9 
)
inlineprotected

bring region to mean zero and stddev 1 for brightness invariance

Returns
scale of region which has been applied

Definition at line 898 of file TrackerBaseInterface.hh.

References BIAS::Matrix< T >::GetData(), TNT::Matrix< T >::num_cols(), and TNT::Matrix< T >::num_rows().

void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

template<class StorageType >
int TrackerBaseInterface::RejectMAD_ ( std::vector< KLT_TYPE > &  sad,
std::vector< int > &  res 
)
protected
Author
woelk

Definition at line 499 of file TrackerBaseInterface.cpp.

References BIAS::TRACKER_MEANABSDIF, and BIAS::TRACKER_SUCCESS.

template<class StorageType >
int TrackerBaseInterface::RejectX84_ ( std::vector< KLT_TYPE > &  ssd,
std::vector< KLT_TYPE > &  sad,
std::vector< int > &  res 
)
protected
void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

template<class StorageType >
void BIAS::TrackerBaseInterface< StorageType >::Resize_ ( const int  halfwinsize)
inlineprotected

resizes the internal matrices _gx1, _gy1, _bl1, _gx2, _gy2 and _bl2

Author
woelk

Definition at line 408 of file TrackerBaseInterface.hh.

template<class StorageType>
virtual void BIAS::TrackerBaseInterface< StorageType >::SetAffineBrightnessInvariance ( bool  bi)
inlinevirtual
void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetHalfWinSize ( const int  hws)
inline
template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxError ( const KLT_TYPE  maxerr)
inline
template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxIterations ( const int  maxiter)
inline
template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetMaxResiduumMAD ( const KLT_TYPE  maxres)
inline

!!! Also used for X84M as maximal residuum.

That is features with a residuum <= 'maxres' will be accept automatically! !!!

Definition at line 176 of file TrackerBaseInterface.hh.

Referenced by BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::Disp2Depth().

template<class StorageType>
void BIAS::TrackerBaseInterface< StorageType >::SetRejectionType ( const int  rejection_type)
inline
template<class StorageType>
virtual void BIAS::TrackerBaseInterface< StorageType >::SetWeightMatrix ( const BIAS::Matrix< KLT_TYPE > &  weight)
inlinevirtual

Reimplemented in BIAS::TrackerBaseWeighted< StorageType >.

Definition at line 193 of file TrackerBaseInterface.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

template<class StorageType >
int TrackerBaseInterface::Track ( HomgPoint2D p1,
HomgPoint2D p2,
HomgPoint2D p2tracked,
KLT_TYPE &  error,
int &  iter,
KLT_TYPE &  residuumMAD,
KLT_TYPE &  residuumMSD,
Matrix< KLT_TYPE > &  cov,
const Matrix2x2< KLT_TYPE > &  AffinePred = Matrix2x2<KLT_TYPE>(MatrixIdentity),
Matrix2x2< KLT_TYPE > *  AffineResult = NULL 
)

Calculates correspondence from image1 to image2.

The two images and corresponding gradients must specified using the function Init() before calling this function.

The algorithm searches for best correspondence to point p1 from image1 in image2. The search starts at p2 in image 2.

All homogenous points must be homogenized (i.e. w=1.0).

The algorithms either terminates if the displacement resulting from one iteration drops below *_Maxerror or the maximum number of iterations *_MaxIterations is reached.

Parameters
[in]p1Point in image1
[in]p2Algorithm starts searching at this point in image2
[out]p2trackedBest matching point in image2
[out]errorChange in displacement calculated in last iteration
[out]iterNumber of iterations used
[out]residuumMADMean absolute grey value difference between p1 in image 1 and p2tracked in image 2 over the tracking support window
[out]residuumMSDSquared grey value difference between p1 in image 1 and p2tracked in image 2 summed over the tracking support window
[out]covApproximation to the covarinace matrix image1 and result in image2 over the tracking window (= sum of absolute difference divided by number of pixels in tracking value)
[in]AffinePredPredicted affine matrix (only used in affine tracking)
[out]AffineResultResult of affine tracking (only used in affine tracking)
Returns
See TRACKER_*

Definition at line 322 of file TrackerBaseInterface.cpp.

References BIAS::HomgPoint2D, BIAS::MatrixIdentity, BIAS::Matrix< T >::NormFrobenius(), and BIAS::TRACKER_IGNOREPOINT.

Referenced by BIAS::RectificationViaProjectionMappingBase< InputStorageType, OutputStorageType >::Disp2Depth().

template<class StorageType >
void TrackerBaseInterface::Track ( std::vector< HomgPoint2D > &  p1,
std::vector< HomgPoint2D > &  p2,
std::vector< HomgPoint2D > &  p2tracked,
std::vector< KLT_TYPE > &  error,
std::vector< int > &  numiter,
std::vector< KLT_TYPE > &  residuiMAD,
std::vector< KLT_TYPE > &  residuiMSD,
std::vector< int > &  res,
std::vector< Matrix< KLT_TYPE > > &  cov,
const std::vector< Matrix2x2< KLT_TYPE > > &  AffinePred = std::vector<Matrix2x2<KLT_TYPE> >(),
std::vector< Matrix2x2< KLT_TYPE > > *  AffineResult = NULL 
)

Same as Track(), but a correspondence is searched for every point in the vector p1.

Definition at line 368 of file TrackerBaseInterface.cpp.

References BIAS::TimeMeasure::GetRealTime(), BIAS::RT_Invalid, BIAS::RT_MAD, BIAS::RT_X84, BIAS::RT_X84M, BIAS::TimeMeasure::Start(), and BIAS::TimeMeasure::Stop().

template<class StorageType>
virtual int BIAS::TrackerBaseInterface< StorageType >::Track_ ( Vector2< KLT_TYPE > &  p1,
Vector2< KLT_TYPE > &  p2,
Vector2< KLT_TYPE > &  result,
KLT_TYPE &  error,
int &  iter,
const Matrix2x2< KLT_TYPE > &  AffinePred,
Matrix2x2< KLT_TYPE > &  AffineResult 
)
protectedpure virtual

Member Data Documentation

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_AffineBrightnessInvariance
protected

compute brightness "invariant"

Definition at line 211 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::TrackerBaseInterface().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_bl1
protected

Definition at line 258 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_bl2
protected

Definition at line 258 of file TrackerBaseInterface.hh.

template<class StorageType>
bool BIAS::TrackerBaseInterface< StorageType >::_ComputeFilteredImages
protected
template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_d
protected

Definition at line 257 of file TrackerBaseInterface.hh.

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_disp
protected

Definition at line 257 of file TrackerBaseInterface.hh.

template<class StorageType>
Vector2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_e
protected

Definition at line 257 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix2x2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_G
protected

Definition at line 256 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix2x2<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_Ginv
protected

Definition at line 256 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim1x
protected
template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim1y
protected
template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim2x
protected
template<class StorageType>
Image<StorageType> * BIAS::TrackerBaseInterface< StorageType >::_gradim2y
protected
template<class StorageType>
GradientFilter BIAS::TrackerBaseInterface< StorageType >::_GradXFilter
protected

Definition at line 242 of file TrackerBaseInterface.hh.

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_GradXMask
protected

Definition at line 243 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_GradXMaskSum
protected

Definition at line 244 of file TrackerBaseInterface.hh.

template<class StorageType>
GradientFilter BIAS::TrackerBaseInterface< StorageType >::_GradYFilter
protected

Definition at line 242 of file TrackerBaseInterface.hh.

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_GradYMask
protected

Definition at line 243 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_GradYMaskSum
protected

Definition at line 244 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gsx
protected

Definition at line 258 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gsy
protected

Definition at line 258 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx
protected

Definition at line 258 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx1
protected

Definition at line 258 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gx2
protected

Definition at line 258 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gxx
protected

Definition at line 259 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gxy
protected

Definition at line 259 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy
protected

Definition at line 258 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy1
protected

Definition at line 258 of file TrackerBaseInterface.hh.

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_gy2
protected

Definition at line 258 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_gyy
protected

Definition at line 259 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_HalfWinSize
protected

use support window of size 2*hws+1

Definition at line 201 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::TrackerBaseInterface().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_idet
protected

Definition at line 259 of file TrackerBaseInterface.hh.

template<class StorageType>
Image<StorageType>* BIAS::TrackerBaseInterface< StorageType >::_im1
protected
template<class StorageType>
Image<StorageType>* BIAS::TrackerBaseInterface< StorageType >::_im2
protected
template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_LastHalfWinSize
protected
long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

template<class StorageType>
LowpassFilter BIAS::TrackerBaseInterface< StorageType >::_LowpassFilter
protected

Definition at line 241 of file TrackerBaseInterface.hh.

template<class StorageType>
FilterMask BIAS::TrackerBaseInterface< StorageType >::_LowpassMask
protected

Definition at line 243 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_LowpassMaskSum
protected

Definition at line 244 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_LowpassWindowExtraSize
protected

Definition at line 245 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_MaxError
protected

iteration stops if position refinement is less than *_MaxError

Definition at line 204 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::TrackerBaseInterface().

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_MaxIterations
protected

iteration stops after _MaxIterations

Definition at line 202 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::TrackerBaseInterface().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::_MaxResiduumMAD
protected

outlier rejection via MAD and

Definition at line 205 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::TrackerBaseInterface().

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxx1
protected
template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxx2
protected
template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxy1
protected
template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_maxy2
protected
template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_minx1
protected
template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_minx2
protected
template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_miny1
protected
template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_miny2
protected
template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_RejectionType
protected

The rejection type: RT_MAD,RT_X84 or RT_X84M.

Definition at line 207 of file TrackerBaseInterface.hh.

Referenced by BIAS::TrackerBaseInterface< StorageType >::TrackerBaseInterface().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

template<class StorageType>
Matrix<KLT_TYPE> BIAS::TrackerBaseInterface< StorageType >::_weight
protected

Definition at line 260 of file TrackerBaseInterface.hh.

template<class StorageType>
int BIAS::TrackerBaseInterface< StorageType >::_WinSize
protected
std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::dev1_
protected

Definition at line 214 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::dev2_
protected

Definition at line 214 of file TrackerBaseInterface.hh.

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::mean1_
protected

mean and std deviation of image patch

Definition at line 214 of file TrackerBaseInterface.hh.

template<class StorageType>
KLT_TYPE BIAS::TrackerBaseInterface< StorageType >::mean2_
protected

Definition at line 214 of file TrackerBaseInterface.hh.


The documentation for this class was generated from the following files: