User`s guide
Previewing Data
2-13
The status displayed in the Video Preview window also changes to indicate that
previewing has been stopped.
vid = videoinput('winvideo');
preview(vid)
stoppreview(vid)
To restart the video stream in the Video Preview window, call preview again on the
same video input object.
preview(vid)
Closing a Video Preview Window
To close a particular Video Preview window, use the closepreview function, specifying
the video input object as an argument. You do not need to stop the live video stream
displayed in the Video Preview window before closing it.
closepreview(vid)
To close all currently open Video Preview windows, use the closepreview function
without any arguments.
closepreview
Note When called without an argument, the closepreview function only closes Video
Preview windows. The closepreview function does not close any other figure windows
in which you have directed the live preview video stream. For more information, see
“Previewing Data in Custom GUIs” on page 2-13.
Previewing Data in Custom GUIs
Instead of using the toolbox's Video Preview window, you can use the preview function
to direct the live video stream to any Handle Graphics image object. In this way, you
can incorporate 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-15.)
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.