From ee9449c5047ccf129f45bdd93b762dde2424b081 Mon Sep 17 00:00:00 2001 From: Gabriel Nascarella Date: Wed, 3 May 2023 13:19:17 -0300 Subject: [PATCH] Depthmap tutorial: add reference to class documentation and explain parameter usage --- doc/py_tutorials/py_calib3d/py_depthmap/py_depthmap.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/py_tutorials/py_calib3d/py_depthmap/py_depthmap.markdown b/doc/py_tutorials/py_calib3d/py_depthmap/py_depthmap.markdown index 52d0c5933d..d904c640c3 100644 --- a/doc/py_tutorials/py_calib3d/py_depthmap/py_depthmap.markdown +++ b/doc/py_tutorials/py_calib3d/py_depthmap/py_depthmap.markdown @@ -44,7 +44,7 @@ from matplotlib import pyplot as plt imgL = cv.imread('tsukuba_l.png', cv.IMREAD_GRAYSCALE) imgR = cv.imread('tsukuba_r.png', cv.IMREAD_GRAYSCALE) -stereo = cv.StereoBM_create(numDisparities=16, blockSize=15) +stereo = cv.StereoBM.create(numDisparities=16, blockSize=15) disparity = stereo.compute(imgL,imgR) plt.imshow(disparity,'gray') plt.show() @@ -63,6 +63,9 @@ There are some parameters when you get familiar with StereoBM, and you may need - uniqueness_ratio: Another post-filtering step. If the best matching disparity is not sufficiently better than every other disparity in the search range, the pixel is filtered out. You can try tweaking this if texture_threshold and the speckle filtering are still letting through spurious matches. - prefilter_size and prefilter_cap: The pre-filtering phase, which normalizes image brightness and enhances texture in preparation for block matching. Normally you should not need to adjust these. +These parameters are set with dedicated setters and getters after the algoritm +initialization, such as `setTextureThreshold`, `setSpeckleRange`, `setUniquenessRatio`, +and more. See cv::StereoBM documentation for details. Additional Resources --------------------