Record depth stream frame by frame with OpenNI2

174 Views Asked by At

Is there any way to manually record frame by frame using OpenNI2 from a depth sensor like Orbbec Astra? I know there is the class recorder, but it doesn't suite with my needs. I'd like to record from a continuous stream .oni chunks of fixed length (i.e. 5 minutes) without loosing any frame in the middle. I've already did it for the color stream (in a mp4 video file) using a multithreading approach, one thread grab the current frame and put it in a buffer, the other one take from the buffer and save in the file, when the file reach the length, close it and open a new one. I'd like to do the same for a oni file without converting the frames in images, I don't want to loose the depth information and the metadata related to the frame and the device. Any idea?

0

There are 0 best solutions below