Abstract: High Dynamic Range (HDR) images use a wider range of intensity values than common Limited Dynamic Range (LDR) images. Because of this, handling HDR images requires a great deal of information to be stored and transferred. To represent and display HDR images efficiently, a trade-off needs to be balanced between size and accuracy. We present a new wavelet-based algorithm for encoding HDR images, making their data feasible for internet-based image communication. Experiments conducted using libraries from the Munsell Color Science Laboratory and Industrial Light and Magic (ILM) show that the encoded format achieves a good balance between visual quality and image size for internet users.
The Challenge of HDR on the Web
High Dynamic Range (HDR) imaging is essential for capturing scenes with extreme lighting—such as a dark interior with a bright sunlit window. While standard images (LDR) lose detail in the shadows or highlights, HDR preserves the full range of luminance. However, this fidelity comes at a significant cost: HDR files (like .exr or .hdr) are enormous because they store high-precision floating-point data for every pixel.
In the modern web paradigm, images must load instantaneously. Existing HDR formats are often too heavy for consumer-grade internet speeds, and standard JPEG compression introduces "blocking" artifacts that ruin the smooth gradients typical of high-fidelity scenes. This research seeks a middle ground: a format small enough for the web but accurate enough to maintain the "truer to life" quality of HDR.
The Proposed Encoding Pipeline
The proposed encoding algorithm consists of five major stages designed to prioritize human visual perception while maximizing data density.
- Color Space Transformation: The algorithm converts calibrated XYZ color values into a luma ($Y$) and chroma ($u, v$) representation. This is crucial because the human eye is far more sensitive to brightness (luma) than to color (chroma).
- Floating-Point to Integer Conversion: To save space, the authors map physical luminance to a 16-bit "luma" integer using a non-linear function. Chroma values are scaled to 8-bit integers.
- Discrete Wavelet Transform (DWT): Instead of the Discrete Cosine Transform (DCT) used in standard JPEGs, the authors use the Daubechies 9-tap/7-tap wavelet (the same standard used in JPEG 2000). DWT provides better space-frequency decomposition and avoids blocky artifacts at high compression ratios.
- Quantization: The wavelet coefficients are quantized to discard less important visual information. The algorithm allocates more precision to the luma channel than the chroma channels.
- Entropy Coding: Finally, arithmetic coding is used to compress the remaining data. This is generally more efficient than the more common Huffman coding used in older formats.
Perceptual Optimization and Insights
A key innovation of this method is the aggressive downsampling of color relative to brightness. By treating luma as a 16-bit channel and chroma as 8-bit, the algorithm mimics the biology of the human eye, saving massive amounts of data without a perceived drop in quality.
As shown in the mapping curve above, the luma transformation uses a logarithmic component for high-intensity values. This ensures that the "Just Noticeable Difference" (JND) remains constant across the entire dynamic range, from dim shadows to blinding highlights. Furthermore, by choosing DWT over DCT, the authors ensure that even when the image is heavily compressed, the resulting errors appear as slight blurring rather than the distracting square blocks seen in low-quality JPEGs.
Experimental Results
The algorithm was evaluated using high-resolution HDR scenes from the Munsell Color Science Laboratory (RIT) and Industrial Light and Magic (ILM). The results demonstrate significant efficiency gains:
- Massive Compression: For the
atrium.hdrtest image, the file size was reduced from 8.11 MB to 360 KB—a reduction of approximately 95%. - High Fidelity: Using "Visible Difference Metrics" (VDM), the authors found that for most test images, 0% of pixels had a >95% probability of a human observer detecting a difference between the original and the compressed version.
- Mathematical Accuracy: Even with such high compression, the Root Mean Square Error (RMSE) remained low (e.g., 0.0515 for the atrium scene), indicating high mathematical accuracy in the reconstruction.
Limitations and Future Work
While the compression results are promising, the current implementation in Matlab results in encoding times between 5 and 17 seconds per image. For real-world web deployment, the code would need to be optimized in C or Assembly. Additionally, in some highly compressed samples, colors can appear slightly "fainted" or less crisp. Finally, because these images must undergo "tone mapping" to be viewed on standard monitors, the final visual quality is a combined result of both the compression and the specific tone mapping algorithm employed.
Summary updated