Answered by:
Camera intrinsic parameters
Question

Answers

Look at MSR_NuiImageCamera.h include file in $(MSRKINECTSDK)\inc
You'll see the following definitions:
#define NUI_CAMERA_DEPTH_NOMINAL_FOCAL_LENGTH_IN_PIXELS (285.63f) // Based on 320x240 pixel size.
#define NUI_CAMERA_DEPTH_NOMINAL_INVERSE_FOCAL_LENGTH_IN_PIXELS (3.501e3f) // (1/NUI_CAMERA_DEPTH_NOMINAL_FOCAL_LENGTH_IN_PIXELS)
#define NUI_CAMERA_DEPTH_NOMINAL_DIAGONAL_FOV (70.0f)
#define NUI_CAMERA_DEPTH_NOMINAL_HORIZONTAL_FOV (58.5f)
#define NUI_CAMERA_DEPTH_NOMINAL_VERTICAL_FOV (45.6f)#define NUI_CAMERA_COLOR_NOMINAL_FOCAL_LENGTH_IN_PIXELS (531.15f) // Based on 640x480 pixel size.
#define NUI_CAMERA_COLOR_NOMINAL_INVERSE_FOCAL_LENGTH_IN_PIXELS (1.83e3f) // (1/NUI_CAMERA_COLOR_NOMINAL_FOCAL_LENGTH_IN_PIXELS)
#define NUI_CAMERA_COLOR_NOMINAL_DIAGONAL_FOV ( 73.9f)
#define NUI_CAMERA_COLOR_NOMINAL_HORIZONTAL_FOV ( 62.0f)
#define NUI_CAMERA_COLOR_NOMINAL_VERTICAL_FOV ( 48.6f)aspect ratio would be 58.5/45.6 for depth camera, or 62/48.6 for color camera (which both are approx 1.28).
Hope this helps,
Eddy
I'm here to help Proposed as answer by Eddy EscardoRaffo [MSFT] Monday, October 17, 2011 8:25 AM
 Marked as answer by Eddy EscardoRaffo [MSFT] Friday, October 21, 2011 1:31 AM
All replies

Which parameters do you mean? Brightness, autogain, etc? If so, there is no way to obtain them, but request has been made before (http://social.msdn.microsoft.com/Forums/enIE/kinectsdk/thread/b72253bc89b04a6e9d34dfbe528f1a90), and it already was recorded.
Thanks!
Eddy
I'm here to help Proposed as answer by Eddy EscardoRaffo [MSFT] Monday, October 17, 2011 7:23 AM
 Unproposed as answer by StudentAtManchester Monday, October 17, 2011 8:13 AM


Look at MSR_NuiImageCamera.h include file in $(MSRKINECTSDK)\inc
You'll see the following definitions:
#define NUI_CAMERA_DEPTH_NOMINAL_FOCAL_LENGTH_IN_PIXELS (285.63f) // Based on 320x240 pixel size.
#define NUI_CAMERA_DEPTH_NOMINAL_INVERSE_FOCAL_LENGTH_IN_PIXELS (3.501e3f) // (1/NUI_CAMERA_DEPTH_NOMINAL_FOCAL_LENGTH_IN_PIXELS)
#define NUI_CAMERA_DEPTH_NOMINAL_DIAGONAL_FOV (70.0f)
#define NUI_CAMERA_DEPTH_NOMINAL_HORIZONTAL_FOV (58.5f)
#define NUI_CAMERA_DEPTH_NOMINAL_VERTICAL_FOV (45.6f)#define NUI_CAMERA_COLOR_NOMINAL_FOCAL_LENGTH_IN_PIXELS (531.15f) // Based on 640x480 pixel size.
#define NUI_CAMERA_COLOR_NOMINAL_INVERSE_FOCAL_LENGTH_IN_PIXELS (1.83e3f) // (1/NUI_CAMERA_COLOR_NOMINAL_FOCAL_LENGTH_IN_PIXELS)
#define NUI_CAMERA_COLOR_NOMINAL_DIAGONAL_FOV ( 73.9f)
#define NUI_CAMERA_COLOR_NOMINAL_HORIZONTAL_FOV ( 62.0f)
#define NUI_CAMERA_COLOR_NOMINAL_VERTICAL_FOV ( 48.6f)aspect ratio would be 58.5/45.6 for depth camera, or 62/48.6 for color camera (which both are approx 1.28).
Hope this helps,
Eddy
I'm here to help Proposed as answer by Eddy EscardoRaffo [MSFT] Monday, October 17, 2011 8:25 AM
 Marked as answer by Eddy EscardoRaffo [MSFT] Friday, October 21, 2011 1:31 AM




Well, in pixel dimensions for 640x480 image, to match units in which nominal focal length is given, (x,y,z) for principal point would be (320.0,240.0,531.15)
Eddy
I'm here to help Marked as answer by StudentAtManchester Tuesday, October 18, 2011 4:41 AM
 Unmarked as answer by StudentAtManchester Tuesday, October 18, 2011 4:42 AM
 Marked as answer by StudentAtManchester Tuesday, October 18, 2011 7:56 AM
 Unmarked as answer by StudentAtManchester Tuesday, October 18, 2011 2:20 PM



Hi Eddy,
Thanks but I need focal length in mm or metres to do conversion from pixels to real world coordinates. It would help if either the fov or the focal length is in mm. As one of the parameters in the conversion matrix is in pixels/mm.
thanks,
Anu
Anu Aggarwal 
You don't need focal length in mm or meters to convert to real world coordinates. Since you have the depth image pixel locations and focal length in pixels, that gives you x, y and z in pixel coordinates. Then, you have the depth pixel value, which corresponds to z, in millimeters, so you can do simple triangulation to get x and y also in millimeters.
To see how this computation would work, see NuiTransformDepthImageToSkeletonF in MSR_NuiSkeleton.h in SDK installation directory. In managed code, you can use SkeletonEngine.DepthImageToSkeleton method.
Eddy
I'm here to help Proposed as answer by Eddy EscardoRaffo [MSFT] Friday, October 21, 2011 5:39 PM


Still, though, calibrations and other computations that need focal length will typically need it in pixels. E.g.: http://www.ros.org/wiki/kinect_calibration/technical#Focal_lengths
Could you show me the computation description for which you need focal length in meters?
Eddy
I'm here to help