You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you click on the image, you will be redirected to the webapp. Some blocks have notes that provide additional technical information.
84
84
85
85
Currently configurable blocks
86
-
*****************************
86
+
-----------------------------
87
87
88
88
.. tabs::
89
89
@@ -165,12 +165,12 @@ Currently configurable blocks
165
165
:no-link:
166
166
167
167
Limitations
168
-
###########
168
+
===========
169
169
170
170
- Median filtering is disabled when subpixel mode is set to 4 or 5 bits.
171
171
172
172
Stereo depth FPS
173
-
################
173
+
================
174
174
175
175
.. list-table::
176
176
:header-rows: 1
@@ -201,7 +201,7 @@ All stereo modes were measured for :code:`depth` output with **5x5 median filter
201
201
to **60 FPS** and for 400P mono cameras were set to **110 FPS**.
202
202
203
203
Usage
204
-
#####
204
+
=====
205
205
206
206
.. tabs::
207
207
@@ -238,15 +238,15 @@ Usage
238
238
right->out.link(stereo->right);
239
239
240
240
Examples of functionality
241
-
#########################
241
+
=========================
242
242
243
243
- :ref:`Depth Preview`
244
244
- :ref:`RGB Depth alignment`
245
245
- :ref:`Mono & MobilenetSSD & Depth`
246
246
- :ref:`RGB & MobilenetSSD with spatial data`
247
247
248
248
Reference
249
-
#########
249
+
=========
250
250
251
251
.. tabs::
252
252
@@ -266,7 +266,7 @@ Reference
266
266
:undoc-members:
267
267
268
268
Disparity
269
-
#########
269
+
=========
270
270
271
271
Disparity refers to the distance between two corresponding points in the left and right image of a stereo pair.
272
272
By looking at the image below, it can be seen that point :code:`X` gets projected to :code:`XL = (u, v)` in the :code:`Left view` and :code:`XR = (p, q)` in the :code:`Right view`.
@@ -290,7 +290,7 @@ For the final disparity map, a filtering is applied based on the confidence thre
290
290
the threshold get invalidated, i.e. their disparity value is set to zero. You can set the confidence threshold with :code:`stereo.initialConfig.setConfidenceThreshold()`.
291
291
292
292
Calculate depth using disparity map
293
-
###################################
293
+
===================================
294
294
295
295
Disparity and depth are inversely related. As disparity decreases, depth increases exponentially depending on baseline and focal length. Meaning, if the disparity value is close to zero, then a small change in disparity generates a large change in depth. Similarly, if the disparity value is big, then large changes in disparity do not lead to a large change in depth.
296
296
@@ -339,7 +339,7 @@ Examples for calculating the depth value, using the OAK-D (7.5cm baseline):
339
339
Note the value of disparity depth data is stored in :code:`uint16`, where 0 is a special value, meaning that distance is unknown.
340
340
341
341
Min stereo depth distance
342
-
#########################
342
+
=========================
343
343
344
344
If the depth results for close-in objects look weird, this is likely because they are below the minimum depth-perception distance of the device.
345
345
@@ -375,8 +375,41 @@ or roughly 35cm.
375
375
376
376
See `these examples <https://github.com/luxonis/depthai-experiments/tree/master/gen2-camera-demo#real-time-depth-from-depthai-stereo-pair>`__ for how to enable Extended Disparity.
377
377
378
+
Disparity shift to lower min depth perception
379
+
---------------------------------------------
380
+
381
+
Another option to perceive closer depth range is to use disparity shift. Disparity shift will shift the starting point
382
+
of the disparity search, which will significantly decrease max depth (MazZ) perception, but it will also decrease min depth (MinZ) perception.
383
+
Disparity shift can be combined with extended/subpixel/LR-check modes.
**Left graph** shows min and max disparity and depth for OAK-D (7.5cm baseline, 800P resolution, ~70° HFOV) by default (disparity shift=0). See :ref:`Calculate depth using disparity map`.
388
+
Since hardware (stereo block) has a fixed 95 pixel disparity search, DepthAI will search from 0 pixels (depth=INF) to 95 pixels (depth=71cm).
389
+
390
+
**Right graph** shows the same, but at disparity shift set to 30 pixels. This means that disparity search will be from 30 pixels (depth=2.2m) to 125 pixels (depth=50cm).
391
+
This also means that depth will be very accurate at the short range (**theoretically** below 5mm depth error).
392
+
393
+
**Limitations**:
394
+
395
+
- Because of the inverse relationship between disparity and depth, MaxZ will decrease much faster than MinZ as the disparity shift is increased. Therefore, it is **advised not to use a larger than necessary disparity shift**.
396
+
- Tradeoff in reducing the MinZ this way is that objects at **distances farther away than MaxZ will not be seen**.
397
+
- Because of the point above, **we only recommend using disparity shift when MaxZ is known**, such as having a depth camera mounted above a table pointing down at the table surface.
398
+
- Output disparity map is not expanded, only the depth map. So if disparity shift is set to 50, and disparity value obtained is 90, the real disparity is 140.
399
+
400
+
**Compared to Extended disparity**, disparity shift:
401
+
402
+
- **(+)** Is faster, as it doesn't require an extra computation, which means there's also no extra latency
403
+
- **(-)** Reduces the MaxZ (significantly), while extended disparity only reduces MinZ.
404
+
405
+
Disparity shift can be combined with extended disparity.
The maximum depth perception distance depends on the :ref:`accuracy of the depth perception <Depth perception accuracy>`. The formula used to calculate this distance is an approximation, but is as follows:
382
415
@@ -397,7 +430,7 @@ So using this formula for existing models the *theoretical* max distance is:
397
430
If greater precision for long range measurements is required, consider enabling Subpixel Disparity or using a larger baseline distance between mono cameras. For a custom baseline, you could consider using `OAK-FFC <https://docs.luxonis.com/projects/hardware/en/latest/pages/DM1090.html>`__ device or design your own baseboard PCB with required baseline. For more information see Subpixel Disparity under the Stereo Mode tab in :ref:`this table <Currently configurable blocks>`.
398
431
399
432
Depth perception accuracy
400
-
#########################
433
+
=========================
401
434
402
435
Disparity depth works by matching features from one image to the other and its accuracy is based on multiple parameters:
403
436
@@ -415,7 +448,7 @@ Lower baseline enables us to detect the depth at a closer distance as long as th
415
448
So the common norm is to adjust the baseline according to how far/close we want to be able to detect objects.
416
449
417
450
Limitation
418
-
##########
451
+
==========
419
452
420
453
Since depth is calculated from disparity, which requires the pixels to overlap, there is inherently a vertical
421
454
band on the left side of the left mono camera and on the right side of the right mono camera, where depth
Because the depth map contains the Z distance, objects in parallel with the camera are measured accurately standard. For objects not in parallel, the Euclidean distance calculation can be used. Please refer to the below:
0 commit comments