depth_generator->getXnDepthGenerator().
ConvertRealWorldToProjective(2, pos, pos);
If you are computing the point cloud with a flipped y axis, you also need to flip the skeleton at this point:
pos[0].Y *= -1;
pos[1].Y *= -1;
From here, the data is ready to be used. If you want to see it, you need to change one more thing. Inside ofxTrackedUser.h, in ofxLimb::debugDraw():
glVertex2f(begin.x, begin.y);
glVertex2f(end.x, end.y);
Needs to be changed to:
glVertex3f(begin.x, begin.y, begin.z);
glVertex3f(end.x, end.y, end.z);
No comments:
Post a Comment