hcmlab / ssi

Social Signal Interpretation (SSI) Framework
http://openssi.net
61 stars 24 forks source link

How to save the depth video using Kinect V2? #39

Open ChangyuanZhou opened 4 years ago

ChangyuanZhou commented 4 years ago

When I used Kinect V2 to record depth video on SSI, I found all channels could be correctly visualized and RGB video could be saved with CameraWriter or AviWriter. But when it comes to depth or IR channels as shown below, it always failed with different errors.

<consumer create="CameraWriter" overwrite="true" path="Kinect2_depth.mp4"> <input pin="depth" frame="1" delta="0"/> </consumer>

For example, when using CameraWriter, it showed the warning "RenderStream failed" and no file was generated.

<consumer create="AviWriter" option="aviwriter" path="kinect2_depth.avi"> <input pin="depth" frame="1"/> </consumer> When I used AviWriter consumer, depth video could be saved, but the problem is that the generated video is with three channels (512*424*3), so I guess if there is some problem with the coding format. I have tried a group of "fourcc" codes, but no one worked.

Could anyone tell me how to correctly save the depth video please? Thank you!

tobiasbaur commented 4 years ago

The depth channel is a bit different to e.g. the RGB Channel. If you want to save it, try to use filewriter to write it and filereader to read it. Does this work for you?

ChangyuanZhou commented 4 years ago

The depth channel is a bit different to e.g. the RGB Channel. If you want to save it, try to use filewriter to write it and filereader to read it. Does this work for you?

Thank you for your reply, Dr. Tobias!

I have tried using filewriter with different parameters, and every time it generated a ".stream~" file and a ".stream" file. But filereader failed to read it. I also tried opening it using NOVA, but nothing was visualized.