0

Does anybody knows how many pixels correspond for each millimeter of depth value in images taken from kinect for xbox360? I'm using the standard resolution and settings...

Thanks!

Vangelis
  • 1
  • 1
  • Sounds like the same question to me: http://stackoverflow.com/questions/11784888/kinect-map-x-y-pixel-coordinates-to-real-world-coordinates-using-depth – Farside Mar 02 '16 at 16:54
  • Are you using kinect v1 or kinect v2? – Rafaf Tahsin Mar 03 '16 at 08:41
  • I guess it's v1... It's for xbox 360... – Vangelis Mar 04 '16 at 12:58
  • Not exactly the same... I'll make it easier... In a screen 380mm width with resolution 1920 pixels in X axis, it's 5.05 pixels for each milimeter... in kinect (or general a camera) how can I do the same? I guess it's something like (field of view)/(resolution) and somehow related to the distance from the camera... but I'm not sure and i can not find it anywhere... – Vangelis Mar 04 '16 at 13:08

1 Answers1

0

1 pixel corresponds to a number of millimiters that depends on the depth value of that pixels (i.e. its level of gray).

The simplest way you can get the distance between two pixels in a depth image is to convert those pixels (which are expressed in Depth Space) in real world coordinates (i.e. in Skeleton Space)1. Then, you can calculate the distance between those points using a common euclidean distance formula.

So if you have two pixels P1 and P2, with depth values respectively equal to D1 and D2, you can proceed as follows:

DepthImagePoint dip1 = new DepthImagePoint();
dip1.X = P1.x;
dip1.Y = P1.y;
dip1.Depth = D1;
DepthImagePoint dip2 = new DepthImagePoint();
dip2.X = P2.x;
dip2.Y = P2.y;
dip2.Depth = D2;
SkeletonPoint sp1 = CoordinateMapper.MapDepthPointToSkeletonPoint(DepthImageFormat.Resolution640x480Fps30, dip1);
SkeletonPoint sp2 = CoordinateMapper.MapDepthPointToSkeletonPoint(DepthImageFormat.Resolution640x480Fps30, dip2);

double dist = euclideanDistance(sp1, sp2);


1 See Coordinate Spaces for more information.
Vito Gentile
  • 13,336
  • 9
  • 61
  • 96