robotika / osgar

Open Source Garden (Autonomous) Robot
MIT License
13 stars 11 forks source link

OAK-D support H264 and H265 video encoding and gzip detph data #993

Closed m3d closed 1 month ago

m3d commented 1 month ago

before:

(osgar) md@md-ThinkPad-P50:~/git/osgar$ python -m osgar.logger /home/md/git/osgar/test-oak-camera-usb-240507_171842.log
 k                 name    bytes | count | freq Hz
--------------------------------------------------
 0                  sys     1243 |  9 |   0.9Hz
 1            oak.depth 35337246 | 69 |   6.9Hz
 2            oak.color 32602560 | 68 |   6.8Hz
 3 oak.orientation_list    36366 | 66 |   6.6Hz
 4       oak.detections        0 |  0 |   0.0Hz
 5        oak.depth_seq      759 | 69 |   6.9Hz
 6        oak.color_seq      748 | 68 |   6.8Hz
 7   oak.detections_seq        0 |  0 |   0.0Hz

Total time 0:00:10.039510

after

(osgar) md@md-ThinkPad-P50:~/git/osgar$ python -m osgar.logger /home/md/git/osgar/test-oak-camera-usb-240507_172759.log 
 k                 name   bytes | count | freq Hz
-------------------------------------------------
 0                  sys    1271 |  9 |   0.9Hz
 1            oak.depth 1823576 | 68 |   6.8Hz
 2            oak.color 2426190 | 68 |   6.8Hz
 3 oak.orientation_list   36917 | 67 |   6.7Hz
 4       oak.detections       0 |  0 |   0.0Hz
 5        oak.depth_seq     748 | 68 |   6.8Hz
 6        oak.color_seq     748 | 68 |   6.8Hz
 7   oak.detections_seq       0 |  0 |   0.0Hz

Total time 0:00:10.064269
tajgr commented 1 month ago

Please add some config parameter e.g. disable_depth_compression. But yes, the effect is huge. Thanks.

m3d commented 1 month ago

I hope this extra flag will work for you (if not please let me know). I tried also H265 and it also seems to work, but lidarview etc will be tricky. Thanks & merging