Products & Services Solutions Academia Support User Community Company

Learn more about Video and Image Processing Blockset   

Viewing Video Signals in Simulink

Using the Video Viewer Block

Use the Video Viewer block when you require a wired-in video display with simulation controls in your Simulink model. The Video Viewer block provides simulation control buttons directly from the GUI. The block integrates play, pause, and step features while running the model and also provides video analysis tools such as pixel region viewer.

For more information about the Video Viewer block, see the Video Viewer block reference page in the Video and Image Processing Blockset Reference.

Using the To Video Display Block

Use the To Video Display block in your Simulink model as a simple display viewer designed for optimal performance. This block supports code generation for the Windows platform.

For more information about the To Video Display block, see the To Video Display block reference page in the Video and Image Processing Blockset Reference.

Using the MPlay GUI

The MPlay GUI enables you to view video signals in Simulink models without adding blocks to your model. You can also view videos represented as variables in the MATLAB workspace.

You can open several instances of the MPlay GUI simultaneously to view multiple video data sources at once. You can also dock these MPlay GUIs in the MATLAB desktop. Use the figure arrangement buttons in the upper-right corner of the Sinks window to control the placement of the docked GUIs.

For further information on using the MPlay GUI, see the following topics:

For more information about the MPlay GUI, see the mplay function reference page.

Connecting MPlay to Your Simulink Model

Set Simulink simulation mode to Normal to use mplay . MPlay does not work when you use Acceleration Modes.

The following procedure shows you how to use the MPlay GUI to view a Simulink signal:

  1. Open a Simulink model. At the MATLAB command prompt, type

    vipmplaytut

  2. Open an MPlay GUI by typing mplay on the MATLAB command line.

  3. Run the model.

  4. Select the signal line you want to view. For example, select the bus signal coming out of the Rotate block.

  5. On the MPlay GUI, click Connect to Simulink Signal GUI element,

    The video appears in the MPlay window.

  6. Change to floating-scope mode by clicking the persistent connect GUI element, button.

  7. Experiment with selecting different signals and viewing them in the MPlay window. You can also use multiple MPlay GUIs to display different Simulink signals.

MPlay GUI Interface

The following figure shows the MPlay GUI containing an image sequence.

The following sections provide descriptions of the MPlay GUI toolbar buttons and equivalent menu options.

 Toolbar Buttons

 Playback Toolbar — Workspace and File Sources

 Playback Toolbar — Simulink Sources

 Configuration

 Configuration Core Pane

 Configuration Sources Pane

 Configuration Visuals Pane

 Configuration Tools Pane

 Video Information

 Color Map for Intensity Video

 Frame Rate

 Saving the Settings of Multiple MPlay GUIs

 Message Log

 Status Bar

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS