introlab / rtabmap

RTAB-Map library and standalone application
https://introlab.github.io/rtabmap
Other
2.83k stars 787 forks source link

[Feature-Request] RVL Depth Image Compression #1362

Open borongyuan opened 1 month ago

borongyuan commented 1 month ago

RVL is a lossless depth image compression algorithm developed by Microsoft. RVL frame is supported by some Orbbec cameras. RVL codec has been added to ROS since Noetic/Jazzy. I think it will help reduce the size of the database and save bandwidth (for camera data transfer and ROS communication).

matlabbe commented 3 weeks ago

Thanks for the link, that could be indeed useful! As a comparison, we are currently using PNG: image

Implementation details:

borongyuan commented 33 minutes ago

Hi, RVL only supports the depth image in 16 bits format. So I went to see how the depth image in 32 bits format was processed previously. According to https://github.com/introlab/rtabmap/blob/b2e26e81c14bd7a1394da10998d0264968089cbe/corelib/src/Compression.cpp#L105C1-L110C4 It looks like it will be converted to 8bits-4channel data first and then encoded using png. What I'm curious about is can this be compressed effectively? Because the resulting data after the conversion doesn't seem to be a reasonable image.

If I add another _depthCompressionFormat option, how should 32 bits images be processed when it is set to '.rvl'? From a compatibility perspective, we should keep the original approach. Or force conversion to 16 bits format and give a warning when ".rvl" is set?