Depth Preview ============= This example shows how to set the SGBM (semi-global-matching) disparity-depth node, connects over XLink to transfer the results to the host real-time, and displays the depth map in OpenCV. Note that disparity is used in this case, as it colorizes in a more intuitive way. Below is also a preview of using different median filters side-by-side on a depth image. There are 3 depth modes which you can select inside the code: #. `lr_check`: used for better occlusion handling. For more information `click here `__ #. `extended_disparity`: suitable for short range objects. For more information `click here `__ #. `subpixel`: suitable for long range. For more information `click here `__ .. rubric:: Similar samples: - :ref:`RGB Preview` - :ref:`Mono Preview` - :ref:`Stereo Depth Video` Demo #### .. raw:: html
**Filtering depth using median filter** .. raw:: html
Setup ##### .. include:: /includes/install_from_pypi.rst Source code ########### .. tabs:: .. tab:: Python Also `available on GitHub `__ .. literalinclude:: ../../../../examples/StereoDepth/depth_preview.py :language: python :linenos: .. tab:: C++ Also `available on GitHub `__ .. literalinclude:: ../../../../depthai-core/examples/StereoDepth/depth_preview.cpp :language: cpp :linenos: .. include:: /includes/footer-short.rst