Skip to content
Kinect related projects
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Kinect Server

Kinect Server is a wrapper for Microsoft Kinect V2, implemented as a Web Socket server, optimized for browser access. The Kinect Server enables browser-based interactive applications with Kinect, using technologies such as WebGL, with libraries such as THREE.JS, a Javascript 3D library, and p5.js.

How to use Kinect Server

You should run the Kinect Server application in the same computer where Kinect device is connected to. Make sure Kinect is working properly, by testing with the Kinect Studio tool. Once Kinect Server () is running, it will start accepting web socket connections to ws://

Web Socket client example

Here a web socket client was created as part of a P5.JS sketch, and the position of the hands is steering the animation in the browser. kinect example

A more ellaborate approach is to connect to the Kinect depth stream, and use the depth image to drive an interactive panel. For more details on this project, check Interactive Gallery project.

kinect example

Example of client code in Javascript

I recommend to encapsulate the Kinect client in a Worker:

    this.kinectWorker = new Worker("/Scripts/kinectWorker.js");

Example for kinectWorker.js:

function KinectConnect(serverUrl) {
    if (ws !== undefined && ws.readyState === 0) {//CONNECTING
    if (ws !== undefined && ws.readyState === 1) {//OPEN
    ws = new WebSocket(serverUrl);

    ws.binaryType = "arraybuffer";

    ws.onopen = function () {
            status: "Connected"

    ws.onmessage = function (evt) {
        if ( instanceof ArrayBuffer) {
            postMessage(, []);
        } else {
            //If not a ArrayBuffer, treat it as status message

    ws.onerror = function (evt) {        
        //Note that ws.onerror does not give details about the error
            err: "An error occurred while stablishing a connection to the server. Please make sure Kinect is connected and server is running."

You can’t perform that action at this time.