main content

acquire images and video from hardware -凯发k8网页登录

acquire images and video from hardware

since r2022a

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.

parameters

configure format

click this button select camera file 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.

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.

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.

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 .

if you select bayer, you can set the sensor alignment parameter.

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.

valuedescription
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.

logging

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.

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.

snapshot

click this button capture 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.

record

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.

set the recording mode as continuous to start saving frames when you click the record button. for more information, see record continuously.

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 and record with hardware trigger.

dependencies

this parameter is enabled only if your device supports hardware triggered acquisition.

click this button record 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.

visualize and analyze

click this button image viewer 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.

click this button video viewer 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.

click this button colro thresholder 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.

export

click this button export 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 .

version history

introduced in r2022a

see also

functions

网站地图