Trait opencv::calib3d::StereoBM [−][src]
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) -> *const c_void
[src]
fn as_raw_mut_StereoBM(&mut self) -> *mut c_void
[src]
Provided methods
fn get_pre_filter_type(&self) -> Result<i32>
[src]
fn set_pre_filter_type(&mut self, pre_filter_type: i32) -> Result<()>
[src]
fn get_pre_filter_size(&self) -> Result<i32>
[src]
fn set_pre_filter_size(&mut self, pre_filter_size: i32) -> Result<()>
[src]
fn get_pre_filter_cap(&self) -> Result<i32>
[src]
fn set_pre_filter_cap(&mut self, pre_filter_cap: i32) -> Result<()>
[src]
fn get_texture_threshold(&self) -> Result<i32>
[src]
fn set_texture_threshold(&mut self, texture_threshold: i32) -> Result<()>
[src]
fn get_uniqueness_ratio(&self) -> Result<i32>
[src]
fn set_uniqueness_ratio(&mut self, uniqueness_ratio: i32) -> Result<()>
[src]
fn get_smaller_block_size(&self) -> Result<i32>
[src]
fn set_smaller_block_size(&mut self, block_size: i32) -> Result<()>
[src]
fn get_roi1(&self) -> Result<Rect>
[src]
fn set_roi1(&mut self, roi1: Rect) -> Result<()>
[src]
fn get_roi2(&self) -> Result<Rect>
[src]
fn set_roi2(&mut self, roi2: Rect) -> Result<()>
[src]
Implementations
impl dyn StereoBM + '_
[src]
pub fn create(
num_disparities: i32,
block_size: i32
) -> Result<Ptr<dyn StereoBM>>
[src]
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