User`s guide
1 Getting Started
1-12
SupportedFormats: {'F7_Y8_1024x768' 'Y8_1024x768'}
Step 3: Create a Video Input Object
In this step you create the video input object that the toolbox uses to represent the
connection between MATLAB and an image acquisition device. Using the properties
of a video input object, you can control many aspects of the image acquisition process.
For more information about image acquisition objects, see “Creating Image Acquisition
Objects” on page 5-8.
To create a video input object, use the videoinput function at the MATLAB prompt.
The DeviceInfo structure returned by the imaqhwinfo function contains the default
videoinput function syntax for a device in the VideoInputConstructor field. For
more information the device information structure, see “Determining the Supported
Video Formats” on page 1-11.
The following example creates a video input object for the DCAM adaptor. Substitute the
adaptor name of the image acquisition device available on your system.
vid = videoinput('dcam',1,'Y8_1024x768')
The videoinput function accepts three arguments: the adaptor name, device ID, and
video format. You retrieved this information in step 2. The adaptor name is the only
required argument; the videoinput function can use defaults for the device ID and
video format. To determine the default video format, look at the DefaultFormat field
in the device information structure. See “Determining the Supported Video Formats” on
page 1-11 for more information.
Instead of specifying the video format, you can optionally specify the name of a device
configuration file, also known as a camera file. Device configuration files are typically
supplied by frame grabber vendors. These files contain all the required configuration
settings to use a particular camera with the device. See “Using Device Configuration
Files (Camera Files)” on page 5-12 for more information.
Viewing the Video Input Object Summary
To view a summary of the video input object you just created, enter the variable name
vid at the MATLAB command prompt. The summary information displayed shows many
of the characteristics of the object, such as the number of frames that will be captured
with each trigger, the trigger type, and the current state of the object. You can use video
input object properties to control many of these characteristics. See “Step 5: Configure
Object Properties (Optional)” on page 1-14 for more information.