The class also performs pre- and post-filtering steps: Sobel pre-filtering (if PREFILTER_XSOBEL flag is set) and low textureness filtering (if averageTexThreshols>0 ). If avergeTexThreshold=0 , low textureness filtering is disabled. Otherwise, the disparity is set to 0 in each point (x,y) , where for the left image

This means that the input left image is low textured.

Note

A basic stereo matching example can be found at opencv_source_code/samples/gpu/stereo_match.cpp

A stereo matching example using several GPU’s can be found at opencv_source_code/samples/gpu/stereo_multi.cpp

A stereo matching example using several GPU’s and driver API can be found at opencv_source_code/samples/gpu/driver_api_stereo_multi.cpp

By default, gpu::StereoBeliefPropagation uses floating-point arithmetics and the CV_32FC1 type for messages. But it can also use fixed-point arithmetics and the CV_16SC1 message type for better performance. To avoid an overflow in this case, the parameters must satisfy the following requirement:

The class implements algorithm described in [Yang2010]. StereoConstantSpaceBP supports both local minimum and global minimum data cost initialization algorithms. For more details, see the paper mentioned above. By default, a local algorithm is used. To enable a global algorithm, set use_local_init_data_cost to false .

By default, StereoConstantSpaceBP uses floating-point arithmetics and the CV_32FC1 type for messages. But it can also use fixed-point arithmetics and the CV_16SC1 message type for better performance. To avoid an overflow in this case, the parameters must satisfy the following requirement:

dst_disp – Output disparity image. It has the same size as src_disp . The type is CV_8UC4 in BGRA format (alpha = 255).

ndisp – Number of disparities.

stream – Stream for the asynchronous version.

This function draws a colored disparity map by converting disparity values from [0..ndisp) interval first to HSV color space (where different disparity values correspond to different hues) and then converting the pixels to RGB for visualization.

xyzw – Output 3- or 4-channel floating-point image of the same size as disp . Each element of xyzw(x,y) contains 3D coordinates (x,y,z) or (x,y,z,1) of the point (x,y) , computed from the disparity map.