camshiftKalman
 All Classes Files Functions Variables Enumerations Enumerator Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
camShiftKalman Class Reference

The camShiftKalman class the core of algorithm. More...

#include <camshiftkalman.h>

Public Member Functions

 camShiftKalman (const string videoName_, double start, const Mat target, const Rect targetWindow, featureType type_)
 
 ~camShiftKalman ()
 
void extractTargetModel ()
 extractTargetModel build the model for the object More...
 
void track ()
 track all tracking process is executed in this function More...
 
Point getCurrentObjectCenter () const
 getCurrentObjectCenter return the current position of object More...
 
Rect getCurrentTrackWindow () const
 getCurrentTrackWindow return the tracking window More...
 

Private Member Functions

void initKalman (double)
 initKalman initialize the Kalman Filter More...
 
Point getCurrentState () const
 getCurrentState return the current state of KF More...
 
void setCurrentTrackWindow ()
 setCurrentTrackWindow adjust the tracking window to follow the object More...
 
Mat drawHist1d (const Mat hist, int histSize) const
 drawHist1d draw histgram of one dimision More...
 
Mat drawHist2d (const Mat hist, int histSizeX, int histSizeY) const
 drawHist2d draw histgram of two dimision More...
 
void drawTrackResult ()
 drawTrackResult draw the tracking result on image More...
 
void normalizeHist (Mat &hist)
 normalizeHist normalize the hist (only for 3-dim) More...
 

Private Attributes

featureType type
 
string videoName
 
Mat currentFrame
 
Mat hist
 
Mat backProject
 
Point camCenter
 
Point KFPredictCenter
 
Point KFCorrectCenter
 
Rect trackWindow
 
int frameStart
 
int vMin
 
int vMax
 
int sMin
 
KalmanFilter KF
 
Mat_< float > measurement
 
string winName
 
bool isShowHist
 
bool isShowBackProject
 

Detailed Description

The camShiftKalman class the core of algorithm.

Constructor & Destructor Documentation

camShiftKalman::camShiftKalman ( const string  videoName_,
double  start,
const Mat  target,
const Rect  targetWindow,
featureType  type_ 
)
camShiftKalman::~camShiftKalman ( )

Member Function Documentation

Mat camShiftKalman::drawHist1d ( const Mat  hist,
int  histSize 
) const
private

drawHist1d draw histgram of one dimision

Parameters
histhistgram data to draw
histSizethe number of bins
Returns
Mat camShiftKalman::drawHist2d ( const Mat  hist,
int  histSizeX,
int  histSizeY 
) const
private

drawHist2d draw histgram of two dimision

Parameters
histhistgram data to draw
histSizeXthe number of bins in horizen
histSizeYthe number of bins in vertical
Returns
void camShiftKalman::drawTrackResult ( )
private

drawTrackResult draw the tracking result on image

void camShiftKalman::extractTargetModel ( )

extractTargetModel build the model for the object

Point camShiftKalman::getCurrentObjectCenter ( ) const

getCurrentObjectCenter return the current position of object

Returns
Point camShiftKalman::getCurrentState ( ) const
private

getCurrentState return the current state of KF

Returns
Rect camShiftKalman::getCurrentTrackWindow ( ) const

getCurrentTrackWindow return the tracking window

Returns
void camShiftKalman::initKalman ( double  interval)
private

initKalman initialize the Kalman Filter

void camShiftKalman::normalizeHist ( Mat &  hist)
private

normalizeHist normalize the hist (only for 3-dim)

Parameters
histhistgram data to normalize
void camShiftKalman::setCurrentTrackWindow ( )
private

setCurrentTrackWindow adjust the tracking window to follow the object

void camShiftKalman::track ( )

track all tracking process is executed in this function

Member Data Documentation

Mat camShiftKalman::backProject
private
Point camShiftKalman::camCenter
private
Mat camShiftKalman::currentFrame
private
int camShiftKalman::frameStart
private
Mat camShiftKalman::hist
private
bool camShiftKalman::isShowBackProject
private
bool camShiftKalman::isShowHist
private
KalmanFilter camShiftKalman::KF
private
Point camShiftKalman::KFCorrectCenter
private
Point camShiftKalman::KFPredictCenter
private
Mat_<float> camShiftKalman::measurement
private
int camShiftKalman::sMin
private
Rect camShiftKalman::trackWindow
private
featureType camShiftKalman::type
private
string camShiftKalman::videoName
private
int camShiftKalman::vMax
private
int camShiftKalman::vMin
private
string camShiftKalman::winName
private

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