Description
The Video Viewer block enables you to view a binary, intensity, or RGB image or a
video stream. The block provides simulation controls for play, pause, and step while
running the model. The block also provides pixel region analysis tools. During code
generation, Simulink®
Coder™ software does not generate code for this block.
See the following table for descriptions of both input types.
Input | Description |
---|
Image | M-by-N matrix of intensity values or an M-by-N-by-P color video
signal where P is the number of color planes. |
R/G/B | Scalar, vector, or matrix that represents one plane of the RGB video
stream. Inputs to the R, G, or B ports must have the same dimensions and
data type. |
Select > to set the input to either Image or
RGB.
Dialogs
Toolbar
Toolbar
GUI | Menu Equivalent | Shortcut Keys and Accelerators | Description |
---|
| > | Ctrl+P | Print the current display window. Printing is only
available when the display is not changing. You can enable
printing by placing the display in snapshot mode, or by pausing
or stopping model simulation, or simulating the model in
step-forward mode. To print the current window to a
figure rather than sending it to your printer, select > . |
 |
| Ctrl+E | Send the current video frame to the Image Tool. For more
information, see Get Started with Image Viewer App. |
Note The Image Tool can know that the frame is an intensity
image only if the colormap of the frame is grayscale
(gray(256) ). Otherwise, the Image
Tool assumes the frame is an indexed image and disables the
Adjust Contrast button.
|
 |
| V | View information about the video data source. |
 |
| N/A | Open the Pixel Region tool. For more information about this tool,
see the Image Processing Toolbox™ documentation. |
 |
| N/A | Zoom in on the video display. |
 |
| N/A | Zoom out of the video display. |
 |
| N/A | Move the image displayed in the GUI. |
 |
| N/A | Scale video to fit GUI size automatically. Toggle the button on
or off. |
 | N/A | N/A | Enlarge or shrink the video frame. This option becomes available
if you do not select the Maintain Fit to
Window. |
Playback Toolbar
Setting Viewer Configuration
The Video Viewer Configuration preferences enables you to change the behavior and
appearance of the graphic user interface (GUI) as well as the behavior of the
playback shortcut keys.
To open the Configuration dialog box, select > > .
To save the configuration settings for future use, select > > .
Core Pane
The Core pane in the Viewer Configuration dialog box controls the GUI's general
settings.
General UI
Click General UI, and click the
Options button to open the General UI Options dialog box.
If you select the Display the full source path in the
title bar check box, the GUI displays the model name and full
Simulink path to the video data source in the title bar. Otherwise, it displays
a shortened name.
Use the Open message log: parameter to control when the
Message log window opens. You can use this window to debug issues with video
playback. Your choices are for any new messages
,
for warn/fail messages
, only for fail
messages
, or manually
.
Tools Pane
The Tools pane in the Viewer Configuration dialog box contains the tools that
appear on the Video Viewer GUI. Select the Enabled check box
next to the tool name to specify which tools to include on the GUI.
Image Tool
Click Image Tool, and then click the
Options button to open the Image Tool Options dialog
box.
Select the Open new Image Tool window for export
check box if you want to open a new Image Tool for each exported
frame.Pixel RegionSelect the
Pixel Region check box to display and enable the pixel
region GUI button. For more information on working with pixel regions see Getting Information
about the Pixels in an Image. Image Navigation
ToolsSelect the Image Navigation Tools check
box to enable the pan-and-zoom GUI button.Instrumentation SetSelect the Instrumentation
Set check box to enable the option to load and save viewer
settings. The option appears in the File
menu.
Video Information
The Video Information dialog box lets you view basic information about the video.
To open this dialog box, you can select , click the information button
, or press the V key.
Colormap for Intensity Video
The Colormap dialog box lets you change the colormap of an intensity video. You
cannot access the parameters on this dialog box when the GUI displays an RGB video
signal. To open this dialog box for an intensity signal, select or press C.
Use the Colormap parameter to specify the colormap to apply
to the intensity video.
If you know that the pixel values do not use the entire data type range, you can
select the Specify range of displayed pixel values check box
and enter the range for your data. The dialog box automatically displays the range
based on the data type of the pixel values.
Status Bar
A status bar appear along the bottom of the Video Viewer. It displays information
pertaining to the video status (running, paused or ready), type of video (Intensity
or RGB) and video time.
Message Log
The Message Log dialog provides a system level record of configurations
and extensions used. You can filter what messages to display by Type and Category,
view the records, and display record details.
The Type parameter allows you to select either
All
, Info
,
Warn
, or Fail
message logs. The
Category parameter allows you to select either
Configuration
or Extension
message
summaries. The Configuration
messages indicate when a new
configuration file is loaded. The Extension
messages indicate a
component is registered. For example, you might see a Simulink
message,
which indicates the component is registered and available for configuration.