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

  • 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 51
2 Introduction
2-14
The following example creates a figure window and then creates an image object in the
figure, the same size as the video frames. The example then calls the preview function,
specifying a handle to the image object.
% Create a video input object.
vid = videoinput('winvideo');
% Create a figure window. This example turns off the default
% toolbar, menubar, and figure numbering.
figure('Toolbar','none',...
'Menubar', 'none',...
'NumberTitle','Off',...
'Name','My Preview Window');
% Create the image object in which you want to display
% the video preview data. Make the size of the image
% object match the dimensions of the video frames.
vidRes = vid.VideoResolution;
nBands = vid.NumberOfBands;
hImage = image( zeros(vidRes(2), vidRes(1), nBands) );
% Display the video data in your GUI.
preview(vid, hImage);
When you run this example, it creates the GUI shown in the following figure.
Vue de la page 51
1 2 ... 47 48 49 50 51 52 53 54 55 56 57 ... 573 574

Commentaires sur ces manuels

Pas de commentaire