OpenCV  4.1.0
Open Source Computer Vision
Public Member Functions | Static Public Member Functions | List of all members
cv::optflow::SparseRLOFOpticalFlow Class Referenceabstract

Class used for calculation sparse optical flow and feature tracking with robust local optical flow (RLOF) algorithms. More...

#include <opencv2/optflow/rlofflow.hpp>

Inheritance diagram for cv::optflow::SparseRLOFOpticalFlow:
cv::SparseOpticalFlow cv::Algorithm

Public Member Functions

virtual float getForwardBackward () const =0
 
virtual Ptr
< RLOFOpticalFlowParameter
getRLOFOpticalFlowParameter () const =0
 
virtual void setForwardBackward (float val)=0
 Threshold for the forward backward confidence check.
 
virtual void setRLOFOpticalFlowParameter (Ptr< RLOFOpticalFlowParameter > val)=0
 Configuration of the RLOF alogrithm.
 
- Public Member Functions inherited from cv::SparseOpticalFlow
virtual void calc (InputArray prevImg, InputArray nextImg, InputArray prevPts, InputOutputArray nextPts, OutputArray status, OutputArray err=cv::noArray())=0
 Calculates a sparse optical flow.
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 Clears the algorithm state.
 
virtual bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.
 
virtual String getDefaultName () const
 
virtual void read (const FileNode &fn)
 Reads algorithm parameters from a file storage.
 
virtual void save (const String &filename) const
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage.
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 simplified API for language bindingsThis is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Static Public Member Functions

static Ptr< SparseRLOFOpticalFlowcreate (Ptr< RLOFOpticalFlowParameter > rlofParam=Ptr< RLOFOpticalFlowParameter >(), float forwardBackwardThreshold=1.f)
 Creates instance of SparseRLOFOpticalFlow.
 

Additional Inherited Members

- Protected Member Functions inherited from cv::Algorithm
void writeFormat (FileStorage &fs) const
 

Detailed Description

Class used for calculation sparse optical flow and feature tracking with robust local optical flow (RLOF) algorithms.

The RLOF is a fast local optical flow approach similar to the pyramidal iterative Lucas-Kanade method as proposed byBouguet00. The implementation is derived from optflow::calcOpticalFlowPyrLK().

For the RLOF configuration see optflow::RLOFOpticalFlowParameter for further details. Parameters have been described inSenst2012,Senst2013,Senst2014 andSenst2016.

Note
SIMD parallelization is only available when compiling with SSE4.1.
See Also
optflow::calcOpticalFlowSparseRLOF(), optflow::RLOFOpticalFlowParameter

Member Function Documentation

static Ptr<SparseRLOFOpticalFlow> cv::optflow::SparseRLOFOpticalFlow::create ( Ptr< RLOFOpticalFlowParameter rlofParam = PtrRLOFOpticalFlowParameter >(),
float  forwardBackwardThreshold = 1.f 
)
static
Python:
retval=cv.optflow.SparseRLOFOpticalFlow_create([, rlofParam[, forwardBackwardThreshold]])

Creates instance of SparseRLOFOpticalFlow.

Parameters
rlofParamsee setRLOFOpticalFlowParameter
forwardBackwardThresholdsee setForwardBackward
virtual float cv::optflow::SparseRLOFOpticalFlow::getForwardBackward ( ) const
pure virtual
Python:
retval=cv.optflow_SparseRLOFOpticalFlow.getForwardBackward()

Threshold for the forward backward confidence check.

See Also
setForwardBackward
virtual Ptr<RLOFOpticalFlowParameter> cv::optflow::SparseRLOFOpticalFlow::getRLOFOpticalFlowParameter ( ) const
pure virtual
Python:
retval=cv.optflow_SparseRLOFOpticalFlow.getRLOFOpticalFlowParameter()

Configuration of the RLOF alogrithm.

See Also
setRLOFOpticalFlowParameter
virtual void cv::optflow::SparseRLOFOpticalFlow::setForwardBackward ( float  val)
pure virtual
Python:
None=cv.optflow_SparseRLOFOpticalFlow.setForwardBackward(val)

Threshold for the forward backward confidence check.

For each feature point a motion vector \( d_{I0,I1}(\mathbf{x}) \) is computed. If the forward backward error

\[ EP_{FB} = || d_{I0,I1} + d_{I1,I0} || \]

is larger than threshold given by this function then the status will not be used by the following vector field interpolation. \( d_{I1,I0} \) denotes the backward flow. Note, the forward backward test will only be applied if the threshold > 0. This may results into a doubled runtime for the motion estimation.

See Also
setForwardBackward
virtual void cv::optflow::SparseRLOFOpticalFlow::setRLOFOpticalFlowParameter ( Ptr< RLOFOpticalFlowParameter val)
pure virtual
Python:
None=cv.optflow_SparseRLOFOpticalFlow.setRLOFOpticalFlowParameter(val)

Configuration of the RLOF alogrithm.

See Also
optflow::RLOFOpticalFlowParameter, getRLOFOpticalFlowParameter


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