This example displays a sequence of images, which were saved in a folder, and then stored in a variable in the MATLAB® workspace. At load time, this model executes the code from the Batch Process Image Files example, which stores images in a workspace variable.
You can open the example model by typing
at the MATLAB command line.
The Video From Workspace block reads the files from the MATLAB workspace. The Signal parameter is set to the name of the variable for the stored images. For this example, it is set to my_video.
The Video Viewer block displays the sequence of images.
Run your model. You can view the image sequence in
the Video Viewer window.
Because the Video From Workspace block's Sample time parameter is set to 1 and the Stop time parameter in the configuration parameters, is set to 10, the Video Viewer block displays 10 images before the simulation stops.
To find or modify the pre-loaded code, select File > Model Properties > Model Properties. Then select the Callbacks tab. For more details on how to set-up callbacks, see Callbacks for Customized Model Behavior.