Class cv::optflow::SparseRLOFOpticalFlow#

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

Collaboration diagram for cv::optflow::SparseRLOFOpticalFlow:

Public Member Functions#

Public Member Functions inherited from cv::SparseOpticalFlow
Public Member Functions inherited from cv::Algorithm

Return

Name

Description

Algorithm()

~Algorithm()

void

clear()

Clears the algorithm state.

bool

empty()

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.

String

getDefaultName()

void

read(const FileNode & fn)

Reads algorithm parameters from a file storage.

void

save(const String & filename)

void

write(
    const Ptr< FileStorage > & fs,
    const String & name = String() )

void

write(FileStorage & fs)

Stores algorithm parameters in a file storage.

void

write(
    FileStorage & fs,
    const String & name )

Static Public Member Functions#

Static Public Member Functions inherited from cv::Algorithm

Return

Name

Description

static Ptr< _Tp >

load(
    const String & filename,
    const String & objname = String() )

Loads algorithm from the file.

static Ptr< _Tp >

loadFromString(
    const String & strModel,
    const String & objname = String() )

Loads algorithm from a String.

static Ptr< _Tp >

read(const FileNode & fn)

Reads algorithm from the file node.

Additional Inherited Members#

Protected Member Functions inherited from cv::Algorithm

Return

Name

Description

void

writeFormat(FileStorage & fs)

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.

Member Function Documentation#

getForwardBackward()#

float cv::optflow::SparseRLOFOpticalFlow::getForwardBackward()

Threshold for the forward backward confidence check.

getRLOFOpticalFlowParameter()#

Ptr< RLOFOpticalFlowParameter > cv::optflow::SparseRLOFOpticalFlow::getRLOFOpticalFlowParameter()

Configuration of the RLOF alogrithm.

setForwardBackward()#

void cv::optflow::SparseRLOFOpticalFlow::setForwardBackward(float 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.

setRLOFOpticalFlowParameter()#

void cv::optflow::SparseRLOFOpticalFlow::setRLOFOpticalFlowParameter(Ptr< RLOFOpticalFlowParameter > val)

Configuration of the RLOF alogrithm.

create()#

static Ptr< SparseRLOFOpticalFlow > cv::optflow::SparseRLOFOpticalFlow::create(
Ptr< RLOFOpticalFlowParameter > rlofParam = Ptr< RLOFOpticalFlowParameter >(),
float forwardBackwardThreshold = 1.f )

Creates instance of SparseRLOFOpticalFlow.

Parameters

  • rlofParam — see setRLOFOpticalFlowParameter

  • forwardBackwardThreshold — see setForwardBackward

Source file#

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