/gspca-kinect2

Kinect2 Sensor Device Driver for Linux

Primary LanguageCGNU General Public License v2.0GPL-2.0

gspca-kinect2

Linux kernel driver for the "Kinect for Windows 2" sensor.

Requirements

  • Linux 3.x+

Build & install

Build

$ make -C /lib/modules/`uname -r`/build  SUBDIRS=`pwd` SRCROOT=`pwd` clean modules  

If you already installed original gspca_main driver, remove it first.

$ sudo /sbin/rmmod gspca_main

Then, install drivers.

$ sudo /sbin/modprobe videodev
$ sudo /sbin/insmod ./gspca_main.ko  
$ sudo /sbin/insmod ./gspca_kinect2.ko  

Usage

This driver provides two v4l2 interfaces per a single kinect sensor; color camera is mapped to /dev/video0, and depth camera is mapped to /dev/video1. If you have two or more sensors, they shall be mappaed to /dev/videoX, where X are (2n) for n-th color and (2n+1) for n-th depth.

Capture color video

$ ffmpeg  -framerate 30 -video_size 640x480 -i /dev/video0  test.avi  
$ mplayer test.avi  

View live color/depth video

I wrote an open source library, named libk4w2. See https://github.com/yoshimoto/libk4w2/ for details.

Misc

$ v4l-info /dev/video0  
$ v4l-info /dev/video1  
$ v4l2ucp preview  

Acknowledgements

This driver is based on the following discussions and source codes;

Special thanks to the people in the OpenKinect project!!!

Hiromasa YOSHIMOTO