Optimal Algorithms for Running Max and Min Filters on Random Inputs

Given a d-dimensional array and an integer p, the max (or min) filter is the set of maximum (or minimum) elements within a d-dimensional sliding window of edge length p inside the array. The current best algorithm for computing the 1D max (or min) filter, due to Yuan and Atallah [14], uses \(1+o(1)\) comparisons per sample in the worst case. As a direct consequence, the d-dimensional max (or min) filter can be computed in \((1+o(1))d\) comparisons per sample, and the d-dimensional max and min filters can be computed simultaneously using \((2+o(1))d\) comparisons per sample. Both bounds are the best known results for the corresponding problems, on both worst-case inputs and independently and identically distributed (i.i.d.) inputs.

[1]  Robert E. Tarjan,et al.  Scaling and related techniques for geometry problems , 1984, STOC '84.

[2]  Michael Werman,et al.  Computing 2-D Min, Median, and Max Filters , 1993, IEEE Trans. Pattern Anal. Mach. Intell..

[3]  Marcel van Herk A fast algorithm for local minimum and maximum filters on rectangular and octagonal kernels , 1992, Pattern Recognit. Lett..

[4]  Ronald L. Rivest,et al.  Introduction to Algorithms, third edition , 2009 .

[5]  Ioannis Pitas,et al.  Fast algorithms for running ordering and max/min calculation , 1989 .

[6]  Xinhua Zhuang,et al.  Image Analysis Using Mathematical Morphology , 1987, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[7]  Robert E. Tarjan,et al.  Fast Algorithms for Finding Nearest Common Ancestors , 1984, SIAM J. Comput..

[8]  Jean Vuillemin,et al.  A unifying look at data structures , 1980, CACM.

[9]  Ronald L. Rivest,et al.  Introduction to Algorithms , 1990 .

[10]  Mikhail J. Atallah,et al.  Data structures for range minimum queries in multidimensional arrays , 2010, SODA '10.

[11]  Dinu Coltuc Mathematical Complexity of Running Filters on Semi-Groups and Related Problems , 2008, IEEE Transactions on Signal Processing.

[12]  Pierre Soille,et al.  Morphological Image Analysis: Principles and Applications , 2003 .

[13]  Mikhail J. Atallah,et al.  Running Max/Min Filters Using 1+o(1) Comparisons per Sample , 2011, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[14]  Jaakko T. Astola,et al.  Improving Gil-Werman Algorithm for Running Min and Max Filters , 1997, IEEE Trans. Pattern Anal. Mach. Intell..

[15]  Ron Kimmel,et al.  Efficient Dilation, Erosion, Opening, and Closing Algorithms , 2002, IEEE Trans. Pattern Anal. Mach. Intell..