Overview
A median filter slides a window over a signal or image and outputs the median value in that window. It reduces impulse noise while preserving sharper edges better than simple averaging.
Replaces each sample or pixel with the median of a local neighborhood.
Compact metadata for implementation and discovery.
A median filter slides a window over a signal or image and outputs the median value in that window. It reduces impulse noise while preserving sharper edges better than simple averaging.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n k log k)
Worst
O(n k log k)
Space
O(k)
output[i] = median(values in local window around i)Replaces each sample with the middle-ranked value from its neighborhood.
Show an outlier removed by choosing the middle value in a window.
Median filtering is nonlinear; it does not have the same frequency response interpretation as linear filters.
What each reference supports for this entry.
Image-processing reference for nonlinear filters such as median filtering and practical neighborhood operations.
Good next jumps from the relationship graph, ranked for useful discovery.
Median filters suppress impulse noise, while Gaussian blur averages local neighborhoods.
Both are local-window image operations but use different order statistics.