Image Acquisition Explorer
Description
The Image Acquisition Explorer app provides a user interface to acquire images and video from cameras and frame grabbers.
Using this app, you can:
Preview live video data from your image acquisition hardware.
Configure device-specific properties and acquisition settings such as video format, region of interest, and hardware trigger.
Save image snapshot and video recording data to a file or to the MATLAB® workspace.
Visualize and analyze saved data by launching Image Processing Toolbox™ apps.
Generate a MATLAB live script for app interactions that uses the
videoinput
interface.
Open the Image Acquisition Explorer App
MATLAB Toolstrip: On the Apps tab, under Image Processing and Computer Vision, click the app icon.
MATLAB command prompt: Enter
imageAcquisitionExplorer
.
Examples
- Get Started with Image Acquisition Explorer
- Select Your Device and Configure Format in Image Acquisition Explorer
- Set Acquisition Parameters in Image Acquisition Explorer
- Log Data in Image Acquisition Explorer
- Preview and Acquire Data in Image Acquisition Explorer
- Export Code from Image Acquisition Explorer
Parameters
Select Camera File
— Specify device configuration file
button
Click this button to select a device configuration file, also known as a camera file or digitizer configuration format file, from your computer. Some image acquisition devices use these files to store device configuration information. The app uses this file to determine the video format and other configuration information.
When you open the app, the rest of the app toolstrip is disabled until you select a camera file. You can change the camera file at any time.
Note
The camera file is provided by the device manufacturer. See your device documentation for more information.
Dependencies
This button is available only for devices that support camera files.
Camera File
— Name of camera file
selected camera file
This parameter is read-only.
This is the name of the camera file that you selected using the Select Camera File button. You can view the full file path by hovering your cursor over the file name.
Dependencies
This parameter is available only for devices that support camera files.
Video Format
— Video format
supported video formats
Select the video format used by the device to capture images and video. The list of values for this parameter depends on the video formats supported by your device. The format selected when you open the app is the device's default format.
Dependencies
This parameter is available only for devices that support video format.
Color Space
— Color space used in MATLAB
grayscale
| rgb
| YCbCr
| bayer
Select the color space that the app uses when it returns image data. The list of values for this parameter depends on the Video Format selected.
If you select grayscale
, you can set the
Colormap and Color Limits parameters.
Color Limit — Toggle this switch to Manual to set the minimum and maximum values on the specified colormap. The default values are 0 and 255. All values in the preview that are less than or equal to the minimum value map to the lowest value of the colormap. All values in the preview that are greater than or equal to the maximum value map to the highest value of the colormap.
Colormap — Colormap applied to the preview. For a full list of options, see
map
.
If you select bayer
, you can set the Sensor
Alignment parameter.
Sensor Alignment
— Sensor alignment for Bayer demosaicing
grbg
(default) | gbrg
| rggb
| bggr
Select the 2-by-2 pixel Bayer color filter array pattern of the Bayer color filter array. The specified pattern is used to convert the Bayer pattern image to RGB. There are four possible sensor alignments. For more information about which one to select, refer to your device documentation.
Value | Description |
---|---|
gbrg | The 2-by-2 sensor alignment is green blue red green |
grbg | The 2-by-2 sensor alignment is green red blue green |
bggr | The 2-by-2 sensor alignment is blue green green red |
rggb | The 2-by-2 sensor alignment is red green green blue |
Dependencies
This parameter is enabled only if your device supports Bayer sensor alignment and
Color Space is set to bayer
.
Image
— Specify image file or workspace variable name to log snapshot data
valid file name | valid variable name
Edit the name of the image file or name of the workspace variable to save snapshot image data as.
If you select the File option, this parameter defines the image file name. You can click the configuration icon next to this parameter for additional settings, including the file location to save to and file format to save as.
If you select the Workspace Variable option, this parameter defines the workspace variable name.
When you click the Capture button, the snapshot image data is saved as the specified file or workspace variable.
For more information, see Log Data in Image Acquisition Explorer.
Video
— Specify video file or workspace variable name to log recorded data
valid file name | valid variable name
Edit the name of the video file or name of the workspace variable to save recorded data as.
If you select the File option, this parameter defines the video file name. You can click the configuration icon next to this parameter for additional settings, including the file location to save to and file format to save as.
If you select the Workspace Variable option, this parameter defines the workspace variable name.
When you click the Record button, the recorded data is saved as the specified file or workspace variable.
For more information, see Log Data in Image Acquisition Explorer.
Capture
— Take image snapshot
button
Click this button to immediately capture a single image frame and save it as an image file or as a workspace variable, depending on your selection of File or Workspace Variable in the Logging section. For more information, see Capture Image Snapshot.
Finite
— Select finite recording option
button
Set the recording mode as finite and specify the number of frames or seconds to save when you click the Record button. When you select this option, you have two options for finite recording.
Specify the number of
frame(s)
to record. For more information, see Record Finite Number of Frames.Specify the number of
second(s)
to record. For more information, see Record for Finite Duration.
Continuous
— Select continuous recording option
button
Set the recording mode as continuous to start saving frames when you click the Record button. For more information, see Record Continuously.
Hardware Trigger
— Select hardware triggered recording option
button
Set the recording mode as hardware trigger. Hardware triggered acquisition is supported for GigE Vision® and GenICam™ GenTL devices. When you select this option, the app opens a Hardware Trigger tab. You can define the following hardware trigger parameters.
Number of Triggers
Frames per Trigger
Trigger Source
Trigger Condition
If you are using this recording mode, make sure you
also enable hardware triggered acquisition in the Device Properties
by setting Trigger Mode to On
and
specifying other Trigger Selector parameters for your setup.
For more information, see Set Up Hardware Triggering and Record with Hardware Trigger.
Dependencies
This parameter is enabled only if your device supports hardware triggered acquisition.
Record
— Record video
button
Click this button to acquire multiple frames and save them as a video file or as a workspace variable, depending on your selection of File or Workspace Variable in the Logging section. This button becomes a Stop button after you click it. End recording at any time and save the recorded data by clicking Stop.
While you are recording, the app toolstrip and all property tabs are disabled. You can not change the value of any parameters during recording.
For more information, see Record Video.
Image Viewer
— View captured snapshot in Image Viewer app
button
Click this button to launch the Image Viewer app and send it the most recent image data captured in this app session.
You must have Image Processing Toolbox installed to use the Image Viewer app.
Video Viewer
— View recorded video in Video Viewer app
button
Click this button to launch the Video Viewer app and send it the most recent video data recorded in this app session.
You must have Image Processing Toolbox installed to use the Video Viewer app.
Color Thresholder
— View captured snapshot in Color Thresholder app
button
Click this button to launch the Color Thresholder app and send it the most recent image data captured in this app session.
You must have Image Processing Toolbox installed to use the Color Thresholder app.
Image Segmenter
— View captured snapshot in Image Segmenter app
button
Click this button to launch the Image Segmenter app and send it the most recent image data captured in this app session.
You must have Image Processing Toolbox installed to use the Image Segmenter app.
Export
— Export MATLAB code
Generate Snapshot Script
| Generate Record Script
Click this button to select an option to generate a MATLAB live script for capturing a snapshot or recording a video and open it in the Live Editor. The live script contains code for the current device configuration, as specified in the Configure Format section, and code for saving data as a file or workspace variable, as specified in the Logging section.
For more information, see Export Code from Image Acquisition Explorer.
Version History
Introduced in R2022a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)