I knew that kinect v2 camera can detect the skeleton joint position, but I need to know how can I determine the (x,y,z) position of a certain point in a room using kinect- v2 camera?
point position using Kinect V2 camera
1.2k Views Asked by Ibrahim Seleem At
3
There are 3 best solutions below
1
On
For this you need to use CameraSpacePoint Structure
I give you an example in C#.
For that i will track the hand left and i suppose you have your joint.
internal Joint HandLeft;
For take a position you need to use this:
CameraSpacePoint pointLeft = HandLeft.Position;
After that you can use your position with this:
pointLeft.X
pointLeft.Y
pointLeft.Z
of course you can save the value in a float:
float test = pointLeft.Y;
0
On
you can determine the (x,y,z) position of 1-25 point of a person in kinect v2. (Z) means distance from each point to kinect sensor . if you need find each point of your frame you must use ColorFrame class then you can define your favorite position with Ellipse of course with a X-Y position. Your frame is 2D view frame so you dont have z position
you can take a look at Vitruvius libraries as it has the thing u are looking for like joint position and measuring distance.
Example of joint code:
body.Joints[JointType.HandLeft].Position.YExample of distance code:
Length(_bodies[_token.BodyArrIndex].Joints[JointType.SpineBase].Position)Vitruvius GitHub link: https://github.com/LightBuzz/Vitruvius
Vitruvius GitHub Gesture joints link: https://github.com/LightBuzz/Vitruvius/tree/master/Kinect%20v2/WPF/LightBuzz.Vitruvius/Gestures
Vitruvius website: https://vitruviuskinect.com/
Hope it helps!