Adaptive Fast Image Dehazing Algorithm - IEEE Xplore

1 downloads 0 Views 895KB Size Report
Adaptive Fast Image Dehazing Algorithm. Cheng-Hsiung Hsieh1, Chih-Tsung Chen2, and Yu-Sheng Lin1. 1 Dept. of Computer Science and Information ...
Adaptive Fast Image Dehazing Algorithm Cheng-Hsiung Hsieh1, Chih-Tsung Chen2, and Yu-Sheng Lin1 1

Dept. of Computer Science and Information Engineering Chaoyang University of Technology Taichung County, Taiwan [email protected]

Abstract—Recently, a single image haze removal scheme based on dark channel prior (DCP) is presented in [1] and is getting popular because of its satisfactory performance for most of cases. However, the DCP scheme has at least three problems: halos, high computational cost and over-exposure. In our previous paper [2], a dehazing algorithm with dual dark channels was presented where high computational cost and over-exposure problems are relieved. In this paper, the objective of proposed dehazing algorithm (PDA) is to relieve the three problems in [1] simultaneously. Four examples are given to verify the PDA where comparison with the DCP scheme is made as well. The simulation results indicate that the PDA is 87.87 times, on average, faster than the DCP in the given examples. Besides, in general better color situation is found for the PDA with similar visual quality and without the three problems in the DCP scheme. Keywords—Haze removal; Dark channel prior; Halo, Soft matting; Transmission refinement; Over-exposure.

I.

Introduction

One of common imaging environments against image quality is a hazy condition. The haze in an image degrades the visibility and thus visual quality in general. Traditionally, haze is an atmospheric phenomenon where particles obscure the clarity of the sky. To improve the visibility of hazy images, haze removal schemes are sought. Haze removal schemes can be roughly categorized as model-based or non-model-based where multiple-image or single image is used. In this paper, we concentrate ourselves on the model-based scheme with single image. Recently, several model-based schemes have been reported for single image haze removal or dehazing. The challenge is to appropriately estimate the model parameters, such as atmospheric light and transmission map. In [3], the transmission and surface shading are assumed locally uncorrelated under which the albedo of the scene and the transmission are estimated. The dehazing performance heavily

978-1-4799-5375-2/14/$31.00 ©2014 IEEE

2

Dept. of Multimedia and Game Science Asia-Pacific Institute of Creativity Miaoli County, Taiwan [email protected]

depends on the assumption in [3]. That is, a dehazing result is satisfied if the local uncorrelation assumption is appropriate and vice versa. In [4], dehazing problem was considered as a contrast enhancement problem. The motivation is based on the observation that an image with haze is of higher contrast than that in a hazy image. By the observation, an approach to maximize local contrast was proposed. However, the restored image may look unnatural because of local contrast maximization. In 2011, a popular single image dehazing scheme was proposed based on dark channel prior [1]. In [1], an interesting statistics is observed which is called dark channel prior (DCP). The prior is found that some pixels are very often have very low values in at least one color channel, for a non-sky local region in outdoors haze-free images. The DCP-based scheme in [1] works well in general. However, the DCP dehazing scheme suffers from high computational cost and over-exposure. Many variations of the DCP scheme have been reported. Some of them are in [5-8]. In our previous paper [2], a dehazing algorithm with dual dark channels was presented where high computational cost and over-exposure problems are relieved. This paper attempts to put a step further, i.e, to relieve the three problems: halos, high computational cost and over-exposure in the DCP scheme simultaneously. The organization of this paper is as follows: Section II briefly reviews the DCP scheme in [1]. Based on the DCP scheme, in Section III an approach is presented to improve the performance of DCP scheme. In Section IV, examples are provided to justify the proposed approach. Then conclusion is made in Section V. II.

Review of the DCP scheme

Based on the dark channel prior (DCP), a dehazing algorithm is developed in [1] which is abbreviated as DCP scheme in this paper. In the DCP scheme, the following haze model is assumed:

I ( x) = J ( x) ⋅ t ( x) + A[1 − t ( x)]

(1)

where I (x ) denotes the observed intensity, J (x) the scene radiance, A the global atmospheric light, and t (x ) the transmission map. With the model in Eq. (1), the implementation steps of DCP scheme are summarized as follows: Step 1. Calculate the dark channel though the minimum filter as

J dark ( x) = min [c∈min ( I c ( y))] { r , g ,b } y∈Ω ( x )

Figure 1. The flowchart of DCP scheme in [1]

ʳ (2)

where I c ( y ) is one of three components {r, g, b} in the input image and ȍ(x ) is a window centered at x . Step 2. Estimate the transmission map as

~ t ( x) = 1 − Ȧ × J dark ( x)

ʳ ʳ (3)

where ω is a scaling factor. Step 3. Obtain the refined ~t ( x ) , t (x ) , by the soft matting. Step 4. Estimate the global atmospheric light A by tracking back from 0.1% maxima of J dark (x) to the maximum of the corresponding pixels in the input image. Step 5. Recover the scene radiance as

Jˆ ( x) =

I ( x) − A +A max[t ( x), t 0 ]

(4)

where t 0 is a user-defined lower bound of t (x ) . The flowchart of DCP scheme is shown in Figure 1. In general, the DCP scheme has satisfactory dehazing results. However, three problems are found in the DCP scheme. First, halos happen if the transmission map ~t ( x ) is not refined. Second, the soft matting is used to refine ~t ( x ) to avoid the halo problem. However, it results in another problem: high computational cost. Third, over-exposure may happen in dehazed images when sky or bright area is presented in the original image. An example “New York” shows the problem of over-exposure as marked in Figure 2. As seen, the dehazed image after the DCP scheme loses details in the bright area.

Figure 2. Image New York (a) original (b) after the DCP scheme

III. The Proposed Approach The objectives of the paper have three folds: (i) to avoid the soft matting and consequently to reduce the computational cost, (ii) to relief the over-exposure problem, and (iii) to get rid of the halo problem in the DCP scheme. The motivation and the proposed dehazing approach are given in Section III.A and Section III.B, respectively. A. Motivation Note that the soft matting is used to refine the transmission map. When observing transmission maps with different window sizes, we find a clue to avoid the soft matting. Note that in [1] 15×15 minimum filter is applied to the estimation of dark channel prior where comes in halos if not refined. Moreover, if 1×1 minimum filter is used to estimate the transmission map, no refinement is required at all and no halos happen either. In other words, the halo problem results from the dark channel found through minimum filter with 15×15 window. When 1×1 window is used, the transmission map needs no refinement. The problem now is how to compensate the dark channel estimated by 1×1 minimum filter. In this paper, an adaptive scaling factor B is introduced to do the compensation. It should be pointed out that the halo and high computational cost problems are expected to be relieved at same time.

To deal with the over-exposure problem, it is observed that the way to estimate the atmospheric light A is not appropriate in [1]. Fortunately, we find that the atmospheric light A can be estimated directly by dark channel J 1dark ( x) , since they are correlated. In the light of ideas described above, the proposed dehazing algorithm is presented in the following section. B. The proposed dehazing algorithm According to the motivation in the previous section, the proposed dehazing algorithm (PDA) is given where (i) 1×1ʳ minimum filter is used to estimate dark channel J 1dark ( x) , (ii) the soft matting to refine transmission map in [1] is avoided, (iii) the final transmission map t ( x ) ʳ is obtained through 1×1

Figure 3. The flowchart of PDA

dark channel J 1dark ( x) , and (iv) the atmospheric light A is IV. Simulation Results

directly estimated from J 1dark ( x) . Given a hazy image I in RGB color space, the implementation steps of the PDA are described in the following: Step 1. Calculate the dark channel

J 1dark ( x ) = min [c∈min ( I c ( y ))] ʳ ʳ ʳ ʳ ʳ { r , g ,b } y∈Ω ( x )

(5)

Step 2. Estimate atmospheric light A through J 1dark ( x) as A = α × max[ J 1dark ( x )] x

(6)

where 0 < α ≤ 1 is a scaling factor. Step 3. Calculate the standard deviation of J 1dark , σ J .

Step 4. Calculate the scaling factor B

B = min(1.5 * (1 − σ J ), 0.8)

(7)

Step 5. Estimate the final transmission map as

t ( x) = 1 − B × J 1dark

(8)

Step 6. Recover the scene radiance asʳ

J ( x) =

I ( x) − A +A max[t ( x), t 0 ]

(9)

where t 0 is a user-defined lower bound of t (x) . The flowchart of the PDA is depicted in Figure 3.

In this section, four images are provided to verify the PDA: Wheat, People, New York, and Red Brick House, where comparison with the DCP scheme is made as well. By MATLAB, the PDA is programmed where the parameters are set as α = 0.95 and t 0 = 0.1 . Moreover, the MATLAB code available on the website [9] is implemented for the DCP scheme. The first example is image Wheat of size 512×384, whose original image is shown in Figure 4(a) and the corresponding dehazed images by the DCP and the PDA are given in Figures 4(b) and 4(c), respectively, where the processing times for dehazed images are shown as well. For the PDA, the processing time t p is 0.87 second which is 86.14 times faster than the DCP scheme. It is because the soft matting is avoided and 1×1ʳminimum filter is used to estimate dark channel in the PDA. Note that the PDA is much more efficient than the DCP scheme, the dehazed Wheat by the PDA is of similar visual quality to the DCP scheme as shown in Figures 4(b) and 4(c).

(a)

(a)

(b)

(b)

(c)

(c)

Figure 4. Image Wheat (a) original (b) after the DCP ( t p = 74.94 s )

Figure 5. Image People (a) original (b) after the DCP ( t p = 90.37 s )

(c) after the PDA ( t p = 0.87 s )

(c) after the PDA ( t p = 1.02 s )

As the second example, the original People of size 512×460 is shown in Figure 5(a) while the dehazed images obtained from the DCP and PDA are given in Figures 5(b) and 5(c), respectively. In this example, the processing time t p of the PDA is 1.02 seconds which is 88.60 times faster than the DCP scheme. Similar visual quality and better color saturation can be found for the PDA when Figures 5(b) and 5(c) are compared.

The third example is the image New York of size 576×768. The original image New York is shown in Figure 6(a) and the corresponding dehazed images by the DCP and the PDA are shown in Figures 6(b) and 6(c), respectively. In image New York, the processing time t p of the PDA is 2.58 seconds which about 144.04 times faster than the DCP as shown in Figures 6(b) and 6(c). With much more efficient, the visual quality of the dehazed image after the PDA is less inferior to the DCP in general. Yet, the PDA is of better dehazed performance in the bright area, i.e., the top area of image New York. Note that the problem of over-exposure is found in the DCP as in Figure 6(b) while it is relieved in the PDA as shown in Figure 6(c).

quality to the DCP is found for the PDA with better color saturation. As expected, the PDA relieves the halo problem on the edge of depth discontinuity in this example as shown in Figure 7(c).

(a) (a)

(b)

(b)

(c) Figure 7. Image Red Brick House (a) original (b) after the DCP ( t p = 86.21 s ) (c) after the PDA ( t p = 0.97s )

V. (c) Figure 6. Image New York (a) original (b) after the DCP ( t p = 371.62s ) (c) after the PDA ( t p = 2.58s )

The final example is image Red Brick House of size 441×450 which is shown in Figure 7(a) and its corresponding dehazed images are given in Figure 7(b) and 7(c), respectively. In this example, the processing time t p of the PDA is 0.97 second which is 88.87 times faster than the DCP. Similar visual

Conclusion

This paper presented a single image dehazing algorithm to deal with the three problems in the DCP scheme: halos, high computational cost, and over-exposure. To achieve the goal, the proposed dehazing algorithm (PDA) uses 1×1ʳ minimum filter to estimate dark channel. Through the 1×1 dark channel, the atmospheric light and transmission map is found where no refinement is needed and thus no soft matting at all. Four examples with different image size are provided to justify the PDA. Besides, comparison with the DCP scheme is made. Simulation results indicate that the PDA is able to relieve the three problems in the DCP scheme and is much more efficient than the DCP scheme. On average, the processing time of the

PDA is 87.87 times faster than the DCP scheme, except image New York whose image size is larger. When the image size increases, the PDA performs faster than the DCP scheme more. For image New York, the PDA is faster than the DCP scheme as high as 144.04 times. For the visual quality, the PDA is similar to the DCP scheme with better color saturation generally. Consequently, the PDA is an efficient and promising approach. Acknowledgment This work is supported by the Ministry of Science and Technology of Republic of China under grant MOST 103-2221-E-324-011-MY2. References [1] K. He, J. Sun, X. Tang, “Single image haze removal using dark channel prior,” IEEE Trans. Pattern Anal. Mach. Intell. Vol. 33, Issue 12, pp. 1956-1963, 2011. [2] C.-H. Hsieh, Y.-S. Lin, C.-H. Chang, “Haze removal without transmission map refinement based on dual dark channels,” International Conference on Machine Learning and Cybernetics, July 2014. [3] R. Fattal “Single image dehazing,” ACM Transactions on Graphics, Vol. 27, No. 3, pp. 721-729, 2008.

[4] R. Tan “Visibility in bad weather from a single image,” IEEE Conference on Computer Vision and Pattern Recognition, pp. 2347-2354, 2008. [5] K. B. Gibson, D. T. Vo, Nguyen, Q. Truong, ”An investigation of dehazing effects on image and video coding,” IEEE Transactions on Image Processing, Vol. 21, Issue 2, pp. 662 - 673 , February 2012. [6] Z. Wang and Y. Feng, “Fast single haze image enhancement,” Computers & Electrical Engineering, ʳ ʳ ʳ ʳ Available at http://www.sciencedirect.com/science/article/pii/S004579 0613001699, 31 July 2013. [7] J.-H. Kim, W.-D. Jang, J.-Y. Sim, C.-S. Kim, “Optimized contrast enhancement for real-time image and video dehazing,” Journal of Visual Communication and Image Representation, Vol. 24, Issue 3, pp. 410-425, February, 2013. [8] Y.-H. Shiau, H.-Y. Yang, P.-Y. Chen, Y.-Z. Chuang, ‘‘Hardware implementation of a fast and efficient haze removal method, ’’IEEE Transactions on Circuits and Systems for Video Technology, Vol. 23, No. 8, pp. 1369-1374, August, 2013. [9] Available at http://www.codeforge.com/read/224718/dehazeCP.m_htm l