KinectWithOpenCVForUnityExa.../README.md

1.9 KiB

Kinect With OpenCVForUnity Example

  • An example of reading color frame data from Kinect and adding image processing.
  • An example of reading multiple source frame data from Kinect and applying image processing only to the human body area.

Demo Video

Environment

Setup

  1. Setup "Kinect v2" device. (See Kinect for Windows)
  2. Download the latest release unitypackage. KinectWithOpenCVForUnityExample.unitypackage
  3. Create a new project. (KinectWithOpenCVForUnityExample)
  4. Import Kinect.2.0.1410.19000.unitypackage
  5. Import OpenCVForUnity.
    • Setup the OpenCVForUnity. (Tools > OpenCV for Unity > Set Plugin Import Settings)
  6. Import the KinectWithOpenCVForUnityExample.unitypackage.
  7. Add the "Assets/KinectWithOpenCVForUnityExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.

Examples

KinectColorFrameExample.cs
Converts ColorFrame acquired from "Kinect" to Mat of "OpenCV", perform image processing.

KinectMultiSourceFrameExample.cs
Converts BodyIndexFrame acquired from "Kinect" to Mat of "OpenCV", perform image processing only person.