Start » Filter Reference » OpenCV » Motion Analysis and Object Tracking » cvDISOpticalFlow
Module: | OpenCV |
---|
DIS optical flow algorithm.
Name | Type | Description | |
---|---|---|---|
inSrc1 | Image | First input image. | |
inSrc2 | Image | Second input image. | |
inPreset | CvDISOpticalFlowPreset | ||
inFinestScale | Integer* | 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. | |
inGradientDescentIterations | Integer* | Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases. | |
inPatchSize | Integer* | Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases. | |
inPatchStride | Integer* | Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality. | |
inUseMeanNormalization | Bool* | 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. | |
inUseSpatialPropagation | Bool* | 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. | |
inVariationalRefinementAlpha | Real* | Weight of the smoothness term. | |
inVariationalRefinementDelta | Real* | Weight of the color constancy term. | |
inVariationalRefinementGamma | Real* | Weight of the gradient constancy term. | |
inVariationalRefinementIterations | Integer* | Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases. | |
outFlow | Image |
Requirements
For input inSrc1 only pixel formats are supported: 1⨯uint8.
For input inSrc2 only pixel formats are supported: 1⨯uint8.
Read more about pixel formats in Image documentation.
Errors
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Not supported inSrc1 pixel format in AvsFilter_cvDISOpticalFlow. Supported formats: 1xUInt8. |
DomainError | Not supported inSrc2 pixel format in AvsFilter_cvDISOpticalFlow. Supported formats: 1xUInt8. |
Complexity Level
This filter is available on Basic Complexity Level.