visionhdl.MedianFilter
2-D median filtering
Description
The visionhdl.MedianFilter
System object™ performs 2-D median filtering on a pixel stream. The object
replaces each pixel value with the median value of the adjacent
pixels.
To perform 2-D median filtering on a pixel stream:
Create the
visionhdl.MedianFilter
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 median filter System object that performs 2-D median filtering of a pixel
stream. Set properties using one or more name-value pairs.
Enclose each property name in single quotes. MF
= visionhdl.MedianFilter(Name
,Value
)
returns a median filter System object, with the
MF
= visionhdl.MedianFilter(size
,Name
,Value
)NeighborhoodSize
property set
to size
and additional options
specified by one or more
Name
,Value
pair arguments.
Properties
Usage
Description
[
returns the filtered pixel value,
pixelout
,ctrlout
] = MF(pixelin
,ctrlin
)pixelout
, and accompanying
control signals, resulting from calculating the median of
the neighborhood around each input pixel,
pixelin
. Before filtering, the
object pads the image edges according to the
PaddingMethod
property.
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
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 Median Filter block reference page.
Extended Capabilities
Version History
Introduced in R2015aSee Also
Median Filter | medfilt2
(Image Processing Toolbox) | visionhdl.FrameToPixels