Skip to content

Commit 1190d34

Browse files
committed
Updte Filter Configuration Impact in lower_cpu_usage README
1 parent d083947 commit 1190d34

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

examples/lower_cpu_usage/README.MD

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ This document outlines strategies for minimizing CPU usage in the **OrbbecSDK_RO
66

77
To achieve the lowest possible CPU usage in OrbbecSDK_ROS1, it is recommended to configure the following parameters.
88

9-
| Parameter | Recommendation | Note |
10-
| :------------: | :----------------------------------: | :--------------------------------------------: |
11-
| `uvc_backend` | `v4l2` | Lower CPU usage compared to `libuvc` |
12-
| `color_format` | `RGB` | Lower CPU usage than `MJPG` |
9+
| Parameter | Recommendation | Note |
10+
| :--------------: | :------------------------------------: | :--------------------------------------------: |
11+
| `uvc_backend` | `v4l2` | Lower CPU usage compared to `libuvc` |
12+
| `color_format` | `RGB` | Lower CPU usage than `MJPG` |
1313
| `filter` | Only `hardware_noise_removal_filter` | Other filters significantly increase CPU usage |
1414

1515
### Launch Files Used for Testing
@@ -51,35 +51,35 @@ Note: The following CPU usage data focuses on `uvc_backend`, `color_format` and
5151

5252
| libuvc CPU Usage | v4l2 CPU Usage | Absolute Change |
5353
| :--------------: | :------------: | :-------------: |
54-
| 116.0% | 45.7% | -70.3% |
54+
| 116.0% | 45.7% | -70.3% |
5555

5656
The CPU usage can be significantly reduced with v4l2 backend. In our implementation, v4l2 works without requiring any patches to the Linux kernel, allowing users to easily switch between v4l2 and libuvc and maintaining full compatibility with standard Linux distributions.
5757

5858
### 2. `color_format` Comparison (MJPG vs RGB)
5959

6060
| Backend | MJPG CPU Usage | RGB CPU Usage | Absolute Change |
6161
| :-----: | :------------: | :-----------: | :-------------: |
62-
| libuvc | 132.6% | 116.0% | -16.6% |
63-
| v4l2 | 56.0% | 45.7% | -10.3% |
62+
| libuvc | 132.6% | 116.0% | -16.6% |
63+
| v4l2 | 56.0% | 45.7% | -10.3% |
6464

6565
The CPU usage can be reduced if the RGB format is selected instead of MJPG, since the decoding of MJPG image will consume the host CPU resource.
6666

6767
### 3. Filter Configuration Impact
6868

69-
| Filters Applied | libuvc CPU Usage | Change w.r.t benchmark | v4l2 CPU Usage | Change w.r.t benchmark |
70-
| ------------------------------------------------- | ---------------- | ---------------------- | -------------- | ---------------------- |
71-
| No Filter (benchmark) | 116.0% | 0.0%(benchmark) | 45.7% | 0.0%(benchmark) |
72-
| `(software)noise_removal_filter` | 148.2% | +32.2% | 73.4% | +27.7% |
73-
| `(software)noise_removal_filter + spatial_filter` | 169.3% | +53.3% | 93.3% | +47.6% |
74-
| `hardware_noise_removal_filter` | 115.7% | -0.3% | 45.6% | -0.1% |
75-
| `hardware_noise_removal_filter + spatial_filter` | 124.5% | +8.5% | 61.7% | +16.0% |
69+
| Filters Applied | libuvc CPU Usage | CPU Usage Increase | v4l2 CPU Usage | CPU Usage Increase |
70+
| ----------------------------------------------------- | ---------------- | ------------------ | -------------- | ------------------ |
71+
| No Filter (benchmark) | 116.0% | 0.0%(benchmark) | 45.7% | 0.0%(benchmark) |
72+
| `(software)noise_removal_filter` | 148.2% | +32.2% | 73.4% | +27.7% |
73+
| `(software)noise_removal_filter + spatial_filter` | 169.3% | +53.3% | 93.3% | +47.6% |
74+
| `hardware_noise_removal_filter` | 115.7% | -0.3% | 45.6% | -0.1% |
75+
| `hardware_noise_removal_filter + spatial_filter` | 124.5% | +8.5% | 61.7% | +16.0% |
7676

7777
Based on the test results, using only the `hardware_noise_removal_filter` results in a negligible change in CPU usage for both `libuvc` (-0.3%) and `v4l2` (-0.1%) compared to the no-filter benchmark, as this filter runs internally on the camera hardware. In contrast, other filters execute on the host system. Adding the `spatial_filter` to the hardware filter leads to a moderate increase in CPU usage, while applying the software-based `noise_removal_filter` —either alone or combined with `spatial_filter` —significantly increases CPU load. To maintain low CPU usage, it is recommended to avoid software-based filters and rely solely on the `hardware_noise_removal_filter`.
7878

7979
## Further Optimization
8080

81-
| Parameter | Recommendation | Note |
82-
| :--------------------------: | :------------------------------------: | :---------------------------------------------: |
83-
| `depth_registration` | `false` or `true` with `align_mode=HW` | Software alignment consumes more CPU |
84-
| `enable_point_cloud` | `false` | Disabling point cloud reduces CPU usage |
85-
| `enable_colored_point_cloud` | `false` | Disabling colored point cloud reduces CPU usage |
81+
| Parameter | Recommendation | Note |
82+
| :----------------------------: | :----------------------------------------------: | :---------------------------------------------: |
83+
| `depth_registration` | `false` or `true` with `align_mode=HW` | Software alignment consumes more CPU |
84+
| `enable_point_cloud` | `false` | Disabling point cloud reduces CPU usage |
85+
| `enable_colored_point_cloud` | `false` | Disabling colored point cloud reduces CPU usage |

0 commit comments

Comments
 (0)