none
Camera intrinsic parameters RRS feed

  • Question

  • HI

     

    I am using a managed code application. Please advice how to find the intrinsic camera parameters for the RGB?

     

    Regards and thanks in advance,

    Anu


    Anu Aggarwal
    Thursday, October 13, 2011 4:55 PM

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.501e-3f) // (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.83e-3f)  // (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
    Monday, October 17, 2011 8:25 AM

All replies

  • Which parameters do you mean? Brightness, auto-gain, etc? If so, there is no way to obtain them, but request has been made before (http://social.msdn.microsoft.com/Forums/en-IE/kinectsdk/thread/b72253bc-89b0-4a6e-9d34-dfbe528f1a90), and it already was recorded.

    Thanks!
    Eddy


    I'm here to help
    Monday, October 17, 2011 7:23 AM
  • Hi Eddy,

     

    I meant the focal length, principal point and aspect ratio. 

    Thanks,

    Anu


    Anu Aggarwal
    Monday, October 17, 2011 8:12 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.501e-3f) // (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.83e-3f)  // (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
    Monday, October 17, 2011 8:25 AM
  • Thanks a ton for that, Eddy.

     

    Could you advice on principal point as well please? For the color camera!

     

    Thanks,

    Anu


    Anu Aggarwal
    Monday, October 17, 2011 4:56 PM
  • What do you mean by principal point? Coordinates of point at image center?

    Eddy


    I'm here to help
    Monday, October 17, 2011 6:15 PM
  • Yes, please.

     

    Thanks

    Anu


    Anu Aggarwal
    Monday, October 17, 2011 6:52 PM
  • 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
    Monday, October 17, 2011 7:30 PM
  • HI Eddy, 

     

    Could you please give focal length in metres etc as well? Please advice about the units of fov as well.

     

    Sorry if this sounds stupid but I am new to all this. 

     

    Thanks


    Anu Aggarwal
    Tuesday, October 18, 2011 2:23 PM
  • FOV is given in degrees. Not sure about focal length in meters. I could try to find out, but what is the application where you need this? Maybe there's a way to obtain what you need without this number.

    Eddy


    I'm here to help
    Friday, October 21, 2011 1:03 AM
  • 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
    Friday, October 21, 2011 5:18 AM
  • 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
    Friday, October 21, 2011 5:39 PM
  • Thanks Eddy,

    But I am converting a color image and not a depth image!

     

    Thanks

     

    Anu


    Anu Aggarwal
    Friday, October 21, 2011 7:36 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
    Monday, October 24, 2011 8:45 PM