User`s guide

Logging Image Data to Disk
6-47
object (aviobj). See “Logging Data to Disk Using an AVI File” on page 6-47 for an
example.
Before you close the file, make sure that the video input object has finished
logging frames to disk. Because logging to disk takes more time than logging to
memory, the completion of disk logging can lag behind the completion of memory
logging. To determine when logging to disk is complete, check the value of the
DiskLoggerFrameCount property; this property tells how many frames have been
logged to disk.
Note When you log frames to disk, the video input object queues the frames for writing
but the operating system might not perform the write operation immediately. Closing an
AVI file causes the data to be written to the disk.
Logging Data to Disk Using an AVI File
This example illustrates how to configure a video input object to log data to a disk file:
1
Create a MATLAB AVI file object — Create the MATLAB AVI file that you want
to use for data logging, using the avifile function. You specify the name of the AVI
file when you create it.
my_log = 'my_datalog.avi';
aviobj = avifile(my_log);
aviobj
Adjustable parameters:
Fps: 15.0000
Compression: 'Indeo3'
Quality: 75
KeyFramePerSec: 2.1429
VideoName: 'my_datalog.avi'
Automatically updated parameters:
Filename: 'my_datalog.avi'
TotalFrames: 0
Width: 0
Height: 0
Length: 0
ImageType: 'Unknown'