MATLAB IMAGE ACQUISITION TOOLBOX 3 User's Guide Page 46

  • Download
  • Add to my manuals
  • Print
  • Page
    / 408
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 45
2 Introduction
% Create a video input object .
vid = videoinput('winv ideo');
% Create a figure window. Thi s ex ampl e tu rns off the default
% toolbar, menubar, and fi gur e nu mber ing.
figure('Toolbar','none',...
'Menubar', 'none', ...
'NumberTitle','Off',...
'Name','My Preview Win dow');
% Create the image object in which you want to display
% the video preview data. Mak e th e size of the image
% object match the dimensi ons of the video frames.
vidRes = get(vid, 'VideoResolution');
nBands = get(vid, 'NumberOfBands');
hImage = image( zeros(vidRes(2), vidRes(1 ), nBands) );
% Display the video data in your GUI.
preview(vid, hImag e);
When y ou run this example, it creates th e GUI shown in the following figure.
Custom Preview
2-12
Page view 45
1 2 ... 41 42 43 44 45 46 47 48 49 50 51 ... 407 408

Comments to this Manuals

No comments