Skip to content

rjw57/openni-skeleton-export

Repository files navigation

Skeleton tracking utility

Build Status

This is a silly little hack built atop OpenNi's user tracking example which is modified to dump skeletal information to standard output.

It's probably useful if you want to quickly get skeletal dumping working.

Building

This software uses the CMake build system. It requires that the OpenNi libraries be installed (along with the NITE binaries; find your own mirror). In addition, OpenGL and GLUT must be available.

$ git clone https://github.com/rjw57/openni-skeleton-export.git
$ cd openni-skeleton-export
$ mkdir build
$ cd build
$ cmake ..
$ make && ./glskelview

Note that the path to SamplesConfig.xml is hard-coded into the program and so it must be run from the build directory. (Sorry, it's a hack.)

Running

This project includes two utilities: glskelview and logskel. The former is an OpenGL based utility to check your sensor is pointing in the right direction and to show tracker skeletons. It can also be used to play back recorded sensor data to check that tracking will succeed. The later is used to actually export the tracked skeleton information, depth data and per-pixel user labels to a log.

glskelview

This utility takes no command-line options aside from an optional path to a .oni-format recording (as produced by NiViewer). If no options are passed, it attempts to stream from the primesense sensor using the configuration at the hard-coded path of ../Data/SamplesConfig.xml. Sorry, this is a horrible hack but reproduces the behaviour of the original NiUserTracker sample.

logskel

This utility takes a number of command line options which may be examined via logskel --help. The utility can take either the path to an XML configuration file for live-streaming from the sensor or the path to a .oni recording. It can log depth, user-labelling, 3d point clouds and joint locations to HDF5 files.

For example, to playback recording.oni for 10 seconds logging to /tmp/skel.h5:

$ build/logskel --playback recording.oni --duration 10 --log /tmp/skel.h5

Examples

The examples directory contains a selection of example scripts showing how the output from this utility may be parsed and used.

Reading the logs

There is an example IPython notebook which shows how to parse the logs generated by this utility.

Sample data

The recordings sub-module links to a git repository with some sample recordings made with the sensor. If you've not checked out with --recursive, you can fetch the recordings via:

$ git submodule init
$ git submodule update

Contributing

Pull-requests are very welcome.

License

This software is Apache licensed like the original OpenNi code. See the LICENSE for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published