High dynamic range imaging by multiple exposure image.

Create a single high dynamic range image from multiple exposure bracketed images fusion. I have completed this term project for DIP course.

You are now following this Submission

I have assigned two processes for this project.
Process I :
Input Images:For this project, we have considered 16 input images of dimension 768*512*3 taken with different exposures.
The exposure times for the 16 images are as follows [30; 15; 8; 4; 2; 1; 1/2; 1/4; 1/8; 1/15; 1/30; 1/60; 1/120; 1/250; 1/500; 1/1000].
The process will be discussed in the following steps:
Step 1: First, we have to recover radiometric response curve. For that purpose I have used some mathematical equations which are taken from this paper and they are as follows:
where, P is the number of images, N is the number of pixels in images, z(i,j) is the pixel values of pixel location number i in image j, w(z) is the weighting function value for pixel value z and . Also, for
= , otherwise.
The w(z) is used for enhance the smoothness. Now, given z, log shutter speed, λ= 1 and weight, we get the image system's response function g and hence the response curve.
Step 2: Radiance Map Reconstruction
The radiance map can be computed using the recovered response obtained from tln(radiance at the ith pixel) = g(ith pixel value in image j) - ln(exposure time of image j). Mathematically, .
Step 3: Tonemapping
I have employed linear normalisation technique to achieve the required tonemapping.
tonemapped image = (img — img.min()/img.max() — img.min()).
Step 4: Gamma correction
gammaCorrectedImage(x,y) = .
If we increase the value of γ, the image becomes darker; whereas, the image becomes brighter for decreasing values of γ. For my analysis, γ= 1.5 produces good results.
Step 5: Visualizing HDR images
The final HDR image can be visualized from the gamma correction response by using the inbuilt Matlab functions 'hdrwrite' , 'hdrread' and 'imshow'.
Output:
Code: HighDynamicRange.m
References :
  1. https://towardsdatascience.com/hdr-imaging-what-is-an-hdr-image-anyway-bdf05985492c
  2. Debevec, P. E., & Malik, J. (2008). Recovering high dynamic range radiance maps from photographs. In ACM SIGGRAPH 2008 classes (pp. 1-10).
Process II:
Input : Image1, Imag2, Image3. Image3 have the high pixel values and Image2 have the less pixel values.
Steps:
1. match1 = imhistmatch(Image3, Image2);
2. match2 = imhistmatch(match1, Image1);
3. Use median filter on match2 and convert to HDR image.
4. Apply inbuilt matlab function tonemap on HDR image.
Output:
Histograms :
Code: hdr1.m

Cite As

Asim Manna (2026). High dynamic range imaging by multiple exposure image. (https://www.mathworks.com/matlabcentral/fileexchange/102184-high-dynamic-range-imaging-by-multiple-exposure-image), MATLAB Central File Exchange. Retrieved .

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.3

Nothing

1.0.2

nothing

1.0.1

Nothing

1.0.0