System object: visionhdl.MedianFilter
Median pixel value of neighborhood
[pixelOut,ctrlOut] = step(medfilt,pixelIn,ctrlIn)
Starting in R2016b, instead of using the
to perform the operation defined by the System object™, you can
call the object with arguments, as if it were a function. For example,
= step(obj,x) and
y = obj(x) perform
[pixelOut,ctrlOut] = step(medfilt,pixelIn,ctrlIn) returns
the next pixel value,
pixelOut, in the filtered
pixel stream resulting from calculating the median of the neighborhood
around each input pixel,
pixelIn. Before filtering,
the object pads image edges according to the
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 System object performs an initialization the first time
you call the
step method. This initialization locks
nontunable properties and input specifications, such as dimensions,
complexity, and data type of the input data. If you change a nontunable
property or an input specification, the object issues an error. To
change nontunable properties or inputs, first call the
to unlock the object.
visionhdl.MedianFilter System object that
you created and configured.
pixelIn— Input pixel
Single pixel, specified as a scalar value.
Supported data types:
types are supported for simulation, but not for HDL code generation.
You can simulate System objects with a multipixel streaming interface, but System objects are not supported for HDL code generation. Use the equivalent blocks to generate HDL code for multipixel algorithms.
pixelOut— Output pixel
Single pixel value representing the median of its neighborhood, returned as a scalar value.
The data type is the same as the data type of