User`s guide

Previewing Data
To restart the video stream in the Video Preview window, call preview again
on the same v id eo input object.
preview(vid)
Closing a Video Preview Window
TocloseaparticularVideoPreviewwindow,usetheclosepreview function,
specifying the video input object as an argument. You do not need to stop the
live video stream d isplayed in the Video Preview window be fore closing it.
closepreview(vid)
To close all curre ntly open Video Preview windows, use the closepreview
function without any arguments.
closepreview
Note When called without an argument, the closeprev iew function only
closes Video Preview windows. The
closepreview function does not close any
otherfigurewindowsinwhichyouhavedirectedthelivepreviewvideostream.
For more informatio n, see “Previewing Data in Custom GUIs” on page 2-11.
Previewing Data in Custom GUIs
Instead of using the toolbox’s Video Prev ie w window, you can use the preview
function to direct the live video stream to any Handle Graphics image object.
In this way, you can incorpo r ate the toolbox’s previewing capability in a GUI
of your own creation. (You can also perform custom processing as the live
video is displayed. For information, see “Performing Custom Processing of
Previewed Data” on page 2-13.)
To use this capability, create an image object and then call the
preview
function, specifying a handle to the image object as an argument. The
preview function outputs the live video stream to the image object you specify.
The following example creates a figure window and then creates an image
objectinthefigure,thesamesizeasthevideoframes.Theexamplethencalls
the
preview function, specifying a handle to the image object.
2-11