User`s guide
Getting Started Doing Image Acquisition Programmatically
1-11
in “Determining the Adaptor Name” on page 1-10.) In the data returned, the
DeviceIDs field is a cell array containing the device IDs of all the devices accessible
through the specified adaptor.
Note This example uses the DCAM adaptor. You should substitute the name of the
adaptor you would like to use.
info = imaqhwinfo('dcam')
info =
AdaptorDllName: [1x77 char]
AdaptorDllVersion: '2.1 (R2007a)'
AdaptorName: 'dcam'
DeviceIDs: {[1]}
DeviceInfo: [1x1 struct]
Determining the Supported Video Formats
To determine which video formats an image acquisition device supports, look in the
DeviceInfo field of the data returned by imaqhwinfo. The DeviceInfo field is a
structure array where each structure provides information about a particular device.
To view the device information for a particular device, you can use the device ID as a
reference into the structure array. Alternatively, you can view the information for a
particular device by calling the imaqhwinfo function, specifying the adaptor name and
device ID as arguments.
To get the list of the video formats supported by a device, look at SupportedFormats
field in the device information structure. The SupportedFormats field is a cell array
of strings where each string is the name of a video format supported by the device. For
more information, see “Determining Supported Video Formats” on page 5-5.
dev_info = imaqhwinfo('dcam',1)
dev_info =
DefaultFormat: 'F7_Y8_1024x768'
DeviceFileSupported: 0
DeviceName: 'XCD-X700 1.05'
DeviceID: 1
VideoInputConstructor: 'videoinput('dcam', 1)'
VideoDeviceConstructor: 'imaq.VideoDevice('dcam', 1)'