Class cv::DISOpticalFlow#
DIS optical flow algorithm. View details
#include <opencv2/video/tracking.hpp>Collaboration diagram for cv::DISOpticalFlow:
Public Types#
enum cv::DISOpticalFlow {
cv::PRESET_ULTRAFAST = 0,
cv::PRESET_FAST = 1,
cv::PRESET_MEDIUM = 2
}Public Member Functions#
Public Member Functions inherited from cv::DenseOpticalFlow
Return |
Name |
Description |
|---|---|---|
|
Calculates an optical flow. |
|
|
Releases all inner buffers. |
Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Additional Inherited Members#
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Detailed Description#
DIS optical flow algorithm.
This class implements the Dense Inverse Search (DIS) optical flow algorithm. More details about the algorithm can be found at Kroeger2016 . Includes three presets with preselected parameters to provide reasonable trade-off between speed and quality. However, even the slowest preset is still relatively fast, use DeepFlow if you need better quality and don’t care about speed.
This implementation includes several additional features compared to the algorithm described in the paper, including spatial propagation of flow vectors (getUseSpatialPropagation), as well as an option to utilize an initial flow approximation passed to calc (which is, essentially, temporal propagation, if the previous frame’s flow field is passed).
- Examples
- samples/python/snippets/dis_opt_flow.py.
Member Enumeration Documentation#
enum DISOpticalFlow
|
|
|
Member Function Documentation#
getCoarsestScale()#
int cv::DISOpticalFlow::getCoarsestScale()
Python:
cv.DISOpticalFlow.getCoarsestScale() -> retval
Gets the coarsest scale.
getFinestScale()#
int cv::DISOpticalFlow::getFinestScale()
Python:
cv.DISOpticalFlow.getFinestScale() -> retval
Finest level of the Gaussian pyramid on which the flow is computed (zero level corresponds to the original image resolution). The final flow is obtained by bilinear upscaling.
See also
getGradientDescentIterations()#
int cv::DISOpticalFlow::getGradientDescentIterations()
Python:
cv.DISOpticalFlow.getGradientDescentIterations() -> retval
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.
See also
getPatchSize()#
int cv::DISOpticalFlow::getPatchSize()
Python:
cv.DISOpticalFlow.getPatchSize() -> retval
Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases.
See also
getPatchStride()#
int cv::DISOpticalFlow::getPatchStride()
Python:
cv.DISOpticalFlow.getPatchStride() -> retval
Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality.
See also
getUseMeanNormalization()#
bool cv::DISOpticalFlow::getUseMeanNormalization()
Python:
cv.DISOpticalFlow.getUseMeanNormalization() -> retval
Whether to use mean-normalization of patches when computing patch distance. It is turned on by default as it typically provides a noticeable quality boost because of increased robustness to illumination variations. Turn it off if you are certain that your sequence doesn’t contain any changes in illumination.
See also
getUseSpatialPropagation()#
bool cv::DISOpticalFlow::getUseSpatialPropagation()
Python:
cv.DISOpticalFlow.getUseSpatialPropagation() -> retval
Whether to use spatial propagation of good optical flow vectors. This option is turned on by default, as it tends to work better on average and can sometimes help recover from major errors introduced by the coarse-to-fine scheme employed by the DIS optical flow algorithm. Turning this option off can make the output flow field a bit smoother, however.
See also
getVariationalRefinementAlpha()#
float cv::DISOpticalFlow::getVariationalRefinementAlpha()
Python:
cv.DISOpticalFlow.getVariationalRefinementAlpha() -> retval
Weight of the smoothness term.
See also
getVariationalRefinementDelta()#
float cv::DISOpticalFlow::getVariationalRefinementDelta()
Python:
cv.DISOpticalFlow.getVariationalRefinementDelta() -> retval
Weight of the color constancy term.
See also
getVariationalRefinementEpsilon()#
float cv::DISOpticalFlow::getVariationalRefinementEpsilon()
Python:
cv.DISOpticalFlow.getVariationalRefinementEpsilon() -> retval
Norm value shift for robust penalizer.
See also
getVariationalRefinementGamma()#
float cv::DISOpticalFlow::getVariationalRefinementGamma()
Python:
cv.DISOpticalFlow.getVariationalRefinementGamma() -> retval
Weight of the gradient constancy term.
See also
getVariationalRefinementIterations()#
int cv::DISOpticalFlow::getVariationalRefinementIterations()
Python:
cv.DISOpticalFlow.getVariationalRefinementIterations() -> retval
Number of fixed point iterations of variational refinement per scale. Set to zero to disable variational refinement completely. Higher values will typically result in more smooth and high-quality flow.
See also
setCoarsestScale()#
void cv::DISOpticalFlow::setCoarsestScale(int val)
Python:
cv.DISOpticalFlow.setCoarsestScale(val)
Sets the coarsest scale.
Parameters
val— Coarsest level of the Gaussian pyramid on which the flow is computed. If set to -1, the auto-computed coarsest scale will be used.
setFinestScale()#
void cv::DISOpticalFlow::setFinestScale(int val)
Python:
cv.DISOpticalFlow.setFinestScale(val)
Finest level of the Gaussian pyramid on which the flow is computed (zero level corresponds to the original image resolution). The final flow is obtained by bilinear upscaling.
See also
setGradientDescentIterations()#
void cv::DISOpticalFlow::setGradientDescentIterations(int val)
Python:
cv.DISOpticalFlow.setGradientDescentIterations(val)
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.
See also
setPatchSize()#
void cv::DISOpticalFlow::setPatchSize(int val)
Python:
cv.DISOpticalFlow.setPatchSize(val)
Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases.
See also
setPatchStride()#
void cv::DISOpticalFlow::setPatchStride(int val)
Python:
cv.DISOpticalFlow.setPatchStride(val)
Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality.
See also
setUseMeanNormalization()#
void cv::DISOpticalFlow::setUseMeanNormalization(bool val)
Python:
cv.DISOpticalFlow.setUseMeanNormalization(val)
Whether to use mean-normalization of patches when computing patch distance. It is turned on by default as it typically provides a noticeable quality boost because of increased robustness to illumination variations. Turn it off if you are certain that your sequence doesn’t contain any changes in illumination.
See also
setUseSpatialPropagation()#
void cv::DISOpticalFlow::setUseSpatialPropagation(bool val)
Python:
cv.DISOpticalFlow.setUseSpatialPropagation(val)
Whether to use spatial propagation of good optical flow vectors. This option is turned on by default, as it tends to work better on average and can sometimes help recover from major errors introduced by the coarse-to-fine scheme employed by the DIS optical flow algorithm. Turning this option off can make the output flow field a bit smoother, however.
See also
setVariationalRefinementAlpha()#
void cv::DISOpticalFlow::setVariationalRefinementAlpha(float val)
Python:
cv.DISOpticalFlow.setVariationalRefinementAlpha(val)
Weight of the smoothness term.
See also
setVariationalRefinementDelta()#
void cv::DISOpticalFlow::setVariationalRefinementDelta(float val)
Python:
cv.DISOpticalFlow.setVariationalRefinementDelta(val)
Weight of the color constancy term.
See also
setVariationalRefinementEpsilon()#
void cv::DISOpticalFlow::setVariationalRefinementEpsilon(float val)
Python:
cv.DISOpticalFlow.setVariationalRefinementEpsilon(val)
Norm value shift for robust penalizer.
See also
setVariationalRefinementGamma()#
void cv::DISOpticalFlow::setVariationalRefinementGamma(float val)
Python:
cv.DISOpticalFlow.setVariationalRefinementGamma(val)
Weight of the gradient constancy term.
See also
setVariationalRefinementIterations()#
void cv::DISOpticalFlow::setVariationalRefinementIterations(int val)
Python:
cv.DISOpticalFlow.setVariationalRefinementIterations(val)
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.
See also
create()#
static Ptr< DISOpticalFlow > cv::DISOpticalFlow::create(int preset = DISOpticalFlow::PRESET_FAST)
Python:
cv.DISOpticalFlow.create([, preset]) -> retval
cv.DISOpticalFlow_create([, preset]) -> retval
Creates an instance of DISOpticalFlow.
Parameters
preset— one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM
Source file#
The documentation for this class was generated from the following file:
opencv2/video/tracking.hpp