LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::lkTracker Class Reference

This functor implements a hierachical Lucas Kanade optical flow. More...

#include <ltiLkTracker.h>

Inheritance diagram for lti::lkTracker:
Inheritance graph
[legend]
Collaboration diagram for lti::lkTracker:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class lkTracker More...
class  vec2d
 a position/direction vector type More...

Public Member Functions

 lkTracker ()
 lkTracker (const lkTracker &other)
virtual ~lkTracker ()
virtual const char * getTypeName () const
bool apply (const channel &src, pointList &featurePoints)
bool apply (const channel &src, pointList &featurePoints, int &validPoints)
bool apply (const channel &src, tpointList< float > &featurePoints)
bool apply (const channel &src, tpointList< float > &featurePoints, int &validPoints)
bool reset ()
bool reset (const tpointList< float > &whichPoints)
bool reset (const pointList &whichPoints)
lkTrackercopy (const lkTracker &other)
virtual functorclone () const
const parametersgetParameters () const

Static Public Attributes

static const tpoint< float > outOfRange

Detailed Description

This functor implements a hierachical Lucas Kanade optical flow.

It is used for feature tracking through a image sequence. Therefore it uses a corner detector to find the initial features

For more details please look at Jean-Yves Bouguet's paper Pyramidal Implementation of the Lucas Kanade Feature Tracker. Description of the algorithm


Constructor & Destructor Documentation

lti::lkTracker::lkTracker (  ) 

default constructor

lti::lkTracker::lkTracker ( const lkTracker other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::lkTracker::~lkTracker (  )  [virtual]

destructor


Member Function Documentation

bool lti::lkTracker::apply ( const channel src,
tpointList< float > &  featurePoints,
int &  validPoints 
)

Track the points in the src channel and return the new positions in the given point list.

Parameters:
src the channel with the points being tracked. The first presentation (or the next presentation after a reset() ) is used for initialization only. The next ones are used to track the first given point set, and the results will be left in featurePoints.
featurePoints the first time the apply is called (or after a reset() ), this list contain the positions of the points to track. If the attribute autoCorners of the parameters is true, the content of this list will be discarded and the positions of the automatic detected corners will be left here. Points getting invalid during tracking are marked by negative values in the point list.
validPoints returns the number of valid points in the list featurePoints
Returns:
true if apply successful or false otherwise.
bool lti::lkTracker::apply ( const channel src,
tpointList< float > &  featurePoints 
)

Track the points in the src channel and return the new positions in the given point list.

Parameters:
src the channel with the points being tracked. The first presentation (or the next presentation after a reset() ) is used for initialization only. The next ones are used to track the first given point set, and the results will be left in featurePoints.
featurePoints the first time the apply is called (or after a reset() ), this list contain the positions of the points to track. If the attribute autoCorners of the parameters is true, the content of this list will be discarded and the positions of the automatic detected corners will be left here. Points getting invalid during tracking are marked by negative values in the point list.
Returns:
true if apply successful or false otherwise.
bool lti::lkTracker::apply ( const channel src,
pointList featurePoints,
int &  validPoints 
)

Track the points in the src channel and return the new positions in the given point list.

Please note that internally the pointList contains points with float precision, and to return an pointList they need to be casted. Is faster if you try to use directly the other apply member, which works directly with the float-points.

Parameters:
src the channel with the points being tracked. The first presentation (or the next presentation after a reset() ) is used for initialization only. The next ones are used to track the first given point set, and the results will be left in featurePoints.
featurePoints the first time the apply is called (or after a reset() ), this list contain the positions of the points to track. If the attribute autoCorners of the parameters is true, the content of this list will be discarded and the positions of the automatic detected corners will be left here. Points getting invalid during tracking are marked by negative values in the point list.
validPoints returns the number of valid points in the list feature points.
Returns:
true if apply successful or false otherwise.
bool lti::lkTracker::apply ( const channel src,
pointList featurePoints 
)

Track the points in the src channel and return the new positions in the given point list.

Please note that internally the pointList contains points with float precision, and to return an pointList they need to be casted. Is faster if you try to use directly the other apply member, which works directly with the float-points.

Parameters:
src the channel with the points being tracked. The first presentation (or the next presentation after a reset() ) is used for initialization only. The next ones are used to track the first given point set, and the results will be left in featurePoints.
featurePoints the first time the apply is called (or after a reset() ), this list contain the positions of the points to track. If the attribute autoCorners of the parameters is true, the content of this list will be discarded and the positions of the automatic detected corners will be left here. Points getting invalid during tracking are marked by negative values in the point list.
Returns:
true if apply successful or false otherwise.
virtual functor* lti::lkTracker::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

lkTracker& lti::lkTracker::copy ( const lkTracker other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

const parameters& lti::lkTracker::getParameters (  )  const

returns used parameters

Reimplemented from lti::modifier.

virtual const char* lti::lkTracker::getTypeName (  )  const [virtual]

returns the name of this type ("lkTracker")

Reimplemented from lti::modifier.

bool lti::lkTracker::reset ( const pointList whichPoints  ) 

Reset some points in the tracking list.

Please note that this reset takes effect only if there is already a tracking point list in the functor, i.e. if a "total" reset was already done followed by an apply.

Parameters:
whichPoints Only those points in the list with valid values (coordinates > 0) will be reset: they will get this valid value. All invalid points in the list, i.e. with coordinates lower than zero will be keped as they are. Please note that point sequence in this list must correspond to the sequence of the tracking list!
bool lti::lkTracker::reset ( const tpointList< float > &  whichPoints  ) 

Reset some points in the tracking list.

Please note that this reset takes effect only if there is already a tracking point list in the functor, i.e. if a "total" reset was already done followed by an apply.

Parameters:
whichPoints Only those points in the list with valid values (coordinates > 0) will be reset: they will get this valid value. All invalid points in the list, i.e. with coordinates lower than zero will be keped as they are. Please note that point sequence in this list must correspond to the sequence of the tracking list!
bool lti::lkTracker::reset (  ) 

Resets the internal state but not the parameters.


Member Data Documentation

const tpoint<float> lti::lkTracker::outOfRange [static]

constant which describes a point outOfRange.

In general, a point with negative coordinates can be considered out of range


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

Generated on Sat Apr 10 15:27:30 2010 for LTI-Lib by Doxygen 1.6.1