Camera

Camera superclass

An abstract superclass for Toolbox camera classes.

Methods

plot plot projection of world point to image plane
hold control figure hold for image plane window
ishold test figure hold for image plane
clf clear image plane
figure figure holding the image plane
mesh draw shape represented as a mesh
point draw homogeneous points on image plane
line draw homogeneous lines on image plane
plot_camera draw camera in world view
rpy set camera attitude
move clone Camera after motion
centre get world coordinate of camera centre
delete object destructor
char convert camera parameters to string
display display camera parameters

Properties (read/write)

npix image dimensions (2x1)
pp principal point (2x1)
rho pixel dimensions (2x1) in metres
T camera pose as homogeneous transformation

Properties (read only)

nu number of pixels in u-direction
nv number of pixels in v-direction
u0 principal point u-coordinate
v0 principal point v-coordinate

Notes


Camera.Camera

Create camera object

Constructor for abstact Camera(options) creates a default (abstract) camera with null parameters.

Options

'name', N Name of camera
'image', IM Load image IM to image plane
'resolution', N Image plane resolution: NxN or N=[W H]
'sensor', S Image sensor size in metres (2x1) [metres]
'centre', P Principal point (2x1)
'pixel', S Pixel size: SxS or S=[W H]
'noise', SIGMA Standard deviation of additive Gaussian noise added to returned image projections
'pose', T Pose of the camera as a homogeneous transformation
'color', C Color of image plane background (default [1 1 0.8])

Notes

See also

CentralCamera, fisheyecamera, CatadioptricCamera, SphericalCamera


Camera.centre

Get camera position

p = C.centre (3x1).

Camera.char

Convert to string

s = C.

Camera.clf

Clear the image plane

C.

Camera.delete

Camera object destructor

C.Camera object and removes the object.

Camera.display

Display value

C.Camera.char


Camera.figure

Return figure handle

H = C.figure that contains the camera's image plane graphics.

Camera.hold

Control hold on image plane graphics

C.hold mode is set on if H is true (or > 0), and off if H is false (or 0).

Camera.ishold

Return image plane hold status

H = C.

Camera.line

Plot homogeneous lines on image plane

C.

Camera.mesh

Plot mesh object on image plane

C. 'Tobj', T Transform all points by the homogeneous transformation T before projecting them to the camera image plane. 'Tcam', T Set the camera pose to the homogeneous transformation T before projecting points to the camera image plane. Temporarily overrides the current camera pose C.T.

See also

mesh, cylinder, sphere, mkcube, Camera.plot, Camera.hold, Camera.clf


Camera.move

Instantiate displaced camera

C2 = C.

Camera.plot

Plot points on image plane

C.plot(p) as above but returns the image plane coordinates uv (2xN). If p has 3 dimensions (3xNxS) then it is considered a sequence of point sets and is displayed as an animation.

Options

'Tobj', T Transform all points by the homogeneous transformation T before projecting them to the camera image plane.
'Tcam', T Set the camera pose to the homogeneous transformation T before projecting points to the camera image plane. Overrides the current camera pose C.T.
'fps', N Number of frames per second for point sequence display
'sequence' Annotate the points with their index
'textcolor', C Text color for annotation (default black)
'textsize', S Text size for annotation (default 12)
'drawnow' Execute MATLAB drawnow function
Additional options are considered MATLAB linestyle parameters and are passed directly to Camera.mesh, Camera.hold, Camera.clf


Camera.plot_camera

Display camera icon in world view

C. 'Tcam', T Camera displayed in pose T (homogeneous transformation 4x4) 'scale', S Overall scale factor (default 0.2 x maximum axis dimension)

Notes

  • The graphic handles are stored within the Camera object.

Camera.point

Plot homogeneous points on image plane

C.

Camera.rpy

Set camera attitude

C.rpy(rpy) as above but rpy=[R,p,y].

Machine Vision Toolbox for MATLAB © 1990-2011 Peter Corke.