MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES Guide de l'utilisateur Page 196

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 574
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 195
6 Acquiring Image Data
6-48
CurrentState: 'Open'
2
Configure properties of the AVI file object — You can optionally configure the
properties of the AVI file object. The AVI file object supports properties that control
the data compression used, image quality, and other characteristics of the file. The
example sets the quality property to a midlevel value. By lowering the quality, the
AVI file object creates smaller log files.
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 = gray(256);
3
Create a video input object — This example creates a video input object for a
Matrox image acquisition device, using the default video format M_RS170. To run
this example on your system, use the imaqhwinfo function to get the video input
object constructor for your image acquisition device and substitute that syntax for
the following code.
vid = videoinput('matrox',1);
4
Configure video input object properties — Set up disk logging by setting the
value of the DiskLogger property to be aviobj, the AVI file object created in step 1.
Then, set the LoggingMode property to 'disk' (or 'disk&memory'). This example
also sets the TriggerRepeat property.
vid.LoggingMode = 'disk&memory';
vid.DiskLogger = aviobj;
vid.TriggerRepeat = 3;
5
Start the video input object — Start logging data to disk.
start(vid)
The object executes an immediate trigger, acquires frames of data, repeats the
trigger three additional times, and then stops.
To verify that all the frames have been logged to the AVI file, check the value of the
DiskLoggerFrameCount property. This property tells the number of frames that
have been logged to disk.
vid.DiskLoggerFrameCount
Vue de la page 195
1 2 ... 191 192 193 194 195 196 197 198 199 200 201 ... 573 574

Commentaires sur ces manuels

Pas de commentaire