This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Export to Video Files

The Computer Vision System Toolbox™ blocks enable you to export video data from your Simulink® model. In this example, you use the To Multimedia File block to export a multimedia file from your model. This example also uses Gain blocks from the Math Operations Simulink library.

You can open the example model by typing at the MATLAB® command line.

  1. Run your model.

  2. You can view your video in the To Video Display window.

By increasing the red, green, and blue color values, you increase the contrast of the video. The To Multimedia File block exports the video data from the Simulink model to a multimedia file that it creates in your current folder.

This example manipulated the video stream and exported it from a Simulink model to a multimedia file. For more information, see the To Multimedia File block reference page.

Setting Block Parameters for this Example

The block parameters in this example were modified from default values as follows:


The Gain blocks are used to increase the red, green, and blue values of the video stream. This increases the contrast of the video:

  • Main pane, Gain = 1.2

  • Signal Attributes pane, Output data type = Inherit: Same as input

To Multimedia File

The To Multimedia File block exports the video to a multimedia file:

  • File name = my_output.avi

  • Write = Video only

  • Image signal = Separate color signals

Configuration Parameters

You can locate the Model Configuration Parameters by selecting Model Configuration Parameters from the Simulation menu. For this example, the parameters on the Solver pane, are set as follows:

  • Stop time = 20

  • Type = Fixed-step

  • Solver = Discrete (no continuous states)