marek-simonik / record3d

Accompanying library for the Record3D iOS app (https://record3d.app/). Allows you to receive RGBD stream from iOS devices with TrueDepth camera(s).
https://record3d.app/
GNU Lesser General Public License v2.1
382 stars 55 forks source link

Load .r3d files in Python #24

Closed Haydnspass closed 3 years ago

Haydnspass commented 3 years ago

Hey,

If I understand it correctly ".r3d" files contain all RGBD information. Is it possible to load them via the python API or is there a small snipped you could provide on how to load those? Currently, I export to .mp4 but as I understand it, the quality is not optimal here and files are pretty large.

marek-simonik commented 3 years ago

Hi, the .r3d are ordinary ZIP files, so the easiest way to access the RGBD data is to unzip a .r3d file and then read the individual frames. In Python, the RGB images can be loaded e.g. by cv2.imread() and here is a snippet that shows how to load the depth files: https://github.com/marek-simonik/record3d/issues/7#issuecomment-736573410

the quality is not optimal here and files are pretty large.

Yes, the depth accuracy is worse due to mp4 compression, but the mp4 files are quite small compared to .r3d.

I assume the information above answered your question, so I am closing this issue, but feel free to ask follow-up questions :).