Skip to content

Commit f12d5fa

Browse files
committed
Merge branch 'main' into imagemanip-rotating-mono
2 parents 8381592 + c90cebb commit f12d5fa

File tree

66 files changed

+1643
-602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1643
-602
lines changed

cmake/Hunter/config.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Temporary pybind11 2.6.3dev1 chrono bindings patch
1+
# Pybind11 2.7.0
22
hunter_config(
33
pybind11
4-
VERSION "2.6.3dev1"
5-
URL "https://github.com/pybind/pybind11/archive/54430436fee2afc4f8443691075a6208f9ea8eba.tar.gz"
6-
SHA1 "c8550f7d77e92045c996d17f1d214223d1e2e620"
4+
VERSION "2.7.0"
5+
URL "https://github.com/pybind/pybind11/archive/refs/tags/v2.7.0.tar.gz"
6+
SHA1 "3a7010e5952c56e08c8f9b7d6fb458a173fd585a"
77
)

cmake/pybind11-mkdoc.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ function(pybind11_mkdoc_setup_internal target output_path mkdoc_headers enforce)
5656
# Docstring wrap width
5757
-w 80
5858
-o "${output_path}"
59+
# C++ standard
60+
-std=c++14
5961
# List of include directories
6062
"-I$<JOIN:$<TARGET_PROPERTY:${target},INTERFACE_INCLUDE_DIRECTORIES>,;-I>"
6163
# List of compiler definitions

docs/source/components/bootloader.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ or update the bootloader itself.
3636
progressCb parameter takes a callback function, which will be called each time an progress update occurs (rate limited to 1 second). This is mainly
3737
used to inform the user of the current flashing progress.
3838

39+
You can also check the version of the current bootloader by using the :ref:`Bootloader Version` example.
40+
3941
DepthAI Application Package (.dap)
4042
##################################
4143

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
IMUData
2+
=======
3+
4+
IMU data message is created by the :ref:`IMU` node.
5+
6+
Reference
7+
#########
8+
9+
.. tabs::
10+
11+
.. tab:: Python
12+
13+
.. autoclass:: depthai.IMUData
14+
:members:
15+
:inherited-members:
16+
:noindex:
17+
18+
.. tab:: C++
19+
20+
.. doxygenclass:: dai::IMUData
21+
:project: depthai-core
22+
:members:
23+
:private-members:
24+
:undoc-members:
25+
26+
.. include:: ../../includes/footer-short.rst

docs/source/components/nodes/color_camera.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ How to place it
1111
.. code-tab:: py
1212

1313
pipeline = dai.Pipeline()
14-
cam = pipeline.createColorCamera()
14+
cam = pipeline.create(dai.node.ColorCamera)
1515

1616
.. code-tab:: c++
1717

@@ -67,7 +67,7 @@ Usage
6767
.. code-tab:: py
6868

6969
pipeline = dai.Pipeline()
70-
cam = pipeline.createColorCamera()
70+
cam = pipeline.create(dai.node.ColorCamera)
7171
cam.setPreviewSize(300, 300)
7272
cam.setBoardSocket(dai.CameraBoardSocket.RGB)
7373
cam.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
@@ -98,7 +98,7 @@ Reference
9898

9999
.. tab:: Python
100100

101-
.. autoclass:: depthai.ColorCamera
101+
.. autoclass:: depthai.node.ColorCamera
102102
:members:
103103
:inherited-members:
104104
:noindex:

docs/source/components/nodes/edge_detector.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ How to place it
1111
.. code-tab:: py
1212

1313
pipeline = dai.Pipeline()
14-
edgeDetector = pipeline.createEdgeDetector()
14+
edgeDetector = pipeline.create(dai.node.EdgeDetector)
1515

1616
.. code-tab:: c++
1717

@@ -48,7 +48,7 @@ Usage
4848
.. code-tab:: py
4949

5050
pipeline = dai.Pipeline()
51-
edgeDetector = pipeline.createEdgeDetector()
51+
edgeDetector = pipeline.create(dai.node.EdgeDetector)
5252

5353
sobelHorizontalKernel = [[1, 0, -1], [2, 0, -2], [1, 0, -1]]
5454
sobelVerticalKernel = [[1, 2, 1], [0, 0, 0], [-1, -2, -1]]
@@ -75,7 +75,7 @@ Reference
7575

7676
.. tab:: Python
7777

78-
.. autoclass:: depthai.EdgeDetector
78+
.. autoclass:: depthai.node.EdgeDetector
7979
:members:
8080
:inherited-members:
8181
:noindex:

docs/source/components/nodes/image_manip.rst

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ How to place it
1111
.. code-tab:: py
1212

1313
pipeline = dai.Pipeline()
14-
manip = pipeline.createImageManip()
14+
manip = pipeline.create(dai.node.ImageManip)
1515

1616
.. code-tab:: c++
1717

@@ -52,7 +52,7 @@ Usage
5252
.. code-tab:: py
5353

5454
pipeline = dai.Pipeline()
55-
manip = pipeline.createImageManip()
55+
manip = pipeline.create(dai.node.ImageManip)
5656

5757
manip.initialConfig.setResize(300, 300)
5858
manip.initialConfig.setFrameType(dai.ImgFrame.Type.BGR888p)
@@ -65,6 +65,22 @@ Usage
6565
manip->initialConfig.setResize(300, 300);
6666
manip->initialConfig.setFrameType(dai::ImgFrame::Type::BGR888p);
6767

68+
Image formats supported
69+
#######################
70+
71+
ImageManip node supports the following image formats:
72+
73+
- for RGB input/output types only :code:`RGB888p` / :code:`BGR888p` (planar, not interleaved)
74+
- :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)
76+
77+
Limitations
78+
###########
79+
80+
Besides limitations mentioned above (unsupported frame formats), there are other limitations:
81+
82+
- Due to HW warp constraint, rotating/warping can be done only on frames whose width values are multiples of 16.
83+
6884
Examples of functionality
6985
#########################
7086

@@ -80,7 +96,7 @@ Reference
8096

8197
.. tab:: Python
8298

83-
.. autoclass:: depthai.ImageManip
99+
.. autoclass:: depthai.node.ImageManip
84100
:members:
85101
:inherited-members:
86102
:noindex:
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
IMU
2+
===
3+
4+
IMU (`intertial measurement unit <https://en.wikipedia.org/wiki/Inertial_measurement_unit>`__) node can be used to receive data from the IMU chip on the device.
5+
Our DepthAI devices use `BNO085 <https://www.ceva-dsp.com/product/bno080-085/>`__ 9-axis sensor (`datasheet here <https://www.ceva-dsp.com/wp-content/uploads/2019/10/BNO080_085-Datasheet.pdf>`__)
6+
that supports sensor fusion on the (IMU) chip itself. The IMU chip is connected to the Myriad X (VPU) over SPI (we have integrated
7+
`this driver <https://github.com/hcrest/bno080-driver>`__ to the DepthAI).
8+
9+
10+
How to place it
11+
###############
12+
13+
.. tabs::
14+
15+
.. code-tab:: py
16+
17+
pipeline = dai.Pipeline()
18+
imu = pipeline.create(dai.node.IMU)
19+
20+
.. code-tab:: c++
21+
22+
dai::Pipeline pipeline;
23+
auto imu = pipeline.create<dai::node::IMU>();
24+
25+
26+
Inputs and Outputs
27+
##################
28+
29+
.. code-block::
30+
31+
┌──────────────┐
32+
│ │
33+
│ │ out
34+
│ IMU ├─────────►
35+
│ │
36+
│ │
37+
└──────────────┘
38+
39+
**Message types**
40+
41+
- :code:`out` - :ref:`IMUData`
42+
43+
Maximum frequencies
44+
###################
45+
46+
Maximum output frequencies are 500 Hz raw accelerometer, 1000 Hz raw gyroscope values individually, and 500 Hz combined (synced) output.
47+
You can obtain the combined (synced) 500 Hz output with :code:`imu.enableIMUSensor([dai.IMUSensor.RAW_ACCELEROMETER, dai.IMUSensor.RAW_GYROSCOPE], 500)`.
48+
49+
Usage
50+
#####
51+
52+
.. tabs::
53+
54+
.. code-tab:: py
55+
56+
pipeline = dai.Pipeline()
57+
imu = pipeline.create(dai.node.IMU)
58+
59+
# enable RAW_ACCELEROMETER and RAW_GYROSCOPE at 100 hz rate
60+
imu.enableIMUSensor([dai.IMUSensor.RAW_ACCELEROMETER, dai.IMUSensor.RAW_GYROSCOPE], 100)
61+
# above this threshold packets will be sent in batch of X, if the host is not blocked and USB bandwidth is available
62+
imu.setBatchReportThreshold(1)
63+
# maximum number of IMU packets in a batch, if it's reached device will block sending until host can receive it
64+
# if lower or equal to batchReportThreshold then the sending is always blocking on device
65+
# useful to reduce device's CPU load and number of lost packets, if CPU load is high on device side due to multiple nodes
66+
imu.setMaxBatchReports(10)
67+
68+
.. code-tab:: c++
69+
70+
dai::Pipeline pipeline;
71+
auto imu = pipeline.create<dai::node::IMU>();
72+
73+
// enable RAW_ACCELEROMETER and RAW_GYROSCOPE at 100 hz rate
74+
imu->enableIMUSensor({dai::IMUSensor::RAW_ACCELEROMETER, dai::IMUSensor::RAW_GYROSCOPE}, 100);
75+
// above this threshold packets will be sent in batch of X, if the host is not blocked and USB bandwidth is available
76+
imu->setBatchReportThreshold(1);
77+
// maximum number of IMU packets in a batch, if it's reached device will block sending until host can receive it
78+
// if lower or equal to batchReportThreshold then the sending is always blocking on device
79+
// useful to reduce device's CPU load and number of lost packets, if CPU load is high on device side due to multiple nodes
80+
imu->setMaxBatchReports(10);
81+
82+
83+
IMU sensors
84+
###########
85+
86+
When enabling the IMU sensors (:code:`imu.enableIMUSensor()`), you can select between the following sensors:
87+
88+
- :code:`ACCELEROMETER_RAW`
89+
- :code:`ACCELEROMETER`
90+
- :code:`LINEAR_ACCELERATION`
91+
- :code:`GRAVITY`
92+
- :code:`GYROSCOPE_RAW`
93+
- :code:`GYROSCOPE_CALIBRATED`
94+
- :code:`GYROSCOPE_UNCALIBRATED`
95+
- :code:`MAGNETOMETER_RAW`
96+
- :code:`MAGNETOMETER_CALIBRATED`
97+
- :code:`MAGNETOMETER_UNCALIBRATED`
98+
- :code:`ROTATION_VECTOR`
99+
- :code:`GAME_ROTATION_VECTOR`
100+
- :code:`GEOMAGNETIC_ROTATION_VECTOR`
101+
- :code:`ARVR_STABILIZED_ROTATION_VECTOR`
102+
- :code:`ARVR_STABILIZED_GAME_ROTATION_VECTOR`
103+
104+
Here are **descriptions of all sensors**:
105+
106+
.. autoclass:: depthai.IMUSensor
107+
:noindex:
108+
109+
Examples of functionality
110+
#########################
111+
112+
- :ref:`IMU Accelerometer & Gyroscope`
113+
- :ref:`IMU Rotation Vector`
114+
115+
Reference
116+
#########
117+
118+
.. tabs::
119+
120+
.. tab:: Python
121+
122+
.. autoclass:: depthai.node.IMU
123+
:members:
124+
:inherited-members:
125+
:noindex:
126+
127+
.. tab:: C++
128+
129+
.. doxygenclass:: dai::node::IMU
130+
:project: depthai-core
131+
:members:
132+
:private-members:
133+
:undoc-members:
134+
135+
.. include:: ../../includes/footer-short.rst

docs/source/components/nodes/mobilenet_detection_network.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ How to place it
1313
.. code-tab:: py
1414

1515
pipeline = dai.Pipeline()
16-
mobilenetDet = pipeline.createMobileNetDetectionNetwork()
16+
mobilenetDet = pipeline.create(dai.node.MobileNetDetectionNetwork)
1717

1818
.. code-tab:: c++
1919

@@ -50,7 +50,7 @@ Usage
5050
.. code-tab:: py
5151

5252
pipeline = dai.Pipeline()
53-
mobilenetDet = pipeline.createMobileNetDetectionNetwork()
53+
mobilenetDet = pipeline.create(dai.node.MobileNetDetectionNetwork)
5454

5555
mobilenetDet.setConfidenceThreshold(0.5)
5656
mobilenetDet.setBlobPath(nnBlobPath)
@@ -81,7 +81,7 @@ Reference
8181

8282
.. tab:: Python
8383

84-
.. autoclass:: depthai.MobileNetDetectionNetwork
84+
.. autoclass:: depthai.node.MobileNetDetectionNetwork
8585
:members:
8686
:inherited-members:
8787
:noindex:

0 commit comments

Comments
 (0)