visionhdl.ChromaResampler
Downsample or upsample chrominance component
Description
The visionhdl.ChromaResampler
System object™ downsamples or upsamples a pixel stream.
Downsampling reduces bandwidth and storage requirements in a video system by combining pixel chrominance components over multiple pixels. You can specify a filter to prevent aliasing, by selecting the default filter or by entering coefficients.
Upsampling restores a signal to its original rate. You can use interpolation or replication to calculate the extra sample.
The object accepts luma and the chrominance components. The object does not modify the luma component and applies delay to align with the resampled chrominance outputs. The rate of the output luma component is the same as the input.
To resample the chrominance component of a pixel stream:
Create the
visionhdl.ChromaResampler
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 chroma resampler System object that resamples the chrominance component of a pixel stream. Set
properties using one or more name-value pairs. Enclose each property name in
single quotes. CR
= visionhdl.ChromaResampler(Name
,Value
)
Properties
Usage
Description
[
computes the next output pixel, pixelout
,ctrlout
] = CR(pixelin
,ctrlin
)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 object passes through the luma component and
control signals, ctrlin
, 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 three-component vector that
represents a single pixel and a structure that contains five control 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.
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)
Examples
Algorithms
This object implements the algorithms described on the Chroma Resampler block reference page.
Extended Capabilities
Version History
Introduced in R2015a
See Also
Chroma Resampler | vision.ChromaResampler
(Computer Vision Toolbox) | visionhdl.FrameToPixels