User`s guide

6 Acquiring Image Data
6-42
Logging Image Data to Disk
In this section...
“Logging Data to Disk Using VideoWriter” on page 6-42
“Logging Data to Disk Using VideoWriter” on page 6-42
“Logging Data to Disk Using an AVI File” on page 6-44
“Creating an AVI File Object for Logging” on page 6-45
“Logging Data to Disk Using an AVI File” on page 6-47
Logging Data to Disk Using VideoWriter
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. You can log data to
several formats but VideoWriter is recommended, instead of using an AVI file.
For the best performance, logging to disk requires a MATLAB VideoWriter object,
which is a MATLAB function, not an Image Acquisition Toolbox function. After you
create and configure a VideoWriter object, provide it to the videoinput object's
DiskLogger property.
VideoWriter provides a number of different profiles that log the data in different
formats. The following example uses the Motion JPEG 2000 profile, which can log single-
banded (grayscale) data as well as multi-byte data. Supported profiles are:
'Motion JPEG 2000' — Compressed Motion JPEG 2000 file.
'Archival' — Motion JPEG 2000 file with lossless compression.
'Motion JPEG AVI' — Compressed AVI file using Motion JPEG codec.
'Uncompressed AVI' — Uncompressed AVI file with RGB24 video.
'MPEG-4' — Compressed MPEG-4 file with H.264 encoding (systems with Windows 7
or Mac OS X 10.7 and later).
'Grayscale AVI' — Uncompressed AVI file with grayscale video. Only used for
monochrome devices.
'Indexed AVI' — Uncompressed AVI file with indexed video. Only used for
monochrome devices.
Logging Data to Disk Using VideoWriter