visionhdl.ImageFilter
R2026b2-D FIR filtering
Description
The visionhdl.ImageFilter
System object™ performs two-dimensional finite-impulse-response (FIR) filtering on a
pixel stream. It supports the use of programmable filter coefficients.
The filter can implement an internal line
buffer, or accept inputs from an external line buffer such as the visionhdl.LineBuffer
System object. An external line buffer allows you to share the line buffer with other
operations in your system. To support sharing a line buffer between filters with
different kernel sizes, you must manipulate the line buffer output to extract the
smaller neighborhoods. For an example of this manipulation in a Simulink® design, see . (since R2026b)
To filter a pixel stream:
Create the
visionhdl.ImageFilterobject 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
Syntax
Description
returns a 2-D FIR filter System object that filters a pixel stream. Set properties using one or more
name-value pairs. Enclose each property name in single quotes. F = visionhdl.ImageFilter(PropertyName=Value)
returns a 2-D FIR filter System object, with the F = visionhdl.ImageFilter(coeff,lineSize,PropertyName=Value)Coefficients property set to
coeff, the LineBufferSize property
set to lineSize, and additional options specified by one or
more name-value arguments.
Properties
Usage
Syntax
Description
[
returns the next pixel, pixelout,ctrlout] = F(pixelin,ctrlin,coeff)pixelout, of the filtered image
resulting from applying the coefficients in the coeff
argument to the image described by the input pixel stream,
pixelin. The object samples the values from the
coeff argument only at the start of a frame and ignores
any changes during a frame. To enable this syntax, set the
CoefficientsSource property to 'Input
port'.
[
returns the next pixel, pixelout,ctrlout] = F(nhoodColumn,ctrlin,shiftEnable)pixelout, of the filtered image
resulting from applying the coefficients in the
Coefficients property to the current neighborhood. This
syntax applies when you set LineBufferSource to
'External', and the nhoodColumn and
shiftEnable arguments represent a neighborhood selected
by an external line buffer, such as the visionhdl.LineBuffer
System object.
[
implements a filter that has programmable coefficients and uses an external line
buffer. This syntax applies when you set the
pixelout,ctrlout] = F(nhoodColumn,ctrlin,shiftEnable,coeff)LineBufferSource property to
'External' and the
CoefficientsSource property to 'Input
port'.
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. When configured with an internal line buffer, the filter
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. When configured with an external line buffer, one set of
input control signals applies to all the values in the
nhoodColumn input vector, and the filter returns a scalar
value and accompanying control signals. To convert a pixel matrix into a pixel
stream and control signals, use the visionhdl.FrameToPixels object.
For a 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 System object implements the algorithms described on the Image Filter block reference page.
Extended Capabilities
Version History
Introduced in R2015aSee Also
Image Filter | imfilter (Image Processing Toolbox) | visionhdl.FrameToPixels

