Skip to content

Commit 0593d4a

Browse files
authored
Merge branch 'main' into remove_gen1_from_docs
2 parents 3c70d5c + 3cbc455 commit 0593d4a

File tree

2 files changed

+77
-26
lines changed

2 files changed

+77
-26
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
StereoDepthConfig
2+
=================
3+
4+
This message is used to configure the :ref:`StereoDepth` node.
5+
With this message you can set filters, confidences, thresholds and mode of the :ref:`StereoDepth` node.
6+
7+
Examples of functionality
8+
#########################
9+
10+
- :ref:`Stereo Depth from host`
11+
12+
Reference
13+
#########
14+
15+
.. tabs::
16+
17+
.. tab:: Python
18+
19+
.. autoclass:: depthai.StereoDepthConfig
20+
:members:
21+
:inherited-members:
22+
:noindex:
23+
24+
.. tab:: C++
25+
26+
.. doxygenclass:: dai::StereoDepthConfig
27+
:project: depthai-core
28+
:members:
29+
:private-members:
30+
:undoc-members:
31+
32+
.. include:: ../../includes/footer-short.rst

docs/source/components/nodes/stereo_depth.rst

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,50 @@ Inputs and Outputs
2525
.. code-block::
2626
2727
┌───────────────────┐
28+
│ │ confidenceMap
29+
│ ├─────────────►
2830
│ │rectifiedLeft
2931
│ ├─────────────►
3032
left │ │ syncedLeft
31-
──────────────►│ ├─────────────►
33+
──────────────►│-------------------├─────────────►
3234
│ │ depth
3335
│ ├─────────────►
3436
│ StereoDepth │ disparity
3537
│ ├─────────────►
36-
right │ │rectifiedRight
37-
──────────────►│ ├─────────────►
38-
│ │ syncedRight
38+
right │ │ syncedRight
39+
──────────────►│-------------------├─────────────►
40+
│ │rectifiedRight
3941
│ ├─────────────►
42+
inputConfig │ | outConfig
43+
──────────────►│-------------------├─────────────►
4044
└───────────────────┘
4145
42-
**Message types**
46+
.. tabs::
47+
48+
.. tab:: **Inputs**
49+
50+
- :code:`left` - :ref:`ImgFrame` from the left :ref:`MonoCamera`
51+
- :code:`right` - :ref:`ImgFrame` from the right :ref:`MonoCamera`
52+
- :code:`inputConfig` - :ref:`StereoDepthConfig`
53+
54+
.. tab:: **Outputs**
55+
56+
- :code:`confidenceMap` - :ref:`ImgFrame`
57+
- :code:`rectifiedLeft` - :ref:`ImgFrame`
58+
- :code:`syncedLeft` - :ref:`ImgFrame`
59+
- :code:`depth` - :ref:`ImgFrame`
60+
- :code:`disparity` - :ref:`ImgFrame`
61+
- :code:`rectifiedRight` - :ref:`ImgFrame`
62+
- :code:`syncedRight` - :ref:`ImgFrame`
63+
- :code:`outConfig` - :ref:`StereoDepthConfig`
4364

44-
- :code:`left` - :ref:`ImgFrame` from the left :ref:`MonoCamera`
45-
- :code:`right` - :ref:`ImgFrame` from the right :ref:`MonoCamera`
46-
- :code:`rectifiedLeft` - :ref:`ImgFrame`
47-
- :code:`syncedLeft` - :ref:`ImgFrame`
48-
- :code:`depth` - :ref:`ImgFrame`
49-
- :code:`disparity` - :ref:`ImgFrame`
50-
- :code:`rectifiedRight` - :ref:`ImgFrame`
51-
- :code:`syncedRight` - :ref:`ImgFrame`
65+
.. tab:: **Debug outputs**
66+
67+
- :code:`debugDispLrCheckIt1` - :ref:`ImgFrame`
68+
- :code:`debugDispLrCheckIt2` - :ref:`ImgFrame`
69+
- :code:`debugExtDispLrCheckIt1` - :ref:`ImgFrame`
70+
- :code:`debugExtDispLrCheckIt2` - :ref:`ImgFrame`
71+
- :code:`debugDispCostDump` - :ref:`ImgFrame`
5272

5373
Internal block diagram of StereoDepth node
5474
##########################################
@@ -73,32 +93,36 @@ Currently configurable blocks
7393

7494
.. tab:: Left-Right Check
7595

76-
Left-Right Check or LR-Check is used to remove incorrectly calculated disparity pixels due to occlusions at object borders (Left and Right camera views
96+
**Left-Right Check** or LR-Check is used to remove incorrectly calculated disparity pixels due to occlusions at object borders (Left and Right camera views
7797
are slightly different).
7898

7999
#. Computes disparity by matching in R->L direction
80100
#. Computes disparity by matching in L->R direction
81101
#. Combines results from 1 and 2, running on Shave: each pixel d = disparity_LR(x,y) is compared with disparity_RL(x-d,y). If the difference is above a threshold, the pixel at (x,y) in the final disparity map is invalidated.
82102

103+
You can use :code:`debugDispLrCheckIt1` and :code:`debugDispLrCheckIt2` debug outputs for debugging/fine-tuning purposes.
104+
83105
.. tab:: Extended Disparity
84106

85-
The :code:`extended disparity` allows detecting closer distance objects for the given baseline. This increases the maximum disparity search from 96 to 191, meaning the range is now: **[0..190]**.
107+
**Extended disparity mode** allows detecting closer distance objects for the given baseline. This increases the maximum disparity search from 96 to 191, meaning the range is now: **[0..190]**.
86108
So this cuts the minimum perceivable distance in half, given that the minimum distance is now :code:`focal_length * base_line_dist / 190` instead
87109
of :code:`focal_length * base_line_dist / 95`.
88110

89111
#. Computes disparity on the original size images (e.g. 1280x720)
90112
#. Computes disparity on 2x downscaled images (e.g. 640x360)
91113
#. Combines the two level disparities on Shave, effectively covering a total disparity range of 191 pixels (in relation to the original resolution).
92114

115+
You can use :code:`debugExtDispLrCheckIt1` and :code:`debugExtDispLrCheckIt2` debug outputs for debugging/fine-tuning purposes.
116+
93117
.. tab:: Subpixel Disparity
94118

95-
Subpixel improves the precision and is especially useful for long range measurements. It also helps for better estimating surface normals.
119+
**Subpixel mode** improves the precision and is especially useful for long range measurements. It also helps for better estimating surface normals.
96120

97121
Besides the integer disparity output, the Stereo engine is programmed to dump to memory the cost volume, that is 96 levels (disparities) per pixel,
98-
then software interpolation is done on Shave, resulting a final disparity with 5 fractional bits, resulting in significantly more granular depth
99-
steps (32 additional steps between the integer-pixel depth steps), and also theoretically, longer-distance depth viewing - as the maximum depth
100-
is no longer limited by a feature being a full integer pixel-step apart, but rather 1/32 of a pixel. In this mode, stereo cameras perform: :code:`96 depth steps * 32 subpixel depth steps = 3,072 depth steps.`
101-
Note that Subpixel and Extended Disparity are not yet supported simultaneously (which would result in :code:`191 * 32 = 6,112 depth steps`), but should be available in the near future (`Pull Request <https://github.com/luxonis/depthai-python/pull/347>`__).
122+
then software interpolation is done on Shave, resulting a final disparity with 3 fractional bits, resulting in significantly more granular depth
123+
steps (8 additional steps between the integer-pixel depth steps), and also theoretically, longer-distance depth viewing - as the maximum depth
124+
is no longer limited by a feature being a full integer pixel-step apart, but rather 1/8 of a pixel. In this mode, stereo cameras perform: :code:`94 depth steps * 8 subpixel depth steps + 2 (min/max values) = 754 depth steps`
125+
Note that Subpixel and Extended Disparity are not yet supported simultaneously.
102126

103127
For comparison of normal disparity vs. subpixel disparity images, click `here <https://github.com/luxonis/depthai/issues/184>`__.
104128

@@ -138,12 +162,7 @@ Currently configurable blocks
138162
Current limitations
139163
###################
140164

141-
If one or more of the additional depth modes (:code:`lrcheck`, :code:`extended`, :code:`subpixel`) are enabled, then:
142-
143-
- median filtering is disabled on device
144-
- with subpixel, if both :code:`depth` and :code:`disparity` are used, only :code:`depth` will have valid output
145-
146-
Otherwise, :code:`depth` output is **U16** (in millimeters) and median is functional.
165+
- Median filtering is disabled when subpixel mode is set to 4 or 5 bits.
147166

148167
Stereo depth FPS
149168
################

0 commit comments

Comments
 (0)