A fast algorithm for two dimensional median filtering

The median of a set of numbers is a number which partitions the given set, excluding that number, into two subsets with an equal number of elements such that the number is greater than or equal to the elements in one subset and less than or equal to in the other. In image processing, in order to compute the running median, the window is moved from one neighborhood to the next. In this paper, a fast two-dimensional median filtering algorithm is proposed. The algorithm is designed in such a way that in order to find the median of a window, the results obtained during the partitioning of the previous window are used. Test results obtained by running the algorithm on VAX 11/780 are presented and its performance is compared with the Huang's histogram algorithm for median filtering. It is shown that the proposed algorithm's execution time is faster and is independent of the number of bits used to represent the data values. The novel features in the algorithm design that contribute to fast execution are also presented.