J. Gil et M. Werman, COMPUTING 2-D MIN, MEDIAN, AND MAX FILTERS, IEEE transactions on pattern analysis and machine intelligence, 15(5), 1993, pp. 504-507
Fast algorithms to compute min, median, max, or any other order statis
tic filter transforms are described. The algorithms take constant time
per pixel to compute min or max filters and polylog time per pixel, i
n the size of the filter, to compute the median filter. A logarithmic
time per pixel lower bound for the computation of the median filter is
shown.