-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example "SkeletonColor" why joints[jointType].getZ() always zero #60
Comments
Hello. I had the same problem on the exemple SkeletonMaskDepth. By watching the code and the example skeleton3d, (the example doesn't work on my pc but the code make sense) it seems that for getting z value of the skeleton the good way is to use kinect.getSkeleton3d(). So try in setup: kinect.enableSkeleton3DMap(true); and now you should have access to Z values (need to scale the value). It worked for me. Hope it helps. |
Hello. I have the same problem with you. code blow ArrayList<KSkeleton> skeletonArray = kinect.getSkeletonColorMap();
ArrayList<KSkeleton> skeletonArrayZ = kinect.getSkeleton3d(); //this is new for getZ()
//individual JOINTS
for (int i = 0; i < skeletonArray.size(); i++) {
KSkeleton skeleton = (KSkeleton) skeletonArray.get(i);
KSkeleton skeletonZ = (KSkeleton) skeletonArrayZ.get(i); //this is new for getZ()
if (skeleton.isTracked()) {
text("skeleton is tracked", 50, 90);
KJoint[] joints = skeleton.getJoints();
KJoint[] jointsZ = skeletonZ.getJoints(); //this is new for getZ() after that, you can use this code to check if you get the right Z println(jointsZ[KinectPV2.JointType_HandLeft].getZ()); I just have try and the Z seems in unit meter. See link below to get the .pde file |
Hi, I am using this method to get the Z depth of a joint, and it works most of the time, except my program crashes randomly with this error when using getSkeleton3d(). I tried getting depth using rawDepthData, but it's slow and not as accurate. I'd really like to use the depth of certain joints, but getting them is proving very strange and difficult. Any help would be appreciated.
|
i wanna use the depth value.
void drawJoint(KJoint[] joints, int jointType) {
pushMatrix();
translate(joints[jointType].getX(), joints[jointType].getY(), joints[jointType].getZ());
ellipse(0, 0, 25, 25);
popMatrix();
}
the joints[jointType].getZ() is work?
someone can help me?
The text was updated successfully, but these errors were encountered: