Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between cv2.StereoSGBM_create() and cv2.StereoBM_create() functions for disparity mapping on opencv3?

I am trying to understand the disparity mapping functions of opencv I came across two methods cv2.StereoSGBM_create and cv2.StereoBM_create I don't quite understand the difference.

Also, what are the properties of the functions such as numDisparities or setSpeckleRange etc

like image 234
BigZee Avatar asked Aug 09 '18 02:08

BigZee


People also ask

What is stereobm object in OpenCV?

Class for computing stereo correspondence using the block matching algorithm, introduced and contributed to OpenCV by K. Konolige. Creates StereoBM object. the disparity search range. For each pixel algorithm will find the best disparity from 0 (default minimum disparity) to numDisparities.

What is the difference between CVV and CVV2?

What is the difference between CVV and CVV2? Practically speaking, for merchants and consumers, there is no difference between CVV1 and CVV2. Technically, the CVV1 code is embedded in the magnetic stripe in the back of a payment card, and the CVV2 is the visible code on the card.

What is the difference between CV2 resize() and imutils resize()?

What is the difference between cv2.resize () and imutils.resize () imutils.resize () evaluate width only but not height. Imutils never used height all times. While OpenCV used both width and height or either height or width. Here is imutils.py:

How does CV::stereosgbm work?

Inheritance diagram for cv::StereoSGBM: Computes disparity map for the specified stereo pair. More... Clears the algorithm state. More... Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More... Reads algorithm parameters from a file storage.


1 Answers

The definitions of all the arguments are given at the bottom of the documentation page here

In block matching or cv2.StereoBM_create() the disparity is computed by comparing the sum of absolute differences (SAD) of each 'block' of pixels. In semi-global block matching or cv2.StereoSGBM_create() forces similar disparity on neighbouring blocks. This creates a more complete disparity map but is more computationally expensive.

Paper that discusses 'block matching'

Paper that discusses 'semi-global block matching'

like image 129
PyWalker2797 Avatar answered Oct 02 '22 09:10

PyWalker2797