This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------ | |
# CALCULATE DISPARITY (DEPTH MAP) | |
# Adapted from: https://github.com/opencv/opencv/blob/master/samples/python/stereo_match.py | |
# and: https://docs.opencv.org/master/dd/d53/tutorial_py_depthmap.html | |
# StereoSGBM Parameter explanations: | |
# https://docs.opencv.org/4.5.0/d2/d85/classcv_1_1StereoSGBM.html | |
# Matched block size. It must be an odd number >=1 . Normally, it should be somewhere in the 3..11 range. | |
block_size = 11 |