OpenCV  4.3.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
 Threshold for the forward backward confidence check. More...
 
virtual Ptr< RLOFOpticalFlowParametergetRLOFOpticalFlowParameter () const =0
 Configuration of the RLOF alogrithm. More...
 
virtual void setForwardBackward (float val)=0
 Threshold for the forward backward confidence check. More...
 
virtual void setRLOFOpticalFlowParameter (Ptr< RLOFOpticalFlowParameter > val)=0
 Configuration of the RLOF alogrithm. More...
 
- 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. More...
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 Clears the algorithm state. More...
 
virtual bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
 
virtual String getDefaultName () const
 
virtual void read (const FileNode &fn)
 Reads algorithm parameters from a file storage. More...
 
virtual void save (const String &filename) const
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage. More...
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 

Static Public Member Functions

static Ptr< SparseRLOFOpticalFlowcreate (Ptr< RLOFOpticalFlowParameter > rlofParam=Ptr< RLOFOpticalFlowParameter >(), float forwardBackwardThreshold=1.f)
 Creates instance of SparseRLOFOpticalFlow. More...
 
- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tp > load (const String &filename, const String &objname=String())
 Loads algorithm from the file. More...
 
template<typename _Tp >
static Ptr< _Tp > loadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String. More...
 
template<typename _Tp >
static Ptr< _Tp > read (const FileNode &fn)
 Reads algorithm from the file node. More...
 

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 described in [207] [208] [209] and [210] similar to the pyramidal iterative Lucas-Kanade method as proposed by [25]. More details and experiments can be found in the following thesis [211]. The implementation is derived from optflow::calcOpticalFlowPyrLK().

For the RLOF configuration see optflow::RLOFOpticalFlowParameter for further details. Parameters have been described in [207], [208], [209] and [210].

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

Member Function Documentation

◆ create()

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

◆ getForwardBackward()

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

◆ getRLOFOpticalFlowParameter()

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

Configuration of the RLOF alogrithm.

See also
setRLOFOpticalFlowParameter

◆ setForwardBackward()

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

◆ setRLOFOpticalFlowParameter()

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: