Main Content

To Simulink Image

Pack numeric matrix into a Simulink image

Since R2022a

Computer Vision Toolbox / Utilities


The To Simulink Image block converts matrix data to Simulink® image data.



expand all

Input signal to the To Simulink Image block. The input is a numerical matrix.

Data Types: integer | single | double | Boolean


expand all

Output signal from the To Simulink Image block. The output is an image of Simulink.ImageType data type.

Data Types: Simulink.ImageType


expand all

Specify the output data type of the image signal.

Click the Show data type assistant button to display the Data Type Assistant, which helps you set the data type attributes. For more information, see Specify Data Types Using Data Type Assistant (Simulink).

You can specify any of these options:

  • Inherited data type

  • Simulink image data type — Use the constructor for Simulink.ImageType object and specify the properties to describe the image. By default, the data type uses Simulink.ImageType(480,640,3) expression.

  • Custom data type — Use a MATLAB® expression that represents the rows, columns, and channels of the image respectively.

Programmatic Use

Block Parameter: OutDataTypeStr
Type: character vector
Value: Inherit: auto | Simulink.ImageType(480,640,3) | <data type expression>
Default: Inherit: auto

Block Characteristics

Data Types

double | single | integer | Boolean | image

Direct Feedthrough


Multidimensional Signals


Variable-Size Signals


Zero-Crossing Detection


Extended Capabilities

Version History

Introduced in R2022a