MTF
Public Types | Public Member Functions | Protected Attributes | List of all members
ImageBase Class Referenceabstract
Inheritance diagram for ImageBase:
AppearanceModel CCRE KLD LKLD MI NCC NGF RIU SAD SPSS SSDBase SSIM SumOfAMs

Public Types

enum  InputType { MTF_32FC1 = CV_32FC1, MTF_32FC3 = CV_32FC3, MTF_8UC1 = CV_8UC1, MTF_8UC3 = CV_8UC3 }
 supported input image types
 
typedef EigImgT ImageT
 convenience type if floating point grayscale image is used as input by the AM
 

Public Member Functions

 ImageBase (const ImgParams *img_params=nullptr, const int _n_channels=1)
 
virtual int inputType () const
 return the type of OpenCV Mat image the AM requires as input; typically either CV_32FC3 or CV_32FC1
 
virtual const cv::Mat & getCurrImg () const
 accessor methods; these are not defined as 'const' since an appearance model may like to make some last moment changes to the variable being accessed before returning it to can avoid any unnecessary computations concerning the variable (e.g. More...
 
virtual unsigned int getImgHeight () const
 
virtual unsigned int getImgWidth () const
 
virtual unsigned int getResX () const
 
virtual unsigned int getResY () const
 
virtual unsigned int getNPix () const
 
virtual unsigned int getNChannels () const
 
virtual unsigned int getPatchSize () const
 
virtual double getGradOffset () const
 
virtual double getHessOffset () const
 
virtual const PixValT & getInitPixVals () const
 
virtual const PixGradT & getInitPixGrad () const
 
virtual const PixHessT & getInitPixHess () const
 
virtual const PixValT & getCurrPixVals () const
 
virtual const PixGradT & getCurrPixGrad () const
 
virtual const PixHessT & getCurrPixHess () const
 
virtual void setCurrImg (const cv::Mat &cv_img)
 modifier methods;
 
virtual void setInitPixVals (const PixValT &pix_vals)
 
virtual void setInitPixGrad (const PixGradT &pix_grad)
 
virtual void setInitPixHess (const PixHessT &pix_hess)
 
virtual void setCurrPixVals (const PixValT &pix_vals)
 
virtual void setCurrPixGrad (const PixGradT &pix_grad)
 
virtual void setCurrPixHess (const PixHessT &pix_hess)
 
virtual void initializePixVals (const PtsT &init_pts)
 initialization methods - to be called once when the tracker is initialized
 
virtual void initializePixGrad (const GradPtsT &warped_offset_pts)
 functions to compute image differentials (gradient and hessian) are overloaded since there are two ways to define them: More...
 
virtual void initializePixGrad (const PtsT &init_pts)
 
virtual void initializePixHess (const PtsT &init_pts, const HessPtsT &warped_offset_pts)
 
virtual void initializePixHess (const PtsT &init_pts)
 
virtual void updatePixVals (const PtsT &curr_pts)
 
virtual void updatePixGrad (const GradPtsT &warped_offset_pts)
 
virtual void updatePixGrad (const PtsT &curr_pts)
 
virtual void updatePixHess (const PtsT &curr_pts)
 
virtual void updatePixHess (const PtsT &curr_pts, const HessPtsT &warped_offset_pts)
 
virtual void extractPatch (VectorXd &pix_vals, const PtsT &curr_pts)
 general utility function to extract raw pixel values from the current image at the specified points; might be useful for visualization purposes as the curr_pix_vals might not have raw pixel values;
 
virtual VectorXd getPatch (const PtsT &curr_pts)
 returning variant
 
virtual ImgStatusisInitialized ()=0
 

Protected Attributes

const unsigned int resx
 horizontal and vertical sampling resolutions for the object patch
 
const unsigned int resy
 
const unsigned int n_pix
 no. of pixels in the sampled image patch to be tracked
 
const unsigned int n_channels
 no. More...
 
const unsigned int patch_size
 size of the vector that represents the object patch in the image, typically n_pix*n_channels
 
const double grad_eps
 offsets to use for computing the numerical image gradient and hessian
 
const double hess_eps
 
const InputType input_type
 
EigImgT curr_img
 Eigen structure shaing memory with the OpenCV image used by default with grayscale inputs.
 
cv::Mat curr_img_cv
 OpenCV image used by default with multi channel inputs.
 
unsigned int img_height
 height and width of the input images
 
unsigned int img_width
 
PixValT I0
 let N = n_pix = no. More...
 
PixValT It
 
PixGradT dI0_dx
 (N*C) x 2 jacobian of pixel values in the warped image w.r.t. More...
 
PixGradT dIt_dx
 
PixHessT d2I0_dx2
 4 x (N*C) Hessian of pixel values in the warped image w.r.t. More...
 
PixHessT d2It_dx2
 
double pix_norm_add
 additive and multiplicative factors for normalizing pixel values
 
double pix_norm_mult
 
unsigned int frame_count
 incremented once during initialization and thereafter everytime the template is updated
 

Member Function Documentation

virtual const cv::Mat& ImageBase::getCurrImg ( ) const
inlinevirtual

accessor methods; these are not defined as 'const' since an appearance model may like to make some last moment changes to the variable being accessed before returning it to can avoid any unnecessary computations concerning the variable (e.g.

in its 'update' function) unless it is actually accessed;

virtual void ImageBase::initializePixGrad ( const GradPtsT &  warped_offset_pts)
virtual

functions to compute image differentials (gradient and hessian) are overloaded since there are two ways to define them:

  1. differential of the warped image: the image is warped first, then its differential is computed at the base (unwarped) locations
  2. warp of the image differential: differential is computed in the image coordinates and evaluated at the given (presumably warped) locations
  1. gradient of the warped image

Reimplemented in SCV, and SumOfAMs.

virtual void ImageBase::initializePixGrad ( const PtsT &  init_pts)
virtual
  1. warp of the image gradient

Reimplemented in SCV, and SumOfAMs.

virtual void ImageBase::initializePixHess ( const PtsT &  init_pts,
const HessPtsT &  warped_offset_pts 
)
virtual
  1. hessian of the warped image

Reimplemented in SumOfAMs.

virtual void ImageBase::initializePixHess ( const PtsT &  init_pts)
virtual
  1. warp of the image hessian

Reimplemented in SumOfAMs.

Member Data Documentation

PixHessT ImageBase::d2I0_dx2
protected

4 x (N*C) Hessian of pixel values in the warped image w.r.t.

pixel coordinate locations; each column of this matrix contains the 2x2 hessian for the respective location (for each channel) flasttened in the column major order;

PixGradT ImageBase::dI0_dx
protected

(N*C) x 2 jacobian of pixel values in the warped image w.r.t.

pixel coordinate locations aka gradient of the warped image or warp of the gradient image depending on the search method

PixValT ImageBase::I0
protected

let N = n_pix = no.

of pixels and C = n_channels = no. of channels pixel values for all channels in the object patch being tracked (flattened as a vector)

const unsigned int ImageBase::n_channels
protected

no.

of values that represent each pixel in the sampled patch defined as a constant to enable compile time optimizations


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