System object: visionhdl.ChromaResampler
Package: visionhdl
Compute next pixel in upsampled or downsampled pixel stream
[pixelOut,ctrlOut] = step(resample,pixelIn,ctrlIn)
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.
[pixelOut,ctrlOut] = step(resample,pixelIn,ctrlIn)
computes
the next output pixel, pixelOut
, in the resampled
video stream. The pixel data arguments, pixelIn
and pixelOut
,
are vectors of three values representing a pixel in Y'CbCr color space.
The luma component and control signals, ctrlIn
,
are passed through and aligned with the output pixel stream.
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 full
description of the interface, see Streaming Pixel Interface.
Note
The System object performs an initialization the first time
you call the step
method. This initialization locks
nontunable properties and input specifications, such as dimensions,
complexity, and data type of the input data. If you change a nontunable
property or an input specification, the object issues an error. To
change nontunable properties or inputs, first call the release
method
to unlock the object.