Fast Isotropic Median Filtering
Ben Weiss
TL;DR
This work tackles the challenge of fast, high-quality isotropic median filtering with circular kernels across arbitrary bit-depths and kernel shapes. It introduces the omnigram, an immutable 2D extension of compound histograms, together with an ordinal transform that yields a unique ordinal image, enabling constant-time queries for circular regions. The method processes images in tiles, computing medians via pivots and counts and then sweeping horizontally and vertically to leverage vectorization on CPU and GPU, achieving state-of-the-art performance and markedly reduced anisotropic artifacts. The results demonstrate substantial quality gains and speedups over existing square-kernel methods, with practical impact for large kernels and HDR-like data, while outlining future directions for coherence analysis, small-kernel optimization, and broader kernel shapes.
Abstract
Median filtering is a cornerstone of computational image processing. It provides an effective means of image smoothing, with minimal blurring or softening of edges, invariance to monotonic transformations such as gamma adjustment, and robustness to noise and outliers. However, known algorithms have all suffered from practical limitations: the bit depth of the image data, the size of the filter kernel, or the kernel shape itself. Square-kernel implementations tend to produce streaky cross-hatching artifacts, and nearly all known efficient algorithms are in practice limited to square kernels. We present for the first time a method that overcomes all of these limitations. Our method operates efficiently on arbitrary bit-depth data, arbitrary kernel sizes, and arbitrary convex kernel shapes, including circular shapes.
