NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Low Cost Edge Sensing for High Quality Demosaicking

Yan Niu, Jihong Ouyang, Wanli Zuo, Fuxin Wang · DOI

Abstract

Digital cameras that use Color Filter Arrays (CFA) entail a demosaicking procedure to form full RGB images. As today's camera users generally require images to be viewed instantly, demosaicking algorithms for real applications must be fast. Moreover, the associated cost should be lower than the cost saved by using CFA. For this purpose, we revisit the classical Hamilton-Adams (HA) algorithm, which outperforms many sophisticated techniques in both speed and accuracy. Inspired by HA's strength and weakness, we design a very low cost edge sensing scheme. Briefly, it guides demosaicking by a logistic functional of the difference between directional variations. We extensively compare our algorithm with 28 demosaicking algorithms by running their open source codes on benchmark datasets. Compared to methods of similar computational cost, our method achieves substantially higher accuracy, whereas compared to methods of similar accuracy, our method has significantly lower cost. Moreover, on test images of currently popular resolution, the quality of our algorithm is comparable to top performers, whereas its speed is tens of times faster.

Introduction

Most digital cameras capture only one primary color (Red, Green, or Blue) per pixel using a Color Filter Array (CFA), typically the Bayer Pattern. The process of reconstructing the missing color components at each pixel is known as demosaicking.

This task presents a significant engineering challenge. Simple algorithms like Bilinear Interpolation or the classical Hamilton-Adams (HA) method are computationally efficient but often produce "zipper" artifacts and false colors near sharp edges. Conversely, sophisticated modern algorithms—including those based on Deep Learning or non-local regularization—yield high-quality images but are too computationally intensive for real-time viewing on mobile devices or high-resolution sensors. The goal of this research is to find a "sweet spot": an algorithm that is fast enough for hardware implementation while maintaining the accuracy required for modern high-resolution sensors.

Methodology: The LED Innovation

The proposed Logistic Edge-Sensing Demosaicking (LED) algorithm builds upon the Hamilton-Adams framework but addresses its primary weakness: the "hard switch" logic. In HA, if horizontal variation is even slightly lower than vertical, the vertical data is ignored, making the algorithm sensitive to noise.

Logistic Blending

Instead of a discrete choice, LED utilizes a logistic function (a sigmoid curve) to calculate a blending weight ($\omega_h$). This allows for a smooth transition between horizontal and vertical estimates. When an edge is clearly defined, the algorithm favors the appropriate direction; in flat or noisy regions, it blends both estimates to reduce artifacts.

The logistic function used to smoothly blend directional estimates, avoiding the artifacts of hard-switching.

Diagonal Edge Sensing

While the Green channel is sampled relatively densely in the Bayer pattern, Red and Blue channels are sparse. To address this, the researchers developed a novel scheme to sense edges diagonally. This leverages the diagonal symmetry of the Bayer pattern to improve interpolation accuracy for the sparse color channels.

Diagonal edge sensing schemes for Red and Blue channel interpolation.

Parallel Design

Unlike iterative methods that require multiple passes over the image data, LED calculates each pixel's value independently. This "embarrassingly parallel" design is ideal for modern hardware acceleration on GPUs and FPGAs.

Results and Performance

The LED algorithm was evaluated against 28 other methods using benchmark datasets including Kodak, McM, and a high-resolution "MR Kodak" set (approx. 6.2 Megapixels).

  • Accuracy: LED achieved a significant 2.51dB PSNR improvement over the baseline HA algorithm on the Kodak dataset.
  • Efficiency: LED proved to be tens of times faster than high-accuracy competitors. On modern high-resolution images, LED processed data in approximately 2.8 seconds, while comparable high-quality methods required hundreds of seconds.
  • Visual Quality: Qualitative analysis shows that LED effectively reduces "false color" artifacts—rainbow-like streaks on fine lines—that typically plague other fast demosaicking methods.

Conclusion

By replacing rigid logic with continuous functional blending, the LED algorithm achieves a superior balance of speed and image quality. While the current implementation avoids post-processing to highlight the strength of its core edge-sensing logic, it serves as an excellent candidate for real-time camera pipelines or as a high-quality initialization step for more complex iterative frameworks.

Summary updated

BibTeX
@article{niu2019low,
  author = {Yan Niu and Jihong Ouyang and Wanli Zuo and Fuxin Wang},
  title = {{Low Cost Edge Sensing for High Quality Demosaicking}},
  journal = {IEEE Trans. Image Process.},
  year = {2019},
  url = {https://openreview.net/forum?id=5Z4tSZ73SI},
}
Figure