Trait opencv::calib3d::StereoBM

source ·
pub trait StereoBM: StereoBMConst + StereoMatcher {
    // Required method
    fn as_raw_mut_StereoBM(&mut self) -> *mut c_void;

    // Provided methods
    fn set_pre_filter_type(&mut self, pre_filter_type: i32) -> Result<()> { ... }
    fn set_pre_filter_size(&mut self, pre_filter_size: i32) -> Result<()> { ... }
    fn set_pre_filter_cap(&mut self, pre_filter_cap: i32) -> Result<()> { ... }
    fn set_texture_threshold(&mut self, texture_threshold: i32) -> Result<()> { ... }
    fn set_uniqueness_ratio(&mut self, uniqueness_ratio: i32) -> Result<()> { ... }
    fn set_smaller_block_size(&mut self, block_size: i32) -> Result<()> { ... }
    fn set_roi1(&mut self, roi1: Rect) -> Result<()> { ... }
    fn set_roi2(&mut self, roi2: Rect) -> Result<()> { ... }
}
Expand description

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

Required Methods§

Provided Methods§

source

fn set_pre_filter_type(&mut self, pre_filter_type: i32) -> Result<()>

source

fn set_pre_filter_size(&mut self, pre_filter_size: i32) -> Result<()>

source

fn set_pre_filter_cap(&mut self, pre_filter_cap: i32) -> Result<()>

source

fn set_texture_threshold(&mut self, texture_threshold: i32) -> Result<()>

source

fn set_uniqueness_ratio(&mut self, uniqueness_ratio: i32) -> Result<()>

source

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

source

fn set_roi1(&mut self, roi1: Rect) -> Result<()>

source

fn set_roi2(&mut self, roi2: Rect) -> Result<()>

Implementations§

source§

impl dyn StereoBM + '_

source

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

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§