Display video data
The To Video Display block sends video data to your computer screen. It provides a Windows® only, lightweight, high performance, simple display, which accepts RGB and YCbCr formatted images. This block also generates code.
Note This block supports code generation and is only available on Windows platforms with available file I/O. This excludes Real-Time Windows Target™ (RTWin). This block performs best on platforms with DirectX Version 9.0 or later and Windows Media Version 9.0 or later.
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 function creates a single zip file containing all of the pieces required to run or rebuild this code. See packNGo 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.
This block runs in real-time, and may limit the speed at which video data displays. It operates and renders video data to the display independent of the Simulink® model. This design allows buffering to the display, which increases performance. You may notice, the block lags the model by one or more frames.
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. For Rapid Accelerator mode, menu preferences are saved only when the model is compiled. To change any of the menu options, change the model to run in Normal Mode, and re-save it. You can then run in Rapid Accelerator mode with the new preferences.
The To Video Display block provides menu options to modify viewing preferences for the display. If however, your model is set to run in Accelerator Mode, the menu options will not be available.
|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 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.|
|Select Normal mode to modify display size at simulation start time.|
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.
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.|
Set any preferences available for the Computer Vision System Toolbox™. You can set your model to use hardware acceleration, by selecting the Use hardware acceleration checkbox in the Preferences window. To access the preferences, select Settings > Preferences . Then select Computer Vision from the preferences list.
|Port||Supported Data Types|
R, G, B
Same as Image port
Same as Image ports