Single Image Haze Removal Using Dark Channel Prior¶
The Background Of Single Image Haze Removal¶
The model widely used to describe the formation of a hazy image is I(x)=J(x)t(x)+A(1-t(x)) (1).
The goal of haze removal is to recover J,A,and t from I, Where I is the observed intensity, J is the original scene, A is the global atmospheric light, and t is the medium transmission describing the portion of the light that reaches the camera. When the atmosphere is homogeneous, the transmission t can be expressed as a function of the scene depth d. Thus we can get the scene depth if we recover the transmission.
Based on this model, many methods has been proposed to solve this problem. In this paper, authors presented a new prior-dark channel prior to estimate the transmission.¶
Dark Channel Prior¶
From observation on outdoor haze-free images, in most of the nonsky patches, at least one color channel has some pixels whose intensity is close to zero, which means the minimum intensity in such a patch is close to zero simultaneously. Thus we can define the concept of a dark channel. In a local patch centered at x, we find the minimum value of every color channel of every pixel, then we choose the minimum value among the statistics we get as the dark channel of J(x). Based on the observation, if J is an outdoor haze-free image, the intensity of J's dark channel is close to zero.¶
Haze Removal Using Dark Channel Prior¶
Estimating the Transmission¶
Assuming the atmospheric light A is known, We can write the equation I(x)=J(x)t(x)+A(1-t(x)) in every color channel. Then the passage assumes that the transmission t in a local patch is constant(This assumption can make some bad influence on the results). Using the dark channel prior, we can finally recover t(x) just from the observed I(y) and the atmospheric light A. It can be used in both sky and nonsky regions. To make the results natural, we can optionally keep a small amount of haze for the distant objects by adding a constant parameter w. Thus the equation to recover t(x) is: t(x)=1-w * min(min(I c(y)/A c)).
From the above discussion we noticed that the term J(x)t(x) in the equation of the model is close to zero and can be discarded. So we can generalize the equation:I(x)=J(x)t1(x)+A(1-t2(x)).We can easily get t2(x) with the dark channel prior. The problem remained is to access t1(x).
Some halo and block artifacts show in the recovered images. That's due to the assumption that the transmission t in a local patch is constant. However, the transmission t cannot always be constant, especially in the contour or the edge of the image.¶
Soft Matting¶
The image matting equation is: I=Fα+B(1-α), which is similar to the equation of a hazy image. F and B means the foreground and the background of the image, α is a parameter measuring the foreground opacity. The optimal t can be obtained by solving the following sparse linear system: (L+λU)t=λt'. L is the matting Laplacian matrix, its elements are defined by previous research. After solving the linear system, a bilateral filter is performed on t. We can get a refined transmission t after soft matting. The recovered images show that there are less halos and artifacts.¶
Estimating the Atmospheric Light¶
In previous work, the brightest pixels in the hazy image are considered to be the most haze-opaque, and it's thought to be A. However, it can be true only when there is no sunlight and the atmospheric light is the only illumination source. Taking sunlight into consideration, J(x)=R(x)(S+A). R(x) is the reflectance of the scene points. S is the sunlight. We can use the dark channel to detect the most haze-opaque region. We first pick the top 0.1 percent brightest pixels in the dark channel, and the pixels with highest intensity are selected as A.¶
Recovering the Scene Radiance¶
After estimating the transmission t and the atmospheric light A, we can recover I(x) with the equation (1).To avoid J's propensity to be noised caused by the situation when the transmission t is close to zero, we can restrict the transmission t by a lower bound t0. Thus the final equation is J(x)=(I(x)-A)/(max(t(x),t0)) + A.¶
The influence brought by patch size¶
Patch size is important in this method. It must be neither too big nor too small. If the patch size is too big, the assumption that the transmission t in a patch is constant is less accurate. If the patch size is too small, the possibility that a patch contains a dark pixel is decreased.¶
Further research¶
- Before estimating the transmission t, we must do soft matting. Otherwise we won't get the refined transmission t and the recovered images may have halos and blocks. However, the step of soft matting is certainly time-consuming, it contains the time to solve a linear system and the use of bilateral filter. Can we have a better method instead of soft matting? Opposite from the assumption that t is constant in a local patch, we can admit the change of t in a local patch, but handle it lately in a easier way.
载入中...