Skip to content

TinyTinni/KinectFaker

Repository files navigation

Kinect Skeleton Tracking Emulator using DLL-Proxy

Build status

Emulates a Kinect Device (Version 1/xBox360) with Skeleton Tracking. The Kinect Toolkit provides a program, called Kinect Studio, which is able to record and play Skeleton Animations. Sadly, the Kinect Studio program works only on a PC with a connected Kinect Device. This emulator enables testing of Kinect applications without connected Kinect or Kinect runtime by reading skeleton animation files. Currently, only a self defined file format (defined with protobuf) is used and must be recorded first.

Recompiling or relinking of the Kinect application is not needed.

WIP: GUI is WIP. Currently, it can record and play skeleton animations.

See ffmpeg branch for a version for faked color stream.

Requirements

For the Proxy:

For the GUI (Record & Play Skeleton Data):

used libs which will be auto downloaded, when not specified

for tests:

If you want to use Conan or Hunter as package manger, activate the cmake option USE_CONAN resp. USE_HUNTER [default=OFF].

When you are using Hunter, only a Kinect SDK installation is required. Rest will be automatically downloaded. When you are using Conan, make sure you edit the conanfile.txt since it is only used by the build system.

Using DLL-Proxy

  • Record your skeleton using the prototyped recorder (not recommended) or the GUI (recommended).
  • Configure your emulated scene in fake_kinect.config, example can be found in tests.
  • Put the configure file and the skeleton animation into the folder with the binary, which should recieve the emulated skeleton animation.
  • Copy Kinect10.dll + dependencies (e.g. protobuf dlls) into the binary folder of your program.

Run the program.

Implemented Functions

Some functions are free functions and INuiSensor functions. When using functions which also exists in INuiSensor e.g. NuiInitialize instead of multi device mode INuiSensor::NuiInitialize, these "free"-functions will be listed in INuiSensor column. Not implemented functions will return E_NOIMPL.

Free Functions INuiSensor
NuiGetSensorCount NuiInitialize
NuiCreateSensorByIndex NuiShutdown
NuiCreateSensorById NuiSkeletonTrackingEnable
NuiSkeletonTrackingDisable
NuiSkeletonGetNextFrame
NuiTransformSmooth *)
NuiDeviceConnectionId
NuiUniqueId **)
NuiStatus
NuiInstanceIndex
NuiInitializationFlags

*)NuiTransformSmooth Skeleton positions are saved after smoothing, therefore this function does nothing and has to be set in the animation file.

**) NuiUniqueId Recommended by MSDN: Don't use!

Not all members of a NUI_SKELETON_FRAME instance are filled yet.

Functions which will only be avaiable when a Kinect runtime is present:

Kinect Runtime Functions
NuiCreateDepthFilter
NuiCreateCoordinateMapperFromParameters
NuiSkeletonCalculateBoneOrientations
NuiSetDeviceStatusCallback

They are not changed in anyway and not guaranteed to work.

LICENSE

GPLv3© Matthias Möller. Made with ♥ in Germany.