imaq.VideoDevice
Acquire one frame at a time from video device
Description
The imaq.VideoDevice
System object™ allows single-frame image acquisition and code generation from MATLAB®. It supports the same adaptors and hardware that the videoinput
object supports; however, it has different functions and
properties associated with it.
To acquire single frames from video device:
Create the
imaq.VideoDevice
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Syntax
Description
vidObj = imaq.VideoDevice
creates an
imaq.VideoDevice
System object, vidObj
, 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 the imaqhwinfo
function.
vidObj = imaq.VideoDevice(adaptorname)
creates an
imaq.VideoDevice
System object, vidObj
, 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.
vidObj = imaq.VideoDevice(adaptorname, deviceid)
creates
an imaq.VideoDevice
System object, vidObj
, 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
.
vidObj = imaq.VideoDevice(adaptorname, deviceid, format)
creates an imaq.VideoDevice
System object, vidObj
, 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).
vidObj = imaq.VideoDevice(adaptorname, deviceid, format,
P1, V1, ...)
Creates an imaq.VideoDevice
System object, vidObj
, 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 the table below for a list of applicable properties.
Properties
Usage
Description
acquires a single
frame from the frame
= vidObj()imaq.VideoDevice
System object, vidObj
. To change a property after calling
vidObj
, you must first release the VideoDevice using
the release
function. To reset the
internal states of vidObj
, use the reset
function.
Note
The first time you call imaq.VideoDevice
, it acquires
exclusive use of the hardware and will start streaming data.
[
acquires a single image frame from the frame
metadata
] = vidObj()imaq.VideoDevice
System object, vidObj
, plus metadata from the Kinect® for Windows® Depth sensor. You can return Kinect for Windows skeleton data using the imaq.VideoDevice
System object on the Kinect Depth sensor. For information on how to do this, see
Kinect for Windows Metadata.
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
Examples
Extended Capabilities
Version History
Introduced in R2012a