Convert video to OpenNI * .oni video

Kinect OpenNI library uses a custom video file format for storing videos containing rgb + d information. These videos have the * .oni extension. I can not find any information or documentation in ONI format.

I am looking for a way to convert regular rgb video to * .oni video. The depth channel can be left blank (i.e. reset to zero). For example, I have an MPEG-4 encoded .mov file with audio and video channels.

There are no restrictions on how this conversion should be done, I just need to somehow convert it! That is, imagemagick, ffmpeg, mencoder are all right, like custom conversion code in C / C ++, etc.

So far, all I can find is one C ++ conversion utility in OpenNI sources . In appearance, I will convert this from one * .oni file to another. I also managed to find a C ++ script student who converts images from an academic database into a * .oni file . Unfortunately, the code is in Spanish, not in my native language.

Any help or pointers really appreciated!

EDIT: As my usecase is a bit strange, some explanations might be ok. OpenNI drivers (in my case I use the excellent Kinect for the Matlab library ) allows you to specify the * .oni file when creating the Kinect context. This allows you to emulate the presence of a real Kinect application that receives video data, which is useful when testing / developing code (you do not need Kinect to connect for this). In my particular case, we will use Kinect in a production environment (process control in a factory environment), but during development I have a video file :) Therefore, you want to convert to a * .oni file. We do not use the depth channel at the moment, so we do not care about it.

+4
source share
2 answers

I do not have the full answer for you, but look at the NiRecordRaw and NiRecordSynthetic examples in OpenNI / Samples. They demonstrate how to create ONIs with arbitrary or modified data. See how MockDepthGenerator is used in NiRecordSynthetic - in your case you will need a MockImageGenerator. You can specify more detailed information in google openni-dev group.

+4
source

You viewed this command and its related documentation.

NiConvertXToONI - NiConvertXToONI opens any entry, takes every node inside it and writes it to a new ONI entry. It receives both the input file and the output file from the command line.

0
source

Source: https://habr.com/ru/post/1444235/


All Articles