Convert frame-based video to pixel stream
visionhdl.FrameToPixels
converts color or grayscale
frame-based video to a pixel stream and control structure. The control structure indicates the
validity of each pixel and its location in 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 specifying custom dimensions. See Streaming Pixel Interface for details of the pixel stream format.
Use this object to generate input for a function targeted for HDL code generation. This block does not support HDL code generation.
If your design converts frames to a pixel stream and later converts the stream back to
frames, specify the same video format for the FrameToPixels
object and the PixelsToFrame
object.
Note
Starting in R2016b, instead of using the step
method
to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For
example, y = step(obj,x)
and y = obj(x)
perform
equivalent operations.
returns a
System object, F2P
= visionhdl.FrameToPixelsF2P
, that serializes a grayscale 1080×1920 frame into
a 1080p pixel stream with standard padding around the active data.
returns a System object, F2P
= visionhdl.FrameToPixels(Name
,Value
)F2P
, with additional options specified by one or more
Name,Value
pair arguments. Name
is a property name and Value
is the corresponding value.
Name
must appear inside single quotes (''
). You can
specify several name-value pair arguments in any order as
Name1,Value1,...,NameN,ValueN
. Properties not specified retain their
default values.
|
Components of each pixel, specified as 1, 3, or 4. Set to 1 for grayscale video. Set
to 3 for color video, for example, {R,G,B} or {Y,Cb,Cr}. Set to 4 to use color with an
alpha channel for transparency. The default is 1. The
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Number of pixels transferred on the streaming interface for each cycle, specified as
Note You can simulate System objects with a multipixel streaming interface, but they are not supported for HDL code generation. Use the equivalent blocks to generate HDL code for multipixel algorithms. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dimensions of active and inactive regions of a video frame. To select a predefined
format, specify the
Note When using a custom format, the properties you enter for the active and inactive dimensions of the image must add up to the total frame dimensions. For the horizontal direction, For the vertical direction, If you specify a format that does not conform to these rules, the object reports an error. Note When using a custom format,
Note When using multipixel streaming (
|
step | Convert image frame to pixel stream |
Common to All System Objects | |
---|---|
release | Allow System object property value changes |