[][src]Trait opencv::calib3d::prelude::StereoBM

pub trait StereoBM: StereoMatcher {
    pub fn as_raw_StereoBM(&self) -> *const c_void;
pub fn as_raw_mut_StereoBM(&mut self) -> *mut c_void; pub fn get_pre_filter_type(&self) -> Result<i32> { ... }
pub fn set_pre_filter_type(&mut self, pre_filter_type: i32) -> Result<()> { ... }
pub fn get_pre_filter_size(&self) -> Result<i32> { ... }
pub fn set_pre_filter_size(&mut self, pre_filter_size: i32) -> Result<()> { ... }
pub fn get_pre_filter_cap(&self) -> Result<i32> { ... }
pub fn set_pre_filter_cap(&mut self, pre_filter_cap: i32) -> Result<()> { ... }
pub fn get_texture_threshold(&self) -> Result<i32> { ... }
pub fn set_texture_threshold(
        &mut self,
        texture_threshold: i32
    ) -> Result<()> { ... }
pub fn get_uniqueness_ratio(&self) -> Result<i32> { ... }
pub fn set_uniqueness_ratio(&mut self, uniqueness_ratio: i32) -> Result<()> { ... }
pub fn get_smaller_block_size(&self) -> Result<i32> { ... }
pub fn set_smaller_block_size(&mut self, block_size: i32) -> Result<()> { ... }
pub fn get_roi1(&self) -> Result<Rect> { ... }
pub fn set_roi1(&mut self, roi1: Rect) -> Result<()> { ... }
pub fn get_roi2(&self) -> Result<Rect> { ... }
pub fn set_roi2(&mut self, roi2: Rect) -> Result<()> { ... } }

Class for computing stereo correspondence using the block matching algorithm, introduced and contributed to OpenCV by K. Konolige.

Required methods

Loading content...

Provided methods

pub fn get_pre_filter_type(&self) -> Result<i32>[src]

pub fn set_pre_filter_type(&mut self, pre_filter_type: i32) -> Result<()>[src]

pub fn get_pre_filter_size(&self) -> Result<i32>[src]

pub fn set_pre_filter_size(&mut self, pre_filter_size: i32) -> Result<()>[src]

pub fn get_pre_filter_cap(&self) -> Result<i32>[src]

pub fn set_pre_filter_cap(&mut self, pre_filter_cap: i32) -> Result<()>[src]

pub fn get_texture_threshold(&self) -> Result<i32>[src]

pub fn set_texture_threshold(&mut self, texture_threshold: i32) -> Result<()>[src]

pub fn get_uniqueness_ratio(&self) -> Result<i32>[src]

pub fn set_uniqueness_ratio(&mut self, uniqueness_ratio: i32) -> Result<()>[src]

pub fn get_smaller_block_size(&self) -> Result<i32>[src]

pub fn set_smaller_block_size(&mut self, block_size: i32) -> Result<()>[src]

pub fn get_roi1(&self) -> Result<Rect>[src]

pub fn set_roi1(&mut self, roi1: Rect) -> Result<()>[src]

pub fn get_roi2(&self) -> Result<Rect>[src]

pub fn set_roi2(&mut self, roi2: Rect) -> Result<()>[src]

Loading content...

Implementations

impl<'_> dyn StereoBM + '_[src]

pub fn create(
    num_disparities: i32,
    block_size: i32
) -> Result<Ptr<dyn StereoBM>>
[src]

Creates StereoBM object

Parameters

  • numDisparities: the disparity search range. For each pixel algorithm will find the best disparity from 0 (default minimum disparity) to numDisparities. The search range can then be shifted by changing the minimum disparity.
  • blockSize: the linear size of the blocks compared by the algorithm. The size should be odd (as the block is centered at the current pixel). Larger block size implies smoother, though less accurate disparity map. Smaller block size gives more detailed disparity map, but there is higher chance for algorithm to find a wrong correspondence.

The function create StereoBM object. You can then call StereoBM::compute() to compute disparity for a specific stereo pair.

C++ default parameters

  • num_disparities: 0
  • block_size: 21

Implementors

Loading content...