Pixels To Frame

Convert pixel stream to frame-based video

  • Library:
  • Vision HDL Toolbox / I/O Interfaces

    Vision HDL Toolbox / I / O Interfaces


The Pixels To Frame block converts a color or grayscale pixel stream and control signals to frame-based video. The control signal bus indicates the validity of each pixel and its location within the frame. The pixel stream format can include padding pixels around the active frame. You can configure the frame and padding dimensions by selecting a common video format or by specifying custom dimensions. For details of the pixel stream format, see Streaming Pixel Interface.

This block does not support HDL code generation. However, you can use this block to convert the output of a separate subsystem, targeted for HDL code generation, back to frames.

If your model converts frames to a pixel stream and later converts the stream back to frames, specify the same video format for the Frame To Pixels block and the Pixels To Frame block.



expand all

Single image pixel in a pixel stream, specified as a scalar or a vector of 1-by-Number of components values.

Data Types: single | double | int | uint | Boolean | fixed point

Control signals accompanying the pixel stream, specified as a pixelcontrol bus containing five signals. The signals describe the validity of the pixel and its location in the frame. For more information, see Pixel Control Bus.

Data Types: bus


expand all

Full image frame, returned as an Active pixels per line-by-Active video lines-by-N array. The first two array dimensions are the height and width of the active image specified by the Video format parameter. N is the Number of components used to express a single pixel. The output data type is the same as the data type of the pixel port.

This signal is 1 (true) when the block has successfully recompiled an output frame from the input stream.

Data Types: Boolean


expand all

Number of values used to represent each pixel. Each pixel can have 1, 2, 3, or 4 components. Set this parameter to 1 for grayscale video. Set this parameter to 3 for color video, for example, {R,G,B} or {Y,Cb,Cr}. Set this parameter to 4 to use color with an alpha channel for transparency.

Dimensions of active regions in a video frame. To select a predefined format, use the Video format pull-down menu. The active frame dimensions are set as shown in the table. For a custom format, select Custom, then specify the active frame dimensions as integers.

Video FormatActive Pixels Per LineActive Video Lines
1080p (default)19201080

Extended Capabilities

Introduced in R2015a