Median Filter
2-D median filtering
- Library:
Vision HDL Toolbox / Analysis & Enhancement
Vision HDL Toolbox / Filtering
Description
TheMedian Filterblock replaces each input pixel with the median value of a specified surroundingN-by-Nneighborhood. The median is less sensitive to extreme values than the mean. You can use this block to remove salt-and-pepper noise from an image without significantly reducing the sharpness of the image. You can specify the neighborhood size and padding values for edges of the input image.
Ports
This block uses a streaming pixel interface with a bus for frame control signals. This interface enables the block to operate independently of image size and format. Thepixelports on this block support single pixel streaming or multipixel streaming. Single pixel streaming accepts and returns a single pixel value each clock cycle. Multipixel streaming accepts and returns a vector ofMpixels per clock cycle to support high-frame-rate or high-resolution formats. TheMvalue corresponds to theNumber of pixelsparameter of theFrame To Pixelsblock. Along with the pixel, the block accepts and returns apixelcontrol
bus that contains five control signals. The control signals indicate the validity of each pixel and their location in the frame. For multipixel streaming, one set of control signals applies to all pixels in the vector. To convert a frame (pixel matrix) into a serial pixel stream and control signals, use theFrame To Pixelsblock. For a full description of the interface, seeStreaming Pixel Interface.
Input
Output
Parameters
Tips
When you use a block with an internal line buffer inside anEnabled Subsystem(Simulink), the enable signal pattern must maintain the timing of the pixel stream, including the minimum blanking intervals. If the enable pattern corrupts the timing of the pixel stream, you might see partial output frames, corrupted pixel stream control signals, or mismatches between Simulink®and HDL simulation results. You may need to extend the blanking intervals to accommodate for cycles when the enable is low. For more information, seeConfigure Blanking Intervals.
Algorithms
Extended Capabilities
Version History
See Also
Median Filter(Computer Vision Toolbox)|Frame To Pixels|力ionhdl.MedianFilter