You can acquire images with any type of supported hardware using
the videoinput
object. If you have GigE Vision
or Matrox hardware, you can continue to use the existing GigE Vision
and Matrox adaptors (gige
and matrox
)
with the videoinput
object, or you can use the
new interfaces for GigE Vision and Matrox, which provide new objects, gigecam
and matroxcam
.
See Acquisition Using GigE Vision Hardware and Acquisition Using Matrox Hardware for more information
on those interfaces.
In addition to doing the acquisition programmatically using
the videoinput
object, you can also acquire images
using any type of supported hardware using the Image Acquisition Tool,
a full user interface that enables you to set acquisition properties,
preview the image, and acquire images. For more information on using
the tool, see Acquisition Using the Image Acquisition Tool.
Note: The functionality for all supported hardware is now available via the Support Package Installer. Starting with R2014a, each adaptor is available separately through the Support Package Installer, and you must install the appropriate support packages to use the toolbox with your hardware. For more information, see Image Acquisition Support Packages for Hardware Adaptors.
imaqtool | Launch Image Acquisition Tool |
videoinput | Create video input object |
imaq.VideoDevice | Acquire one frame at a time from video device |
getdata | Acquired image frames to MATLAB workspace |
peekdata | Most recently acquired image data |
getsnapshot | Immediately return single image frame |
set | Configure or display image acquisition object properties |
start | Obtain exclusive use of image acquisition device |
islogging | Determine whether video input object is logging |
isrunning | Determine whether video input object is running |
isvalid | Determine whether image acquisition object is associated with image acquisition device |
wait | Wait until image acquisition object stops running or logging |
stop | Stop video input object |
clear | Clear image acquisition object from MATLAB workspace |
delete | Remove image acquisition object from memory |
flushdata | Remove data from memory buffer used to store acquired image frames |
obj2mfile | Convert video input objects to MATLAB code |
imaqmontage | Sequence of image frames as montage |
load | Load image acquisition object into MATLAB workspace |
save | Save image acquisition objects to MAT-file |
trigger | Initiate data logging |
triggerconfig | Configure video input object trigger properties |
triggerinfo | Provide information about available trigger configurations |
Triggers can come from an internal or external event or source.
Controlling Logging Parameters
Describes how you can control various aspects of data logging using toolbox functions and video input object properties.
While a video input object is running, you can log image data being acquired to a disk file. Logging image data to disk provides a record of your data.
Setting the Values of Trigger Properties
Describes how to set the values of video input object trigger properties.
To specify the type of trigger you want to execute,
set the value of the TriggerType
property of
the video input object. You can use immediate, manual, or hardware
triggering.
You can determine your device’s default color space and change the color space.
Waiting for an Acquisition to Finish
You can use the wait
function to
block the command line until an acquisition completes.
You can free memory using the flushdata
function.
You can enhance the power and flexibility of your image acquisition application by using event callbacks.
Using the Default Callback Function
Introduces events and callbacks by showing a simple example.
Describes the information generated with each event and how to access it.
Creating and Executing Callback Functions
Describes how to write a callback function and associate it with an event callback.
Bringing Image Data into the MATLAB Workspace
You can bring acquired image data into the MATLAB® workspace in multiple ways.
Working with Image Data in MATLAB Workspace
Describes the format of the image data returned to the MATLAB workspace.
You can determine your device’s default color space and change the color space.
You can use the getdata
function
to retrieve timing information, such as when a trigger is executed
or when a frame is acquired.
Creating the VideoDevice System Object
You use the imaq.VideoDevice
function
to create the System object. You can specify the adaptor name, device
ID, and format when you create the object.
Using VideoDevice System Object to Acquire Frames
The basic workflow for using the VideoDevice System object is to create the object, preview the image, set any properties, acquire a frame, and clear the object.
Using Properties on a VideoDevice System Object
You can specify properties at the time of object creation, or they can be specified and changed after the object is created.
Code Generation with VideoDevice System Object
The VideoDevice System object supports code generation
in MATLAB via the codegen
function.
Provides an overview of data logging and a brief description of all the trigger properties supported by the video input object. Acquired frames can be logged in a buffer in memory, a disk file, or both.
Provides an overview of data logging and the process of bringing frames into the MATLAB workspace.
Defines all the event types supported by the toolbox.
VideoDevice System Object Overview
The VideoDevice System object allows single-frame image acquisition and code generation from MATLAB.
Image Acquisition Toolbox Properties
These properties are available in the toolbox.