| Video and Image Processing Blockset™ | ![]() |
Sinks

The Video Viewer block enables you to view a binary, intensity, or RGB image or a video stream. During code generation, Real-Time Workshop does not generate code for this block.
| Port | Output | Supported Data Types | Complex Values Supported |
|---|---|---|---|
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 |
| No |
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. | Same as I port | No |
Use the Image signal parameter to specify how the block accepts a color video signal. If you select One multidimensional signal, the block accepts an M-by-N-by-P color video signal, where P is the number of color planes, at one port. If you select Separate color signals, additional ports appear on the block. Each port accepts one M-by-N plane of an RGB video stream.
If you set the Image signal parameter to One multidimensional signal, the Use colormap and Specify range of values parameters appear on the block dialog box. If you select the Use colormap check box, you can use the Colormap parameter to specify a colormap or a call to a colormap-generating function.
MATLAB® provides a number of functions for generating predefined colormaps, such as hot, cool, bone, and autumn. Each of these functions accepts the colormap size as an argument, and can be used in this parameter. For example, if you enter gray(128), the image is displayed in 128 shades of gray. The color in the first row of the colormap matrix represents the minimum input value, and the color in the last row represents the maximum input value. Values between the minimum and maximum are quantized and mapped to the intermediate rows of the colormap matrix. For more information, see the MATLAB colormap function documentation.
If you select the Specify range of values check box, you can use the Minimum input value and Maximum input value parameters to define the range of your input. If you do not specify a range, the block assumes that Boolean, double-precision floating-point, and single-precision floating-point signals range from 0 to 1, and any other signals range between the minimum and maximum values supported by their data type.
The Video Viewer dialog box appears as shown in the following figure.

Specify how the block accepts a color video signal. If you select One multidimensional signal, the block accepts an M-by-N-by-P color video signal, where P is the number of color planes, at one port. If you select Separate color signals, additional ports appear on the block. Each port accepts one M-by-N plane of an RGB video stream.
Select this check box to specify a colormap. This parameter is available if you set the Image signal parameter to One multidimensional signal.
Specify the colormap to apply to the intensity image or video by entering a 3-column matrix defining the colormap or a call to a colormap-generating function such as hot, cool, gray, or spring. This parameter is available if you select the Use colormap check box.
Select this check box if you want to define the range for the input. This parameter is available if you set the Image signal parameter to One multidimensional signal, and is only valid for Intensity input images. If data values exceed the specified range, they are saturated to the specified minimum and maximum values.
Use this parameter to define the range of the input; enter the smallest input value. This parameter is available if you select the Specify range of values check box.
Use this parameter to define the range of the input; enter the largest input value. This parameter is available if you select the Specify range of values check box.
| From Multimedia File | Video and Image Processing Blockset |
| mplay | Video and Image Processing Blockset |
| To Multimedia File | Video and Image Processing Blockset |
| To Video Display | Video and Image Processing Blockset |
| Video To Workspace | Video and Image Processing Blockset |
![]() | Video To Workspace | Write AVI File (Obsolete) | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |