This Article 
 Bibliographic References 
 Add to: 
Improving Gil-Werman Algorithm for Running Min and Max Filters
May 1997 (vol. 19 no. 5)
pp. 526-529

Abstract—The current best bound on the number of comparison operations needed to compute the running maximum or minimum over a p-element sliding data window is approximately three comparisons per output sample [1], [2], [3], [4]. This bound is probabilistic for the algorithms in [2], [3], [4] and is derived for their complexities on the average for independent, identically distributed (i.i.d.) input signals (uniformly i.i.d., in the case of the algorithm in [2]). The worst-case complexities of these algorithms are O(p). The worst-case complexity C1 = 3 − 4 / p comparisons per output sample for 1D signals is achieved in the Gil-Werman algorithm [1]. In this correspondence we propose a modification of the Gil-Werman algorithm with the same worst-case complexity but with a lower average complexity. A theoretical analysis shows that using the proposed modification the complexities of sliding Max or Min 1D and 2D filters over i.i.d. signals are reduced to C1 = 2.5 − 3.5 / p + 1 / p2 and C2 = 5 − 7 / p + 2 / p2 comparisons per output sample on the average, respectively. Simulations confirm the theoretical results. Moreover, experiments show that even for highly correlated data, namely, for real images the behavior of the algorithm remains the same as for i.i.d. signals.

[1] J. Gil and M. Werman, “Computing 2D Min, Median, and Max Filters,” IEEE Trans. Pattern Analysis and Machine Intelligence, vol. 15, no. 5, pp. 504-507, May 1993.
[2] I. Pitas, "Fast Algorithms for Running Ordering and Max/Min Calculation," IEEE Trans. Circuits and Systems, vol. 36, no. 6, pp. 795-804, June 1989.
[3] S. Douglas, "An Efficient Algorithm for Running Max/Min Calculation," Proc. IEEE Int'l Symp. Circuits and Systems, ISCAS'96, vol. 2, pp. 5-8, May12-15, 1996,Atlanta, Ga.
[4] S. Douglas, "Running Max/Min Calculation Using a Pruned Ordered List," IEEE Trans. Signal Processing, vol. 44, no. 11, pp. 2,872-2,877, Nov. 1996.
[5] A. Bovik, T.S. Huang, and D.C. Munson, Jr., "A Generalization of Median Filtering Using Linear Combinations of Order Statistics," IEEE Trans. Acoustics, Speech and Signal Processing, vol. 31, no. 6, pp. 1,342-1,350, Dec. 1983.
[6] M. Vemis, G. Economou, S. Fotopoulos, and A. Khodyrev, "The Use of Boolean Functions and Logical Operations for Edge Detection in Images," Signal Processing, vol. 45, pp. 161-172, 1995.
[7] S.C. Douglas, "A Family of Normalized LMS Algorithms," IEEE Trans. Signal Proc. Lett., vol. 1, no. 3, pp. 49-51, Mar. 1994.
[8] J. Serra, Image Analysis and Mathematical Morphology.New York: Academic Press, 1982.
[9] M. Werman and S. Peleg, "Min Max Operators in Texture Analysis," IEEE Trans. Pattern Analysis and Machine Intelligence, vol. 7, no. 11, pp. 730-733, Nov. 1985.
[10] A. Kaufman, “Volume Visualization,” ACM Computing Surveys, vol. 28, no. 1, pp. 165-167, 1996.

Index Terms:
Running min and max, morphological filters, algorithms, computational complexity.
David Z. Gevorkian, Jaakko T. Astola, Samvel M. Atourian, "Improving Gil-Werman Algorithm for Running Min and Max Filters," IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 19, no. 5, pp. 526-529, May 1997, doi:10.1109/34.589214
Usage of this product signifies your acceptance of the Terms of Use.