Single Image Haze Removal using Weighted Guided Image Filter

DOI : 10.17577/IJERTCONV5IS13070

Download Full-Text PDF Cite this Publication

Text Only Version

Single Image Haze Removal using Weighted Guided Image Filter

I. Mesiya

M.E-Communication Systems Department of ECE

Saranathan College of Engineering, Trichy

Dr. M. Baritha Begum M.E., Ph.D., Assistant Professor Department of ECE

Saranathan College of Engineering, Trichy

Abstract Haze removal is the process of converting hazy image into a haze free image. The transmission map for a haze image is estimated based on edge preserving decomposition technique. The weighted guided image filter is introduced by adding edge aware weighting to guided image filter. The minimal color channel and dark channel of the haze image is computed. Using the weighted guided image filter the dark channel of a haze image is decomposed into base layer and detail layer. From the base layer the transmission map is estimated. The transmission map is used to restore the haze free image.

Keywords single image haze removal, edge preserving smoothing, weighted guided image filter, dark channel, minimal color channel.

  1. INTRODUCTION

    Bad weather conditions such as haze, mist, fog and smoke degrade the quality of the outdoor scenes. Under this condition the light is reaching the camera severely scattered by the atmosphere. This degradation fades the color and reduces the contrast of captured objects and often lack visual vividness. The degradation is more serious when increasing the distance between camera and object. The main sources of haze particles include farming, traffic, industry, volcanic ashes and wildfires Haze is the combination of airlight and direct attenuation. While observing an extensive landscape quickly notice that the scene points appear progressively lighter as our attention shifts from foreground towards the horizon is called airlight or atmospheric light. The light beam is attenuated when it is travel from a scene point through the atmosphere due to scattering. The attenuated flux reaches from a scene point to an observer is termed as direct attenuation.

    Haze removal is the process to remove haze effects in captured image. It increase the both local and global contrast of the scene, correct the color distortion caused by airlight and produce depth information. Haze removal is highly demanded in image processing, computational photography and vision applications.

    In multiple images the haze is removed by weather condition based method [1], polarization based method [2], depth based method.

    The automated method [3] is used that requires only a single input image. It based on two observations: the first one is the clear day images have more contrast than haze images. The second one is airlight variation depends on the distance of objects to the viewer. This method does not require geometrical information of the input image. It is applicable to both color and gray images. The refined image formation model [4] used

    for estimating the optical transmission from a single haze image. This model includes scene transmission and surface shading. In this method eliminates the scatter light, increase the scene visibility and recover the haze free scene contrast. The failure of this method is insufficient SNR. Based on the dark channel prior [5, 6] the haze is removed. The dark pixels are referred to as low intensity pixels in at least one color (rgb) channel. These pixels are used to estimate the haze transmission. For every pixel the transmission map is calculated. The prior is used to estimate the thickness of the haze. The haze image is recovered by combination of haze image model and soft matting technique. Soft matting technique is used for refine the transmission map. It is suitable for rgb images. In the reconstructed image the halo artifacts are present. Instead of soft matting the guided image filter [7] is used for refine the transmission map. It is also based on the dark channel prior. It gives better result than soft matting.

    In this paper the weighted guided image filter is used for estimating the transmission map of a haze image. Weighted guided image filter is an edge preserving smoothing technique. This algorithm requires only single input image rather than multiple images. It is based on the concepts of minimal color channel and dark channel. The atmospheric light is estimated using the quad-tree subdivision method [8]. Then compute the minimal color channel and dark channel of the haze image. The minimal color channel is the minimal value among all color components of the pixels. The dark channel is some pixels have very low intensity in at least one color channel. Using WGIF [9] the dark channel is decomposed into base layer and detail layer. It requires the guidance image. The guidance image is generated from the minimal color channel. The transmission map is estimated from the base layer. The estimated transmission map is used to recover the haze image.

    The paper is organized as follows. In section II describes the related works on filters. In section III describes the background of the haze image model. In section IV describes the proposed system of weighted guided image filter. The results are shown in section V.

  2. RELATED WORK

    Edge preserving smoothing is an image processing technique. Edge preserving filters preserve the edges. It is used to smooth an image, it also reduce the edge blurring effects across the edges. In edges the larger weights are assigned than flat areas because the edges provide efficient information.

    Two types of edge preserving image smoothing techniques are available. One type is global optimization

    based filters. The performance of optimization measure weights are assigned the pixels at edges than pixel in flat

    contains a two term one is data term and another one is regularization term. The data term is used to measure the reliability of reconstructed image. In case of regularization

    areas. The edge aware weighting G p is defined by

    N 2G , p

    term is used to measure the smoothness level of the reconstructed image. The global optimization filter produce admirable quality but the computation cost is high. The other

    type is local filters such as bilateral filter (BF), guided image Where

    G p

    N

    p1

    1

    1

    2G , p

    (3)

    filter (GIF), etc. Compared with global optimization based filters, local filters are generally simpler. However local filters cannot preserve sharp edges like global optimization based filters.

    The most widely used local filter is bilateral filter (BF) [10, 11] due to its simplicity. BF is a non-linear filter. The each pixel intensity value is replaced by a weighted

    N is the total no of pixels in the image G.

    is a small constant and its value selected as (0.001× L) 2

    L is the dynamic range of the input image

    The weighting is added to the cost function of GIF. The equation (3) is added to equation (2) to form WGIF. The solution is obtained by minimizing the difference between the images to be filtered X and the filtering output Z.

    average of intensity values from nearby pixels. However, the

    BF could suffer from gradient reversal artifact which refers E

    a Gp b X p2 a2

    (4)

    to the artifacts of unwanted sharpening of edges. It also refers

    p

    p p

    p

    p

    to introduce the false edge in the image. The disadvantage of bilateral filter does not provide stronger noise reduction.

    Where

    1 p

    p

    G

    p

    p

    The gradient reversa artifacts are reduced by using a GX , 1 G , 1 X , 1

    guided image filter (GIF) [12]. The GIF uses guidance image p

    which is similar to the input image. It consider the

    2 p

    p

    G

    reconstructed image Z is a linear transform of the guidance 1

    image G. ,

    1 1

    A reconstructed image Z is given as G

    Z p a

    pGp bp

    p p,

    1

    (1)

    bp X , p ap G, p

    1

    where pis a square window centered at the pixel p

    of a radius 1 . a p and bp are two constants in the window

    1

    p

    p p

    The values of a p and bp are obtained by minimizing a quadratic cost function Ea , b which is defined as

  3. BACKGROUND

    According to the koschmiedars law [14], the haze image is generally modeled by

    X c p Zc ptp Ac 1 tp (5)

    where c r, g,b is a color channel index,

    X c is a haze image

    E a Gp b X p2 a2 (2)

    Zc is a haze free image.

    p p p p 1 p

    Ac is the global atmospheric light

    where is a regularization parameter penalizing large a p . The

    t is the transmission map and p represents the each pixel location of the input image.

    value of is fixed for all pixels in the image. Transmission map is used to describe the non-scattered

    The disadvantage of guided image filter is does not eliminate the halo artifacts. The halo artifacts are referred as unwanted smoothing of edges. It also refers to a light line around object edges in an image produced by the sharpening technique or the dark regions near edges remain dark after image enhancement. The halo artifacts are reduced by using weighted least squares (WLS) filter [13]. The difference between WLS and GIF are 1). GIF is local optimization based while WLS is global optimization based. 2). The complexity of GIF is O(N) for an image with N no of pixels while WLS has more complexity than . 3). In GIF the value of is fixed while WLS the value of is adaptive to local gradients and 4). The GIF concentrate only blurring the near edges while WLS distribute the blurring globally.

    But WLS has more complexity so the WGIF is used. The WGIF has less complexity and also reduce the halo artifacts. An edge aware weighting is added to the GIF to form the WGIF. The edges are providing effective information. Larger

    light between the observed object and the digital camera.

    The first term Zc ptp is called direct attenuation and the second term Ac 1 tp is called airlight. The

    airlight value suffers from scattering and absorption by atmospheric particles, resulting in scene color variation.

  4. PROPOSED SYSTEM

    In this method using the quad-tree subdivision method the global atmospheric light is determined. Then the simplified dark channel of a haze image is decomposed using WGIF into base layer and detail layer. At last the scene radiance is recovered. The block diagram of proposed method is shown in figure 1

    1. Decomposition of dark channel

      Using the weighted guided image filter the dark channel is decomposed into base layer and detail layer. A base layer formed by homogenous regions with sharp edges. In case of detail layer consist of noise, a pattern with zero mean or with frequent pattern with a systematic structure

    2. Estimation of transmission map

      The transmission map implies the amount of light transmitted through haze from the object point to the camera. After the estimation of atmospheric light the value of minimum atmospheric light is calculated. The minimal color channel is used to generate the guidance image. The guidance

      image is estimated by

      Gp Am X m p

      (8)

      Using the base layer the transmission map is calculated. The base layer t p is a linear transform of the guidance image

      tp a

      pGp

      ~

      b p

      (9)

      Fig 1. Block diagram of proposed method

      1. Computation of minimal color channel and dark channel

        Where a p and b p are two constant in the window 1

        ~

        ~

        p

        The minimal color channel is the minimal value among The values of a p and all color components of the pixels. This channel is used to following cost function

        E a p , b p

        b p are obtained by minimizing the

        calculate the scene content and high intensity value of the

        image. The output of minimal color channel contains a black and white color. The black color represents the area of high

        intensity and white color represents the area of low intensity.

        ~

        a

        Gp ~ A J X p2 a2 (10)

        1

        p

        bp m d

        p p

        channel. So the guidance image is generated from this

        The value of is 256 and the value of 1 is 60. Defining (p)

        The structure of the haze image is preserved better for this

        p p G

        channel. The minimal color channel of the haze image is

        as A

        tp

        1 a A ~

        computed by

        m and bp as

        p m bp , it can be

        X m p minX r p, X g p, Xb p (6) derived that

        where X m is the minimal color component of haze image.

        p a p X m p b p (11)

        Dark channel is the minimum intensity in such a patch G p Xm p (12)

        should have reduced the variation of the direct attenuation. The

        And the cost function Ea

        ~ is equivalent to

        dark channel of the image is computed by

        J X p X ( p) (7)

        d m

        p , b p

        a

        2 a X p b J X p2

        2

        X p

      2. Estimation of atmospheric light

      p m p d

      p

      (13)

      p1

      p m

      In general the atmospheric light is estimated from the brightest color in the haze image because a large amount of

      haze causes a bright color. But it does not produce accurate

      The optimal value of a p and bp are computed by following equations

      estimation of atmospheric light. In this paper the atmospheric

      X p X , p X p

      light is estimated using quad-tree subdivision method. a

      X mJ d ,1

      m 1 J d ,1

      p

      2

      The input image is first divided into four rectangular regions. Each region assigned a value. The value is computed

      Xm ,1 p

      X m

      p

      as the average pixel values within the region. The highest value b*

      X p a

      p

      among the region is selected. The region with the highest value p Jd ,1 p X m , 1

      d 1

      again divided into four smaller rectangular regions. This where is the element by element product of two

      process is repeated until the size of the selected region is smaller than a predefined threshold. In the finally selected

      matrices.

      X mJ X ,

      pis the mean value between minimal

      region the pixel which minimizes the difference color channel of haze image and dark channel of the haze

      X r p, X g p, X b p 255,255,255 is chosen and it is image, X m,1 pis the mean value of minimal color

      used to determine the global atmospheric light. channel of the haze image and X pis the mean value of

      J d 1

      dark channel of the haze image. The optimal solution p minimal color channel

      is then given as follows

      p p

      p a X m p b (14)

      p p

      Where a is the mean value of a

      b is the mean value of b .

      p p

      The optimal value for the transmission map tpis calculated using below formulae

      tp 1

      p (15)

      Am

      Fig 3. Minimal color channel

      The pixel p belongs to the sky region when the value of t p

      is zero.

      E. Recovery of sceneradiance

      After the estimation of atmospheric light and transmission map, the scene radiance is recovered.

      The dark channel of the image is shown in figure 4.

      dark channel

      Zc p

      1

      t p

      X c p Ac Ac

      (16)

      The value of t p is less than or equal to 1. To adjust the transmission map in the sky region the compensation term is added in the proposed algorithm.

  5. RESULTS

    The experiments are performed on windows 7 processor with an Intel(R) Core i3-2328M Machine with

    2.20 GHz CPU and 2GB RAM. All the programs are written and compiled on MATLAB version 7.14.0.739 (R2012a). The size of input image is 768x1024x3 uint8.

    input image

    Fig 2. Input image

    The minimal color channel of the image is calculated by following steps: first find the three color channels (red, green, blue) of the image. Then find the minimum value of the channel between red and green channel, between green and blue channel, between blue and red channel. Again find the minimum value between first two minimum channels. Finally find the minimum value between third minimum value and the minimum value between the first two minimum channels. The minimal color channel is shown in figure 3.

    Fig 4. Dark channel

    The transmission of the haze image is shown in figure 5

    Transmission Map

    Fig 5. Transmission map

    The haze removal image is shown in figure 6.

    Input Image Haze Removal Image

    Fig 6. Haze removal image

  6. CONCLUSION

In this paper we present a single image haze removal algorithm based on edge preserving decomposition technique. As a major contribution the proposed edge preserving filter (WGIF) can reduce the halo artifacts. Using the quad-tree subdivision method the atmospheric light in a given hazy image is estimated. By using a weighted guided image filter we have obtain a base layer and detail layer of dark channel by decomposition method. Finally the transmission map is obtained from a base layer. As a result the haze from the image has been removed and obtain haze-free image.

REFERENCES

  1. S. G. Narasimhan and S. K. Nayar, Chromatic framework for vision in bad weather, in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Hilton Head Island, SC, USA, Jun 2000, pp. 598605.

  2. S. G. Narasimhan and S. K. Nayar, Contrast restoration of weather degraded images, IEEE Trans. Pattern Anal. Mach. Learn., vol. 25, no. 6, Jun 2003, pp. 713724.

  3. R. T. Tan, Visibility in bad weather from a single image, in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Anchorage, AK, USA, Jun. 2008, pp. 18.

  4. R. Fattal, Single Image Dehazing, in Proc. SIGGRAPH, New York, NY, USA, Jun. 2008, pp. 19.

  5. K. He, J. Sun and X. Tang, Single Image Haze Removal Using Dark Channel Prior, IEEE Trans. Pattern Anal. Mach. Intell., vol. 33, no. 12, Dec. 2011 pp. 23412353.

  6. Z. Li, J. Zheng, Z. Zhu and W. Yao, Single image haze removal via a simplified dark channel, in Proc. Int. Conf. Acoust., Speech, Signal Process., South Brisbane, QLD, Australia, Apr. 2015, pp. 16081612.

  7. J. Pang, O. C. Au, and Z. Guo, Improved single image dehazing using guided filter, in Proc. APSIPA ASC, Xian, China, 2011, pp. 14.

  8. J.-H. Kim, W.-D. Jang, J.-Y. Sim, and C.-S. Kim, Optimized contrast enhancement for real-time image and video dehazing, J. Vis. Commun. Image Represent., vol. 24, no. 3, Apr. 2013, pp. 410425.

  9. Z. Li, J. Zheng, Z. Zhu, W. Yao, and S. Wu, Weighted guided image filterin, IEEE Trans. Image Process., vol. 24, no. 1, Jan. 2015, pp. 120- 129.

  10. C. Tomasi and R. Manduchi, Bilateral filtering for gray and color images, in Proc. IEEE Int. Conf. Comput. Vis., Jun. 1998, pp. 839846.

  11. F. Durand and J. Dorsey, Fast bilateral filtering for the display of high dynamic range images, ACM Trans. Graph., vol. 21, no. 3, Jul. 2002, pp.257-266.

  12. K. He, J. Sun and X. Tang, Guided Image Filtering, IEEE Trans. Pattern Anal. Mach. Intell., vol. 35, no. 6, Jan. 2013, pp. 13971409.

  13. Z. Farbman, R. Fattal, D. Lischinski, and R. Szeliski, Edge-preserving decompositions for multi-scale tone and detail manipulation, ACM Trans. Graph., vol. 27, no. 3, Nov. 1998, pp. 249-256.

  14. H. Koschmider, Theorie der horizontalen sichtweite, in Proc. Beitrage Phys. Freien Atmos., 1924, pp. 33-53.

Leave a Reply