0% found this document useful (0 votes)
9 views5 pages

HDR Tone Mapping with Logarithmic Optimization

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views5 pages

HDR Tone Mapping with Logarithmic Optimization

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Logarithmically Optimized Real-Time HDR Tone

Mapping Using Hybrid Model


Abstract- This paper introduces a resource-efficient approaches rely on floating-point arithmetic, which provides
hardware implementation of the Drago tone-mapping high precision and accuracy for complex calculations such
operator tailored for high dynamic range (HDR) image as logarithmic transformations and luminance adjustments.
processing. The design leverages the Logarithmic However, floating-point operations are computationally
Number System (LNS) to reduce computational expensive and demand significant memory and processing
complexity by converting complex arithmetic operations resources. Fixed-point arithmetic offers a more efficient
like multiplication and division into simple addition and alternative by reducing resource requirements and
subtraction, eliminating conversion costs. Fixed-point accelerating calculations, but it sacrifices precision and is
arithmetic is applied to optimize luminance prone to quantization errors, especially in operations with
computation, ensuring efficient hardware utilization, extreme values.
while LNS enhances accuracy in tone mapping.
The Logarithmic Number System (LNS) bridges the gap
Adaptation parameters are further optimized through
between floating-point and fixed-point arithmetic. LNS
resource reutilization, leading to significant reductions
simplifies complex arithmetic operations—such as
in DSP and memory usage. It achieves high throughput
multiplication, division, and exponentiation—by
and preserves image quality, making it ideal for real-
transforming them into addition and subtraction operations.
time HDR image applications. Experimental results
This reduces computational complexity without incurring
validate the design’s efficiency and superior
conversion costs and provides a balance between resource
performance in tone mapping quality.
efficiency and precision.
Index Terms— High Dynamic Range (HDR), Logarithmic
In this work, the Drago tone mapping operator (TMO), a
Number System (LNS), Tone Mapping Operator (TMO), Real-
Time Image Processing, Floating-Point Arithmetic, Fixed-Point globally adaptive algorithm, is optimized using LNS. The
Arithmetic, Resource Optimization, Image Quality Metrics, Drago Drago TMO is well-suited for HDR imaging due to its
Tone Mapping Algorithm, Pipelined Architecture. ability to dynamically adjust logarithmic bases for varying
pixel luminance, compressing brightness while preserving
I. INTRODUCTION details in shadows. By replacing traditional floating-point
High Dynamic Range (HDR) imaging is a cutting-edge operations with LNS-based computations, the complexity of
technology designed to capture intricate details in the the tone mapping process is significantly reduced.
brightest highlights and the darkest shadows of a scene. Additionally, fixed-point arithmetic is employed for
HDR imaging surpasses the limitations of conventional Low luminance calculations to enhance computational efficiency
further.
Dynamic Range (LDR) imaging by combining multiple
LDR images, taken at varying exposure levels, to produce a Color channel and luminance information
single HDR image. The resulting images, with dynamic
ranges spanning billions, are widely used in applications
such as digital photography, medical imaging, and
automotive systems.
However, due to the limited dynamic range of traditional
displays like LEDs and LCDs, tone mapping is essential for HDR image > Luminance > Tone Mapped > Gamma Correction
compressing the HDR image's dynamic range while
Fig 1. Workflow diagram of tone mapping algorithm
preserving critical details and visual quality. Tone mapping
algorithms are broadly classified into global and local This paper also optimizes the adaptation parameters—log-
methods. Global tone mapping applies uniform average luminance and maximum luminance—through
transformations across all pixels in an image, ensuring resource reutilization, which reduces computational
simplicity and computational efficiency but often failing to overhead without compromising image quality. These
preserve local contrast. Local tone mapping, on the other optimizations preserve key image characteristics, ensuring a
hand, adapts transformations based on luminance variations high Tone Mapping Quality Index (TMQI) and maintaining
within smaller regions, significantly enhancing local details the naturalness and detail of HDR images.
but requiring more computational resources. These resource
By combining the strengths of floating-point and fixed-point
requirements are particularly challenging for real-time or
approaches through LNS, this work provides an efficient
large-scale HDR imaging applications. Most tone mapping
and high-quality solution for HDR tone mapping. The trade-offs in precision and dynamic range, potentially
proposed method is ideal for applications requiring accurate affecting image quality if not carefully managed.
image processing with limited computational resources.
Luminance Calculation
In conclusion, HDR imaging represents a transformative
technology that enhances how we capture and interpret
visual information. While floating-point arithmetic has
traditionally been the standard for HDR tone mapping, its
resource-intensive nature poses challenges for widespread
adoption. Fixed-point arithmetic offers an efficient
alternative but requires careful handling of precision trade-
Floating-Point Representation is widely used for handling
offs. The adoption of LNS in this paper demonstrates how
real numbers with high precision, especially in complex
these challenges can be addressed, enabling efficient and
mathematical operations like logarithmic calculations,
high-quality HDR tone mapping. By optimizing the Drago
exponentiation, and division involved in HDR tone
TMO with LNS and fixed-point techniques, this work
mapping. It follows the IEEE-754 standard, allowing a
provides a robust solution for HDR imaging applications,
broad dynamic range, which is essential for accurately
laying the foundation for further advancements in this field.
processing HDR images. However, floating-point
The rest of the brief is structured as follows: Section II operations are computationally intensive, consuming more
explains the logarithmic number system and processing power and memory, which can be a limitation in
implementations. Section III explains the proposed method real-time applications.
for tone mapping optimization. Section IV describes the
B.2 Drago Tone Mapping Operator
optimized hardware implementation. In Section V, the
experimental results and discussion are presented, followed
(5)
by the conclusion in Section VII.

II. LNS AND HYBRID IMPLEMENTATIONS


A. Logarithmic Number System
For l = 2a, where a (= log2 l) represents l in logarithmic
number system (LNS). It converts multiplication, division, (6)
and biquadratic root into addition, subtraction, and fixed
dividend division, respectively. For 16-bit wide operand,
Fig. 2 (a) and (b) shows the resource and clock consumption
of various operations in conventional method and LNS. In
LNS, the resources and time delay decrease for all the
operations (multiplication, division, biquadratic root) except
addition. LNS uses fewer bits to represent a number than the
original bit size. Arithmetic in LNS is performed in the
following manner

(a) (b) (c)

III. RELATED WORK


B. Fixed Point and Floating Point A. Luminance

Fixed-Point Representation, on the other hand, offers a It is a measure of the luminous intensity per unit area. The
resource-efficient alternative by representing numbers with color channel information in each pixel of the HDR image
a fixed number of integer and fractional bits. This approach contains four channels those are RGBE (Red, Green, Blue
significantly reduces computational complexity, making it and exponent) and each channel is 8-bit wide. In RGBE
ideal for real-time applications, especially in embedded format a pixel has the same exponent for all channels hence
systems or FPGA implementations. Fixed-point operations it is appended into 𝐿𝑤. Here Lw is calculated [by
are faster and require less hardware, but they come with
Where (𝑥, 𝑦), 𝐺(𝑥, 𝑦) and 𝐵(𝑥, 𝑦) are color channel intensity
and x, y represents special location of pixel. Multiplication
and addition with fixed operands in the above equation are
implemented on hardware by shifters and adders. The result
is 20 bits wide (12 bits for the mantissa and 8 bits for the
luminance exponent). D. Gamma Correction

B. Tone Mapping Finally, the image is made device independent by using


gamma correction. The final output using gamma correction
Tone mapping algorithm compresses the dynamic range of is
HDR image to display range. Here a 14 bit long logarithmic
number system is used, first MSB is sign bit, 5-bit for integer
and last 8-bit for fraction. Drago operator

uses the adaptation parameter (𝐿𝑤𝑎 , 𝐿𝑤𝑚𝑎𝑥). Here, log-


average luminance

as scaling the scene luminance 𝐿𝑤 to image brightness.


Also, 𝐿𝑤𝑚𝑎𝑥 is maximum luminance present in image and
bias parameter b (= 0.85 for best visually perceived image) Here, standard value of gamma 𝛾 is 2.2 and to reduce
[14]. 𝐿𝑤𝑎 is optimized by implementing base-2 logarithmic complexity of calculating generic power is fixed at 2.
and then converting it into logarithmic number system
(LNS). Represented as IV. PROPOSED APPROACH
A. Luminance
Luminance (𝐿𝑤) measures the luminous intensity per unit
area of an image, playing a critical role in defining the
brightness and contrast of HDR images. HDR images
typically use the RGBE (Red, Green, Blue, and Exponent)
format, where each channel is 8-bit wide and shares the same
exponent. This format helps in efficiently storing high
Here, K is calculated (without any dedicated circuit) only
dynamic range data while maintaining image quality. The
once for each frame by using the numerator module of (11)
luminance is calculated as:
unlike. The tone-mapping output does not need to be
converted to a conventional number system, as the Drago
operator output contains a logarithmic module in the last
stage. It should also be noted that using LNS in the Drago
operator reduces the resources required to calculate 𝐿𝑤𝑎 and The result is scaled appropriately based on the bit-width
eliminates the need for a conversion cost in the calculation used for fixed-point (e.g., 16-bit with 8 integer and 8
of 𝑙𝑜𝑔2 𝐿(𝑥, 𝑦). Except for addition, all operations in LNS fractional bits), ensuring that the luminance values are
need fewer resources, tone-mapping requires fewer accurately represented without overflow or significant
additions, and there is no need to calculate the biquadratic quantization errors.
root.
B. Tone Mapping
C. Color Restoration
Tone mapping compresses the dynamic range of HDR
Then the tone-mapped luminance is passed from the color images to suit display capabilities. This process ensures that
restoration stage. The color channel of tone-mapped image images retain their details and visual appeal even when
𝑅𝑑 (𝑥, 𝑦), 𝐺𝑑 (𝑥, 𝑦), 𝐵𝑑 (𝑥, 𝑦) is displayed on devices with limited dynamic range. The
Drago tone mapping operator, known for its ability to
preserve natural image appearance, is optimized using both
fixed-point and floating-point implementations.
D. Gamma Correction
Gamma correction ensures the final image is visually
accurate across different display devices. This process
adjusts the luminance of the image to match the non-linear
Adaption parameter as follows: response of human vision, enhancing visual realism.
Gamma correction compensates for the display device's
gamma curve, which affects how brightness levels are
perceived.
In Fixed-Point: Logarithmic and exponential functions are
approximated using lookup tables (LUTs) or polynomial In Fixed-Point: The gamma correction is simplified using
approximations to reduce computational complexity. These square root approximations (for y=2) or LUTs. This
approximations enable efficient hardware implementation approach balances performance and accuracy, making it
without significantly compromising accuracy. suitable for hardware implementations. Fixed-point
implementations often approximate the power function
In Floating-Point: Native log and exp functions provide using piecewise linear functions or iterative algorithms, such
higher accuracy but with increased computational cost. This
as the Newton-Raphson method, to achieve faster
approach is suitable for applications where computational computation times.
resources are ample, and precision is paramount.
In Floating-Point: Standard power functions are used to
This parameter is precomputed for each frame to enhance compute directly, offering high precision and flexibility in
real-time performance, reducing the need for repetitive adjusting gamma values. Floating-point arithmetic allows
calculations and improving processing speed.
dynamic gamma adjustments based on scene characteristics,
C. Color Restoration improving the visual quality for different types of content,
such as dark movies or brightly lit sports events.
After tone mapping, color restoration adjusts the RGB
channels based on the modified luminance. This step
ensures that the color fidelity of the original HDR image is
preserved, maintaining natural-looking results. Color
restoration is crucial because tone mapping primarily affects
luminance, which can distort the original color balance. By
reintroducing the correct chromatic information, the visual Gamma correction not only enhances image contrast but
quality of the image is enhanced. also ensures consistent appearance across various display
technologies, from smartphones to high-end monitors.

V. OPTIMIZED SOFTWARE IMPLEMENTATION


The software implementation of the hybrid tone-mapping
operator (TMO) in MATLAB follows a structured approach,
ensuring accurate luminance mapping and color restoration
In Fixed-Point: Division operations are optimized using for HDR images. The process involves reading the HDR
reciprocal approximations and multiplication. This reduces image, computing adaptation parameters, applying the tone-
the computational burden, making it feasible for real-time mapping curve, and restoring colors with gamma correction.
applications. Additionally, scaling factors are carefully
chosen to prevent overflow and maintain precision within First, the HDR image is loaded, and its red, green, and blue
the fixed-point format. The use of precomputed reciprocal (RGB) channels are extracted. The luminance values are
tables further accelerates the process, especially in calculated to represent the brightness distribution of the
embedded systems. image. A small offset is added to avoid numerical instability
during logarithmic operations.
In Floating-Point: Direct division is performed with high
precision, ensuring accurate colour restoration even in Next, adaptation parameters are computed based on the
images with subtle colour gradients. This approach provides overall luminance distribution. The average luminance is
better dynamic range handling, crucial for preserving details determined using a logarithmic approach to ensure
in both dark and bright regions of the image. The flexibility perceptual consistency. The maximum luminance value is
of floating-point arithmetic allows for adaptive scaling, also extracted, which helps in normalizing the tone-mapping
enhancing image realism. process. These parameters are updated for each frame to
maintain smooth adaptation over time.
The restored colours are then blended with the tone-mapped
luminance to produce the final output image, ensuring both The tone-mapping operator is then applied to compress the
brightness and colour accuracy are maintained. luminance values into a displayable range while preserving
details in both bright and dark regions. This step ensures that
the image maintains a natural appearance without excessive
loss of contrast. The mapping function is designed to
balance global and local contrast while avoiding
overexposure or underexposure.
After tone mapping, color restoration is performed to
maintain the natural appearance of the image. The RGB
channels are normalized based on the adjusted luminance,
ensuring that colors remain consistent and visually
appealing. Gamma correction is applied as a final step to
enhance the perceptual quality of the output image.
Finally, image quality is evaluated using metrics such as
Peak Signal-to-Noise Ratio (PSNR), Gradient Magnitude
Similarity Deviation (GMSD), and Tone-Mapped Quality
Index (TMQI). These metrics help in assessing the
effectiveness of the tone-mapping approach and ensuring
that the processed image closely resembles the desired
visual characteristics.

VI. SIMULATION RESULTS

You might also like