CentralCamera

RTSX Help: Construct a central-projection perspective camera

CentralCamera

CentralCamera( ) creates a data structure that contains central-projection perspective camera parameters. The camera model assumes central projection; i.e., the focal point is at z=0 and the image plane is at z=f. The image is not inverted.

Syntax

  • cam = CentralCamera(options)

Output Arguments

  • cam — a camera data structure containing the following fields
    • name — camera name
    • f — focal length (meters)
    • rho — pixel size [W, H]
    • npix — image plane resolution [W, H]
    • pp — principal point (2 x 1)
    • T — camera pose (4 x 4 homogeneous transformation matrix)
    • comment — general comment string for this camera

Options

Note : options in [ ] must be passed to the function in pairs.

  • ‘default’ — Default camera parameters: 1024×1024, f=8mm, 10um pixels, camera at origin, optical axis is z-axis, u- and v-axes parallel to x- and y-axes respectively.
  • [ ‘name’, ‘robot name’] — give the camera model some name for reference.
  • [ ‘comment’, ‘comment string’] — a comment for this camera.
  • [ ‘focal’, f] — camera focal length (meters)
  • [ ‘resolution’, N] — image plane resolution [W, H]
  • [ ‘center’, P] — principal point [u,v]
  • [ ‘pixel’, S] — pixel size: Ss = [W H]
  • [ ‘pose’, T] — specify a pose for camera, T must be a 4 x 4 homogeneous transformation matrix

Examples

cam = CentralCamera('default');
cam = CentralCamera('focal', 0.015);
cam = CentralCamera('focal', 0.015, 'pixel', 10e-6, ...
'resolution', [1280 1024], 'centre', [640 512], 'name', 'mycamera')

See Also

  • CamProject — project world points
  • CamPlot — plot projection of world point on image plane
  • IBVS4 — Image-based visual servoing control for 4-feature points