User`s guide
5 Connecting to Hardware
5-2
Getting Hardware Information
In this section...
“Getting Hardware Information” on page 5-2
“Determining the Device Adaptor Name” on page 5-2
“Determining the Device ID” on page 5-3
“Determining Supported Video Formats” on page 5-5
Getting Hardware Information
To connect to an image acquisition device from within MATLAB, you must create a video
input object. This object represents the connection between MATLAB and the device.
You can use object properties to control various aspects of the acquisition. Before you can
create the object, you need several pieces of information about the device that you want
to connect to.
To access an image acquisition device, the toolbox needs several pieces of information:
• The name of the adaptor the toolbox uses to connect to the image acquisition device
• The device ID of the device you want to access
• The video format of the video stream or, optionally, a device configuration file (camera
file)
You use the imaqhwinfo function to retrieve this information, as described in the
following subsections.
Note When using imaqhwinfo to get information about a device, especially devices that
use a Video for Windows (VFW) driver, you might encounter dialog boxes reporting an
assertion error. Make sure that the software drivers are installed correctly and that the
acquisition device is connected to the computer.
Determining the Device Adaptor Name
An adaptor is the software the toolbox uses to communicate with an image acquisition
device via its device driver. The toolbox includes adaptors for some vendors of image