visionhdl.MedianFilter
2-D median filtering
Description
visionhdl.MedianFilter
performs 2-D median
filtering on a pixel stream. The object replaces each pixel value with the
median value of the adjacent pixels.
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.
Note
Starting in R2016b, instead of using the step
method to perform the operation defined by
the System object™, you can call the object with arguments, as if it were
a function. For example, y = step(obj,x)
and
y = obj(x)
perform equivalent
operations.
Construction
returns
a System object, MF
= visionhdl.MedianFilterMF
, that performs two-dimensional median
filtering of serial pixel data.
returns a median filter System object, MF
= visionhdl.MedianFilter(Name
,Value
)MF
, with additional options specified by
one or more Name
,Value
pair
arguments. Name
is a property name and
Value
is the corresponding value.
Name
must appear inside single quotes
(''
). You can specify several name-value pair
arguments in any order as Name1,Value1,...,NameN,ValueN
.
Properties not specified retain their default values.
returns a median filter System object, MF
= visionhdl.MedianFilter(size
,Name
,Value
)MF
, with the
NeighborhoodSize
property set to
size
and additional options specified by one or
more Name
,Value
pair
arguments.
Input Arguments
|
Size in pixels of the image region used to compute the median. This argument sets the NeighborhoodSize property value. |
Output Arguments
|
|
Properties
|
Neighborhood size, in pixels.
|
|
Size of line memory buffer, specified as a positive integer. Choose a power of two that accommodates the number of active pixels in a horizontal line. If you specify a value that is not a power of two, the buffer uses the next largest power of two. Choose a power of 2 that accommodates the number of
active pixels in a horizontal line. If you specify a
value that is not a power of two, the object uses
the next largest power of two. The object allocates
N -
1-by- Default: 2048 |
| Select one of these methods for padding the boundary of the input image.
For more information about these methods, see Edge Padding. Default: |
|
Constant value used to pad the boundary of the input image.
This property applies when you set Default: 0 |
Methods
step | Median pixel value of neighborhood |
Common to All System Objects | |
---|---|
release | Allow System object property value changes |
Examples
Algorithms
This object implements the algorithms described on the Median Filter block reference page.
Extended Capabilities
Version History
See Also
Median Filter | medfilt2
(Image Processing Toolbox) | visionhdl.FrameToPixels