Abstract
Image demosaicing and denoising play a critical role in the raw imaging pipeline. These processes have often been treated as independent, without considering their interactions. Indeed, most classic denoising methods handle noisy RGB images, not raw images. Conversely, most demosaicing methods address the demosaicing of noise-free images. The real problem is to jointly denoise and demosaic noisy raw images. But the question of how to proceed is still not clarified. In this paper, we carry out extensive experiments and a mathematical analysis to tackle this problem by low-complexity algorithms. Indeed, both problems have only been addressed jointly by end-to-end heavy-weight convolutional neural networks (CNNs), which are currently incompatible with low-power portable imaging devices and remain by nature domain (or device) dependent. Our study leads us to conclude that, with moderate noise, demosaicing should be applied first, followed by denoising. This requires a simple adaptation of classic denoising algorithms to demosaiced noise, which we justify and specify. Although our main conclusion is 'demosaic first, then denoise,' we also discover that for high noise, there is a moderate PSNR gain by a more complex strategy: partial CFA denoising followed by demosaicing and by a second denoising on the RGB image. These surprising results are obtained by a black-box optimization of the pipeline, which could be applied to any other pipeline. We validate our results on simulated and real noisy CFA images obtained from several benchmarks.
Introduction
Digital camera sensors capture light through a Color Filter Array (CFA), typically a Bayer pattern, where each pixel records only one color (Red, Green, or Blue). To produce a full-color image, the camera must perform two critical tasks: denoising (removing sensor grain) and demosaic (interpolating the missing color values).
For decades, researchers have debated the order of these operations. The traditional "Denoise-then-Demosaic" (DN&DM) approach is popular because sensor noise is "white" (independent and identically distributed), which is exactly what most denoising algorithms are designed to handle. However, denoising the sparse CFA grid often leads to a loss of fine detail and "checkerboard" artifacts. Conversely, "Demosaic-then-Denoise" (DM&DN) preserves more detail but turns simple sensor noise into complex, correlated "structured noise" that confuses standard denoisers. This paper seeks the optimal middle ground for low-power devices where massive neural networks aren't an option.
Methods
The authors took a two-pronged approach to solve this ordering dilemma:
- Black-Box Optimization: They designed a generic three-step pipeline that could blend denoising and demosaicing in any order. They used an evolutionary algorithm called CMA-ES (Covariance Matrix Adaptation Evolution Strategy) to automatically find the best parameters (noise levels and weights) for this pipeline across thousands of iterations.
- Mathematical Analysis: They analyzed the statistical properties of "demosaiced noise." They discovered that while demosaicing makes noise correlated, it also concentrates it into the luminance (Y) channel.
- The DM&1.5DN Strategy: Based on their findings, they proposed a specific "Demosaic-then-Denoise" strategy where the denoiser is applied to the full RGB image but is "tricked" into using a noise parameter roughly 1.5 times higher than the actual sensor noise ($\sigma_2 = 1.5\sigma$).
Key Insights and Ideas
- The "Tendency to Gray": The authors observed that demosaicing algorithms have a natural "tendency to gray," meaning they correlate the R, G, and B channels. This pushes the noise into the brightness (luminance) direction while actually reducing noise in the chromatic (color) directions.
- Luminance Concentration: After demosaicing, the noise variance in the luminance channel can be up to 1.56 times higher than the original sensor noise. This explains why the "DM&1.5DN" strategy works so well—it targets the specific way demosaicing amplifies brightness noise.
- Detail Preservation: Denoising after demosaicing allows the algorithm to work on a full-resolution image. This avoids the resolution loss and checkerboard artifacts that occur when you try to denoise a sparse CFA grid.
- The High-Noise Exception: For very high noise levels, the optimizer found that a "sandwich" strategy is best: a light pre-denoising on the CFA, followed by demosaicing, followed by a final denoise on the RGB image.
Key Results
The study validated its findings using simulated noise (Imax and Kodak datasets) and real-world noise (SIDD and DND datasets).
- Performance Gain: The proposed DM&1.5DN scheme (using MLRI demosaicing and CBM3D denoising) outperformed the best traditional DN&DM methods by 0.5 to 1.0 dB in Color Peak Signal-to-Noise Ratio (CPSNR).
- Real-World Success: On the SIDD benchmark, the DM&1.5DN strategy achieved an average gain of 0.60 dB over traditional pipelines.
- Efficiency: The DM&DN approach is computationally cheaper than many DN&DM methods because it doesn't require splitting the image into sub-channels for processing, making it ideal for mobile hardware.
Conclusion
While heavyweight end-to-end CNNs still achieve the highest absolute PSNR scores, they are often impractical for real-time use on mobile ISP chips. This research proves that for moderate noise levels, a simple "demosaic first" strategy—when properly tuned—outperforms traditional pipelines and offers a robust, efficient alternative for portable imaging devices. The black-box optimization framework presented here provides a powerful tool for tuning future imaging pipelines beyond just denoising and demosaicing.
Summary updated