Follow my previous blog posting, https://blog.keithkim.com/2019/03/kinect-2-and-windows-10-face.html to:
- Connect XBox One Kinect2 to Windows
- Install SDK
Install from the source, then you'd avoid some errors. If installed by using pip, then see the issue page:
- Source - this page shows how to install using PIP or manually.
- Issue Page, https://github.com/Kinect/PyKinect2/issues/37
- optional, but best to use with Anaconda, Python 3.7
- Numpy, comtypes, PyGame
From the source, there are two examples:
- PyKinectBodyGame.py - shows detecting body motion
- PyKinectInfraRed.py - shows IR camera image
Below photo shows stick figure over my body; where my arms/hands are. I had to carry my keyboard to take the screenshot so it's not showing the stick figure too well, but it actually works pretty good.
I had to crop the image and cover my face for privacy.
I already have Kinect2 to play around, but many folks already implemented similar motion detection/capture just using a webcam with OpenCV python.
For motion capture alone, Kinect doesn't give much benefit over using a cheap webcam with OpenCV. The real benefit is the depth sensor. This also now can be done with with dual webcam, or dedicated devices that can also be used with Raspberry Pi. They are smaller too.
XBox Kinect2 is not for close range motion detection/capture device. For close range, it's better to use other method -- e.g. older Kinect for PC, or other devices.
If you're into stereo vision based depth sensing, don't get Kinect; rather get two webcams or better yet, get StereoPi, Mynteye, or two webcam based device. See below links.
Stereo Vision Cameras
I didn't install/set up below as it appears to be a lot of effort is needed, but comes with more functionalities.
- Kinect: How to install and use OpenNI on Windows – Part 1 & Part 2
- OpenKinect for Kinect2,
- OpenNI2 Download, https://structure.io/openni
- OpenNI & Nite (older version) http://fivedots.coe.psu.ac.th/~ad/kinect/installation.html
- Python OpenNI wrapper, https://pypi.org/project/openni/