Table of Contents

Method Create

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Create(int, int)

Creates StereoBM object. You can then call Compute() to compute disparity for a specific stereo pair.

public static StereoBM Create(int numDisparities = 0, int blockSize = 21)

Parameters

numDisparities int

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 int

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.

Returns

StereoBM

A new StereoBM instance.