pub trait StereoMatcher: AlgorithmTrait + StereoMatcherConst {
    // Required method
    fn as_raw_mut_StereoMatcher(&mut self) -> *mut c_void;

    // Provided methods
    fn compute(
        &mut self,
        left: &dyn ToInputArray,
        right: &dyn ToInputArray,
        disparity: &mut dyn ToOutputArray
    ) -> Result<()> { ... }
    fn set_min_disparity(&mut self, min_disparity: i32) -> Result<()> { ... }
    fn set_num_disparities(&mut self, num_disparities: i32) -> Result<()> { ... }
    fn set_block_size(&mut self, block_size: i32) -> Result<()> { ... }
    fn set_speckle_window_size(
        &mut self,
        speckle_window_size: i32
    ) -> Result<()> { ... }
    fn set_speckle_range(&mut self, speckle_range: i32) -> Result<()> { ... }
    fn set_disp12_max_diff(&mut self, disp12_max_diff: i32) -> Result<()> { ... }
}
Expand description

The base class for stereo correspondence algorithms.

Required Methods§

Provided Methods§

source

fn compute( &mut self, left: &dyn ToInputArray, right: &dyn ToInputArray, disparity: &mut dyn ToOutputArray ) -> Result<()>

Computes disparity map for the specified stereo pair

Parameters
  • left: Left 8-bit single-channel image.
  • right: Right image of the same size and the same type as the left one.
  • disparity: Output disparity map. It has the same size as the input images. Some algorithms, like StereoBM or StereoSGBM compute 16-bit fixed-point disparity map (where each disparity value has 4 fractional bits), whereas other algorithms output 32-bit floating-point disparity map.
source

fn set_min_disparity(&mut self, min_disparity: i32) -> Result<()>

source

fn set_num_disparities(&mut self, num_disparities: i32) -> Result<()>

source

fn set_block_size(&mut self, block_size: i32) -> Result<()>

source

fn set_speckle_window_size(&mut self, speckle_window_size: i32) -> Result<()>

source

fn set_speckle_range(&mut self, speckle_range: i32) -> Result<()>

source

fn set_disp12_max_diff(&mut self, disp12_max_diff: i32) -> Result<()>

Implementors§