M-File Help: VideoCamera_IAT | View code for VideoCamera_IAT |
Class to read from local video camera
A concrete subclass of ImageSource that acquires images from a local camera using the MATLAB Image Acquisition Toolbox (imaq). This Toolbox provides a multiplatform interface to a range of cameras, and this class provides a simple wrapper.
This class is not intended to be used directly, instead use the factory method Video which will return an instance of this class if the Image Acquisition Toolbox is installed, for example
vid = VideoCamera();
grab | Aquire and return the next image |
size | Size of image |
close | Close the image source |
char | Convert the object parameters to human readable string |
videocamera, ImageSource, AxisWebCamera, Movie
Video camera constructor
v = Video_IAT(camera, options) is a Video object that acquires images from the local video camera specified by the string camera.
'uint8' | Return image with uint8 pixels (default) |
'float' | Return image with float pixels |
'double' | Return image with double precision pixels |
'grey' | Return greyscale image |
'gamma', G | Apply gamma correction with gamma=G |
'scale', S | Subsample the image by S in both directions. |
'resolution', S | Obtain an image of size S=[W H]. |
'id', I | ID of camera |
Notes:
Convert to string
V.char() is a string representing the state of the camera object in human readable form.
Close the image source
V.close() closes the connection to the camera.
Acquire image from the camera
im = V.grab() acquires an image from the camera.
available adaptors and cameras
Control image preview
V.preview(true) enables camera preview in a separate window
© 1990-2012 Peter Corke.