Developer Reference for Intel® Integrated Performance Primitives
The median filter functions perform non-linear filtering of a source image data.
These functions use either an arbitrary rectangular mask, or the following predefined masks of the IppiMaskSize type to filter an image:
ippMskSize3x1 |
Horizontal mask of length 3 |
ippMskSize5x1 |
Horizontal mask of length 5 |
ippMskSize1x3 |
Vertical mask of length 3 |
ippMskSize3x3 |
Square mask of size 3 |
ippMskSize1x5 |
Vertical mask of length 5 |
ippMskSize5x5 |
Square mask of size 5 |
The size of the neighborhood and coordinates of the anchor cell in the neighborhood depend on the mask mean value. Table “Median Filter Mask, Neighborhood, and Anchor Cell” lists the mask types with the corresponding neighborhood sizes and anchor cell coordinates. Mask size in mask names is indicated in (XY) order. The anchor cell is specified by its coordinates anchor.x and anchor.y in the coordinate system associated with the upper left corner of the mask.
Mask |
Neighborhood Size |
Anchor Cell |
|
---|---|---|---|
Columns |
Rows |
||
ippMskSize3x1 |
3 |
1 |
[1, 0] |
ippMskSize5x1 |
5 |
1 |
[2, 0] |
ippMskSize1x3 |
1 |
3 |
[0, 1] |
ippMskSize3x3 |
3 |
3 |
[1, 1] |
ippMskSize1x5 |
1 |
5 |
[0, 2] |
ippMskSize5x5 |
5 |
5 |
[2, 2] |
Median filters have the effect of removing the isolated intensity spikes and can be used to reduce noise in an image.
For details on algorithms used in Intel IPP for median filtering, see [APMF].