Joint positions coordinates do not match with skeleton

edited November 2013 in Kinect

Hi there, i'm trying to do a very simple experiment but something is going wrong. I draw the skeleton and then with the getJointPositionSkeleton i'm trying to draw two circle on the head and torso joints but the coordinates of the two points doesn't match with the skeleton one as you can see from the image.

processingJoints

i'm using this code to convert the "getJointPositionSkeleton" values:

PVector realHead=new PVector();
context.getJointPositionSkeleton(0,SimpleOpenNI.SKEL_HEAD,realHead);
PVector projHead=new PVector();
context.convertRealWorldToProjective(realHead, projHead);

PVector realTorso=new PVector();
context.getJointPositionSkeleton(0,SimpleOpenNI.SKEL_TORSO,realTorso);
PVector projTorso=new PVector();
context.convertRealWorldToProjective(realTorso, projTorso);

fill(0,255,0);
ellipse(projHead.x,projHead.y,10,10);
fill(0,0,255);
ellipse(projTorso.x,projTorso.y,10,10);

thank you for your help!

Sign In or Register to comment.