Skip to content

Commit

Permalink
Merge pull request #895 from luxonis/latency_update
Browse files Browse the repository at this point in the history
Update low latency docs, added usb comparisons
  • Loading branch information
Erol444 authored Oct 2, 2023
2 parents 125cbfe + a4c0d1a commit 12f1a79
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions docs/source/tutorials/low-latency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Low Latency
These tables show what performance you can expect from **USB 3.2** Gen 1 (5 Gbps) connection with an OAK camera. XLink chunking was
disabled for these tests (:code:`pipeline.setXLinkChunkSize(0)`). For an example code, see :ref:`Latency measurement`.

.. list-table::
.. list-table:: USB 5gbps latency
:header-rows: 1

* - What
- Resolution
- FPS
- FPS set
- Time-to-Host [ms]
- Latency [ms]
- Bandwidth
- Histogram
* - Color (isp)
Expand All @@ -28,6 +28,13 @@ disabled for these tests (:code:`pipeline.setXLinkChunkSize(0)`). For an example
- 150
- 2.8 Gbps
- `link <https://user-images.githubusercontent.com/18037362/162675403-f3c5a4c3-1f7d-4acc-a5d5-f5aecff5a66a.png>`__
* - Color (isp)
- 4K
- 26
- 26
- 83 (Std: 3.6)
- 2.6 Gbps
- /
* - Mono
- 720P/800P
- 120
Expand All @@ -43,9 +50,9 @@ disabled for these tests (:code:`pipeline.setXLinkChunkSize(0)`). For an example
- 246 Mbps
- `link <https://user-images.githubusercontent.com/18037362/162675393-e3fb08fb-0f17-49d0-85d0-31ae7b5af0f9.png>`__

Below are the same tests, but with **OAK PoE** camera, which uses Gigabit ethernet link. The camera was connected directly to the computer,
Below are the same tests, but also with **OAK PoE** camera, which uses Gigabit ethernet link. The camera was connected directly to the computer,
without any switches or routers in between. Power was supplied via M8 connector. `oak_bandwidth_test.py <https://github.com/luxonis/depthai-experiments/tree/master/random-scripts#oak-bandwidth-test>`__ results: 797 mbps downlink, 264 mbps uplink.
`oak_latency_test.py <https://github.com/luxonis/depthai-experiments/tree/master/random-scripts#oak-latency-test>`__ results: Average: 5.2 ms, Std: 6.2
`oak_latency_test.py <https://github.com/luxonis/depthai-experiments/tree/master/random-scripts#oak-latency-test>`__ results: Average: 5.2 ms, Std: 6.2.

.. list-table::
:header-rows: 1
Expand All @@ -54,41 +61,49 @@ without any switches or routers in between. Power was supplied via M8 connector.
- Resolution
- FPS
- FPS set
- Time-to-Host [ms]
- PoE Latency [ms]
- USB Latency [ms]
- Bandwidth
* - Color (isp)
- 1080P
- 25
- 25
- 51
- 33 Std: 0.8
- 622 Mbps
* - Color (isp)
- 4K
- 8
- 8
- 148
- 80 Std: 1.2
- 530 Mbps
* - Color (isp)
- 4K
- 8.5
- 10
- 530
- 80 Std: 1.3
- 663 Mbps
* - Mono
- 400P
- 90
- 90
- Avrg: 12 (Std: 5.0)
- 12 Std: 5.0
- 8 Std: 0.47
- 184 Mbps
* - Mono
- 400P
- 110
- 110
- Avrg: 16 (Std: 9.4)
- 16 Std: 9.4
- 8 Std: 0.45
- 225 Mbps

We set lower FPS for the POE measurements due to bandwidth constraints. For example, 4K 8 FPS had 150ms latency, while
4K 10FPS had 530ms latency, as link was saturated.

- **Time-to-Host** is measured time between frame timestamp (:code:`imgFrame.getTimestamp()`) and host timestamp when the frame is received (:code:`dai.Clock.now()`).
- **Latency** is measured time between frame timestamp (:code:`imgFrame.getTimestamp()`) and host timestamp when the frame is received (:code:`dai.Clock.now()`).
- **Histogram** shows how much Time-to-Host varies frame to frame. Y axis represents number of frame that occurred at that time while the X axis represents microseconds.
- **Bandwidth** is calculated bandwidth required to stream specified frames at specified FPS.

Expand Down

0 comments on commit 12f1a79

Please sign in to comment.