[−][src]Trait opencv::calib3d::StereoBM
Class for computing stereo correspondence using the block matching algorithm, introduced and contributed to OpenCV by K. Konolige.
Required methods
fn as_raw_StereoBM(&self) -> *mut c_void
Provided methods
fn get_pre_filter_type(&self) -> Result<i32>
fn set_pre_filter_type(&mut self, pre_filter_type: i32) -> Result<()>
fn get_pre_filter_size(&self) -> Result<i32>
fn set_pre_filter_size(&mut self, pre_filter_size: i32) -> Result<()>
fn get_pre_filter_cap(&self) -> Result<i32>
fn set_pre_filter_cap(&mut self, pre_filter_cap: i32) -> Result<()>
fn get_texture_threshold(&self) -> Result<i32>
fn set_texture_threshold(&mut self, texture_threshold: i32) -> Result<()>
fn get_uniqueness_ratio(&self) -> Result<i32>
fn set_uniqueness_ratio(&mut self, uniqueness_ratio: i32) -> Result<()>
fn get_smaller_block_size(&self) -> Result<i32>
fn set_smaller_block_size(&mut self, block_size: i32) -> Result<()>
fn get_roi1(&self) -> Result<Rect>
fn set_roi1(&mut self, roi1: Rect) -> Result<()>
fn get_roi2(&self) -> Result<Rect>
fn set_roi2(&mut self, roi2: Rect) -> Result<()>
Methods
impl<'_> dyn StereoBM + '_
[src]
pub fn create(num_disparities: i32, block_size: i32) -> Result<PtrOfStereoBM>
[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