Binocular Stereo Vision ======================= `Stereo Vision `_ `Binocular Vision `_ "`Epipolar geometry `_ is the geometry of `stereo vision `_" (cited from Wikipedia), which can be briefly illustrated as the following picture (cited from Wikipedia): .. image:: ../resource/chapter3/images/Epipolar_geometry.jpg :align: center :target: https://upload.wikimedia.org/wikipedia/commons/1/14/Epipolar_geometry.svg :alt: Epipolar Geometry How to calculate depth map from binocular cameras has been widely and thoroughly discussed in various materials. For instance: - `Intel's The basics of stereo depth vision `_ - `OpenCV's Official documentation Depth Map from Stereo Images `_ - etc. Here, we only provides the following two example code to calculate the disparity image from a single pair of left and right images. `Activity10.01.py <../Activity10.01/Activity10.01.py>`_ shows the classical stereo vision **block matching** algorithm, which is heavily cited from `https://github.com/opencv/opencv/issues/9783 `_. **XXXXXXXXXX** shows the classical stereo vision **semi-global block matching** algorithm, which is heavily cited from `http://timosam.com/python_opencv_depthimage `_. Our experiments are carried out on a single image pair as follows: .. list-table:: :align: center * - .. image:: ../resource/chapter3/images/stereo/aloeL.jpg :align: center :target: ../resource/chapter3/images/stereo/aloeL.jpg :alt: Left Image - .. image:: ../resource/chapter3/images/stereo/aloeR.jpg :align: center :target: ../resource/chapter3/images/stereo/aloeR.jpg :alt: Right Image * - .. image:: ../resource/chapter3/images/stereo/disparity_BM.png :align: center :target: ../resource/chapter3/images/stereo/disparity_BM.png :alt: Disparity of Stereo_BM - .. image:: ../resource/chapter3/images/stereo/disparity_SGBM.png :align: center :target: ../resource/chapter3/images/stereo/disparity_SGBM.png :alt: Disparity of Stereo_SGBM I'm still waiting for my econ-system binocular camera `STEEReoCAM `_ for the live stereo vision test.