Units for SkeletonPoint data?

# Units for SkeletonPoint data?

• Thursday, February 16, 2012 11:38 PM

Hi there,

I'm converting my raw depth data into real world co-ordinates using MapDepthToSkeletonPoint() but I'm not sure about the values I'm getting.

For example (xvalue, yvalue, depthvalue) of (36, 197, 2580) maps to (-0.139, -0.08, 0.322). Looking at previous documentation it implies that this sort of thing should be in metres but all the values are too small)

My values of x and y are assuming the top left of image is the centre and then 197 rows down and 36 across.

### All Replies

• Friday, February 17, 2012 1:47 AM
Owner

The depth data is already converted for you. The depthValue = 2580 is the distance in millimeters. Can you provide more detail on how you are getting the depth value?

Is your intent to map a depth distance value to a position on a skeleton in the "real world"

• Friday, February 17, 2012 5:10 AM

Note that this is intended to be used directly with data from the depth pixel buffer, not a "coordinate".  The difference here is that (36, 197, ...) is, as you say, 36 over, 197 down, the depth value should be the depth value in the depth pixel buffer at that point.

In this case, a pixel with a depth of 2580mm and with, say, player index 4 found, would have a value of:

So, your depth was interpreted as (2580 >> DepthImageFrame.PlayerIndexBitmaskWidth) (that is, divided by 8), which is 322mm, which is precisely what you received.

Like the Depth value, the X and Y coords are also "meters from the center of the frame".

• Friday, February 17, 2012 9:34 AM

Hi there,

Yes I am trying to adjust into a real world co-ordinate system as I am trying to get a plane equation for the floor and then calculate the distance between the centre of an object and the floor (I know there's a way to do this with a skeleton but I'm trying to do it with not just skeletons)

Thankyou Adam, that makes more sense now. I've fed in the depth pixel buffer value instead and the numbers make a lot more sense :)

• Friday, February 17, 2012 4:19 PM

It may not work for you, but you may find SkeletonFrame.FloorClipPlane useful to consider.  The 4 item tuple represent the coefficients for a floorplane equation in the form Ax+By+Cz+d = 0.