Hi! I am mostly new to processing and I was wondering can anybody help me with this code i found online. The code simply uses the kinect to make depth image and draws a red circle on users right hand. And my question is really can you make that red circle apper alongside of depth image in rgb view? I have changed the resolution and set the size of window to 640*2, 480, and added rgb with kinect.enableRGB(), but red circle won't appear on the rgb image... thanks in advance :)
import SimpleOpenNI.*;
SimpleOpenNI kinect;
void setup() {
kinect = new SimpleOpenNI(this);
kinect.enableDepth();
// turn on user tracking
kinect.enableUser(SimpleOpenNI.SKEL_PROFILE_ALL);
// make a vector of ints to store the list of users
IntVector userList = new IntVector();
// write the list of detected users
// into our vector
kinect.getUsers(userList);
// if we found any users
if (userList.size() > 0) {
// get the first user
int userId = userList.get(0);
// if we're successfully calibrated
if ( kinect.isTrackingSkeleton(userId)) {
// make a vector to store the left hand
PVector rightHand = new PVector();
// put the position of the left hand into that vector
kinect.getJointPositionSkeleton(userId, SimpleOpenNI.SKEL_LEFT_HAND, rightHand);
// convert the detected hand position
// to "projective" coordinates
// that will match the depth image
PVector convertedRightHand = new PVector();
kinect.convertRealWorldToProjective(rightHand, convertedRightHand);
// and display it
ellipse(convertedRightHand.x, convertedRightHand.y, 10, 10);
}
}
}
I have an assignment of comparing various head tracking examples using kinect, I have tried few of them already and I was wondering is there any example that includes processing? or maybe any links that can help me get started? thanks a lot in advance :)