Skip to content

Commit 9623e6a

Browse files
authored
Merge pull request #493 from luxonis/depth_docs
Added some clarifications to depth docs
2 parents df0e2fc + dfe9f1f commit 9623e6a

File tree

14 files changed

+48
-43
lines changed

14 files changed

+48
-43
lines changed

docs/source/components/nodes/image_manip.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ImageManip node supports the following image formats:
7272

7373
- for RGB input/output types only :code:`RGB888p` / :code:`BGR888p` (planar, not interleaved)
7474
- :code:`RAW16` input, but can only for cropping (use-case: depth map), outputting same format
75-
- can output :code:`GRAY8` (either as single plane, or 3-plane RGB as set with setFrameType()), but only from these inputs: :code:`RAW8, :code:`GRAY8`, :code:`YUV420p` (:ref:`ColorCamera` isp), :code:`NV12` (:ref:`ColorCamera` video / still)
75+
- can output :code:`GRAY8` (either as single plane, or 3-plane RGB as set with setFrameType()), but only from these inputs: :code:`RAW8`, :code:`GRAY8`, :code:`YUV420p` (:ref:`ColorCamera` isp), :code:`NV12` (:ref:`ColorCamera` video / still)
7676

7777
Limitations
7878
###########

docs/source/components/nodes/neural_network.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ Usage
117117
Examples of functionality
118118
#########################
119119

120+
- :ref:`Multi-Input Frame Concationation`
121+
- :ref:`Frame Normalization`
120122
- `DeeplabV3 experiment <https://github.com/luxonis/depthai-experiments/tree/master/gen2-deeplabv3_depth>`__
121123
- `Age/gender experiment <https://github.com/luxonis/depthai-experiments/blob/master/gen2-age-gender/main.py>`__
122124
- `EfficientDet demo <https://github.com/luxonis/depthai-experiments/blob/master/gen2-efficientDet/main.py>`__

docs/source/components/nodes/stereo_depth.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Inputs and Outputs
3131
│ ├─────────────►
3232
left │ │ syncedLeft
3333
──────────────►│-------------------├─────────────►
34-
│ │ depth
34+
│ │ depth [mm]
3535
│ ├─────────────►
3636
│ StereoDepth │ disparity
3737
│ ├─────────────►
@@ -56,8 +56,8 @@ Inputs and Outputs
5656
- :code:`confidenceMap` - :ref:`ImgFrame`
5757
- :code:`rectifiedLeft` - :ref:`ImgFrame`
5858
- :code:`syncedLeft` - :ref:`ImgFrame`
59-
- :code:`depth` - :ref:`ImgFrame`
60-
- :code:`disparity` - :ref:`ImgFrame`
59+
- :code:`depth` - :ref:`ImgFrame`: UINT16 values - depth in millimeters
60+
- :code:`disparity` - :ref:`ImgFrame`: UINT8 or UINT16 if Subpixel mode
6161
- :code:`rectifiedRight` - :ref:`ImgFrame`
6262
- :code:`syncedRight` - :ref:`ImgFrame`
6363
- :code:`outConfig` - :ref:`StereoDepthConfig`
@@ -233,6 +233,7 @@ Examples of functionality
233233
#########################
234234

235235
- :ref:`Depth Preview`
236+
- :ref:`RGB Depth alignment`
236237
- :ref:`Mono & MobilenetSSD & Depth`
237238
- :ref:`RGB & MobilenetSSD with spatial data`
238239

docs/source/samples/StereoDepth/rgb_depth_aligned.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
RGB Depth
2-
=========
1+
RGB Depth alignment
2+
===================
33

4-
This example shows usage of RGB depth. Since our boards has 1 color and 2 mono cameres, therefore
5-
you need 2 mono cameras for the depth map, then you need to align the image from the
6-
color camera on top of that to get RGB depth.
4+
This example shows usage of RGB depth alignment. Since OAK-D has a color and a pair of stereo cameras,
5+
you can align depth map to the color frame on top of that to get RGB depth.
76

87
Demo
98
####
109

10+
.. image:: https://user-images.githubusercontent.com/18037362/151351377-a5752fbe-3b8b-4985-b8d1-d5f8a7d5a868.png
1111

1212
Setup
1313
#####

docs/source/tutorials/code_samples.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ are presented with code.
132132
- :ref:`Depth Preview` - Displays colorized stereo disparity
133133
- :ref:`Stereo Depth from host` - Generates stereo depth frame from a set of mono images from the host
134134
- :ref:`Stereo Depth Video` - An extended version of **Depth Preview**
135-
- :ref:`RGB Depth` - Displays RGB depth frames
135+
- :ref:`RGB Depth alignment` - Displays RGB depth aligned frames
136136

137137
.. rubric:: SystemLogger
138138

examples/SpatialDetection/spatial_location_calculator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
while True:
7575
inDepth = depthQueue.get() # Blocking call, will wait until a new data has arrived
7676

77-
depthFrame = inDepth.getFrame()
77+
depthFrame = inDepth.getFrame() # depthFrame values are in millimeters
78+
7879
depthFrameColor = cv2.normalize(depthFrame, None, 255, 0, cv2.NORM_INF, cv2.CV_8UC1)
7980
depthFrameColor = cv2.equalizeHist(depthFrameColor)
8081
depthFrameColor = cv2.applyColorMap(depthFrameColor, cv2.COLORMAP_HOT)

examples/SpatialDetection/spatial_mobilenet.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@
110110
startTime = current_time
111111

112112
frame = inPreview.getCvFrame()
113-
depthFrame = depth.getFrame()
113+
114+
depthFrame = depth.getFrame() # depthFrame values are in millimeters
114115

115116
depthFrameColor = cv2.normalize(depthFrame, None, 255, 0, cv2.NORM_INF, cv2.CV_8UC1)
116117
depthFrameColor = cv2.equalizeHist(depthFrameColor)

examples/SpatialDetection/spatial_mobilenet_mono.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@
118118

119119
rectifiedRight = inRectified.getCvFrame()
120120

121-
depthFrame = inDepth.getFrame()
121+
depthFrame = inDepth.getFrame() # depthFrame values are in millimeters
122+
122123
depthFrameColor = cv2.normalize(depthFrame, None, 255, 0, cv2.NORM_INF, cv2.CV_8UC1)
123124
depthFrameColor = cv2.equalizeHist(depthFrameColor)
124125
depthFrameColor = cv2.applyColorMap(depthFrameColor, cv2.COLORMAP_HOT)

examples/SpatialDetection/spatial_tiny_yolo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@
132132
depth = depthQueue.get()
133133

134134
frame = inPreview.getCvFrame()
135-
depthFrame = depth.getFrame()
135+
depthFrame = depth.getFrame() # depthFrame values are in millimeters
136+
136137
depthFrameColor = cv2.normalize(depthFrame, None, 255, 0, cv2.NORM_INF, cv2.CV_8UC1)
137138
depthFrameColor = cv2.equalizeHist(depthFrameColor)
138139
depthFrameColor = cv2.applyColorMap(depthFrameColor, cv2.COLORMAP_HOT)

0 commit comments

Comments
 (0)