| Home | ||||
|
|
||||
|
Simulating Glare Effects for Digital Images |
|||
|
Final Project for CSE782, Au06 |
|||
|
[Other Labs] [Gallery] |
|||
|
|
|||
|
|
|||
|
|
|||
| [Why I chose this one] | |||
|
At the beginning, I was implementing BSSRDF (A Practical Model for Subsurface Light Transport) in pbrt as my final project. However, I finally gave up last Sunday night due to the very limited amount of time that I have in this busy quarter. From Monday to Friday, I have been working on "Physically-Based Glare Effects for Digital Images", the project you are seeing. |
|||
|
|
|||
|
[Overview] |
|||
|
Glare effects of light sources are an important phenomena that people perceive almost everyday. However, a digital image can only be as realistic as the limited luminances that a monitor will be able to display. To account for these "bloom" and "flare lines" effects around bright light sources in the digital images. This paper "Physically-Based Glare Effects for Digital Images" introduces an algorithm to reproduce these effects. In general, the Glare effects can be subdivided into two major components: flare and bloom. Flare is composed of a lenticular halo and a ciliary corona (shown in the picture below on the left). Bloom (shown below to the right) is caused by light scattering from three parts of the human's visual system: the cornea, lens and retina. The lenticular halo, ciliary corona, and bloom are the major factors for the glare effects of the light sources. |
|||
|
|
|||
|
flare (left) & bloom(right) |
|||
|
The lenticular halo is observed as a set of colored, concentric rings, surrounding the light source and distal to the ciliary corona. The apparent size of the halo is constant and independent of the distance between the observer and the light source. Bloom, on the other hand, is the "glow" around bright objects, which causes a reduction in contrast that interferes with the visibility of nearby objects. The algorithm
presented in this paper is based on the
quantitative aspects of the glare in terms of the point-spread function
of the human eye. I implemented the algorithm in the paper and the
experimental results show that I have correctly generated the
glare filters strictly following the methods given in the paper. I
also implemented two different methods to apply the filter on the
images, one is called the "convolution"
method, and the other one is "energy spread"
method. I coined the name of the second method, because this
method tries to use filter to compute the influence of the light
source to the surrounding objects. |
|||
|
|
|||
| [Implementations] | |||
|
As the central part of this algorithm is to generate a digital glare filter for a given digital image, I spent major amount of time trying to generate the correct filter. After that, I applied this filter on some test images. Two different methods are implemented to apply the filter on a given image, one is called the "convolution" method, and the other one is "energy spread" method. Note: I implemented the algorithm separately, not in pbrt. |
|||
|
|
|||
| [Part 1 : Digital Glare Filter] | |||
|
The glare filter is independent of a particular image, it is computed for a given field of view. Generating a glare filter involves the following several parts. |
|||
|
|
|||
|
Point Spread Filters (PSF) |
|||
|
Different kinds of point spread filters should be generated and applied depending on different lighting conditions. These conditions include photopic state, scotopic state and mesopic state. Three different PSF filters are constructed based on four components (f0, f1, f2, and f3) representing four different lighting glare effects. These functions are shown below: |
|||
|
|||
|
|
|||
|
Bloom and Lenticular Halo |
|||
|
In the above filter functions, the term f0 represents the unscattered component of the light. The terms f1 and f2 account for the bloom effects of light sources. And the Lenticular halo effects are generated by the f3 term. Also, to account for flare lines, I wrote a OpenGL program called flare (download it from here) to generate the flare streaks randomly shooting from the center of the filter. I put three filter images below. |
|||
|
Bloom (f1+f2) |
Lenticular Halo (f3) | Streaks (g) | |
|
Adding them up, we obtain the various filters shown below. One could compare these images with the pictures shown in the Figure 10 of the original paper "Physically-Based Glare Effects for Digital Images". |
|||
|
(f1 + f2) * g |
f3 *g | (f1 + f2 + f3) *g | |
|
|
|||
|
[Part 2 : Experiments] |
|||
| I applied the glare filters on a set of test images, and the results are shown as follows. | |||
|
|
|||
|
Stars on night sky |
|||
|
In this test image, I randomly put several white dots on a black background. I assume the white dots are the lights sources lacking glare effects. I applied the glare filter (shown in the middle) on this image, and do the Erik tone mapping (as done in Lab2), then I get the final image with lights with glare effects. I generated the image using the energy spread method. |
|||
|
|
|
|
| original image | filter | final result | |
|
|
|||
|
Apply on HDR Images (Lamp, Cornell Box, and Tahoe1) |
|||
| I also applied tone mapping method on the these HDR images. The way I did is that I first do the Erik's tone mapping (Lab2) on the HDR images, then I use the convolution method to apply the glare filter on them. After that, I do the tone mapping again to get nicer results. Below shows several imaged generated on various tone mapping scenarios for the lamp and cornellbox scenes. | |||
|
|
|||
|
Lamp (HDR) |
|||
|
In the following images, the first four are generated by convolution method, and the last one is generated using the energy spread method. |
|||
|
|
|||
|
Cornell Box (HDR) |
|||
|
The following two images are generated by convolution method. |
|||
|
|
|||
|
Tahoe1 (HDR) |
|||
| The following scene is generated by convolution method. One can see the zoom in part of this image, the glare effect is pretty clear. | |||
|
|
|||
|
[Presentation] glare.ppt |
|||
|
|
|||
|
[Conclusion] |
|||
|
In this lab, I have correctly generated the glare filters strictly following the methods given in the paper. I also tried two different methods (convolution method and energy spread method) to apply the filter on the normal images (the first test scene: Stars on night sky) and HDR images (lamp, cornell box, and tahoe1). |
|||
|
|
|||
| [References] | |||
| Thanks are given to Josh, Issam, Leety, Yuan, Ying for the valuable discussions on the implementations of this project. | |||
|
|
|||
|
|
|||
| Kuiyu Li Department of Computer Science and Engineering 395 Dreese Laboratories 2015 Neil Avenue Columbus, OH 43210-1277 |
|||