Abstract: Image processing researchers commonly assert that “median filtering is better than linear filtering for removing noise in the presence of edges.” Using a straightforward large-n decision-theory framework, this folk-theorem is seen to be false in general. We show that median filtering and linear filtering have similar asymptotic worst-case mean-squared error (MSE) when the signal-to-noise ratio (SNR) is of order 1, which corresponds to the case of constant per-pixel noise level in a digital signal. To see dramatic benefits of median smoothing in an asymptotic setting, the per-pixel noise level should tend to zero (i.e., SNR should grow very large). We show that a two-stage median filtering using two very different window widths can dramatically outperform traditional linear and median filtering in settings where the underlying object has edges. In this two-stage procedure, the first pass, at a fine scale, aims at increasing the SNR. The second pass, at a coarser scale, correctly exploits the nonlinearity of the median. Image processing methods based on nonlinear partial differential equations (PDEs) are often said to improve on linear filtering in the presence of edges. Such methods seem difficult to analyze rigorously in a decision-theoretic framework. A popular example is mean curvature motion (MCM), which is formally a kind of iterated median filtering. Our results on iterated median filtering suggest that some PDE-based methods are candidates to rigorously outperform linear filtering in an asymptotic framework.
Challenging the "Median Folk Theorem"
In signal and image processing, it is widely accepted that median filters are superior to linear filters (like moving averages) because they preserve edges while removing noise. However, this "Median Folk Theorem" has historically lacked a rigorous statistical foundation. Ery Arias-Castro and David Donoho investigated this claim using minimax risk analysis, comparing estimators over classes of functions like Punctuated-Lipschitz (1D) and Curve-Punctuated Lipschitz (2D) models.
Their findings reveal a surprising reality: at standard noise levels (where SNR $\approx$ 1), median filtering suffers from a bias near edges that is asymptotically identical to linear blurring. Both methods share the same worst-case error rate in these conditions. The perceived advantage of the median filter only becomes dramatic when the per-pixel noise level is extremely low.
The Two-Scale Multiscale Solution
While a single-pass median filter cannot fundamentally beat linear filtering in standard noisy environments, the authors propose a novel two-stage multiscale median filter. This approach involves:
- A Fine-Scale Pass: A very narrow window is used to slightly increase the SNR without significantly blurring the edge.
- A Coarse-Scale Pass: A wider window then exploits the median's nonlinear properties, which are now effective because the first pass moved the signal into a high-SNR regime.
This two-pass procedure allows the filter to preserve edges perfectly in the limit, effectively making them "invisible" to the error calculation in 1D and significantly improving performance in 2D.
Theoretical Convergence Rates
The superiority of the multiscale approach is reflected in the MSE convergence rates as the number of pixels ($n$) increases. The two-scale median filter achieves the "edge-free" optimal rate in 1D and provides a substantial improvement over linear methods in 2D.
Bridging to PDE-Based Denoising
Beyond immediate filtering applications, this research provides a statistical justification for nonlinear Partial Differential Equation (PDE) methods, such as Mean Curvature Motion (MCM). Since many PDE-based denoising techniques are essentially iterated median filters, the success of the two-scale median filter suggests a path toward proving why these complex methods outperform classical linear ones. While challenges remain in analyzing indefinite iterations and complex 2D geometries, this framework establishes a rigorous decision-theoretic basis for nonlinear edge preservation.
Summary updated