Skip to content

This project is based on OpenNI2, NITE2, and OpenCV2, it will automatically save many skeleton animation clips to bvh files.

License

Notifications You must be signed in to change notification settings

amytraylor/kinect-openni-bvh-saver

 
 

Repository files navigation

kinect-openni-bvh-saver

This project is based on OpenNI2, NITE2, and OpenCV2, it will automatically save many skeleton animation clips to bvh files.

Then you can import the bvh files into Blender or other softwares to smooth animation curves. I use Blender's default smooth key setting to smooth all rotation channels, the results is acceptable.

You can turn your body around 360 degrees in this project, I am very satisfied with the result.

Though the project is developed on macOS, you can port it to Linux, Windows easily, for the source code is portable.

Download windows release from: https://drive.google.com/file/d/0B37dehusTo2MTWJEdkdrd29pLWM/view?usp=sharing

Linux port hint:
Ubuntu Kinect C++ Development Enviroment.

Windows port hint:
1.Download Kinect for Windows SDK 1.8, install the SDK.
2.Download OpenNI 2 SDK Binaries from https://structure.io/openni, install the SDK.
3.Download NiTE-Windows-x64-2.2.zip or NiTE-Windows-x86-2.2.zip, install the SDK.
4.Download opencv 2.4.11, install the SDK.
5.Build the source code with VS2010.

Click the image to watch kinect mocap demo:
Kinect Mocap Demo

Requirements

macOS 10.11
kinect for xbox 360
OpenNI2
NITE2
OpenCV2
Xcode 7.3.1

How to use

1.Git clone openni-nite-opencv-xcode.
2.Install libpng, OpenNI2, OpenCV2 from source code, via macport or homebrew.
3.Copy all the source codes to 'openni-nite-opencv-xcode/OpenNI+NITE+OpenCV', and add them to the project.
4.Copy /usr/local/lib/OpenNI2-FreenectDriver/libFreenectDriver.0.5.0.dylib to 'openni-nite-opencv-xcode/OpenNI2/Drivers/libFreenectDriver.dylib', then add the filename to Xcode's 'Targets->Build Phases->Copy Files(5 items)', ensure that the Subpath is 'OpenNI2/Drivers'.
5.Plug kinect for xbox 360 into USB port.
6.Open the project, build and run.

Note: If you failed to run, just try again, the Kinect driver for macOS is not stable.

When the Kinect sensor detects your body, the app will start recording, after the Kinect sensor lose your body, the app will stop recording, the BVH files will be saved to '../data'.

Enter the Kinect camera's viewport, perform actions, then leave the viewport. Repeat the above steps, you can record many skeleton animation clips at one time.

Thanks

1.Derek Hendrickx's KinectMotionCapture
2.Kyle Weicht's 3D math library
3.Birdy's Notebook
4.sunchy's Kinect_to_BVH_Console
5.Rishad Bharucha's openni-nite-opencv-xcode

License

The MIT License (MIT)

About

This project is based on OpenNI2, NITE2, and OpenCV2, it will automatically save many skeleton animation clips to bvh files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%