imaqhwinfo
Information about available image acquisition hardware
Syntax
out = imaqhwinfo
out = imaqhwinfo(adaptorname
)
out = imaqhwinfo(adaptorname
,field
)
out = imaqhwinfo(adaptorname
,
deviceID)
out = imaqhwinfo(obj)
out = imaqhwinfo(obj,field
)
Description
out = imaqhwinfo
returns
out
, a structure that contains information about the image acquisition
adaptors available on the system. An adaptor is the interface between MATLAB® and the image acquisition devices connected to the system. The adaptor's main
purpose is to pass information between MATLAB and an image acquisition device via its driver.
out = imaqhwinfo(
returns adaptorname
)out
, a structure that contains information about the adaptor
specified by the character vector adaptorname
. The information
returned includes adaptor version and available hardware for the specified adaptor. To get a
list of valid adaptor names, use the imaqhwinfo
syntax.
out = imaqhwinfo(
returns the value of the field specified by the character vector
adaptorname
,field
)field
for the adaptor specified by the character vector
adaptorname
. The argument can be a single character vector or a
cell array of character vectors. If field
is a cell array,
out
is a 1-by-n
cell array where
n
is the length of field
. To get a list of
valid field names, use the imaqhwinfo('adaptorname')
syntax.
out = imaqhwinfo(
returns adaptorname
,
deviceID)out
, a structure containing information about
the device specified by the numeric device ID deviceID
. The
deviceID
can be a scalar or a vector. If deviceID
is
a vector, out
is a 1-by-n
structure array where
n
is the length of deviceID
.
out = imaqhwinfo(obj)
returns
out
, a structure that contains information about the specified image
acquisition object obj
. The information returned includes the adaptor
name, device name, video resolution, native data type, and device driver name and version.
If obj
is an array of device objects, then out
is a
1-by-n
cell array of structures where n
is the
length of obj
.
out = imaqhwinfo(obj,
returns the information in the field specified by field
)field
for the device
object obj
. field
can be a single field name or a cell
array of field names. out
is an
m
-by-n
cell array where m
is the
length of obj
and n
is the length of
field
. You can return a list of valid field names with the
imaqhwinfo(obj)
syntax.
Note
After you call imaqhwinfo
once, hardware information is cached by
the toolbox. To force the toolbox to search for new hardware that might have been
installed while MATLAB was running, use imaqreset
.
Note
To get a list of options you can use on a function, press the Tab key after entering a function on the MATLAB command line. The list expands, and you can scroll to choose a property or value. For information about using this advanced tab completion feature, see Using Tab Completion for Functions.
Examples
This example returns information about all the adaptors available on the system.
imaqhwinfo ans = InstalledAdaptors: {'matrox' 'winvideo'} MATLABVersion: '7.4 (R2007a)' ToolboxName: 'Image Acquisition Toolbox' ToolboxVersion: '2.1 (R2007a)'
This example returns information about all the devices accessible through a particular adaptor.
info = imaqhwinfo('winvideo') info = AdaptorDllName: [1x73 char] AdaptorDllVersion: '2.1 (R2007a)' AdaptorName: 'winvideo' DeviceIDs: {[1]} DeviceInfo: [1x1 struct]
This example returns information about a specific device accessible through a particular adaptor. You identify the device by its device ID.
dev_info = imaqhwinfo('winvideo', 1) dev_info = DefaultFormat: 'RGB555_128x96' DeviceFileSupported: 0 DeviceName: 'IBM PC Camera' DeviceID: 1 VideoInputConstructor: 'videoinput('winvideo', 1)' VideoDeviceConstructor: 'imaq.VideoDevice('winvideo', 1)' SupportedFormats: {1x34 cell}
This example gets information about the device associated with a particular video input object.
obj = videoinput('winvideo', 1); obj_info = imaqhwinfo(obj) obj_info = AdaptorName: 'winvideo' DeviceName: 'IBM PC Camera' MaxHeight: 96 MaxWidth: 128 NativeDataType: 'uint8' TotalSources: 1 VendorDriverDescription: 'Windows WDM Compatible Driver' VendorDriverVersion: 'DirectX 9.0'
This example returns the value of a particular field in the device information associated with a particular video input object.
field_info = imaqhwinfo(vid,'adaptorname') field_info = winvideo
Version History
Introduced before R2006a