[][src]Function opencv::cudastereo::create_stereo_bm

pub fn create_stereo_bm(
    num_disparities: i32,
    block_size: i32
) -> Result<Ptr<dyn CUDA_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.

C++ default parameters

  • num_disparities: 64
  • block_size: 19