März 1, 2012
Erste Versuche mit der Kinekt und Simple Open Ni-Libraries. Processing P3Dperspective(radians(45), float(width)/float(height), 10.0f,150000.0f);Tiefenarray Kinect
int[] depthMap = context.depthMap();Vektor Punkt (Umrechnung 3D-Raum)
PVector realWorldPoint = context.depthMapRealWorld()[index];Abgleich Verschiebung Kamera RGB und Depth
context.alternativeViewPointDepthToImage();Gestures
// enable hands + gesture generation context.enableGesture(); context.enableHands(); // add focus gestures / here i do have some problems on the mac, i only recognize raiseHand ? Maybe cpu performance ? context.addGesture("Wave"); context.addGesture("Click"); context.addGesture("RaiseHand");Liste durchlaufen
while( itr.hasNext() ) { PVector p = (PVector) itr.next(); vertex(p.x,p.y,p.z); }Eintrag in Array am Anfang einfügen (bestehende verschieben sich nach hinten)
handVecList.add(0,pos);User erkennen (IDs User)
int[] map = context.sceneMap();Lagesystem
pushMatrix(); translate(pos.x,pos.y,pos.z); // set the local coordsys applyMatrix(orientation); // coordsys lines are 100mm long // x - r stroke(255,0,0,confidence * 200 + 55); line(0,0,0, length,0,0); // y - g stroke(0,255,0,confidence * 200 + 55); line(0,0,0, 0,length,0); // z - b stroke(0,0,255,confidence * 200 + 55); line(0,0,0, 0,0,length); popMatrix();