Downsample or upsample chrominance component
visionhdl.ChromaResampler
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.
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.
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.
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, CR
= visionhdl.ChromaResamplerCR
, that downsamples from 4:4:4 to 4:2:2 and applies
the default antialiasing filter.
returns a chroma resampler System object, CR
= visionhdl.ChromaResampler(Name
,Value
)CR
, 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.
|
Resampling format.
|
|
Lowpass filter to accompany a downsample operation.
This property applies when you set |
|
Coefficients for the antialiasing filter. Enter the coefficients as a vector. This property applies when you set
Default: |
|
Interpolation method for an upsample operation.
This property applies when you set |
|
Rounding mode used for fixed-point operations. The object uses fixed-point arithmetic for internal calculations
when the input is any integer or fixed-point data type. This option
does not apply when the input data type is Default: |
|
Overflow action used for fixed-point operations. The object uses fixed-point arithmetic for internal calculations
when the input is any integer or fixed-point data type. This option
does not apply when the input data type is Default: |
|
Data type for the antialiasing filter coefficients. Specify a custom data type as a character vector. This parameter applies
when you set Default: |
step | Compute next pixel in upsampled or downsampled pixel stream |
Common to All System Objects | |
---|---|
release | Allow System object property value changes |
This object implements the algorithms described on the Chroma Resampler block reference page.
Chroma Resampler | visionhdl.FrameToPixels
| vision.ChromaResampler
(Computer Vision Toolbox)