User`s guide

14 Using the VideoDevice System Object
14-6
Function Purpose
determined by the value of the VideoDevice System object ROI
property. If not specified, it uses the default resolution for the
device.
closepreview Close live image preview window.
closepreview(obj)
closes the live preview window for VideoDevice System object,
obj.
imaqhwinfo Returns information about the object.
imaqhwinfo(obj)
displays information about the VideoDevice System object, obj.
The basic workflow for using the VideoDevice System object is to create the object,
preview the image, set any properties, acquire a frame, and clear the object, as shown
here.
1
Construct a VideoDevice System object associated with the Winvideo adaptor with
device ID of 1.
vidobj = imaq.VideoDevice('winvideo', 1);
2
Set an object-level property, such as ReturnedColorSpace.
vidobj.ReturnedColorSpace = 'grayscale';
Note that the syntax for setting an object-level property is
<object_name>.<property_name> = <property_value>, where the value can
be a string or a numeric.
3
Set a device-specific property, such as Brightness.
vidobj.DeviceProperties.Brightness = 150;
Note that the syntax for setting a device-specific property is to list the object name,
the DeviceProperties object, and the property name using dot notation, and then
make it equal to the property value.
4
Preview the image.
preview(vidobj)