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>

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.
 
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
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) 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 [Senst2012] [Senst2013] [Senst2014] and [Senst2016] similar to the pyramidal iterative Lucas-Kanade method as proposed by [Bouguet00]. More details and experiments can be found in the following thesis [Senst2019]. The implementation is derived from optflow::calcOpticalFlowPyrLK().

For the RLOF configuration see optflow::RLOFOpticalFlowParameter for further details. Parameters have been described in [Senst2012], [Senst2013], [Senst2014] and [Senst2016].

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

Creates instance of SparseRLOFOpticalFlow.

Parameters
rlofParamsee setRLOFOpticalFlowParameter
forwardBackwardThresholdsee setForwardBackward

◆ getForwardBackward()

virtual float cv::optflow::SparseRLOFOpticalFlow::getForwardBackward ( ) const
pure virtual

Threshold for the forward backward confidence check.

See also
setForwardBackward

◆ getRLOFOpticalFlowParameter()

virtual Ptr< RLOFOpticalFlowParameter > cv::optflow::SparseRLOFOpticalFlow::getRLOFOpticalFlowParameter ( ) const
pure virtual

Configuration of the RLOF alogrithm.

See also
setRLOFOpticalFlowParameter

◆ setForwardBackward()

virtual void cv::optflow::SparseRLOFOpticalFlow::setForwardBackward ( float  val)
pure virtual

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

Configuration of the RLOF alogrithm.

See also
optflow::RLOFOpticalFlowParameter, getRLOFOpticalFlowParameter

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