opencv::prelude

Trait DISOpticalFlowTrait

Source
pub trait DISOpticalFlowTrait: DISOpticalFlowTraitConst + DenseOpticalFlowTrait {
    // Required method
    fn as_raw_mut_DISOpticalFlow(&mut self) -> *mut c_void;

    // Provided methods
    fn set_finest_scale(&mut self, val: i32) -> Result<()> { ... }
    fn set_patch_size(&mut self, val: i32) -> Result<()> { ... }
    fn set_patch_stride(&mut self, val: i32) -> Result<()> { ... }
    fn set_gradient_descent_iterations(&mut self, val: i32) -> Result<()> { ... }
    fn set_variational_refinement_iterations(&mut self, val: i32) -> Result<()> { ... }
    fn set_variational_refinement_alpha(&mut self, val: f32) -> Result<()> { ... }
    fn set_variational_refinement_delta(&mut self, val: f32) -> Result<()> { ... }
    fn set_variational_refinement_gamma(&mut self, val: f32) -> Result<()> { ... }
    fn set_variational_refinement_epsilon(&mut self, val: f32) -> Result<()> { ... }
    fn set_use_mean_normalization(&mut self, val: bool) -> Result<()> { ... }
    fn set_use_spatial_propagation(&mut self, val: bool) -> Result<()> { ... }
}
Expand description

Mutable methods for crate::video::DISOpticalFlow

Required Methods§

Provided Methods§

Source

fn set_finest_scale(&mut self, val: i32) -> Result<()>

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

setFinestScale getFinestScale

Source

fn set_patch_size(&mut self, val: i32) -> Result<()>

Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases.

§See also

setPatchSize getPatchSize

Source

fn set_patch_stride(&mut self, val: i32) -> Result<()>

Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality.

§See also

setPatchStride getPatchStride

Source

fn set_gradient_descent_iterations(&mut self, val: i32) -> Result<()>

Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.

§See also

setGradientDescentIterations getGradientDescentIterations

Source

fn set_variational_refinement_iterations(&mut self, val: i32) -> Result<()>

Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.

§See also

setGradientDescentIterations getGradientDescentIterations

Source

fn set_variational_refinement_alpha(&mut self, val: f32) -> Result<()>

Weight of the smoothness term

§See also

setVariationalRefinementAlpha getVariationalRefinementAlpha

Source

fn set_variational_refinement_delta(&mut self, val: f32) -> Result<()>

Weight of the color constancy term

§See also

setVariationalRefinementDelta getVariationalRefinementDelta

Source

fn set_variational_refinement_gamma(&mut self, val: f32) -> Result<()>

Weight of the gradient constancy term

§See also

setVariationalRefinementGamma getVariationalRefinementGamma

Source

fn set_variational_refinement_epsilon(&mut self, val: f32) -> Result<()>

Norm value shift for robust penalizer

§See also

setVariationalRefinementEpsilon getVariationalRefinementEpsilon

Source

fn set_use_mean_normalization(&mut self, val: bool) -> Result<()>

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

setUseMeanNormalization getUseMeanNormalization

Source

fn set_use_spatial_propagation(&mut self, val: bool) -> Result<()>

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

setUseSpatialPropagation getUseSpatialPropagation

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§