简体   繁体   中英

point position using Kinect V2 camera

我知道kinect v2摄像机可以检测骨骼的关节位置,但是我需要知道如何使用kinect-v2摄像机确定房间中某个点的(x,y,z)位置吗?

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;

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 XY 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.

This gets the y coordinate of the left hand joint

Example of joint code: body.Joints[JointType.HandLeft].Position.Y

This gets the distance of the coordinates to the Kinect V2 sensor

Example 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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM