MATLAB: How to log metadata (skeletal tracking data) while logging color video and depth video to disk when using Kinect for Windows v1

Image Acquisition Toolbox

I am trying to log the skeletal tracking metadata in addition to logging the color and depth sensor data to video files.
I can use the videoinput DiskLogger functionality to log to disk, however the skeletal tracking metadata is not saved.
Is there any way to also log the skeletal metadata?
 

Best Answer

The functionality offered by videoinput DiskLogger logs only the frame data to disk and does not include the metadata associated with the color or depth sensors.
The skeletal tracking information is provided as part of the Kinect depth sensor frame metadata returned by the getdata function. In order to get access to this metadata while also logging to disk, the videoinput LoggingMode for the depth sensor should be set to 'disk&memory'.
Refer to the attached MATLAB example code ("example_log_videos_depthmetadata.m" and  "getDepthMetadata.m") for a simple finite duration acquisition configuration which:
  • logs the color frames to a 'Uncompressed AVI' video file
  • logs the depth frames to a 'Archival' (Motion JPEG 2000 file with lossless compression .MJ2) video file, which supports a bit-depth higher than 8 bits.
  • logs the depth sensor metadata (including the skeletal tracking metadata) to a .MAT file