Showing posts from November, 2013

Recovering truncated OpenNI ONI files

The open source OpenNI library for RGB-D cameras, like Microsoft Kinect, allows to record and playback streams of color and depth content. These streams are stored into a structured file with ONI extension.

If the recording application (such as NiViewer or your own) crashes the resulting ONI file results invalid and it is not readable by OpenNI.

Starting from the source code of the OpenNI2 I have prepared a minimal Python script that tries to fix the ONI file:
Truncate the file if the last Record is incompleteAppend a RECORD_END if it is missingFix the starting header with the maximum node identifier  The Python script is available here.

Update: the tool eventually evolved in a more general tool for manipulating ONI files. Github repo.

Surviving OSX crash on Linux

The aim of this post is to provide some ideas for recovering work from a crashed Mac machine, at least when the hard disk has not been damaged.

mount the Time Machine backupmount the original disk as R/W with permissionsmount the disk as Copy on Write clone the original disk as VDI and mount itrun OSX from Virtual Box