Provides access to Microsoft kinect sensor data (skeleton, color camera and depth camera) from HTTP using WebSockets..
C#MIT
Web Kinect
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 port 8181 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.
Usage Example
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 and Blob 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 a WebGL texture for processing.
varsocket=newWebSocket("ws://127.0.0.1:8181");varconnected=false;socket.onopen=function(){connected=true;};socket.onclose=function(){connected=false;};socket.onmessage=function(event){// Skeleton dataif(typeofevent.data==="string"){vardata=JSON.parse(event.data);// ...}// Camera feedelseif(event.datainstanceofBlob){varcamera=event.data;varurl=URL.createObjectURL(event.data);// ...}};
License
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