OpenFrameworks addon with heavily opiniated tools for working with remote Depth Sensor streams.
This is a suit of tools to work with multiple (different) depth sensors like the Kinect, the Orbbecs (Persee, Astra and Astra-mini) and -soon- the Intel RealSense.
OpenNI provides a uniform API for working with various depth sensors and is used in some of the applications in this repository. The aim of this package is to provide high-level tools and instructions to work with remote depth sensors streaming over a network (currently using TCP).
See the ./tools
folder for various server (transmitter) applications for various platforms/sensors.
Each tool has its own README;
This OpenFrameworks addon tailors only to streaming clients (receivers), try any of the example applications:
cd
into one of the example application's folders and run:
make Debug # to build the applications
make RunDebug # to run the last development-build
See also the API (doxygen) documentation
See also the example applications
#include "ofxDepthStream/ofxDepthStream.h"
std::shared_ptr<depth::Receiver> receiverRef;
ofTexture depthTexture;
ofMesh mesh1;
void ofApp::setup() {
// Create depth stream network receiver (takes a hostname/ip string and port number)
// this receiver instance will start a separate thread in which it listens for new frame data
receiverRef = depth::Receiver::createAndStart("persee.local", 4445);
}
void ofApp::update() {
// this addons provides some convenience methods for;
// ...processing raw frame byte data (which is compressed for network streaming)
depth::emptyAndInflateBuffer(*receiverRef, [this](const void* data, size_t size){
// ...loading texture data
ofxDepthStream::loadDepthTexture(this->depthTexture, data, size);
// ...loading mesh data
ofxDepthStream::loadMesh(this->mesh1, data, size);
}
}
void ofApp::draw() {
if(depthTexture.isAllocated()) {
depthTexture.draw(0,0);
}
mesh1.draw();
}
From this addon's root folder;
cd tests
make Debug
make RunDebug
streaming two sensors over a network; orbbec left, kinect right