cs.CVNov 16, 2026

When Is the Expensive Method Worth It? A Content-Driven Analysis of Classical Bayer Demosaicing

Authors: Taranum Wasu, Harsh Kashyap, HS Pannu

Organizations: Research Student Thapar University, Patiala, India · Department of Computer Science Thapar Institute of Engineering and Technology Patiala, India

Abstract

Demosaicing reconstructs a full-colour image from a single-sensor colour-filter-array (CFA) mosaic, where only one colour is measured per pixel. Classical methods make different assumptions about images, from simple averaging to directional edge-aware interpolation, and the directional methods cost markedly more compute. We ask a practical question that a per-image quality ranking does not answer: for a given image, is the expensive directional method worth its cost? Using a controlled simulate-reconstruct pipeline on 80 benchmark images from four public datasets (Kodak, McMaster, BSD100, Urban100), six classical methods, and image-content descriptors fixed before any results were seen, we show that the quality gain of the edge-aware method (Menon 2007) over the best cheap linear method is not constant. It ranges from −6.6-6.6 to +6.8+6.8 dB, and on 31% of images it is zero or negative, meaning a cheap method matches or beats the expensive one. The gain is also predictable from content: it correlates with mean image saturation at r=−0.86r=-0.86 (p<10−6p<10^{-6}). We then build an interpretable depth-2 decision tree that recommends the best cheap method from image descriptors, beating an always-pick-the-most-common baseline by 20.0 percentage points under leave-one-image-out validation. The analysis uses no deep learning, and every step can be inspected.

Figures & tables

Explore similar work

Aug 8, 2026

SegDem: Segmentation helps Demosaicing

Image demosaicing reconstructs a full-color image from incomplete color measurements produced by a sensor covered with a color filter array (CFA). Most existing methods formulate demosaicing as pixel-level reconstruction and mainly rely on local textures, cross-channel correlations, and low-level image statistics. Our core insight is that reconstruction and visual understanding can be viewed as complementary views of shared scene structure: both are grounded in the same underlying physical world, and therefore the structural and physical information inferred from an image should remain consistent across the two tasks. We instantiate this idea with instance segmentation and propose SegDem, a cross-task decoder representation transfer framework for demosaicing. SegDem first learns region- and boundary-aware representations through instance-aware structural pretraining and then transfers the decoder to RAW-conditioned reconstruction. Segmentation- and demosaicing-conditioned features are further anchored to a shared frozen DINOv2 representation space to preserve structural organization across tasks. We instantiate SegDem with convolutional, Transformer-based, and state-space backbones for unified Single- and Quad-Bayer demosaicing. Extensive experiments on synthetic, external, and challenging datasets demonstrate consistent improvements across different architectures and CFA layouts.
Mar 2, 2026

Perspective-Equivariant Fine-tuning for Multispectral Demosaicing without Ground Truth

Multispectral demosaicing is crucial to reconstruct full-resolution spectral images from snapshot mosaiced measurements, enabling real-time imaging from neurosurgery to autonomous driving. Classical methods are blurry, while supervised learning requires costly ground truth (GT) obtained from slow line-scanning systems. We propose Perspective-Equivariant Fine-tuning for Demosaicing (PEFD), a framework that learns multispectral demosaicing from mosaiced measurements alone. PEFD a) exploits the projective geometry of camera-based imaging systems to leverage a richer group structure than previous demosaicing methods to recover more null-space information, and b) learns efficiently without GT by adapting pretrained foundation models designed for 1-3 channel imaging. On surgical and automotive datasets, PEFD recovers fine details such as blood vessels and preserves spectral fidelity, substantially outperforming recent approaches, nearing supervised performance. Furthermore, the performance of PEFD is demonstrated on raw, unprocessed data from a commercial multispectral sensor. Code is at https://github.com/Andrewwango/pefd.
Oct 17, 2026

S3D-Mosaic: Subgradient-Guided Cross-Band Structure Transfer for Spectral Demosaicing

Multispectral filter array (MSFA) imaging enables snapshot spectral acquisition, but its per-band sparse sampling causes severe spatial aliasing. Although missing spatial structures can be inferred across bands, wavelength-dependent contrast variations make direct cross-band transfer unreliable. Existing model-based methods lack explicit magnitude-invariant mechanisms, and learning-based methods require layout-specific training or per-image tuning, limiting generalization. To address these issues, we propose S3D-Mosaic, a model-based spectral demosaicing method built upon a subgradient-guided cross-band structure transfer framework. We first establish a subgradient-guided regularization framework with a generalized cosine-similarity interpretation, providing a convex mechanism for magnitude-invariant information transfer. Then we design a compact Directional Sparse Equivariant Difference Convolution (DSE-DConv) for band-level extraction of orientation-selective, high-frequency structure features at low computational cost. Instantiating the framework with DSE-DConv on spectrally adjacent bands yields a cross-band self-structure similarity regularizer for spectral demosaicing, which we optimize via a dual-scan ADMM algorithm that decouples the bidirectional dependency while propagating magnitude-robust structural information across bands. With DSE-DConv's two parameters trained once via self-supervision, S3D-Mosaic outperforms state-of-the-art unsupervised methods on CAVE and NTIRE 2022, and generalizes robustly to varying MSFA layouts, pan-mosaic fusion, and real-world UAV data with fixed reconstruction hyperparameters. The source code is available at https://github.com/bestwishes43/S3D-Mosaic.