Skip to content

syalanurag1991/KinectForUnity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Kinect for Unity (works for both Kinect V1 and Kinect V2)

Library for using Kinect with Unity. Unity version = 2018.3 with .Net 4.x.

The project contains just a main scene as of now:

KinectManager

About 'Main' scene

This is a slightly modified version of the original demo-scene developed by Microsoft. Displays color, infrared and body streams along with streams along with a point-cloud view. I replaced the 3D cube object by a UI canvas to get more FPS.

About point-cloud

Kinect V1

There is a single loop managing assignment of pixels for all color, infrared and registered color streams as they all have the exact same resolution. The FPS barely crosses 20, this is because the pixel-by-pixel mapping-function is very slow. There is a better mapper function available in C++, called as "MapColorFrameToDepthFrame". Upon running dependency walker, I found that this function is not exposed in kinect10.dll.

KinectV1 - Point-cloud and streams

Kinect V2

This scene was developed by me using “registered frames” from Kinect. The bindings to get color and depth frame data were changed from multi-frame reader to color and depth frame readers for Kinect V2. Reason being that using multi-frame reader limits Kinect’s output of depth data to 15 FPS. This is because getting color-frame data is an added stress for the multi-frame reader API. Using color-frame reader and depth-frame readers separately, along with the CoordinateMapper class, generates the output at 30 FPS which is more desirable.

KinectV2 - Point-cloud and streams

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages