120 likes | 310 Views
HDR Hallucination. Raymond Li Yu-Han Sun CS498dh3 Fall 2013 Derek Hoiem Kevin Karsch. Background.
E N D
HDR Hallucination Raymond Li Yu-Han Sun CS498dh3 Fall 2013 Derek Hoiem Kevin Karsch
Background • Our Project was based on this paper http://www.kunzhou.net/publications/HDR-egsr07.pdf High Dynamic Range Image Hallucination by Lvdi Wang1, Li-Yi Wei, Kun Zhou, BainingGuo,and Heung-Yeung Shum. • The idea is to create an HDR image from a single LDR image. • To do this, we first use a gamma correction of 2.2 to obtain the radiance space of the image. Then, we separate the high and low frequency maps with bilateral filtering. Next, we use the low freq map to create the illumination layer and the high frequency map to create the texture layer. Then at the end, we blend it together.
Gamma Correction • According to the paper, we needed to perform a Gamma Correction of 2.2 Original Photo
Bilateral filtering • We used the fast bilateral filtering from http://www.mathworks.com/matlabcentral/fileexchange/36657-fast-bilateral-filter by KunalChaudhury. The high freq is obtained by taking the image in radiance space and dividing by the low freq image. • is the filtered image; • is the original input image to be filtered; • are the coordinates of the current pixel to be filtered; • is the window centered in ; • is the range kernel for smoothing differences in intensities. This function can be a Gaussian function; • is the spatial kernel for smoothing differences in coordinates. This function can be a Gaussian function;
Bilateral filtering Results Low Frequency High Frequency
getMask • Used the code from previous project Outline of Mask Mask
Weight Function and Luminance • Weight function is based on relative Luminance • Y(x)= 0.2126 R + 0.7152G + 0.0722B • C_ue = underexposed threshold = 0.05 • C_oe= overexposed threshold = 0.85
Gaussian Fit • We used a gaussian fit from http://jila.colorado.edu/bec/BEC_for_everyone/matlabfitting.htm . Basically, it computes the center x and y location, then the standard deviation for the pixels and a peak. Then we mesh it into a gaussian. In order for the Gaussian to fit with the area that is well-illuminated, we checked an edge pixel to make sure the difference was under a certain threshold ~0.05. and if not, we reran the gaussian fit with slightly altered parameters. Finally, we composited the Log luminance and the Gaussian fit with the equation:
Gaussian Fit and Illumination Layer Gaussian Fit Illumination Layer
Texture Synthesis • We used the inpaint file by SoorajBhathttp://www.cc.gatech.edu/~sooraj/inpainting/To do the texture synthesis. Synthesis on High Freq component
Blended Results Results were a little sloppy because we didn’t seem to put the image back together correctly.
Conclusion & Future Work • If we were able to blend the images back together properly, then the results would have been much nicer • I would want to rewrite the Gaussian 2D fit so that it’s not just an ellipse, but more fitted to the over-exposed patch