M-File Help: VideoCamera_fg | View code for VideoCamera_fg |
Class to read from local video camera
A concrete subclass of ImageSource that acquires images from a local camera using a simple open-source frame grabber interface.
This class is not intended to be used directly, instead use the factory method VideoCamera.which will return an instance of this class if the interface is supported on your platform (Mac or Linux), for example
vid = VideoCamera.amera();
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 |
ImageSource, AxisWebCamera, Movie
Video camera constructor
V = VideoCamera_fg.CAMERA, OPTIONS) is a VideoCamera_fg.object that acquires images from the local video camera specified by the string CAMERA.
If CAMERA is '?' a list of available cameras, and their characteristics is displayed.
'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.
© 1990-2012 Peter Corke.