pub struct DISOpticalFlow { /* private fields */ }
Expand 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).
Creates an instance of DISOpticalFlow
- preset: one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM
- preset: DISOpticalFlow::PRESET_FAST
Creates an instance of DISOpticalFlow
- preset: one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM
This alternative version of [create] function uses the following default values for its arguments:
- preset: DISOpticalFlow::PRESET_FAST
Clears the algorithm state
Reads algorithm parameters from a file storage
Stores algorithm parameters in a file storage
Stores algorithm parameters in a file storage
Read more
Deprecated: ## Note
This alternative version of [write_with_name] function uses the following default values for its arguments:
Read more
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
Saves the algorithm to a file.
In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).
Returns the algorithm string identifier.
This string is used as top level xml/yml node tag when the object is saved to a file or string.
Return an the underlying raw pointer while consuming this wrapper.
Read more
Return the underlying mutable raw pointer
Read more
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.
Read more
Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well
enough in most cases.
Read more
Stride between neighbor patches. Must be less than patch size. Lower values correspond
to higher flow quality.
Read more
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values
may improve quality in some cases.
Read more
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values
may improve quality in some cases.
Read more
Weight of the gradient constancy term
Read more
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.
Read more
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.
Read more
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.
Read more
Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well
enough in most cases.
Read more
Stride between neighbor patches. Must be less than patch size. Lower values correspond
to higher flow quality.
Read more
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values
may improve quality in some cases.
Read more
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.
Read more
Weight of the gradient constancy term
Read more
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.
Read more
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.
Read more
Formats the value using the given formatter.
Read more
Releases all inner buffers.
Executes the destructor for this type.
Read more
Converts to this type from the input type.
Converts to this type from the input type.
The type returned in the event of a conversion error.
Performs the conversion.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.