Documentation Center

  • Trial Software
  • Product Updates

To Video Display

Display video data

Library

Sinks

visionsinks

Description

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.

Rapid Accelerator

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.

Menu Options

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.

View menu

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 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.
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 menu

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- 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.
Preferences

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.

Help menu

Help
Select To Video Display for reference documentation for the block.
Select Computer Vision System Toolbox to navigate to the Computer Vision System Toolbox product page.
Select About Computer Vision System Toolbox for version information.

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 System Toolbox software

From Multimedia File

Computer Vision System Toolbox software

To Multimedia File

Computer Vision System Toolbox software

Video To Workspace

Computer Vision System Toolbox software

Video Viewer

Computer Vision System Toolbox software

Was this topic helpful?