- HTTP Web server to allow using Microsoft Kinect in web pages trough WebSockets.
- Works with Kinect 1.0 only should be easily adaptable to work with Kinect 2.0 but I do not have access to one for testing.
- Allows raw access to the Kinect cameras information (Depth and Color image) and access to the human skeleton generated by the Kinect SDK.
- The server runs by default in the
localhost
at port8181
the browser should be able to communicate with the server without additional configurations even on HTTPS. - A compiled version of the program is available on the
bin
folder in the root of the Git repository.
- There is a usage example available in the example page intended to be used alongside with three.js
- The communication with the server is performed using
JSON
encoded messages for the skeleton data andBlob
encoded binary data for the images captured from the cameras. - Here is a basic example of how we can exchange information with the Kinect server.
- The URL of the image could be easily placed inside of an
img
element for visualization. Its also possible to copy the blob data to aWebGL
texture for processing.
var socket = new WebSocket("ws:https://127.0.0.1:8181");
var connected = false;
socket.onopen = function() {
connected = true;
};
socket.onclose = function() {
connected = false;
};
socket.onmessage = function(event) {
// Skeleton data
if(typeof event.data === "string") {
var data = JSON.parse(event.data);
// ...
}
// Camera feed
else if(event.data instanceof Blob) {
var camera = event.data;
var url = URL.createObjectURL(event.data);
// ...
}
};
- Project uses a MIT license that allow for commercial usage of the platform without any cost.
- The license is available on the project GitHub page