Either build the sources from sketch/
or download the latest release.
Launch the .app then listen to the port 32000
.
When a blob is tracked, an OSC message is sent on /blob
, with the following data structure :
position | datatype | description |
---|---|---|
0 | int |
blob ID |
1 | float |
x position of the blob |
2 | float |
y position of the blob |
3 | float |
width of the blob |
4 | float |
height of the blob |
import oscP5.*;
import netP5.*;
OscP5 oscP5;
NetAddress serverLocation;
void setup() {
oscP5 = new OscP5(this, 32000);
serverLocation = new NetAddress("127.0.0.1", 12000);
}
public void oscEvent(OscMessage message) {
if (message.checkAddrPattern("/touch")) {
if (message.checkTypetag("iffff")) {
int id = message.get(0).intValue();
float x = message.get(1).floatValue();
float y = message.get(2).floatValue();
float w = message.get(3).floatValue();
float h = message.get(4).floatValue();
println("new blob :");
println("id :" + id);
println("x :" + x);
println("y :" + y);
println("width :" + w);
println("height :" + h);
}
}
}
- Kinect v1 (v2 not tested)
MIT.