User`s guide

Previewing Data
Performing Custom Processing of Previewe d Data
When you specify an image object to the preview function (see “Preview ing
Data in Custom GUIs” on page 2-11), you can o ptionally also specify a function
that
preview executes every time it receives an image frame.
To use this ca pability, follow these steps:
1 Create the function you want executed for each image f rame, called the
update preview window function. For information about this function, see
“Creating the Update Preview Window Function” on page 2-13.
2 Create an image object.
3 Configure the value of the image object’s 'Upd ateP reviewWindowFcn'
application-defined data to b e a function handle to your update preview
window function. For more information, see “Specifying the Update
Preview Function” on page 2-15.
4 Call the preview function, specifying the handle of the image object as
an argument.
Note If you specify an update preview window function, in addition to
whatever processing your function performs, it must display the video data
in the image object. You can do this by u pdating the
CData of the image
object with the incoming video frames. For some performance guidelines
about updating the data displayed in an image o bject, see Technical Solution
1-1B022.
Creating the Update Preview Window Function
When preview calls the update preview window f unction you specify, it passes
your function the following arguments.
Argument Description
obj
Handle to th e video input obj ect being previe wed
2-13