Documentation‎ > ‎

Camera model

The distorted camera model used is the same as used by OpenCV and should also be compatible with the model used by matlab computer vision toolbox. This means you can use common tools to do the lens calibration. You can also use ImGRAFT if you have sufficient ground control points (see e.g. this example).

The equations for the lens distortion model can be seen on the OpenCV page or in the code for camera.project.

Internal camera parameters:

  • Size of image in pixels [#rows, #columns]
  • Focal length in pixel units (two element vector [fx,fy]). 
  • Camera center in pixel coordinates (two element vector: [cx,cy]): Note matlab uses 1-based indexing unlike opencv. 
  • Radial distortion coefficients. (a six element vector: [k1-k6])
  • Tangential distortion coefficients (two element vector: [p1,p2])

External camera parameters:

  • world coordinates of camera.
  • viewdirection - [yaw,pitch,roll]. 
    • "Yaw": rotation about z (0=looking east)
    • Pitch: look up/down angle
    • Roll: camera roll (horizon tilt).