Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ChangyuanZhou opened this issue Nov 19, 2019 · 2 comments
Open

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

ChangyuanZhou opened this issue Nov 19, 2019 · 2 comments

Comments

@ChangyuanZhou
Copy link

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
Copy link
Member

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants