pub trait DisparityFilterTrait: AlgorithmTrait + DisparityFilterTraitConst {
// Required method
fn as_raw_mut_DisparityFilter(&mut self) -> *mut c_void;
// Provided methods
fn filter(
&mut self,
disparity_map_left: &impl ToInputArray,
left_view: &impl ToInputArray,
filtered_disparity_map: &mut impl ToOutputArray,
disparity_map_right: &impl ToInputArray,
roi: Rect,
right_view: &impl ToInputArray,
) -> Result<()> { ... }
fn filter_def(
&mut self,
disparity_map_left: &impl ToInputArray,
left_view: &impl ToInputArray,
filtered_disparity_map: &mut impl ToOutputArray,
) -> Result<()> { ... }
}
Expand description
Mutable methods for crate::ximgproc::DisparityFilter
Required Methods§
fn as_raw_mut_DisparityFilter(&mut self) -> *mut c_void
Provided Methods§
Sourcefn filter(
&mut self,
disparity_map_left: &impl ToInputArray,
left_view: &impl ToInputArray,
filtered_disparity_map: &mut impl ToOutputArray,
disparity_map_right: &impl ToInputArray,
roi: Rect,
right_view: &impl ToInputArray,
) -> Result<()>
fn filter( &mut self, disparity_map_left: &impl ToInputArray, left_view: &impl ToInputArray, filtered_disparity_map: &mut impl ToOutputArray, disparity_map_right: &impl ToInputArray, roi: Rect, right_view: &impl ToInputArray, ) -> Result<()>
Apply filtering to the disparity map.
§Parameters
-
disparity_map_left: disparity map of the left view, 1 channel, CV_16S type. Implicitly assumes that disparity values are scaled by 16 (one-pixel disparity corresponds to the value of 16 in the disparity map). Disparity map can have any resolution, it will be automatically resized to fit left_view resolution.
-
left_view: left view of the original stereo-pair to guide the filtering process, 8-bit single-channel or three-channel image.
-
filtered_disparity_map: output disparity map.
-
disparity_map_right: optional argument, some implementations might also use the disparity map of the right view to compute confidence maps, for instance.
-
ROI: region of the disparity map to filter. Optional, usually it should be set automatically.
-
right_view: optional argument, some implementations might also use the right view of the original stereo-pair.
§C++ default parameters
- disparity_map_right: Mat()
- roi: Rect()
- right_view: Mat()
Sourcefn filter_def(
&mut self,
disparity_map_left: &impl ToInputArray,
left_view: &impl ToInputArray,
filtered_disparity_map: &mut impl ToOutputArray,
) -> Result<()>
fn filter_def( &mut self, disparity_map_left: &impl ToInputArray, left_view: &impl ToInputArray, filtered_disparity_map: &mut impl ToOutputArray, ) -> Result<()>
Apply filtering to the disparity map.
§Parameters
-
disparity_map_left: disparity map of the left view, 1 channel, CV_16S type. Implicitly assumes that disparity values are scaled by 16 (one-pixel disparity corresponds to the value of 16 in the disparity map). Disparity map can have any resolution, it will be automatically resized to fit left_view resolution.
-
left_view: left view of the original stereo-pair to guide the filtering process, 8-bit single-channel or three-channel image.
-
filtered_disparity_map: output disparity map.
-
disparity_map_right: optional argument, some implementations might also use the disparity map of the right view to compute confidence maps, for instance.
-
ROI: region of the disparity map to filter. Optional, usually it should be set automatically.
-
right_view: optional argument, some implementations might also use the right view of the original stereo-pair.
§Note
This alternative version of DisparityFilterTrait::filter function uses the following default values for its arguments:
- disparity_map_right: Mat()
- roi: Rect()
- right_view: Mat()
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.