Kinect Support in OpenSensorHub

Microsoft Kinect has been around for some time and here at OpenSensorHub.org we decided to have some fun with this neat sensor platform.

Sensors

Microsoft Kinect is available in three models: V1, V2, & Kinect for Windows. Our particular implementation, based on a dormant device longing for some application and digital exercise, uses a V1 I had laying about. V1 is noted by the model # on the underside of the base. In this particular case, Model # 1414.

Microsoft Kinect has been around for some time and here at OpenSensorHub.org we decided to have some fun with this neat sensor platform.

The Kinect supports three sensors – an IR emitter, an RGB camera, and depth sensor as well as having the ability to tilt up or down (approx. +/- 27deg). The IR emitter (left most aperture) projects a point cloud into the environment and uses the depth sensor to measure the deflection of the light returned from each point to measure the distance from the device. The IR emitter is also used to produce a grayscale image (based on intensity, or luminance). The RGB camera is located between the IR emitter and the depth sensor (right most aperture). The frame resolution for this model of the Kinect is 640×480 and as can be seen below produces decent quality images (clients visualizers created with OSH JS-Toolkit).

Point Clouds

With the help of my lovely assistant (my daughter), we were able to capture some 3-D point cloud images, served through OpenSensorHub by our driver, to a web client created using the JS-Toolkit (JavaScript). The client was built with minimal HTML and JS code to geolocate and render point cloud data using JS-Toolkit’s Cesium view and a custom point cloud styler.

JS-Toolkit is a wonderful tool for rapidly creating client visualizations and connecting them to data being served by OpenSensorHub nodes, making the task of visualization relatively simple.

Integrating the Kinect

The OpenSensorHub driver is built using the libfreenect library on Linux Mint and uses the corresponding Java Native Access package, sources for which are available through OpenKinect.org. Libfreenect is a system library used to interface with the Kinect via a USB interface and is packaged with OpenSensorHub driver for Kinect.

The only other hardware needed is interface cable and power supply combo (IDS 1 Pc Xbox 360 Kinect Sensor USB AV Adapter ) readily available online for about $10.

Driver Options

The implementation of the OpenSensorHub driver supports V1 specific implementations, principally the bit encoding schemes in which data frames are returned from the Kinect to the driver. These are IR 8-BIT, 11-BIT Depth, and RGB format for the camera. The outputs from the OpenSensorHub driver are:

RGB frames

MJPEG encoded RGB

Grayscale IR Frames (single channel)

MJPEG encoded Grayscale IR Frames

Raw Depth Data – Distance from surface of sensor – distances in meters

Preprocessed Depth Data – Accounting for camera lens properties – distances in meters

In addition, the driver provides support for setting the initial tilt angle and led indicator color & blink patterns. The driver also provides an additional enhancement – the ability to scale the volume of data for the depth cloud through the “Point Cloud Scale Factor” option in the configuration settings. This option allows you to scale down the volume of data output which each frame and is configurable as a decimal percentage value from (0.0, 1.0].

Future support will include the ability to command the Kinect to tilt while in operation and to change led indicator color & blink patterns.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: