Image Resizer
Libraries:
Vision HDL Toolbox /
Geometric Transforms
Description
The Image Resizer block downscales grayscale input images. The horizontal and vertical scale factors are independent and you can optionally specify input and output sizes in real time. The block provides an optional antialiasing filter, and you can choose nearest-neighbor or bilinear interpolation.
You can use this block for image resize operations such as:
Converting images to a uniform size for input to deep learning algorithms
Modifying disparate source videos for processing, resource, or display requirements
Ports
This block uses a streaming pixel interface with a
pixelcontrol
bus for frame control signals. All Vision HDL Toolbox™ blocks use the same streaming interface. The block accepts and returns a scalar
pixel value and a bus that contains five control signals. The control signals indicate the
validity of each pixel and its location in the frame. To convert a frame (pixel matrix) into a
serial pixel stream and control signals, use the Frame
To Pixels block. For a full description of the interface, see Streaming Pixel Interface.
Input
Output
Parameters
Algorithms
The resize architecture consists of a scale calculator, buffer, interpolator, and optional
antialiasing filter and output buffer. The scale calculator converts the specified input and
output sizes into accumulators that control the selection of pixels from the buffer. The input
and output sizes can come from parameters or ports. If they come from ports, the block
captures the values when vStart
is true
in the input
control bus. If you select the antialiasing filter,
the input stream is filtered with a 5-by-5 fixed kernel before entering the input buffer. The
input buffer consists of circular buffers that form the vertical kernels required for the
interpolation filter. The interpolator contains vertical and horizontal filters that use the
interpolation method that you selected. The antialiasing filter and the interpolation filters
use symmetric padding. At the output of the block, the pixelcontrol
bus
control signals are regenerated, and data is buffered again if necessary to maintain the
specified minimum horizontal blanking interval.
Extended Capabilities
Version History
Introduced in R2023a