Creating the VideoDevice System Object
You use the imaq.VideoDevice function to create the System object™. You can specify the adaptorname,
deviceid, and format at the time of object
creation, or it will use defaults, as follows.
| Constructor | Purpose |
|---|---|
obj = imaq.VideoDevice | Creates a VideoDevice System object, obj, that acquires images from a
specified image acquisition device. When you specify no parameters, by
default, it selects the first available device for the first adaptor
returned by imaqhwinfo. |
obj = imaq.VideoDevice(adaptorname) | Creates a VideoDevice System object, obj, using the first device of the
specified adaptorname. adaptorname
is a character vector that specifies the name of the adaptor used to
communicate with the device. Use the imaqhwinfo
function to determine the adaptors available on your system. |
obj = imaq.VideoDevice(adaptorname,
deviceid) | Creates a VideoDevice System object, obj, with the default format for
specified adaptorname and
deviceid. deviceid is a numeric
scalar value that identifies a particular device available through the
specified adaptorname. Use the
imaqhwinfo(adaptorname) syntax to determine the
devices available and corresponding values for
deviceid. |
obj = imaq.VideoDevice(adaptorname, deviceid,
format) | Creates a VideoDevice System object, obj, where format
is a character vector that specifies a particular video format supported
by the device or a device configuration file (also known as a camera
file). |
obj = imaq.VideoDevice(adaptorname, deviceid, format, P1,
V1, ...) | Creates a VideoDevice System object, obj, with the specified property
values. If an invalid property name or property value is specified, the
object is not created. |
Specifying properties at the time of object creation is optional. They can also be specified after the object is created. See Using Properties on a VideoDevice System Object for a list of applicable properties.