A Finite Difference Scheme for the Stack Filter Simulating the MCM

Marco MondelliImage Process. Line 2013

Abstract

This paper presents a robust numerical implementation of a "stack filter" designed to simulate Mean Curvature Motion (MCM). By decomposing an image into its constituent level sets and processing them independently via a finite difference scheme, the method achieves strict contrast invariance and exceptional denoising performance, particularly for images heavily corrupted by salt-and-pepper noise.

Introduction

In image processing, Mean Curvature Motion (MCM) is a partial differential equation (PDE) used to smooth images by moving boundaries at a speed proportional to their local curvature. This process effectively removes noise while preserving important geometric structures. However, standard Finite Difference Schemes (FDS) used to solve the MCM equation directly on grayscale images are not "contrast invariant." They can introduce new gray levels or "shading" that wasn't in the original image, violating the perceptual principle that shapes should be recognized regardless of global contrast. Furthermore, standard schemes often struggle with heavy "salt and pepper" noise.

Methodology: The Stack Filter Framework

The author utilizes the framework of Stack Filters to ensure contrast invariance. The core idea is that any monotone, contrast-invariant operator can be implemented through a three-step process:

  1. Decomposition: Breaking a grayscale image (typically 0–255 levels) into 255 binary "cross-sections" or upper level sets.
  2. Binary Processing: Applying a binary version of the MCM finite difference scheme to each of these 255 layers independently. The algorithm uses a $3 \times 3$ stencil to evaluate curvature and a "half-Laplacian" diffusion threshold for areas where the gradient is zero.
  3. Reconstruction: Recombining the evolved layers using the "superposition principle" to form the final grayscale image.

Because processing 255 layers is computationally expensive, the author implements parallelization using OpenMP, allowing independent level sets to be processed simultaneously across multiple CPU cores.

Geometric Integrity and Results

Because the stack filter operates on binary level sets, it cannot create new gray levels, ensuring the output remains faithful to the original image's quantization. This geometric integrity is visible in the way the filter simplifies complex scenes over multiple iterations.

Evolution of a landscape image under the MCM stack filter with increasing iterations (n_iter), demonstrating geometric simplification and the semigroup property.

Key Performance Metrics

  • Contrast Invariance: In tests using linear contrast changes, the stack filter maintained a nearly constant, low Root Mean Square Error (RMSE), whereas standard FDS error spiked significantly as the smoothing scale increased.
  • Denoising Performance: At 30% salt-and-pepper noise, the stack filter achieved an RMSE roughly five times smaller than the standard FDS. At 50% noise—where the input is almost unrecognizable—the stack filter was still able to recover essential geometry, such as the Eiffel Tower, while standard FDS failed completely.

Limitations and Future Work

Despite parallelization, the method remains slower than direct grayscale schemes. The author suggests that Fast Marching algorithms could provide future speed improvements. Additionally, as a pixel-based scheme, the algorithm is limited by grid size; for applications requiring extreme precision, "Level Lines Shortening" (LLS) is noted as a more accurate, albeit more complex, alternative. Current boundary effects from symmetrization also present a minor area for refinement in long-duration evolutions.

Summary updated

BibTeX
@inproceedings{mondelli2013finite,
  author = {Marco Mondelli},
  title = {{A Finite Difference Scheme for the Stack Filter Simulating the MCM}},
  booktitle = {Image Process. Line},
  year = {2013},
  url = {https://openreview.net/forum?id=RMSK1MMXYK},
}
Figure