Struct opencv::video::DISOpticalFlow
source · 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).
Implementations§
source§impl DISOpticalFlow
impl DISOpticalFlow
sourcepub fn create_def() -> Result<Ptr<DISOpticalFlow>>
pub fn create_def() -> Result<Ptr<DISOpticalFlow>>
Creates an instance of DISOpticalFlow
§Parameters
- preset: one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM
§Note
This alternative version of DISOpticalFlow::create function uses the following default values for its arguments:
- preset: DISOpticalFlow::PRESET_FAST
Trait Implementations§
source§impl AlgorithmTrait for DISOpticalFlow
impl AlgorithmTrait for DISOpticalFlow
source§impl AlgorithmTraitConst for DISOpticalFlow
impl AlgorithmTraitConst for DISOpticalFlow
fn as_raw_Algorithm(&self) -> *const c_void
source§fn write(&self, fs: &mut impl FileStorageTrait) -> Result<()>
fn write(&self, fs: &mut impl FileStorageTrait) -> Result<()>
source§fn write_1(&self, fs: &mut impl FileStorageTrait, name: &str) -> Result<()>
fn write_1(&self, fs: &mut impl FileStorageTrait, name: &str) -> Result<()>
source§fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
fn write_with_name(&self, fs: &Ptr<FileStorage>, name: &str) -> Result<()>
source§fn write_with_name_def(&self, fs: &Ptr<FileStorage>) -> Result<()>
fn write_with_name_def(&self, fs: &Ptr<FileStorage>) -> Result<()>
§Note
source§fn empty(&self) -> Result<bool>
fn empty(&self) -> Result<bool>
source§fn save(&self, filename: &str) -> Result<()>
fn save(&self, filename: &str) -> Result<()>
source§fn get_default_name(&self) -> Result<String>
fn get_default_name(&self) -> Result<String>
source§impl Boxed for DISOpticalFlow
impl Boxed for DISOpticalFlow
source§unsafe fn from_raw(
ptr: <DISOpticalFlow as OpenCVFromExtern>::ExternReceive
) -> Self
unsafe fn from_raw( ptr: <DISOpticalFlow as OpenCVFromExtern>::ExternReceive ) -> Self
source§fn into_raw(
self
) -> <DISOpticalFlow as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw( self ) -> <DISOpticalFlow as OpenCVTypeExternContainer>::ExternSendMut
source§fn as_raw(&self) -> <DISOpticalFlow as OpenCVTypeExternContainer>::ExternSend
fn as_raw(&self) -> <DISOpticalFlow as OpenCVTypeExternContainer>::ExternSend
source§fn as_raw_mut(
&mut self
) -> <DISOpticalFlow as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut( &mut self ) -> <DISOpticalFlow as OpenCVTypeExternContainer>::ExternSendMut
source§impl DISOpticalFlowTrait for DISOpticalFlow
impl DISOpticalFlowTrait for DISOpticalFlow
fn as_raw_mut_DISOpticalFlow(&mut self) -> *mut c_void
source§fn set_finest_scale(&mut self, val: i32) -> Result<()>
fn set_finest_scale(&mut self, val: i32) -> Result<()>
source§fn set_patch_size(&mut self, val: i32) -> Result<()>
fn set_patch_size(&mut self, val: i32) -> Result<()>
source§fn set_patch_stride(&mut self, val: i32) -> Result<()>
fn set_patch_stride(&mut self, val: i32) -> Result<()>
source§fn set_gradient_descent_iterations(&mut self, val: i32) -> Result<()>
fn set_gradient_descent_iterations(&mut self, val: i32) -> Result<()>
source§fn set_variational_refinement_iterations(&mut self, val: i32) -> Result<()>
fn set_variational_refinement_iterations(&mut self, val: i32) -> Result<()>
source§fn set_variational_refinement_alpha(&mut self, val: f32) -> Result<()>
fn set_variational_refinement_alpha(&mut self, val: f32) -> Result<()>
source§fn set_variational_refinement_delta(&mut self, val: f32) -> Result<()>
fn set_variational_refinement_delta(&mut self, val: f32) -> Result<()>
source§fn set_variational_refinement_gamma(&mut self, val: f32) -> Result<()>
fn set_variational_refinement_gamma(&mut self, val: f32) -> Result<()>
source§fn set_use_mean_normalization(&mut self, val: bool) -> Result<()>
fn set_use_mean_normalization(&mut self, val: bool) -> Result<()>
source§fn set_use_spatial_propagation(&mut self, val: bool) -> Result<()>
fn set_use_spatial_propagation(&mut self, val: bool) -> Result<()>
source§impl DISOpticalFlowTraitConst for DISOpticalFlow
impl DISOpticalFlowTraitConst for DISOpticalFlow
fn as_raw_DISOpticalFlow(&self) -> *const c_void
source§fn get_finest_scale(&self) -> Result<i32>
fn get_finest_scale(&self) -> Result<i32>
source§fn get_patch_size(&self) -> Result<i32>
fn get_patch_size(&self) -> Result<i32>
source§fn get_patch_stride(&self) -> Result<i32>
fn get_patch_stride(&self) -> Result<i32>
source§fn get_gradient_descent_iterations(&self) -> Result<i32>
fn get_gradient_descent_iterations(&self) -> Result<i32>
source§fn get_variational_refinement_iterations(&self) -> Result<i32>
fn get_variational_refinement_iterations(&self) -> Result<i32>
source§fn get_variational_refinement_alpha(&self) -> Result<f32>
fn get_variational_refinement_alpha(&self) -> Result<f32>
source§fn get_variational_refinement_delta(&self) -> Result<f32>
fn get_variational_refinement_delta(&self) -> Result<f32>
source§fn get_variational_refinement_gamma(&self) -> Result<f32>
fn get_variational_refinement_gamma(&self) -> Result<f32>
source§fn get_use_mean_normalization(&self) -> Result<bool>
fn get_use_mean_normalization(&self) -> Result<bool>
source§fn get_use_spatial_propagation(&self) -> Result<bool>
fn get_use_spatial_propagation(&self) -> Result<bool>
source§impl Debug for DISOpticalFlow
impl Debug for DISOpticalFlow
source§impl DenseOpticalFlowTrait for DISOpticalFlow
impl DenseOpticalFlowTrait for DISOpticalFlow
fn as_raw_mut_DenseOpticalFlow(&mut self) -> *mut c_void
source§fn calc(
&mut self,
i0: &impl ToInputArray,
i1: &impl ToInputArray,
flow: &mut impl ToInputOutputArray
) -> Result<()>
fn calc( &mut self, i0: &impl ToInputArray, i1: &impl ToInputArray, flow: &mut impl ToInputOutputArray ) -> Result<()>
source§fn collect_garbage(&mut self) -> Result<()>
fn collect_garbage(&mut self) -> Result<()>
source§impl DenseOpticalFlowTraitConst for DISOpticalFlow
impl DenseOpticalFlowTraitConst for DISOpticalFlow
fn as_raw_DenseOpticalFlow(&self) -> *const c_void
source§impl Drop for DISOpticalFlow
impl Drop for DISOpticalFlow
source§impl From<DISOpticalFlow> for Algorithm
impl From<DISOpticalFlow> for Algorithm
source§fn from(s: DISOpticalFlow) -> Self
fn from(s: DISOpticalFlow) -> Self
source§impl From<DISOpticalFlow> for DenseOpticalFlow
impl From<DISOpticalFlow> for DenseOpticalFlow
source§fn from(s: DISOpticalFlow) -> Self
fn from(s: DISOpticalFlow) -> Self
source§impl TryFrom<DenseOpticalFlow> for DISOpticalFlow
impl TryFrom<DenseOpticalFlow> for DISOpticalFlow
impl Send for DISOpticalFlow
Auto Trait Implementations§
impl Freeze for DISOpticalFlow
impl RefUnwindSafe for DISOpticalFlow
impl !Sync for DISOpticalFlow
impl Unpin for DISOpticalFlow
impl UnwindSafe for DISOpticalFlow
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res
) -> Res
unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res ) -> Res
Mat
or another similar object. By passing
a mutable reference to the Mat
to this function your closure will get called with the read reference and a write references
to the same Mat
. This is of course unsafe as it breaks the Rust aliasing rules, but it might be useful for some performance
sensitive operations. One example of an OpenCV function that allows such in-place modification is imgproc::threshold
. Read more