User`s guide

5 Acqu iring Image Data
to a midlevel value. By low ering the qual ity, the AVI file object creates
smaller log file s.
aviobj.Quality = 50;
Because this example acquires image data in grayscale format (RS170),
you must also specify the colormap used with the AVI object to ensure that
the stored data displays correctly.
aviobj.Colormap = gra y(256);
3 Create a video input object This e xample creates a video input o bject
for a M atrox im ag e acquisition device, using the d efault video format
M_RS170. Torunthisexampleonyoursystem,usethe
imaqhwinfo
function to get the video input object constructor for your image acquisition
device and substitute that syntax for the following code.
vid = videoinput('mat rox',1);
4 Configure video input object properties Set up disk logging by
setting the value of the
DiskLogger property to be aviobj,theAVIfile
object created in step 1. Then, set the
LoggingMode property to 'disk' (or
'disk&memory'). This example also sets the TriggerRepeat property.
vid.LoggingMode = 'di sk&memory';
vid.DiskLogger = aviob j;
vid.TriggerRepeat = 3;
5 Start the video input object S tart logging data to dis k.
start(vid)
The object executes an im m ediate trigger, acquires frames of data, repeats
the trigger three additional time s, and then stops.
To verify that all the frames have been logged to the AVI file, check the
value of the
DiskLoggerFrameCount property. This p roperty tells the
number of frames that have been logged to disk.
5-44