To Video Display

Display video data

Library

Sinks

visionsinks

  • To Video Display block

Description

The To Video Display block displays video frames. This block is capable of displaying high definition video at high frame rates. It provides a lightweight, high performance, simple display, which accepts RGB and YCbCr formatted images. This block also generates code.

The generated code for this block relies on prebuilt .dll files. You can run this code outside the MATLAB® environment, or redeploy it, but be sure to account for these extra .dll files when doing so. The packNGo (Simulink Coder) function creates a single zip file containing all of the pieces required to run or rebuild this code. See packNGo (Simulink Coder) for more information.

To run an executable file that was generated from a model containing this block, you may need to add precompiled shared library files to your system path. See Simulink Coder, Simulink Shared Library Dependencies, and Accelerating Simulink Models for details.

For the block to display video data properly, double- and single-precision floating-point pixel values must be from 0 to 1. For any other data type, the pixel values must be between the minimum and maximum values supported by their data type.

You can set the display for full screen, normal or, to maintain one-to-one size. When you save the model, the size and position of the display window is saved. Any changes while working with the model should be saved again in order that these preferences are maintained when you run the model. The minimum display width of the window varies depending on your system's font size settings.

Rapid Accelerator

When you set your model to run in Accelerator Mode (Simulink), and do not select the Open at Start of Simulation option, the block will not be included during the run, and therefore the video display will not be visible.

Parameters

View Options

Window Size
Select Full-screen mode to display your video stream in a full screen window. To exit or return to other applications from full-screen, select the display and use the Esc key.
Select Normal mode to modify display size at simulation start time.
Select True Size (1:1) mode to display a one-to-one pixel ratio of input image at simulation start time. The block displays the same information per pixel and does not change size from the input size. You can change the display size after the model starts.
Open at Start of Simulation

Select Open at Start of Simulation from the View menu for the display window to appear while running the model. If not selected, you can double click the block to display the window.

Settings Options

Input Color Format

Select the color format of the data stored in the input image.

Select RGB for the block to accept a matrix that represents one plane of the RGB video stream. Inputs to the R, G, or B ports must have the same dimension and data type.
Select YCbCr 4:2:2 for the block to accept a matrix that represents one frame of the YCbCr video stream. The Y port accepts an M-by-N matrix. The Cb and Cr ports accepts an M-by-N2 matrix.

Image Signal

Specify how the block accepts a color video signal.

Select One multidimensional signal, for the block to accept an M-by-N-by-3 color video signal at one port.
Select Separate color signals, for additional ports to appear on the block. Each port accepts one M-by-N plane of an RGB video stream.

Supported Data Types

PortSupported Data Types

Image

  • Double-precision floating point

  • Single-precision floating point

  • Boolean

  • 8-, 16, and 32-bit signed integer

  • 8-, 16, and 32-bit unsigned integer

R, G, B

Same as Image port

YCbCr 4:2:2

Same as Image ports

See Also

Frame Rate Display

Computer Vision Toolbox™ software

From Multimedia File

Computer Vision Toolbox software

To Multimedia File

Computer Vision Toolbox software

Video To Workspace

Computer Vision Toolbox software

Video Viewer

Computer Vision Toolbox software

Extended Capabilities

Introduced before R2006a