An open API service indexing awesome lists of open source software.

https://github.com/tentone/webkinect

Provides access to Microsoft kinect sensor data (skeleton, color camera and depth camera) from HTTP using WebSockets..
https://github.com/tentone/webkinect

kinect-sensor websockets

Last synced: 4 months ago
JSON representation

Provides access to Microsoft kinect sensor data (skeleton, color camera and depth camera) from HTTP using WebSockets..

Awesome Lists containing this project

README

          

# Web Kinect
- HTTP Web server to allow using Microsoft Kinect in web pages trough [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API).
- 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](https://www.microsoft.com/en-us/download/details.aspx?id=44561).
- 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](https://threejs.org/)
- 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.

```javascript
var socket = new WebSocket("ws://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);
// ...
}
};
```

### 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