visionhdl.FrameToPixels
Convert frame-based video to pixel stream
Description
The visionhdl.FrameToPixels
System object™ 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 by specifying
custom dimensions. For details about the pixel stream format, see Streaming Pixel Interface.
Use this object to generate input for a function targeted for HDL code generation. This object itself 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.
To convert frame-based video to a pixel stream:
Create the
visionhdl.FrameToPixels
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Description
returns a
System object that serializes input frames into a pixel stream. Set properties using one
or more name-value pairs. Enclose each property name in single quotes. F2P
= visionhdl.FrameToPixels(Name
,Value
)
Properties
Usage
Description
[
converts the input image matrix, pixels
,ctrlOut
] = F2P(frm
)frm
, to a
vector
of pixel values, pixels
, and an associated vector of control
structures, ctrlOut
. The control structure indicates the validity of
each pixel and its location in the frame. The output pixels include padding around the
active image, specified by the VideoFormat
property.
For details about the pixel stream format, see Streaming Pixel Interface.
Input Arguments
Output Arguments
Object Functions
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)