| OpenCV 5.0.0alpha Open Source Computer Vision

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
cv::optflow::RLOFOpticalFlowParameter Class Reference
Optical Flow Algorithms

This is used store and set up the parameters of the robust local optical flow (RLOF) algoritm. More...

`#include <opencv2/optflow/rlofflow.hpp>`

Collaboration diagram for cv::optflow::RLOFOpticalFlowParameter:

## Public Member Functions
| RLOFOpticalFlowParameter ()
int | getCrossSegmentationThreshold () const
float | getGlobalMotionRansacThreshold () const
int | getLargeWinSize () const
int | getMaxIteration () const
int | getMaxLevel () const
float | getMinEigenValue () const
float | getNormSigma0 () const
float | getNormSigma1 () const
int | getSmallWinSize () const
SolverType | getSolverType () const
SupportRegionType | getSupportRegionType () const
bool | getUseGlobalMotionPrior () const
bool | getUseIlluminationModel () const
bool | getUseInitialFlow () const
void | setCrossSegmentationThreshold (int val)
void | setGlobalMotionRansacThreshold (float val)
void | setLargeWinSize (int val)
void | setMaxIteration (int val)
void | setMaxLevel (int val)
void | setMinEigenValue (float val)
void | setNormSigma0 (float val)
void | setNormSigma1 (float val)
void | setSmallWinSize (int val)
void | setSolverType (SolverType val)
void | setSupportRegionType (SupportRegionType val)
void | setUseGlobalMotionPrior (bool val)
void | setUseIlluminationModel (bool val)
void | setUseInitialFlow (bool val)
void | setUseMEstimator (bool val)
| Enable M-estimator or disable and use least-square estimator.

## Static Public Member Functions
static Ptr< RLOFOpticalFlowParameter > | create ()
| Creates instance of optflow::RLOFOpticalFlowParameter.

## Public Attributes
int | crossSegmentationThreshold
float | globalMotionRansacThreshold
int | largeWinSize
int | maxIteration
int | maxLevel
float | minEigenValue
float | normSigma0
float | normSigma1
int | smallWinSize
SolverType | solverType
SupportRegionType | supportRegionType
bool | useGlobalMotionPrior
bool | useIlluminationModel
bool | useInitialFlow

## Detailed Description

This is used store and set up the parameters of the robust local optical flow (RLOF) algoritm.

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(). This RLOF implementation can be seen as an improved pyramidal iterative Lucas-Kanade and includes a set of improving modules. The main improvements in respect to the pyramidal iterative Lucas-Kanade are:

- A more robust redecending M-estimator framework (see [239]) to improve the accuracy at motion boundaries and appearing and disappearing pixels.
- an adaptive support region strategies to improve the accuracy at motion boundaries to reduce the corona effect, i.e oversmoothing of the PLK at motion/object boundaries. The cross-based segementation strategy (SR_CROSS) proposed in [241] uses a simple segmenation approach to obtain the optimal shape of the support region.
- To deal with illumination changes (outdoor sequences and shadow) the intensity constancy assumption based optical flow equation has been adopt with the Gennert and Negahdaripour illumination model (see [242]). This model can be switched on/off with the useIlluminationModel variable.
- By using a global motion prior initialization (see [242]) of the iterative refinement the accuracy could be significantly improved for large displacements. This initialization can be switched on and of with useGlobalMotionPrior variable.

The RLOF can be computed with the SparseOpticalFlow class or function interface to track a set of features or with the DenseOpticalFlow class or function interface to compute dense optical flow.

See also
  optflow::DenseRLOFOpticalFlow, optflow::calcOpticalFlowDenseRLOF(), optflow::SparseRLOFOpticalFlow, optflow::calcOpticalFlowSparseRLOF()

## Constructor & Destructor Documentation

## ◆ RLOFOpticalFlowParameter()

cv::optflow::RLOFOpticalFlowParameter::RLOFOpticalFlowParameter | ( |  | ) |
| inline

## Member Function Documentation

## ◆ create()

static Ptr< RLOFOpticalFlowParameter > cv::optflow::RLOFOpticalFlowParameter::create | ( |  | ) |
| static

Python:
| cv.optflow.RLOFOpticalFlowParameter.create( |  | ) -> | retval
| cv.optflow.RLOFOpticalFlowParameter_create( |  | ) -> | retval

Creates instance of optflow::RLOFOpticalFlowParameter.

## ◆ getCrossSegmentationThreshold()

int cv::optflow::RLOFOpticalFlowParameter::getCrossSegmentationThreshold | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getCrossSegmentationThreshold( |  | ) -> | retval

## ◆ getGlobalMotionRansacThreshold()

float cv::optflow::RLOFOpticalFlowParameter::getGlobalMotionRansacThreshold | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getGlobalMotionRansacThreshold( |  | ) -> | retval

## ◆ getLargeWinSize()

int cv::optflow::RLOFOpticalFlowParameter::getLargeWinSize | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getLargeWinSize( |  | ) -> | retval

## ◆ getMaxIteration()

int cv::optflow::RLOFOpticalFlowParameter::getMaxIteration | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getMaxIteration( |  | ) -> | retval

## ◆ getMaxLevel()

int cv::optflow::RLOFOpticalFlowParameter::getMaxLevel | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getMaxLevel( |  | ) -> | retval

## ◆ getMinEigenValue()

float cv::optflow::RLOFOpticalFlowParameter::getMinEigenValue | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getMinEigenValue( |  | ) -> | retval

## ◆ getNormSigma0()

float cv::optflow::RLOFOpticalFlowParameter::getNormSigma0 | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getNormSigma0( |  | ) -> | retval

## ◆ getNormSigma1()

float cv::optflow::RLOFOpticalFlowParameter::getNormSigma1 | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getNormSigma1( |  | ) -> | retval

## ◆ getSmallWinSize()

int cv::optflow::RLOFOpticalFlowParameter::getSmallWinSize | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getSmallWinSize( |  | ) -> | retval

## ◆ getSolverType()

SolverType cv::optflow::RLOFOpticalFlowParameter::getSolverType | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getSolverType( |  | ) -> | retval

## ◆ getSupportRegionType()

SupportRegionType cv::optflow::RLOFOpticalFlowParameter::getSupportRegionType | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getSupportRegionType( |  | ) -> | retval

## ◆ getUseGlobalMotionPrior()

bool cv::optflow::RLOFOpticalFlowParameter::getUseGlobalMotionPrior | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getUseGlobalMotionPrior( |  | ) -> | retval

## ◆ getUseIlluminationModel()

bool cv::optflow::RLOFOpticalFlowParameter::getUseIlluminationModel | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getUseIlluminationModel( |  | ) -> | retval

## ◆ getUseInitialFlow()

bool cv::optflow::RLOFOpticalFlowParameter::getUseInitialFlow | ( |  | ) | const

Python:
| cv.optflow.RLOFOpticalFlowParameter.getUseInitialFlow( |  | ) -> | retval

## ◆ setCrossSegmentationThreshold()

void cv::optflow::RLOFOpticalFlowParameter::setCrossSegmentationThreshold | ( | int | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setCrossSegmentationThreshold( | val | ) -> | None

## ◆ setGlobalMotionRansacThreshold()

void cv::optflow::RLOFOpticalFlowParameter::setGlobalMotionRansacThreshold | ( | float | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setGlobalMotionRansacThreshold( | val | ) -> | None

## ◆ setLargeWinSize()

void cv::optflow::RLOFOpticalFlowParameter::setLargeWinSize | ( | int | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setLargeWinSize( | val | ) -> | None

## ◆ setMaxIteration()

void cv::optflow::RLOFOpticalFlowParameter::setMaxIteration | ( | int | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setMaxIteration( | val | ) -> | None

## ◆ setMaxLevel()

void cv::optflow::RLOFOpticalFlowParameter::setMaxLevel | ( | int | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setMaxLevel( | val | ) -> | None

## ◆ setMinEigenValue()

void cv::optflow::RLOFOpticalFlowParameter::setMinEigenValue | ( | float | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setMinEigenValue( | val | ) -> | None

## ◆ setNormSigma0()

void cv::optflow::RLOFOpticalFlowParameter::setNormSigma0 | ( | float | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setNormSigma0( | val | ) -> | None

## ◆ setNormSigma1()

void cv::optflow::RLOFOpticalFlowParameter::setNormSigma1 | ( | float | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setNormSigma1( | val | ) -> | None

## ◆ setSmallWinSize()

void cv::optflow::RLOFOpticalFlowParameter::setSmallWinSize | ( | int | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setSmallWinSize( | val | ) -> | None

## ◆ setSolverType()

void cv::optflow::RLOFOpticalFlowParameter::setSolverType | ( | SolverType | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setSolverType( | val | ) -> | None

## ◆ setSupportRegionType()

void cv::optflow::RLOFOpticalFlowParameter::setSupportRegionType | ( | SupportRegionType | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setSupportRegionType( | val | ) -> | None

## ◆ setUseGlobalMotionPrior()

void cv::optflow::RLOFOpticalFlowParameter::setUseGlobalMotionPrior | ( | bool | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setUseGlobalMotionPrior( | val | ) -> | None

## ◆ setUseIlluminationModel()

void cv::optflow::RLOFOpticalFlowParameter::setUseIlluminationModel | ( | bool | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setUseIlluminationModel( | val | ) -> | None

## ◆ setUseInitialFlow()

void cv::optflow::RLOFOpticalFlowParameter::setUseInitialFlow | ( | bool | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setUseInitialFlow( | val | ) -> | None

## ◆ setUseMEstimator()

void cv::optflow::RLOFOpticalFlowParameter::setUseMEstimator | ( | bool | val | ) |

Python:
| cv.optflow.RLOFOpticalFlowParameter.setUseMEstimator( | val | ) -> | None

Enable M-estimator or disable and use least-square estimator.

Enables M-estimator by setting sigma parameters to (3.2, 7.0). Disabling M-estimator can reduce runtime, while enabling can improve the accuracy.

Parameters

  val | If true M-estimator is used. If false least-square estimator is used.

See also
  setNormSigma0, setNormSigma1

## Member Data Documentation

## ◆ crossSegmentationThreshold

int cv::optflow::RLOFOpticalFlowParameter::crossSegmentationThreshold

Color similarity threshold used by cross-based segmentation following [241] . (Only used if supportRegionType is SR_CROSS). With the cross-bassed segmentation motion boundaries can be computed more accurately.

## ◆ globalMotionRansacThreshold

float cv::optflow::RLOFOpticalFlowParameter::globalMotionRansacThreshold

To apply the global motion prior motion vectors will be computed on a regulary sampled which are the basis for Homography estimation using RANSAC. The reprojection threshold is based on n-th percentil (given by this value [0 ... 100]) of the motion vectors magnitude. See [242] for more details.

## ◆ largeWinSize

int cv::optflow::RLOFOpticalFlowParameter::largeWinSize

Maximal window size of the support region. If supportRegionType is SR_FIXED this gives the exact support region size. The speed of the RLOF is related to the applied win sizes. The smaller the window size the lower is the runtime, but the more sensitive to noise is the method.

## ◆ maxIteration

int cv::optflow::RLOFOpticalFlowParameter::maxIteration

Number of maximal iterations used for the iterative refinement. Lower values can reduce the runtime but also the accuracy.

## ◆ maxLevel

int cv::optflow::RLOFOpticalFlowParameter::maxLevel

Maximal number of pyramid level used. The large this value is the more likely it is to obtain accurate solutions for long-range motions. The runtime is linear related to this parameter.

## ◆ minEigenValue

float cv::optflow::RLOFOpticalFlowParameter::minEigenValue

Threshold for the minimal eigenvalue of the gradient matrix defines when to abort the iterative refinement.

## ◆ normSigma0

float cv::optflow::RLOFOpticalFlowParameter::normSigma0

&sigma parameter of the shrinked Hampel norm introduced in [239]. If &sigma = std::numeric_limist<float>::max() the least-square estimator will be used instead of the M-estimator. Althoug M-estimator is more robust against outlier in the support region the least-square can be fast in computation.

## ◆ normSigma1

float cv::optflow::RLOFOpticalFlowParameter::normSigma1

&sigma parameter of the shrinked Hampel norm introduced in [239]. If &sigma = std::numeric_limist<float>::max() the least-square estimator will be used instead of the M-estimator. Althoug M-estimator is more robust against outlier in the support region the least-square can be fast in computation.

## ◆ smallWinSize

int cv::optflow::RLOFOpticalFlowParameter::smallWinSize

Minimal window size of the support region. This parameter is only used if supportRegionType is SR_CROSS.

## ◆ solverType

SolverType cv::optflow::RLOFOpticalFlowParameter::solverType

Variable specifies the iterative refinement strategy. Please consider citing [240] when using ST_BILINEAR.

## ◆ supportRegionType

SupportRegionType cv::optflow::RLOFOpticalFlowParameter::supportRegionType

Variable specifies the support region shape extraction or shrinking strategy.

## ◆ useGlobalMotionPrior

bool cv::optflow::RLOFOpticalFlowParameter::useGlobalMotionPrior

Use global motion prior initialisation has been introduced in [242] . It allows to be more accurate for long-range motion. The computational complexity is slightly increased by enabling the global motion prior initialisation.

## ◆ useIlluminationModel

bool cv::optflow::RLOFOpticalFlowParameter::useIlluminationModel

Use the Gennert and Negahdaripour illumination model instead of the intensity brigthness constraint. (proposed in [242] ) This model is defined as follow:

\[ I(\mathbf{x},t) + m \cdot I(\mathbf{x},t) + c = I(\mathbf{x},t+1) \]

and contains with m and c a multiplicative and additive term which makes the estimate more robust against illumination changes. The computational complexity is increased by enabling the illumination model.

## ◆ useInitialFlow

bool cv::optflow::RLOFOpticalFlowParameter::useInitialFlow

Use next point list as initial values. A good intialization can imporve the algortihm accuracy and reduce the runtime by a faster convergence of the iteration refinement.

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

- opencv2/optflow/rlofflow.hpp