Robust Local Optical Flow Libary Documentation  V 1.2
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
IFeatureTracker Interface Referenceabstract

RLOF Interface. More...

#include "include\OpticalFlow\IFeatureTracker.h"

Public Member Functions

virtual void run (const uchar *imgPtr1, unsigned int step1, const uchar *imgPtr2, unsigned int step2, unsigned int nRows, unsigned int nCols, std::vector< CRPoint > &prevPoints, std::vector< CRPoint > &currPoints, const FeatureTrackerContext *context)
 
virtual void run (const cv::Mat &prevImage, const cv::Mat &currImage, std::vector< cv::Point2f > &prevPoints, std::vector< cv::Point2f > &currPoints, const FeatureTrackerContext *context)=0
 
virtual FeatureTrackerContextcreateDefaultParameter ()=0
 

Detailed Description

RLOF Interface.

This class provides a general interface for feature tracking purposes. The RLOF method is a inherent class that is instantiated by the RLOFFactory. To parametrize the RLOF tracking method the FeatureTrackerContext is used. Default parameters could be taken from the createDefaultParameter function.

Definition at line 150 of file IFeatureTracker.h.

Member Function Documentation

virtual FeatureTrackerContext* IFeatureTracker::createDefaultParameter ( )
pure virtual

Create a default context containing the default parameter for the related tracking methods.

Returns
context containing default parameter
virtual void IFeatureTracker::run ( const uchar *  imgPtr1,
unsigned int  step1,
const uchar *  imgPtr2,
unsigned int  step2,
unsigned int  nRows,
unsigned int  nCols,
std::vector< CRPoint > &  prevPoints,
std::vector< CRPoint > &  currPoints,
const FeatureTrackerContext context 
)
inlinevirtual

Track a set of features points (prevPoints) that are specified by a 2D point list and store the tracked positions at the (currPoints) point list by using the image informations providen by the prevImage and currImage. If these images has to be gray scales images. Parameters are set by the context argument. This interface is used to ensure compatibility down to OpenCV 2.0 und upon new OpenCV versions. To ensure such compatibility OpenCV defined classes are replaced by wrapper classes, see CRPoint.(If use used OpenCV 2.4.6 the second interface function could be used)

Parameters
imgPtr1Data pointer to an rgb or gray scaled image at time t.
step1Specifies the number of elements used to allocate a row of image 1.
imgPtr2Data pointer to an rgb or gray scaled image at time t+1.
step2Specifies the number of elements used to allocate a row of image 2.
nRowsNumber of rows of the input images.
nColsNumber of columns of the input images.
prevPointsFeatures as point list at time t.
currPointsTracked features as point list to time t+1.
contextContext including parameters, if NULL default parameters will be used.

Definition at line 170 of file IFeatureTracker.h.

Referenced by demo(), and denseMotionField().

virtual void IFeatureTracker::run ( const cv::Mat &  prevImage,
const cv::Mat &  currImage,
std::vector< cv::Point2f > &  prevPoints,
std::vector< cv::Point2f > &  currPoints,
const FeatureTrackerContext context 
)
pure virtual

ATTENTION - should be only just with OpenCV 2.4.6. Track a set of features points (prevPoints) that are specified by a 2D point list and store the tracked positions at the (currPoints) point list by using the image informations provided by the prevImage and currImage. If these images are RGB images, they will be transformed to grav scaled images internally. Parameters are set by the context argument.

Parameters
prevImageImage at time t (CV_8UC3 or CV_8UC1 depending from method).
currImageImage at time t+1 (CV_8UC3 or CV_8UC1 depending from method).
prevPointsFeatures as point list at time t.
currPointsTracked features as point list to time t+1.
contextContext including parameters, if NULL default parameters will be used.

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