visionhdl.PixelStreamAligner
Align two streams of pixel data
Description
The visionhdl.PixelStreamAligner
System object™ synchronizes two pixel streams by delaying one stream to match the timing
of a reference stream. Many Vision HDL Toolbox™ algorithms delay the pixel stream, and the amount of delay can change as
you adjust algorithm parameters. You can use this object to align streams for
overlaying, comparing, or combining two streams such as in a Gaussian blur operation.
Use the delayed stream as the refpixel
and refctrl
arguments. Use the earlier stream as the pixelin
and
ctrlin
arguments.
This waveform diagram shows the input streams, pixelin
and
refpixel
, and their associated control signals. The reference
input frame starts later than the pixelin
frame. The output signals
show that the object delays pixelin
to match the reference stream,
and that both output streams share control signals. The waveform shows the short latency
between the input ctrl
and the output ctrl
.
In this simulation, to accommodate the delay of four lines between the input streams,
the MaxNumberofLines
property must be set to at least 4.
For details on the pixel control bus and the dimensions of a video frame, see Streaming Pixel Interface.
To align two streams of pixel data:
Create the
visionhdl.PixelStreamAligner
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
aligner = visionhdl.PixelStreamAligner(Name,Value)
creates a System object that synchronizes a pixel stream with a reference pixel stream.
Set properties using one or more name-value pairs. Enclose each property name in
single quotes. For example, 'MaxNumberOfLines',16
sets the
buffer depth that accommodates the timing offset between the two input
streams.
Properties
Usage
Description
[
synchronizes a pixel stream to a reference stream, pixelout
,refout
,ctrlout
]
= aligner(pixelin
,ctrlin
,refpixel
,refctrl
)refpixel
and refctrl
, by delaying the first input,
pixelin
, to align with the reference input. The
resulting aligned pixel streams, pixelout
and
refout
, share the control signals,
ctrlout
. You can use this object to align streams for
overlay or comparison.
This object uses a streaming pixel interface with a structure
for frame control signals. This interface enables the object to operate independently of image
size and format and to connect with other Vision HDL Toolbox objects. The object accepts and returns a scalar pixel value and control signals
as a structure containing five signals. The control signals indicate the validity of each pixel
and its location in the frame. To convert a pixel matrix into a pixel stream and control
signals, use the visionhdl.FrameToPixels
object. For a
description of the interface, 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)