Lune

SIGGRAPH2021Top-tier venue

Fast median filters using separable sorting networks

Andrew Adams

Abstract

Median filters are a widely-used tool in graphics, imaging, machine learning, visual effects, and even audio processing. Currently, very-small-support median filters are performed using sorting networks, and large-support median filters are handled by O (1) histogram-based methods. However, the constant factor on these O (1) algorithms is large, and they scale poorly to data types above 8-bit integers. On the other hand, good sorting networks have not been described above the 7 X 7 case, leaving us with no fast way to compute integer median filters of modest size, and no fast way to compute floating point median filters for any size above 7 X 7. This paper describes new sorting networks that efficiently compute median filters of arbitrary size. The key idea is that these networks can be factored to exploit the separability of the sorting problem - they share common work across scanlines, and within small tiles of output. We also describe new ways to run sorting networks efficiently, using a sorting-specific instruction set, compiler, and interpreter. The speed-up over prior work is more than an order of magnitude for a wide range of data types and filter sizes. For 8-bit integers, we describe the fastest median filters for all sizes up to 25 X 25 on CPU, and up to 33 X 33 on GPU. For higher-precision types, we describe the fastest median filters at all sizes tested on both CPU and GPU.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

its abstract · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Fast Isotropic Median FilteringBen WeissSIGGRAPH 2025 · 1 citation
  2. A Fast Parallel Median Filtering Algorithm Using Hierarchical TilingLouis SugySIGGRAPH 2025 · 1 citation

Related papers

  1. Origami: A High-Performance Mergesort FrameworkArif Arman, Dmitri LoguinovVLDB 2022 · 3 citations
  2. Minuet: Accelerating 3D Sparse Convolutions on GPUsJiacheng Yang, Christina Giannoula, Jun Wu, Mostafa Elhoushi et al.EuroSys 2024 · 2 citations
  3. PAGANI: a parallel adaptive GPU algorithm for numerical integrationIoannis Sakiotis, Kamesh Arumugam, Marc F. Paterno, Desh Ranjan et al.SC 2021 · 4 citations
  4. DWM: A Decomposable Winograd Method for Convolution AccelerationDi Huang, Xishan Zhang, Rui Zhang, Tian Zhi et al.AAAI 2020 · 31 citations
  5. A one-for-all and o(v log(v ))-cost solution for parallel merge style operations on sorted key-value arraysBangyan Wang, Lei Deng, Fei Sun, Guohao Dai et al.ASPLOS 2022 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines