Skip to content
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

How to get the 3d coordinate of the Joint_Points? #77

Open
JohnleeHIT opened this issue Dec 31, 2019 · 5 comments
Open

How to get the 3d coordinate of the Joint_Points? #77

JohnleeHIT opened this issue Dec 31, 2019 · 5 comments

Comments

@JohnleeHIT
Copy link

Any one know how to get the 3d coordinate of the Joint_Points? we can get the 2D coordinate of the Joint_points by using :
joint_points = self._kinect.body_joints_to_color_space(joints)
Generally, we can get the 3d coordinate from the object "joints" , However, I just can't get the attribute from the object when debugging.

@KonstantinosAng
Copy link

if you find a body and write:

joints = body.joints

Then to get the world coordinates of any joint:
Example for Right Hand
x = joints[PyKinectV2.JointType_HandRight].Position.x
y = joints[PyKinectV2.JointType_HandRight].Position.y
z = joints[PyKinectV2.JointType_HandRight].Position.z

all points are in meters

@JohnleeHIT
Copy link
Author

if you find a body and write:

joints = body.joints

Then to get the world coordinates of any joint:
Example for Right Hand
x = joints[PyKinectV2.JointType_HandRight].Position.x
y = joints[PyKinectV2.JointType_HandRight].Position.y
z = joints[PyKinectV2.JointType_HandRight].Position.z

all points are in meters

Got it ,thanks!

@jmatthess
Copy link

if you find a body and write:

joints = body.joints

Then to get the world coordinates of any joint:
Example for Right Hand
x = joints[PyKinectV2.JointType_HandRight].Position.x
y = joints[PyKinectV2.JointType_HandRight].Position.y
z = joints[PyKinectV2.JointType_HandRight].Position.z

all points are in meters

This code here is almost perfect for my use case but im finding that the y position is giving me values that are negative. i imagine this is because the joint im tracking goes below the cameras current height. but i was wondering if its possible to get the "calibrated" values?

@KonstantinosAng
Copy link

The calibration only works for undistorting the RGB or Depth Image and it will help you get accurate data when you perform your own image processing on the RGB or Depth Image. However, the Kinect's tracking algorithm that gives you the joint values cannot be calibrated as we don't know what Microsoft is doing behind it. I am pretty sure they have calibrated their data.

@ahmedetihad
Copy link

if you find a body and write:

joints = body.joints

Then to get the world coordinates of any joint: Example for Right Hand x = joints[PyKinectV2.JointType_HandRight].Position.x y = joints[PyKinectV2.JointType_HandRight].Position.y z = joints[PyKinectV2.JointType_HandRight].Position.z

all points are in meters

thanx that's help me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants