Write binary video data to files
Sinks
visionsinks
The Write Binary File block takes video data from a Simulink® model and exports it to a binary file.
This block produces a raw binary file with no header information. It has no encoded information providing the data type, frame rate or dimensionality. The video data for this block appears in row major format.
This block supports code generation only for platforms that have file I/O available. You cannot use this block to do code generation with Simulink Desktop Real-Time™.
Port | Input | Supported Data Types | Complex Values Supported |
---|---|---|---|
Input | Matrix that represents the luma (Y |
| No |
Four Character Codes (FOURCC) identify video formats. For more information about these codes,
see https://www.fourcc.org
.
Use the Four character code parameter to identify the video format.
You can use the Write Binary File block to create a binary file that contains video data in a custom format.
Use the Bit stream format parameter to specify whether you want your data in planar or packed format.
Use the Number of input components parameter to specify the number of components in the video stream. This number corresponds to the number of block input ports.
Select the Inherit size of components from input data type check box if you want each component to have the same number of bits as the input data type. If you clear this check box, you must specify the number of bits for each component.
Use the Component parameters to specify the component names.
Use the Component order in binary file parameter to specify how to arrange the components in the binary file.
Select the Interlaced video check box if the video stream represents interlaced video data.
Select the Write signed data to output file check box if your input data is signed.
Use the Byte order in binary file parameter to specify whether the byte ordering in the output binary file is little endian or big endian.
Specify the name of the binary file. To specify a different file or location, click the Save As... button.
Specify the format of the binary video data as either Four character
codes
or Custom
. See Four Character Code Video Formats or Custom Video Formats for more details.
From the list, select the binary file format.
Specify how the block fills the binary file. If you select Top
line first
, the block first fills the binary file with
the first row of the video frame. It then fills the file with the
other rows in increasing order. If you select Bottom
line first
, the block first fills the binary file with
the last row of the video frame. It then fills the file with the other
rows in decreasing order.
Specify whether you want your data in planar or packed format.
Specify the number of components in the video stream. This number corresponds to the number of block input ports.
Select this check box if you want each component to have the same number of bits as the input data type. If you clear this check box, you must specify the number of bits for each component.
Specify the component names.
Specify how to arrange the components in the binary file.
Select this check box if the video stream represents interlaced video data.
Select this check box if your input data is signed.
Use this parameter to specify whether the byte ordering in the output binary file is little endian or big endian.
Computer Vision Toolbox™ | |
Computer Vision Toolbox |