A very fast algorithm for max/min filtering
Daniela Colţuc, I. Brulea, Vasile V. Buzuloiu · 2002
This paper proposes an algorithm for the computation of 1D running max/min filters of less than 3 comparisons per sample complexity, regardless the size n of the filter window. The algorithm takes advantage of a data-position computation scheme where 2 output samples of a group of n+1 are computed in ascending/descending order each one using n-1 comparisons, while the other n-2 output samples need only one comparison among already available intermediate results. The algorithm can be easily extended to any window size n and the derived scheme is a periodic one.