Display video data
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.
packNGo function creates a
single zip file containing all of the pieces required to run or rebuild
this code. See
packNGo for more
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
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.
When you set your model to run in Accelerator Mode, 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.
|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 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.
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- matrix.|
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.|
|Port||Supported Data Types|
R, G, B
Same as Image port
Same as Image ports