catid / Zdepth

Zdepth :: Streaming Depth Compressor in C++ for Azure Kinect DK
BSD 3-Clause "New" or "Revised" License
97 stars 30 forks source link

Zdepth compressed depth video file? #1

Open Fireforge opened 4 years ago

Fireforge commented 4 years ago

This repo is exactly what we've been looking for since the previous Kinect camera. Thanks so much!

Do you have any thoughts on saving/loading a stream of Zdepth frames to/from a file? In addition to reducing streaming bandwidth, we've been trying to find a way to save our depth recordings directly to a compressed format for a long time.

The file format you describe seems to be for a single frame of depth. I'm guessing you'd need some container format to save multiple frames. And for seeking, it would need to be aware of the key frames. I imagine you could read and write these compressed frames to a file similar to the MKV file that the Azure Kinect SDK supports, but I'm not that experienced with using such file formats so I'm not sure.

Any input you could offer would be appreciated, especially if you can point somewhere this work is already being done.

catid commented 4 years ago

Working on it

On Tue, Dec 17, 2019, 8:33 AM David Salter notifications@github.com wrote:

This repo is exactly what we've been looking for since the previous Kinect camera. Thanks so much!

Do you have any thoughts on saving/loading a stream of Zdepth frames to/from a file? In addition to reducing streaming bandwidth, we've been trying to find a way to save our depth recordings directly to a compressed format for a long time.

The file format you describe seems to be for a single frame of depth. I'm guessing you'd need some container format to save multiple frames. And for seeking, it would need to be aware of the key frames. I imagine you could read and write these compressed frames to a file similar to the MKV file that the Azure Kinect SDK supports, but I'm not that experienced with using such file formats so I'm not sure.

Any input you could offer would be appreciated, especially if you can point somewhere this work is already being done.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/catid/Zdepth/issues/1?email_source=notifications&email_token=AAB5SIKUTQKMHUEHU7CEQM3QZD5NFA5CNFSM4J36GSG2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IBDHFVA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB5SIM4XK4HJSTOF7OPM6TQZD5NFANCNFSM4J36GSGQ .

catid commented 4 years ago

It's mixed in with a bunch of other code in the xrcap project. But there's an example here now:

https://github.com/catid/xrcap/blob/15d2dac930a37c987c6296ec152a47d5c0dc205b/apps/capture_client/src/FileWriter.cpp#L259

catid commented 4 years ago

In addition to the depth buffer you have to communicate the camera calibration so you can reconstruct the 3D surface, which is why it's a bit trickier. The xrcap project is specialized for the Kinect camera. Honestly don't have the time to improve this stuff further.