Image Acquisition Toolbox
Together, MATLAB, Image Acquisition Toolbox, and Image Processing Toolbox™ (and, optionally, Computer Vision System Toolbox™) provide a complete environment for developing customized imaging solutions. You can acquire images and video, visualize data, develop processing algorithms and analysis techniques, and create Ui's and apps. The image acquisition engine enables you to acquire frames as fast as your camera and PC can support for high speed imaging. In addition, you can use Image Acquisition Toolbox with Simulink and Computer Vision System Toolbox to model and simulate real-time embedded imaging systems.
Image Acquisition Toolbox simplifies the acquisition process by providing a consistent interface across operating systems, hardware devices, and vendors. The toolbox provides multiple ways to access hardware devices from MATLAB and Simulink: the Image Acquisition Tool, a programmatic interface in MATLAB, and a block for Simulink. Each workflow provides access to camera properties and controls while enabling you to solve different types of problems with the strengths of each environment.
The Image Acquisition app enables you to work with image and video acquisition devices and is well suited for interactive configuration of cameras. You can browse all hardware devices available on your computer, change device settings, select a region of interest (ROI), preview an acquisition, acquire images and video, and record data. A preview window helps verify and optimize your acquisition parameters by automatically reflecting any adjustments made to camera properties in the video stream. The Image Acquisition app serves as a starting point in the development of automated and custom image acquisition and processing systems.
Session logging lets you track actions performed in the tool with a history of command-line equivalent functions. In situations that require the same configuration and control process for multiple trials and experiments, the session log provides the ability to load settings to a common point and export the code to a programmatic interface in MATLAB for further automation.
You can log data to disk, memory, or both simultaneously with the Image Acquisition app or programmatically at the MATLAB command line. You can set a limit on memory usage to prevent overuse of resources in memory-intensive applications. Data acquired with the tool can also be exported directly to the Image Viewer app in Image Processing Toolbox for greater control over visualization. In addition, you can:
Image Acquisition Toolbox provides an app and functions and a programmatic interface to help you work with image acquisition hardware in MATLAB. You can automate repetitive tasks, create workflows combined with tasks such as image processing, and create standalone executables that acquire images and video with MATLAB Compiler™. The toolbox enables you to customize the acquisition process to include integrating image processing functionality to identify objects, enhance imagery, or construct mosaics and panoramic views as the data is acquired.
Image Acquisition Toolbox automatically detects compatible image and video acquisition devices. Each device connection is encapsulated as an object, providing an interface for configuration and acquisition. You can create multiple connection objects for simultaneous acquisition from as many devices as your PC and imaging hardware support. Image Acquisition Toolbox can be used on Windows®, Linux®, and Macintosh® systems, enabling you to reuse code when connecting to the same camera in different operating systems.
Image Acquisition Toolbox supports several modes, including background acquisition and continuous acquisition, while processing the acquired data. The toolbox automatically buffers data into memory, handles memory and buffer management, and enables acquisition from an ROI. The image acquisition engine is designed to acquire imagery as fast as your camera and computer can support, enabling analysis and processing of high-speed imaging applications.
Data can be acquired in a wide range of data types, including signed or unsigned 8-, 16-, and 32-bit integers and single- or double-precision floating point. The toolbox supports any color space provided by the image acquisition device including RGB, YUV, or grayscale. Raw sensor data in a Bayer pattern can be automatically converted into RGB data.
Simulink is a block-diagram based environment commonly used for video system design and multidomain simulations. Image Acquisition Toolbox provides a Simulink block that enables you to capture images and video data directly from any device supported by the toolbox for use in imaging system designs. Combined with Computer Vision System Toolbox, the toolbox lets you perform simulation and verification of image or video processing system designs with live image or video data.
Image Acquisition Toolbox lets you generate a C code interface to a deployable library for the Simulink block. This enables you to design a video system and integrate acquisition functionality into your own applications without having to perform low-level coding with hardware drivers. Code generation also enables Simulink Rapid Accelerator modes, which speed up simulations by providing higher performance and frame rates for image and video processing simulations.
Image Acquisition Toolbox supports multiple trigger types to customize the acquisition process: immediate, manual, and hardware. Initiating an acquisition with a manual trigger gives extensive control over when to begin acquisition. In some applications, you may want to record at a high frame rate, perform acquisition only when an object is detected, or when a proximity warning is issued as a trigger. In these situations, you can write MATLAB code to create the logic to activate a manual trigger that can be controlled by the toolbox. Hardware triggers, which are device-specific, let you synchronize your acquisition among several multimodal devices to an external signal. This enables you to record imagery along with other analog and digital input sources.
You can create callback functions or customized code that automatically execute when specific events occur, such as when acquisition starts or stops, a trigger occurs, or a set number of frames is acquired. Callback events can be used to process your data as it is acquired by the image acquisition engine or to automate configuration settings as acquisition starts and stops. For example, you can measure statistics of frames within a video stream and activate downstream processing when a threshold is surpassed. In addition, buffer and memory options let you control the acquisition process further and flush data when needed.
The acquisition thread is designed to run separately from the MATLAB thread in order to provide maximum performance. Using a toolbox function, you can initiate an acquisition thread for each connected device, enabling high-speed frame capture, asynchronous acquisition, and multidevice synchronization. You can capture as high a frame rate and resolution as your camera and computer will support. The image acquisition engine manages the data buffer and provides the ability to access data from the buffer whenever needed.
Image Acquisition Toolbox supports several industry standards including DCAM, Camera Link, and GigE Vision digital interfaces, as well as common interfaces including DirectShow, QuickTime, and video4linux2. The toolbox is also supported across Windows, Linux, and Macintosh systems, enabling you to reuse code and transition designs to other systems. In addition, the toolbox provides specific support for some manufacturers, enabling proprietary features and increasing performance in image acquisition. For more information see the supported hardware page.
Advanced users who want to customize or connect to different cameras can extend support through adaptors connecting the toolbox with third-party drivers. An adaptor is a communication layer between the Image Acquisition Toolbox acquisition engine and a third-party SDK and drivers. The adaptor enables access to proprietary camera features that may not be available through industry standards, improves camera performance, and enables logging and triggering options. The toolbox documentation provides an adaptor kit and example code detailing the development process.
Building an adaptor typically requires extensive knowledge of a vendor’s SDK; as a result, several manufacturers have written adaptors in partnership with MathWorks and made them available on their Web sites. Visit the supported hardware page for more information on available adaptors and to request support for specific hardware vendors.