RawHDR: High Dynamic Range Image Reconstruction from a Single Raw Image

Yunhao Zou, Chenggang Yan, Ying Fu

Abstract

High Dynamic Range (HDR) reconstruction from a single image is a challenging task due to the loss of information in over-exposed and under-exposed regions. While most existing methods attempt to reconstruct HDR images from standard 8-bit sRGB inputs, these images have already undergone significant degradation through the camera's internal processing pipeline. We present RawHDR, a novel framework that shifts the focus to 14-bit Raw sensor data. By leveraging the linear relationship between Raw data and scene radiance, alongside a specialized architecture featuring Dual Intensity Guidance and Transformer-based spatial modules, RawHDR achieves state-of-the-art performance in recovering lost details and maintaining cross-camera robustness.

Introduction

The dynamic range of natural scenes—the ratio between the brightest highlights and the darkest shadows—often exceeds the capture capabilities of standard consumer camera sensors. Traditionally, this is addressed via multi-exposure bracketing, where multiple shots are merged. However, this technique is prone to "ghosting" artifacts when subjects or the camera move during the sequence.

Recent deep learning research has explored single-image HDR reconstruction to circumvent these artifacts. Most of these methods operate on 8-bit sRGB images. However, the sRGB format is a poor starting point for reconstruction: the camera's Image Signal Processor (ISP) has already applied non-linear tone mapping, clipped highlights, and crushed shadows to fit the data into a limited bit-depth. RawHDR addresses this by utilizing the original 14-bit Raw sensor data, which preserves a higher bit-depth and a linear response to light, providing a much richer foundation for high-fidelity reconstruction.

Methodology

RawHDR utilizes a specialized neural architecture designed to exploit the physical and mathematical properties of Raw sensor data. The framework consists of three primary components:

1. Learnable Exposure Masks

Rather than using fixed, hard-coded thresholds to identify saturated or dark regions, RawHDR employs learnable "soft" masks. These masks allow the model to dynamically identify and weight the importance of different regions, facilitating a smoother transition between well-exposed areas and extreme "hard" regions during the reconstruction process.

2. Dual Intensity Guidance (DIG)

This module leverages the inherent asymmetry of the Bayer filter found on most camera sensors. In a standard Bayer pattern, green pixels are typically more sensitive to light, providing a higher signal-to-noise ratio in shadows. Conversely, red and blue pixels are less sensitive, making them less likely to clip in bright highlights. The DIG module uses these more informative channels to "guide" the reconstruction of the less informative ones, effectively turning a hardware characteristic into a computational advantage.

3. Global Spatial Guidance (GSG)

To recover missing textures, the model must often look beyond the immediate local neighborhood. The GSG module utilizes a Transformer-based branch (specifically LeWin Transformer blocks) to capture long-range spatial dependencies. This allows the model to "borrow" structural information from well-exposed parts of the image to intelligently fill in gaps in over-exposed or under-exposed regions.

Experimental Setup and Datasets

To evaluate the proposed method, the researchers introduced the RawHDR Dataset, a high-quality benchmark consisting of 324 pairs of Raw and HDR images. These were captured using a Canon 5D Mark IV. Ground-truth HDR references were generated by merging three distinct exposures (-3EV, 0EV, +3EV) to ensure high fidelity. The study also utilized existing datasets such as Froehlich et al. and HDREye for comparative analysis, noting that many existing benchmarks lack true Raw data or rely on synthetic mappings.

Results and Discussion

Quantitative Performance

RawHDR significantly outperformed existing state-of-the-art methods, including HDRUNet and ExpandNet. The model achieved a PSNR of 37.24 and a PSNR-μ (tone-mapped) of 41.95. These metrics indicate a substantial improvement in reconstruction accuracy over sRGB-based competitors.

Qualitative Analysis

Visual results demonstrate that RawHDR excels at recovering fine details that are typically lost. For instance, the model can reconstruct legible text in deep shadows and maintain structural integrity in bright windows where other methods produce flat, noisy, or artifact-heavy results.

Cross-Camera Robustness

A key advantage of working with Raw data is its linearity. Because sRGB-based models are trained on the specific, non-linear "color science" of a particular manufacturer, they often fail when applied to different cameras. In contrast, RawHDR demonstrated remarkable robustness; a model trained on Canon data maintained high performance when tested on Sony sensor data, whereas sRGB-based models saw a significant drop in quality.

Conclusion

RawHDR demonstrates that the choice of input format is as critical as the architecture itself in single-image HDR reconstruction. By returning to the Raw sensor data, the model bypasses the limitations of the standard camera ISP. While the current model's computational cost (42.07 GMACs) presents a challenge for real-time mobile integration, the research provides a clear path forward for high-fidelity imaging. Future work will focus on architectural compression and the potential for direct integration into camera processing pipelines.

Summary updated

BibTeX
@inproceedings{zou2023rawhdr,
  author = {Yunhao Zou and Chenggang Yan and Ying Fu},
  title = {{RawHDR: High Dynamic Range Image Reconstruction from a Single Raw Image}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
}
Figure