Skip to content

Commit 0410775

Browse files
committed
Add rst files to stereo_depth_video
1 parent debb10c commit 0410775

File tree

7 files changed

+62
-3
lines changed

7 files changed

+62
-3
lines changed

docs/source/samples/depth_preview.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@ This example shows how to set the SGBM (semi-global-matching) disparity-depth no
55
over XLink to transfer the results to the host real-time, and displays the depth map in OpenCV.
66
Note that disparity is used in this case, as it colorizes in a more intuitive way.
77
Below is also a preview of using different median filters side-by-side on a depth image.
8+
There are 3 depth modes which you can select inside the code:
9+
#. lr_check: computes disparity with sub-pixel interpolation (5 fractional bits), suitable for long range
10+
#. extended_disparity: mirror rectified frames: true to have disparity/depth normal (non-mirrored)
11+
#. subpixel: suitable for short range objects
812

913
.. rubric:: Similiar samples:
1014

1115
- :ref:`RGB Preview`
1216
- :ref:`Mono Preview`
17+
- :ref:`Stereo Depth Video`
1318

1419
Demo
1520
####

docs/source/samples/stereo_depth_from_host.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
Stereo Depth from host
22
======================
33

4-
This example shows depth map from host using stereo images. There are 3 depth modes which you can select
5-
inside the code: left-right check, extended (for closer distance), subpixel (for longer distance).
4+
This example shows depth map from host using stereo images. There are 3 depth modes which you can select inside the code:
5+
#. lr_check: computes disparity with sub-pixel interpolation (5 fractional bits), suitable for long range
6+
#. extended_disparity: mirror rectified frames: true to have disparity/depth normal (non-mirrored)
7+
#. subpixel: suitable for short range objects
68
Otherwise a median with kernel_7x7 is activated.
79

10+
.. rubric:: Similiar samples:
11+
12+
- :ref:`Stereo Depth Video`
13+
814
Setup
915
#####
1016

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Stereo Depth Video
2+
==================
3+
4+
This example is an upgraded :ref:`Depth Preview`. It has higher resolution (720p), each frame can be shown
5+
(mono left-right, rectified left-right, disparity and depth). There are 6 modes which you can select
6+
inside the code:
7+
#. withDepth: if you turn it off it will became :ref:`Mono Preview`, so it will show only the 2 mono cameras
8+
#. outputDepth: if you turn it on it will show the depth
9+
#. lrcheck: computes disparity with sub-pixel interpolation (5 fractional bits), suitable for long range
10+
#. extended: mirror rectified frames: true to have disparity/depth normal (non-mirrored)
11+
#. subpixel: suitable for short range objects
12+
13+
.. rubric:: Similiar samples:
14+
15+
- :ref:`Depth Preview`
16+
- :ref:`Stereo Depth from host`
17+
18+
Setup
19+
#####
20+
21+
.. include:: /includes/install_from_pypi.rst
22+
23+
Source code
24+
###########
25+
26+
.. tabs::
27+
28+
.. tab:: Python
29+
30+
Also `available on GitHub <https://github.com/luxonis/depthai-python/blob/main/examples/stereo_depth_video.py>`__
31+
32+
.. literalinclude:: ../../../examples/stereo_depth_video.py
33+
:language: python
34+
:linenos:
35+
36+
.. tab:: C++
37+
38+
Also `available on GitHub <https://github.com/luxonis/depthai-core/blob/main/examples/src/stereo_depth_video.cpp>`__
39+
40+
.. literalinclude:: ../../../depthai-core/examples/src/stereo_depth_video.cpp
41+
:language: cpp
42+
:linenos:
43+
44+
.. include:: /includes/footer-short.rst

docs/source/tutorials/code_samples.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Code samples are used for automated testing. They are also a great starting poin
3535
- :ref:`Mono Camera Control` - Demonstrates how to control the mono camera (crop, exposure, sensitivity) from the host
3636
- :ref:`Depth Crop Control` - Demonstrates how to control cropping of depth frames from the host
3737
- :ref:`Stereo Depth from host` - Generates stereo depth frame from a set of mono images from the host
38+
- :ref:`Stereo Depth Video` - An extended version of **Depth Preview**
3839
- :ref:`RGB Rotate Warp` - Demonstrates how to rotate, mirror, flip or perform perspective transform on a frame
3940
- :ref:`RGB Depth` - Displays RGB depth frames
4041
- :ref:`Auto Exposure on ROI` - Demonstrates how to use auto exposure based on the selected ROI

docs/source/tutorials/complex_samples.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Complex
1010
../samples/mono_camera_control.rst
1111
../samples/depth_crop_control.rst
1212
../samples/stereo_depth_from_host.rst
13+
../samples/stereo_depth_video.rst
1314
../samples/rgb_rotate_warp.rst
1415
../samples/rgb_depth_aligned.rst
1516
../samples/autoexposure_roi.rst
@@ -34,6 +35,7 @@ If you want to see more interesting examples you should check out our `Experimen
3435
- :ref:`Mono Camera Control` - Demonstrates how to control the mono camera (crop, exposure, sensitivity) from the host
3536
- :ref:`Depth Crop Control` - Demonstrates how to control cropping of depth frames from the host
3637
- :ref:`Stereo Depth from host` - Generates stereo depth frame from a set of mono images from the host
38+
- :ref:`Stereo Depth Video` - An extended version of **Depth Preview**
3739
- :ref:`RGB Rotate Warp` - Demonstrates how to rotate, mirror, flip or perform perspective transform on a frame
3840
- :ref:`RGB Depth` - Displays RGB depth frames
3941
- :ref:`Auto Exposure on ROI` - Demonstrates how to use auto exposure based on the selected ROI

examples/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,4 @@ add_python_example(object_tracker object_tracker.py)
118118
add_python_example(spatial_object_tracker spatial_object_tracker.py)
119119
add_python_example(object_tracker_video object_tracker_video.py)
120120
add_python_example(stereo_depth_from_host stereo_depth_from_host.py)
121+
add_python_example(stereo_depth_video stereo_depth_video.py)

0 commit comments

Comments
 (0)