OpenCV 5.0.0-pre
Open Source Computer Vision
Loading...
Searching...
No Matches
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>

Collaboration diagram for cv::optflow::SparseRLOFOpticalFlow:

Public Member Functions

virtual float getForwardBackward () const =0
 Threshold for the forward backward confidence check.
 
virtual Ptr< RLOFOpticalFlowParametergetRLOFOpticalFlowParameter () const =0
 Configuration of the RLOF alogrithm.
 
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 (FileStorage &fs, const String &name) const
 

Static Public Member Functions

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

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 [239] [240] [241] and [242] similar to the pyramidal iterative Lucas-Kanade method as proposed by [36]. More details and experiments can be found in the following thesis [243]. The implementation is derived from optflow::calcOpticalFlowPyrLK().

For the RLOF configuration see optflow::RLOFOpticalFlowParameter for further details. Parameters have been described in [239], [240], [241] and [242].

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:
cv.optflow.SparseRLOFOpticalFlow.create([, rlofParam[, forwardBackwardThreshold]]) -> retval
cv.optflow.SparseRLOFOpticalFlow_create([, rlofParam[, forwardBackwardThreshold]]) -> retval

Creates instance of SparseRLOFOpticalFlow.

Parameters
rlofParamsee setRLOFOpticalFlowParameter
forwardBackwardThresholdsee setForwardBackward

◆ getForwardBackward()

virtual float cv::optflow::SparseRLOFOpticalFlow::getForwardBackward ( ) const
pure virtual
Python:
cv.optflow.SparseRLOFOpticalFlow.getForwardBackward() -> retval

Threshold for the forward backward confidence check.

See also
setForwardBackward

◆ getRLOFOpticalFlowParameter()

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

Configuration of the RLOF alogrithm.

See also
setRLOFOpticalFlowParameter

◆ setForwardBackward()

virtual void cv::optflow::SparseRLOFOpticalFlow::setForwardBackward ( float val)
pure virtual
Python:
cv.optflow.SparseRLOFOpticalFlow.setForwardBackward(val) -> None

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:
cv.optflow.SparseRLOFOpticalFlow.setRLOFOpticalFlowParameter(val) -> None

Configuration of the RLOF alogrithm.

See also
optflow::RLOFOpticalFlowParameter, getRLOFOpticalFlowParameter

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