Answered by:
Calculating Kinect pixel size
Question

Hi,
I have a Kinect. I have no problems running it and getting (also) depth info.
I am looking for suggestions on how to calculate each pixel size as a function of the vertical distance (i.e. the depth information the Kinect generates) from the sensor
Thanks
Yori
Answers

The horizontal angle of view for the depth camera is 57 degrees.
Where d is depth and w is the frame width, you should be able to calculate a pixel width as: tan(28.5) * 2 * d/w.
[Shameless plug  this formula is from chapter 3 of the Beginning Kinect Programming book.]
You can also retrieve the horizontal field of view of the depth camera (57 degrees) by calling DepthImageStream.NominalHorizontalFieldOfView property.
James Ashley  Presentation Layer Architect at Razorfish Emerging Experiences
jamesashley@imaginativeuniversal.com
www.imaginativeuniversal.com www.emergingexperiences.com Proposed as answer by Carmine Si  MSFTMicrosoft employee Friday, March 9, 2012 12:09 AM
 Marked as answer by Carmine Si  MSFTMicrosoft employee Tuesday, May 1, 2012 10:06 PM
All replies

The horizontal angle of view for the depth camera is 57 degrees.
Where d is depth and w is the frame width, you should be able to calculate a pixel width as: tan(28.5) * 2 * d/w.
[Shameless plug  this formula is from chapter 3 of the Beginning Kinect Programming book.]
You can also retrieve the horizontal field of view of the depth camera (57 degrees) by calling DepthImageStream.NominalHorizontalFieldOfView property.
James Ashley  Presentation Layer Architect at Razorfish Emerging Experiences
jamesashley@imaginativeuniversal.com
www.imaginativeuniversal.com www.emergingexperiences.com Proposed as answer by Carmine Si  MSFTMicrosoft employee Friday, March 9, 2012 12:09 AM
 Marked as answer by Carmine Si  MSFTMicrosoft employee Tuesday, May 1, 2012 10:06 PM

Note though that DepthImageStream.NominalHorizontalFieldOfView is 58,5 and not 57 as specified in the documentation. Likewise is DepthImageStream.NominalVerticalFieldOfView 45,6 and not 43. (and the values change if you change the resolution  for some unknown reason)
Best regards,
Jesper