mimas::correlation_tracking_tool< T, C > Class Template Reference
[Tracking of Features]

Correlation based tracking of gray-level images and templates The correlation-type C must be an object of class binary_function with back insertion sequences as first and second parameter and double as return value. More...

#include <correlation_tracking_tool.h>

Inheritance diagram for mimas::correlation_tracking_tool< T, C >:

Inheritance graph
[legend]
Collaboration diagram for mimas::correlation_tracking_tool< T, C >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void pushPolyCoord (int xcoord, int ycoord)
 push a point of a polygon which specifies the tracking template
const std::list< Cartesian<
int > > & 
getPolyCoords (void) const
 returns the current list of the polygon template points
void showPolyCoords (void)
 display the polygon points
void clearPolyCoords (void)
 clears the polygon points (e.g. if you want to specify a new polygon)
void sortPolyCoords (void)
 sort polygon points (useful when displaying/debugging)
void createTemplate (image< T > &trackingImage)
 create the template from the polygon points that have been pushed
void writeTemplateToFilePGM (char *fn)
 write the template to a PGM file (for debugging)
void writeMaskedTemplateToFilePGM (char *fn)
 write the template mask to a PGM file (for debugging)
void showPolygonOnImage (image< T > &someImage)
 display the polygon onto an image
void showPolygonOnImage (image< T > &someImage, int greylevel)
 display the polyton onto an image using gray colour <greylevel>.
double getTrackingCorr (void)
 return the last tracking correlation value
int getTemplateArea (void)
 return the area of a template
void saveParameters (const char *fileName)
 save parameters to an XML file
void loadParameters (const char *fileName)
 load parameters from an XML file
Cartesian< inttrackCorrelation (image< T > &trackingImage, Cartesian< int > &startCoord, Cartesian< int > &range, C &c)
 perform correlation on trackingImage with specified start coordinates and range
Cartesian< inttrackCorrelation (image< T > &trackingImage, Cartesian< int > &startCoord, C &c)
 perform correlation on trackingImage with specified start coordinates. The tracking range is assumed pre-specified using the setTrackingRange() functions.
Cartesian< inttrackCorrelation (image< T > &trackingImage, C &c)
 uses the startCoord from the initial image sent to the template, or the end tracking point from the last tracked image.
std::list< Cartesian< int > > trackCorrelationList (image< T > &trackingImage, Cartesian< int > &startCoord, Cartesian< int > &range, C &c)
 track and return a list of the points of the final polygon after tracking.
void setAutoUpdateTemplate (bool val)
 automatically update the template when correlation is to low? Default=false;
void setAutoUpdateCorrVal (double val)
 lowest correlation before template is updated.
void setTrackingRange (int range)
 tracking range. The single value specifies the ranges in the x and y direction
void setTrackingRange (int xrange, int yrange)
 overloaded function to set x and y tracking range seperately
Cartesian< intgetTrackingPoint (void)
 returns the co-ordinates of the main tracking point
Cartesian< intgetTrackingDisplacement (void)
 returns the last tracking region displacement
 correlation_tracking_tool (void)
 constructor
virtual ~correlation_tracking_tool (void)
 destructor
void variableDiagnostics (void)
 stick debugging stuff here

Public Attributes

bool debug

Protected Attributes

int numPolyPoints
 number of points on polygon
intxpoly
intypoly
 point on the polygon
std::list< Cartesian< int > > polyCoords
std::list< Cartesian< int > > finalPolyCoords
 the polygon coordinates before and after execution of tracking procedure
image< T > trackingTemplate
 the template
image< T > trackingMask
 the rectangular mask used to store shape of template
int templateRows
int templateCols
 rows and columns of the bounding box of the polygon template
Cartesian< intoffsetForFirstCoord
 offset of first coordinate point from top left corner of bounding box of template

Detailed Description

template<typename T, class C = corrcoef< std::vector< double > >>
class mimas::correlation_tracking_tool< T, C >

Correlation based tracking of gray-level images and templates The correlation-type C must be an object of class binary_function with back insertion sequences as first and second parameter and double as return value.

Author:
Bala Amavasai (bala@amavasai.org)
See also:
corrcoef
Date:
Fri Apr 6 11:54:53 BST 2001
Header
/cvs/mimas2/include/correlation_tracking_tool.h,v 1.1.1.1 2005/08/09 15:37:45 engmb Exp

Definition at line 29 of file correlation_tracking_tool.h.


Constructor & Destructor Documentation

template<typename T, class C = corrcoef< std::vector< double > >>
mimas::correlation_tracking_tool< T, C >::correlation_tracking_tool ( void   ) 

constructor

template<typename T, class C = corrcoef< std::vector< double > >>
virtual mimas::correlation_tracking_tool< T, C >::~correlation_tracking_tool ( void   )  [virtual]

destructor


Member Function Documentation

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::pushPolyCoord ( int  xcoord,
int  ycoord 
)

push a point of a polygon which specifies the tracking template

template<typename T, class C = corrcoef< std::vector< double > >>
const std::list< Cartesian<int> >& mimas::correlation_tracking_tool< T, C >::getPolyCoords ( void   )  const

returns the current list of the polygon template points

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::showPolyCoords ( void   ) 

display the polygon points

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::clearPolyCoords ( void   ) 

clears the polygon points (e.g. if you want to specify a new polygon)

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::sortPolyCoords ( void   ) 

sort polygon points (useful when displaying/debugging)

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::createTemplate ( image< T > &  trackingImage  ) 

create the template from the polygon points that have been pushed

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::writeTemplateToFilePGM ( char *  fn  ) 

write the template to a PGM file (for debugging)

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::writeMaskedTemplateToFilePGM ( char *  fn  ) 

write the template mask to a PGM file (for debugging)

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::showPolygonOnImage ( image< T > &  someImage  ) 

display the polygon onto an image

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::showPolygonOnImage ( image< T > &  someImage,
int  greylevel 
)

display the polyton onto an image using gray colour <greylevel>.

template<typename T, class C = corrcoef< std::vector< double > >>
double mimas::correlation_tracking_tool< T, C >::getTrackingCorr ( void   ) 

return the last tracking correlation value

template<typename T, class C = corrcoef< std::vector< double > >>
int mimas::correlation_tracking_tool< T, C >::getTemplateArea ( void   ) 

return the area of a template

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::saveParameters ( const char *  fileName  ) 

save parameters to an XML file

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::loadParameters ( const char *  fileName  ) 

load parameters from an XML file

template<typename T, class C = corrcoef< std::vector< double > >>
Cartesian<int> mimas::correlation_tracking_tool< T, C >::trackCorrelation ( image< T > &  trackingImage,
Cartesian< int > &  startCoord,
Cartesian< int > &  range,
C &  c 
)

perform correlation on trackingImage with specified start coordinates and range

template<typename T, class C = corrcoef< std::vector< double > >>
Cartesian<int> mimas::correlation_tracking_tool< T, C >::trackCorrelation ( image< T > &  trackingImage,
Cartesian< int > &  startCoord,
C &  c 
)

perform correlation on trackingImage with specified start coordinates. The tracking range is assumed pre-specified using the setTrackingRange() functions.

template<typename T, class C = corrcoef< std::vector< double > >>
Cartesian<int> mimas::correlation_tracking_tool< T, C >::trackCorrelation ( image< T > &  trackingImage,
C &  c 
)

uses the startCoord from the initial image sent to the template, or the end tracking point from the last tracked image.

template<typename T, class C = corrcoef< std::vector< double > >>
std::list< Cartesian<int> > mimas::correlation_tracking_tool< T, C >::trackCorrelationList ( image< T > &  trackingImage,
Cartesian< int > &  startCoord,
Cartesian< int > &  range,
C &  c 
)

track and return a list of the points of the final polygon after tracking.

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::setAutoUpdateTemplate ( bool  val  ) 

automatically update the template when correlation is to low? Default=false;

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::setAutoUpdateCorrVal ( double  val  ) 

lowest correlation before template is updated.

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::setTrackingRange ( int  range  ) 

tracking range. The single value specifies the ranges in the x and y direction

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::setTrackingRange ( int  xrange,
int  yrange 
)

overloaded function to set x and y tracking range seperately

template<typename T, class C = corrcoef< std::vector< double > >>
Cartesian<int> mimas::correlation_tracking_tool< T, C >::getTrackingPoint ( void   ) 

returns the co-ordinates of the main tracking point

template<typename T, class C = corrcoef< std::vector< double > >>
Cartesian<int> mimas::correlation_tracking_tool< T, C >::getTrackingDisplacement ( void   ) 

returns the last tracking region displacement

template<typename T, class C = corrcoef< std::vector< double > >>
void mimas::correlation_tracking_tool< T, C >::variableDiagnostics ( void   ) 

stick debugging stuff here


Member Data Documentation

template<typename T, class C = corrcoef< std::vector< double > >>
int mimas::correlation_tracking_tool< T, C >::numPolyPoints [protected]

number of points on polygon

Definition at line 32 of file correlation_tracking_tool.h.

template<typename T, class C = corrcoef< std::vector< double > >>
int* mimas::correlation_tracking_tool< T, C >::xpoly [protected]

Definition at line 33 of file correlation_tracking_tool.h.

template<typename T, class C = corrcoef< std::vector< double > >>
int * mimas::correlation_tracking_tool< T, C >::ypoly [protected]

point on the polygon

Definition at line 33 of file correlation_tracking_tool.h.

template<typename T, class C = corrcoef< std::vector< double > >>
std::list< Cartesian<int> > mimas::correlation_tracking_tool< T, C >::polyCoords [protected]

Definition at line 34 of file correlation_tracking_tool.h.

template<typename T, class C = corrcoef< std::vector< double > >>
std::list< Cartesian<int> > mimas::correlation_tracking_tool< T, C >::finalPolyCoords [protected]

the polygon coordinates before and after execution of tracking procedure

Definition at line 34 of file correlation_tracking_tool.h.

template<typename T, class C = corrcoef< std::vector< double > >>
image<T> mimas::correlation_tracking_tool< T, C >::trackingTemplate [protected]

the template

Definition at line 35 of file correlation_tracking_tool.h.

template<typename T, class C = corrcoef< std::vector< double > >>
image<T> mimas::correlation_tracking_tool< T, C >::trackingMask [protected]

the rectangular mask used to store shape of template

Definition at line 36 of file correlation_tracking_tool.h.

template<typename T, class C = corrcoef< std::vector< double > >>
int mimas::correlation_tracking_tool< T, C >::templateRows [protected]

Definition at line 37 of file correlation_tracking_tool.h.

template<typename T, class C = corrcoef< std::vector< double > >>
int mimas::correlation_tracking_tool< T, C >::templateCols [protected]

rows and columns of the bounding box of the polygon template

Definition at line 37 of file correlation_tracking_tool.h.

template<typename T, class C = corrcoef< std::vector< double > >>
Cartesian<int> mimas::correlation_tracking_tool< T, C >::offsetForFirstCoord [protected]

offset of first coordinate point from top left corner of bounding box of template

Definition at line 38 of file correlation_tracking_tool.h.

template<typename T, class C = corrcoef< std::vector< double > >>
bool mimas::correlation_tracking_tool< T, C >::debug

Definition at line 81 of file correlation_tracking_tool.h.


The documentation for this class was generated from the following file:
[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:27 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...