visionhdl.ImageResizer
Description
The visionhdl.ImageResizer
System object™ 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 object provides an
optional antialiasing filter, and you can choose nearest-neighbor or bilinear
interpolation.
You can use this System object 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
To change the dimensions of an image in a pixel stream:
Create the
visionhdl.ImageResizer
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 System object that resizes the active image in a pixel stream. Set properties using one or
more name-value arguments. For example,
resizer
= visionhdl.ImageResizer(Name
=Value
)InputSize=[48,48],OutputSize=[18,32]
specifies an input image of
48-by-48 pixels and an output image resized to 18-by-32 pixels.
Properties
Usage
Syntax
Description
[
expects an input pixel stream with frames of pixelout
,ctrlout
] = resizer(pixelin
,ctrlin
,inputSize
,outputSize
)inputSize
dimensions and
returns a pixel stream with frames of outputSize
dimensions. Use this
syntax when you have set the InputSizeSource
and
OutputSizeSource
properties to 'Input port'
.
Specify the size of an input or output frame as a row vector of the form
[ActiveVideoLines,ActivePixelsPerLine].
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)
Extended Capabilities
Version History
Introduced in R2023a