Type Definition opencv::types::PtrOfDISOpticalFlow
source · [−]pub type PtrOfDISOpticalFlow = Ptr<dyn DISOpticalFlow>;Implementations
sourceimpl PtrOfDISOpticalFlow
impl PtrOfDISOpticalFlow
pub fn as_raw_PtrOfDISOpticalFlow(&self) -> *const c_void
pub fn as_raw_mut_PtrOfDISOpticalFlow(&mut self) -> *mut c_void
Trait Implementations
sourceimpl AlgorithmTrait for PtrOfDISOpticalFlow
impl AlgorithmTrait for PtrOfDISOpticalFlow
sourceimpl AlgorithmTraitConst for PtrOfDISOpticalFlow
impl AlgorithmTraitConst for PtrOfDISOpticalFlow
fn as_raw_Algorithm(&self) -> *const c_void
sourcefn write(&self, fs: &mut FileStorage) -> Result<()>
fn write(&self, fs: &mut FileStorage) -> Result<()>
Stores algorithm parameters in a file storage
sourcefn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
simplified API for language bindings Stores algorithm parameters in a file storage Read more
sourcefn empty(&self) -> Result<bool>
fn empty(&self) -> Result<bool>
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
sourcefn save(&self, filename: &str) -> Result<()>
fn save(&self, filename: &str) -> Result<()>
Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs). Read more
sourcefn get_default_name(&self) -> Result<String>
fn get_default_name(&self) -> Result<String>
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. Read more
sourceimpl DISOpticalFlow for PtrOfDISOpticalFlow
impl DISOpticalFlow for PtrOfDISOpticalFlow
fn as_raw_mut_DISOpticalFlow(&mut self) -> *mut c_void
sourcefn set_finest_scale(&mut self, val: i32) -> Result<()>
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. Read more
sourcefn set_patch_size(&mut self, val: i32) -> Result<()>
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. Read more
sourcefn set_patch_stride(&mut self, val: i32) -> Result<()>
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. Read more
sourcefn set_gradient_descent_iterations(&mut self, val: i32) -> Result<()>
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. Read more
sourcefn set_variational_refinement_iterations(&mut self, val: i32) -> Result<()>
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. Read more
sourcefn set_variational_refinement_alpha(&mut self, val: f32) -> Result<()>
fn set_variational_refinement_alpha(&mut self, val: f32) -> Result<()>
Weight of the smoothness term Read more
sourcefn set_variational_refinement_delta(&mut self, val: f32) -> Result<()>
fn set_variational_refinement_delta(&mut self, val: f32) -> Result<()>
Weight of the color constancy term Read more
sourcefn set_variational_refinement_gamma(&mut self, val: f32) -> Result<()>
fn set_variational_refinement_gamma(&mut self, val: f32) -> Result<()>
Weight of the gradient constancy term Read more
sourcefn set_use_mean_normalization(&mut self, val: bool) -> Result<()>
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. Read more
sourcefn set_use_spatial_propagation(&mut self, val: bool) -> Result<()>
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. Read more
sourceimpl DISOpticalFlowConst for PtrOfDISOpticalFlow
impl DISOpticalFlowConst for PtrOfDISOpticalFlow
fn as_raw_DISOpticalFlow(&self) -> *const c_void
sourcefn get_finest_scale(&self) -> Result<i32>
fn get_finest_scale(&self) -> Result<i32>
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
sourcefn get_patch_size(&self) -> Result<i32>
fn get_patch_size(&self) -> Result<i32>
Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases. Read more
sourcefn get_patch_stride(&self) -> Result<i32>
fn get_patch_stride(&self) -> Result<i32>
Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality. Read more
sourcefn get_gradient_descent_iterations(&self) -> Result<i32>
fn get_gradient_descent_iterations(&self) -> Result<i32>
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases. Read more
sourcefn get_variational_refinement_iterations(&self) -> Result<i32>
fn get_variational_refinement_iterations(&self) -> Result<i32>
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
sourcefn get_variational_refinement_alpha(&self) -> Result<f32>
fn get_variational_refinement_alpha(&self) -> Result<f32>
Weight of the smoothness term Read more
sourcefn get_variational_refinement_delta(&self) -> Result<f32>
fn get_variational_refinement_delta(&self) -> Result<f32>
Weight of the color constancy term Read more
sourcefn get_variational_refinement_gamma(&self) -> Result<f32>
fn get_variational_refinement_gamma(&self) -> Result<f32>
Weight of the gradient constancy term Read more
sourcefn get_use_mean_normalization(&self) -> Result<bool>
fn get_use_mean_normalization(&self) -> Result<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. Read more
sourcefn get_use_spatial_propagation(&self) -> Result<bool>
fn get_use_spatial_propagation(&self) -> Result<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. Read more
sourceimpl DenseOpticalFlow for PtrOfDISOpticalFlow
impl DenseOpticalFlow for PtrOfDISOpticalFlow
fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void
sourcefn calc(
&mut self,
i0: &dyn ToInputArray,
i1: &dyn ToInputArray,
flow: &mut dyn ToInputOutputArray
) -> Result<()>
fn calc(
&mut self,
i0: &dyn ToInputArray,
i1: &dyn ToInputArray,
flow: &mut dyn ToInputOutputArray
) -> Result<()>
Calculates an optical flow. Read more
sourcefn collect_garbage(&mut self) -> Result<()>
fn collect_garbage(&mut self) -> Result<()>
Releases all inner buffers.