Main Content

Acquisition Using Any Hardware

Specify acquisition parameters and acquire image data using the videoinput interface

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 Explorer, an app that enables you to set acquisition parameters, preview the image, and acquire images. For more information on using the app, see Acquisition Using Image Acquisition Explorer.

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.


videoinputCreate video input object
imaq.VideoDeviceAcquire one frame at a time from video device
getselectedsourceReturn currently selected video source object
chunkDataInfoView hardware metadata configuration status (Since R2024a)
commandsList of commands available for GigE Vision or GenICam GenTL camera
executeCommandExecute command on GigE Vision or GenICam GenTL camera
getdataAcquired image frames to MATLAB workspace
peekdataMost recently acquired image data
getsnapshotImmediately return single image frame
setConfigure or display image acquisition object properties
startObtain exclusive use of image acquisition device
isloggingDetermine whether video input object is logging
isrunningDetermine whether video input object is running
isvalidDetermine whether image acquisition object is associated with image acquisition device
waitWait until image acquisition object stops running or logging
stopStop video input object
clearClear image acquisition object from MATLAB workspace
deleteRemove image acquisition object from memory
flushdataRemove data from memory buffer used to store acquired image frames
obj2mfileConvert video input objects to MATLAB code
imaqmontageSequence of image frames as montage
loadLoad image acquisition object into MATLAB workspace
saveSave image acquisition objects to MAT-file
triggerInitiate data logging
triggerconfigConfigure video input object trigger properties
triggerinfoProvide information about available trigger configurations


Image Acquisition ExplorerAcquire images and video from hardware (Since R2022a)


Programmatic Workflow

Using Events and Callbacks When Acquiring Data Programmatically

Working with Acquired Data Programmatically

Acquiring Data Using the VideoDevice System Object

Image Acquisition Toolbox Overview

  • Data Logging
    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.
  • Image Acquisition Overview
    Provides an overview of data logging and the process of bringing frames into the MATLAB workspace.
  • Event Types
    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.