Converting a sequences of RGB images and depth files to mkv file format

801 Views Asked by At

I have a sequences of pngs and corresponding depth files (aligned to the corresponding images) from an external camera.

RGB: 1.png 2.png 3.png etc 150.png

Depth: 1.txt 2.txt 3.txt etc 150.txt

I also have the intrinsics and corresponding camera information in another file called camera.txt.

My goal is to convert these images and depth files to an mkv file in order to utilize the pykinect's body tracker (https://github.com/ibaiGorordo/pyKinectAzure)

So far, I've been able to convert the images and and depth files into an open3D RGBD object. <class 'open3d.cpu.pybind.geometry.RGBDImage'> See: http://www.open3d.org/docs/release/python_api/open3d.geometry.RGBDImage.html

I would think we need to run it through the azure kinect reader (https://github.com/isl-org/Open3D/blob/0ec3e5b24551eaffa3c7708aae8630fde9b00e6c/examples/python/reconstruction_system/sensors/azure_kinect_recorder.py#L34), but this seems to open up the camera for additional input.

How can I save this rgbd images to an mkv file format to read in to the pykinect reader? I

1

There are 1 best solutions below

1
On BEST ANSWER

Have you tried:

  • Converting the RGBD image into a numpy array :

http://www.open3d.org/docs/latest/tutorial/Basic/rgbd_image.html

  • Then converting the numpy array to an mkv file like:

NumPy array of a video changes from the original after writing into the same video