Expand this Topic clickable element to expand a topic
Skip to content
Optica Publishing Group

Robust air-light estimation for a single hazy image using haze-lines in Plüker coordinates

Open Access Open Access

Abstract

Image dehazing is a valid way to reduce the negative impacts of bad weather, such as fog and haze, on outdoor optical imaging. The effect of the image dehazing heavily relies on the air-light estimation. Most existing methods exploit the prior information, which is generally obtained by simply assessing the brightest pixels’ intensity in a hazy image, to estimate the air-light. However, bright objects, such as lamps, lead to the failure of these methods. So, a novel method for robust and optimal air-light estimation using haze-lines described in Plüker coordinates is proposed. First, the exact analytic solution of the air-light, i.e., the intersection of haze-lines, is derived via analyzing the geometric relationship between haze-lines in three-dimensional RGB space using their Plüker coordinates. Then, a novel air-light estimation algorithm using haze-lines in Plüker coordinates is elaborated. Finally, extensive experiments are performed to validate the proposed algorithm. Experimental results reveal that the proposed algorithm can more robustly and accurately estimate the air-light.

© 2022 Optica Publishing Group under the terms of the Optica Open Access Publishing Agreement

1. Introduction

One essential prerequisite for many image-based applications is that input images should have clear visibility. However, bad weather conditions, such as haze and fog, can severely reduce the visibility and result in the color cast and contrast degradation in obtained hazy images [14]. Based on the hazy image formation model (see Eq. (1)), a hazy image is a per-pixel convex combination of a haze-free image and the global air-light. For image dehazing, two key unknowns, the air-light and transmission, should be firstly estimated to recover a haze-free image. As a global variable, the air-light plays a vital role in image dehazing. Different from transmission estimation, which has been extensively studied, the air-light estimation has been ignored.

The existing methods of air-light estimation can be roughly classified into two categories. One is the prior-based methods. This category of methods can be further classified into the simple brightness-prior-based methods and the statistics-prior-based methods. In the early stage, the air-light estimation mainly exploited the simple prior on the brightest pixels (i.e., pixels with the highest intensity). Tan [5] directly considered the intensity of the brightest pixel as the air-light. Fattal [6] improved the result of [5] via optimization. He et. al. [7] also applied this strategy to estimate the air-light in their proposed dark channel prior (DCP) based image dehazing. However, the brightest pixels in hazy images may correspond to a bright object, such as a lamp, rather than the air-light. Following a similar idea, some methods [3,810] further improved air-light estimation. In addition, Gautam et. al. [11] used the color constancy prior, which origins from the color attenuation prior proposed in [12] to estimate the depth map for image dehazing, to estimate the air-light. To some extent, the latter methods can significantly improve the estimation accuracy. However, various defects still exist for the brightness-prior-based methods, such as the vulnerability to errors and the requirement of visible non-occluded sky regions.

Nevertheless, there are various statistics priors in natural scene images [1315], from which constraints on the air-light can be derived [14,1618]. For example, pixels of a small image patch with the same material (i.e., surface albedo) typically have the same transmission if the image patch is small enough. Accordingly, Fattal [13] proposed color-lines describing these image patches, wherein the intercept of color-lines provides constraints on the air-light. Based on this constraint, Sulami et. al. [16] estimated the air-light in two steps: the direction estimation and the magnitude estimation. Bahat et. al. [14] observed that small patches’ recurrence property diminishes when imaging occurs in scattering media. Based on this observation, they estimated the air-light by detecting differences between small co-occurring patches. However, these methods must find small patches with particular properties, which increases the computational cost. More importantly, small image patches are vulnerable to noise. Therefore, Berman et. al. [17,18] proposed the concept of the haze-line and applied the haze-lines described in point-slope equation and Hough transform to estimate the air-light, which are mostly related to our work. Although [17,18] can more accurately estimate the global air-light than all the aforementioned methods, they could not give the exact analytic solution of the air-light, without which the optimal air-light is hard to obtain. This still limits the air-light estimation accuracy. In addition, there exists irreconcilable conflict between the computational cost and accuracy for Hough transform, since there involves the quantization of three-dimensional (3D) Red-Green-Blue (RGB) color space.

The other category is the learning-based methods which train some specific models to fulfil air-light estimation. Especially, with deep learning being introduced into the image dehazing [1922] recently, there emerges few CNN-based methods [2325] to estimate the air-light. Cai et al. [23] firstly estimated the transmission map via a CNN framework, then estimated the air-light with the guidance of obtained transmission. However, the accuracy of air-light depends on the estimated transmission. Zhang et al. [24] proposed a densely connected pyramid network to fulfil end-to-end haze removal, among which the air-light is regressed separately. Based on [24], Wang et al. [25] further refined the air-light estimation by only computing the weighted intensity sum of pixels inside segmented distant regions. The accuracy of learning-based air-light estimation methods approximates that of prior-based methods. With the emergence of more and more synthetic hazy image dataset [26] that can satisfy the demand of deep learning-based methods for huge amount of high quality training data with ground truth, the learning-based method will be one of the most potential methods to solve this problem.

Most related to this paper is [17,18], which apply the haze-lines described in point-slope equation and Hough transform to estimate the air-light. Different from [17,18], this paper derives the exact analytic solution of the air-light by using haze-lines described in Plüker coordinates, which makes the global optimal air-light can be easily obtained. In addition, a new air-light estimation method is proposed with the derived analytic solution of the air-light, which can provide more robust and accurate estimation.

In this paper, we propose a robust algorithm for air-light estimation using haze-lines in Plüker coordinates. First, the exact analytic solution of the air-light, i.e., the intersection of haze-lines, is derived by analyzing the geometric relationship between haze-lines in 3D RGB space using the description of haze-lines in Plüker coordinates form. Then, an algorithm for the air-light estimation using haze-lines described in Plüker coordinates, and the robust estimation technique, i.e., the random sample consensus (RANSAC) [27], is elaborated, which can provide a robust and accurate air-light estimation. Finally, extensive experiments validate that the proposed algorithm can more robustly and accurately estimate the air-light and overcome defects of existing methods.

In summary, the main contributions of this paper can be summarized as follows.

  • • The exact analytic solution of the air-light is derived by analyzing the geometric relationship between haze-lines in RGB space.
  • • A new algorithm for robust and accurate air-light estimation for single hazy image is proposed by using haze-lines in Plüker coordinates.
  • • Extensive experiments are performed to validate the proposed algorithm.

The rest of this paper is organized as follows. Section 2 briefly introduces some preliminaries. Sections 3 and 4 elaborates the derivation of the exact analytic solution of the air-light and the proposed air-light estimation algorithm using haze-lines in Plüker coordinates, respectively. Extensive experiments are presented in Section 5. Finally, Section 6 concludes this paper.

2. Preliminaries

2.1 Atmospheric scattering model

The formation of a hazy image is commonly described by the atmospheric scattering model [1]:

$${\mathbf{I}}({\mathbf{x}})=t({\mathbf{x}}){\mathbf{J}}({\mathbf{x}})+[1-t({\mathbf{x}})]{\mathbf{A}}$$
where ${\mathbf {x}}$ is the pixel coordinates of a pixel, ${\mathbf {I}}$ and ${\mathbf {J}}$ are the hazy and haze-free image respectively, $t$ is the transmission map, and ${\mathbf {A}}$ is the air-light. To recover the haze-free image ${\mathbf {J}}$ from the haze image ${\mathbf {I}}$, the transmission map $t$ and the air-light ${\mathbf {A}}$ should be estimated. Different from the pixel varying transmission map $t$, the air-light ${\mathbf {A}}$ is a single global variable and has a significant impact on the whole dehazing image.

2.2 Haze-line

Due to the presence of haze, colors of scene points that share the same color and are located at different distances from the camera in 3D space, vary from pixel to pixel in a hazy image. Each group of such colors form a line, i.e., the haze-line [15], in RGB space,

$${\mathbf{I}}({\mathbf{x}})=t({\mathbf{x}})[{\mathbf{J}}({\mathbf{x}}) - {\mathbf{A}}]+{\mathbf{A}}.$$

Eq. (2), which represents a haze-line in the point-slope form with the point of ${\mathbf {A}}$ and the slope of $({\mathbf {J}}({\mathbf {x}}) - {\mathbf {A}})$, is an variant of Eq. (1). It is shown in Eq. (2) that all points ${\mathbf {I}}({\mathbf {x}})$, whose correspondent scene points are in the same color, i.e., correspondent ${\mathbf {J}}({\mathbf {x}})$ are equal to a constant, are on a haze-line in RGB space. Each haze-line passes through the point ${\mathbf {A}}$ and has the direction vector $({\mathbf {J}}({\mathbf {x}}) - {\mathbf {A}})$. So all haze-lines intersect at the air-light ${\mathbf {A}}$. Fig. 1 shows some haze-lines and the air-light of a hazy image, wherein pixels corresponding to scene points in same colors are labelled with same marks (see Fig. 1 (a)). Colors of these pixels form the haze-lines intersecting at the air-light (see Fig. 1 (b)).

 figure: Fig. 1.

Fig. 1. Diagram of the air-light and haze-lines. Scene points in same colors are labeled with same marks. (a) Hazy image. (b) Haze-lines intersect at the air-light in RGB space.

Download Full Size | PDF

2.3 Air-light estimation from haze-lines with Hough transform

To dehaze a given hazy image ${\mathbf {I}}$, the air-light ${\mathbf {A}}$ should be firstly estimated. Haze-lines provide constraints on the air-light. As shown in Eq. (2), a haze-line can be described by a point on it and its direction (i.e., slope). Berman et. al. [17,18] took the haze-lines described in the point-slope equation and Hough transformation to estimate the air-light. Firstly, a haze-line is presented by a discrete five-tuple consisting of three elements of the air-light and two direction angles in RGB space. Then, the air-light with the largest support set is searched via the voting procedure, where each pixel votes for a candidate $\mathbf {A}$ only if the distance from its color to one of the lines defined by discrete five-tuples is smaller than a predefined threshold. Furthermore, some approximations are taken to reduce the computational cost, such as color clustering and voting in two-dimensional color sub-space. Although, these approximations can accelerate the computation to a certain degree. However, it is hard to balance the computational cost and the accuracy. More importantly, it could not give the exact analytical solution of the air-light, without which the optimal air-light is hard to obtain.

3. Exact solution of air-light estimated from haze-lines in Plüker coordinates

3.1 Haze-lines in Plüker coordinates

In fact, a haze-line in RGB space can also be described in Plüker coordinates form. Given two points ${\mathbf {p}}$ and ${\mathbf {q}}$ on it, a haze-line has Plüker coordinates of $(({\mathbf {p}}-{\mathbf {q}})^T, ({\mathbf {p}}{\times }{\mathbf {q}})^T)^T$, where $\times$ denotes the cross product. Its normalized form is $(\hat {\mathbf {l}}^T, {\mathbf {m}}^T)^T$, where $\hat {\mathbf {l}}=({\mathbf {p}}$ - ${\mathbf {q}})/\|{\mathbf {p}}$ - ${\mathbf {q}}\|$ is the unit direction vector and ${\mathbf {m}}={\mathbf {p}}{\times }{\hat {\mathbf {l}}}$ is the moment vector. Here, $\|{\cdot }\|$ denotes the Euclidean norm. Notably, $\|{\mathbf {m}}\|$ is the distance from the coordinate origin to the haze-line, which is irrelevant to the selection of the point ${\mathbf {p}}$.

3.2 Geometric relationship between haze-lines

Given four points $\{{\mathbf {p}},{\mathbf {q}},{\mathbf {r}},{\mathbf {s}}\}$ in RGB space, each pair of them can define a line. So there are three pairs of lines determined by them. For each pair of such lines, their relationship may be parallel, intersecting, or non-coplanar. If and only if the following equation holds

$$det([{\bar {\mathbf{p}}} \quad {\bar {\mathbf{q}}} \quad {\bar {\mathbf{r}}} \quad {\bar {\mathbf{s}}}])=0,$$
four points $\{{\mathbf {p}},{\mathbf {q}},{\mathbf {r}},{\mathbf {s}}\}$ are coplanar, where $det(\cdot )$ denotes the determinant operation of a matrix and ${\bar \cdot }$ denotes the homogeneous coordinates. Otherwise, they are non-coplanar. Eq. (3) can only provide the coplanar condition of four points. Using the Plüker coordinates description of lines, it can determine whether four points are coplanar and whether each pair of lines determined by them is parallel or intersecting, and even the intersection of haze-lines, i.e., the air-light.

Denote one pair of lines determined by $\{{\mathbf {p}},{\mathbf {q}},{\mathbf {r}},{\mathbf {s}}\}$ as ${l}_1: (\hat {\mathbf {l}}^T_1, {\mathbf {m}}^T_1)^T$ and ${l}_2: (\hat {\mathbf {l}}^T_2, {\mathbf {m}}^T_2)^T$. This pair of lines are non-coplanar or intersecting if

$${\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2 {\neq} {\mathbf 0}$$
holds. Otherwise, they are not two haze-lines intersecting at the air-light but two parallel general lines. If Eq. (4) holds, let us assume that the pair of lines have the relationship shown in Fig. 2, where ${\mathbf {a}}_1^{*}$ and ${\mathbf {a}}_2^{*}$ denote the intersection of lines ${l}_1$ and ${l}_2$ with their common perpendicular line ${l}_{\bot }$ respectively, i.e., the perpendicular feet of ${l}_{\bot }$ on ${l}_1$ and ${l}_2$.

 figure: Fig. 2.

Fig. 2. Two lines $l_1$ and $l_2$ in 3D RGB space

Download Full Size | PDF

The moment of the unit vector ${\hat {\mathbf {l}}}_2$ passing through point ${\mathbf {a}}_2^{*}$ with respect to point ${\mathbf {a}}_1^{*}$ is ${\mathbf {m}}_{21}=({\mathbf {a}}_2^{*}-{\mathbf {a}}_1^{*}){\times }{\hat {\mathbf {l}}}_2$. The plane $\Pi$, which is parallel to line ${l}_1$, contains line ${l}_2$. Considering that ${l}_{\bot }$ is perpendicular to $\Pi$, the moment ${\mathbf {m}}_{21}$ is also on the plane $\Pi$. The perpendicular distance between the line ${l}_1$ and ${l}_2$, $d$, is equal to the distance between ${\mathbf {a}}_1^{*}$ and ${\mathbf {a}}_2^{*}$, i.e., the perpendicular distance from the point ${\mathbf {a}}_1^{*}$ to the line ${l}_2$ or from ${\mathbf {a}}_2^{*}$ to ${l}_1$. Because ${l}_2: (\hat {\mathbf {l}}^T_2, {\mathbf {m}}^T_2)^T$ is in the normalized form, i.e., $\|{\hat {\mathbf {l}}}_2\|=1$, $d$ is equal to the modulus of the moment ${\mathbf {m}}_{21}$,

$$d=\| {\mathbf{m}}_{21}\|.$$

Since the plane $\Pi$ is parallel to the line ${l}_1$, the line parallel to the line ${l}_1$ and passing through the point ${\mathbf {a}}_2^{*}$ on the plane $\Pi$, ${l}'_1$, has the unit direction vector ${\hat {\mathbf {l}}}_1$. The angle between the line ${l}_2$ and ${l}'_1$ on the plane $\Pi$, $\alpha$, satisfies $|sin{\alpha }|=\|{\hat {\mathbf {l}}}_2{\times }{\hat {\mathbf {l}}}_1\|$. With the help of moment ${\mathbf {m}}_{21}$ in Eq. (5), the moment of the line ${l}_2$ with respect to the line ${l}_1$ can be expressed as follows:

$${\hat {\mathbf{l}}}_1{\cdot}{\mathbf{m}}_{21} = \|{\mathbf{m}}_{21}\|cos(\alpha+\frac{\pi}{2})={-}dsin{\alpha}.$$

After rearranging Eq. (6), we obtain

$$\begin{aligned} d & =\frac{|{\hat {\mathbf{l}}}_1{\cdot}{\mathbf{m}}_{21}|}{|sin{\alpha}|} = \frac{|{\hat {\mathbf{l}}}_1{\cdot}[({\mathbf{a}}_2^{*}-{\mathbf{a}}_1^{*}){\times}{\hat {\mathbf{l}}}_2]|}{\|{\hat {\mathbf{l}}}_2{\times}{\hat {\mathbf{l}}}_1\|} \\ & =\frac{|{\hat {\mathbf{l}}}_1{\cdot}({\mathbf{a}}_2^{*}{\times}{\hat {\mathbf{l}}}_2)-{\hat {\mathbf{l}}}_1{\cdot}({\mathbf{a}}_1^{*}{\times}{\hat {\mathbf{l}}}_2)|}{\|{\hat {\mathbf{l}}}_2{\times}{\hat {\mathbf{l}}}_1\|} =\frac{|{\hat {\mathbf{l}}}_1{\cdot}{\mathbf{m}}_{2}+{\hat {\mathbf{l}}}_2{\cdot}{\mathbf{m}}_1|}{\|{\hat {\mathbf{l}}}_2{\times}{\hat {\mathbf{l}}}_1\|}. \end{aligned}$$

If $d=0$, i.e., in Eq. (7)

$${\hat {\mathbf{l}}}_1{\cdot}{\mathbf{m}}_{2}+{\hat {\mathbf{l}}}_2{\cdot}{\mathbf{m}}_1=0,$$
the line ${l}_1$ and ${l}_2$ intersect. Otherwise, they are non-coplanar.

Since the haze-lines intersect at the air-light in RGB space, their geometric relationship can be described in the Plüker coordinates by Eq. (4) and Eq. (8).

3.3 Analytical solution of the air-light

Using the description of lines in Plüker coordinates form, the analytical solution of the air-light can further be exactly determined. Without loss of generality, assume that the axis of the world coordinate system ${{\mathbf {o}}_w}-{\hat {\mathbf {l}}}_{1}{\hat {\mathbf {u}}}{\hat {\mathbf {n}}}$ is parallel to the line ${l}_1$, the cross product of the line ${l}_1$ and ${l}_{\perp }$, and the line ${l}_{\perp }$, respectively. As shown in Fig. 2, the unit direction vector of the world coordinate system’s three axes is ${\hat {\mathbf {l}}}_1$, ${\hat {\mathbf {u}}}={\hat {\mathbf {n}}}{\times }{\hat {\mathbf {l}}}_1$, and ${\hat {\mathbf {n}}}=\frac {{\hat {\mathbf {l}}}_1{\times }{\hat {\mathbf {l}}}_2}{\|{\hat {\mathbf {l}}}_1{\times }{\hat {\mathbf {l}}}_2\|}$, respectively. Figure 2 also shows a local coordinate system with the origin at point ${\mathbf {a}}_2^{*}$ and the axis parallel to those of the world coordinate system. With the aid of the local coordinate, it is easy to see that the following relationship holds in the world coordinate system,

$${\hat {\mathbf{l}}}_2=({\hat {\mathbf{l}}}_1{\cdot}{\hat {\mathbf{l}}}_2){\hat {\mathbf{l}}}_1+\|{\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2\|{\hat {\mathbf{u}}}.$$

Take the dot product with ${\mathbf {a}}_2^{*}$ on both sides of Eq. (9). Then,

$${\mathbf{a}}_2^{*}{\cdot}{\hat {\mathbf{l}}}_2=({\hat {\mathbf{l}}}_1{\cdot}{\hat {\mathbf{l}}}_2)({\mathbf{a}}_2^{*}{\cdot}{\hat {\mathbf{l}}}_1)-{\mathbf{m}}_1{\cdot}({\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2).$$

Since point ${\mathbf {a}}_2^{*}$ is on line ${l}_2$, it satisfies

$${\mathbf{a}}_2^{*}={\hat {\mathbf{l}}}_2{\times}{\mathbf{m}}_2+({\mathbf{a}}_2^{*}{\cdot}{\hat {\mathbf{l}}}_2){\hat {\mathbf{l}}}_2.$$

Take the dot product with ${\mathbf {l}}_1$ on both sides of Eq. (11). Then,

$${\mathbf{a}}_2^{*}{\cdot}{\hat {\mathbf{l}}}_1=\frac{{\mathbf{m}}_2{\cdot}({\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2)-({\hat {\mathbf{l}}}_1{\cdot}{\hat {\mathbf{l}}}_2)({\mathbf{m}}_1{\cdot}({\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2))}{\|{\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2\|^2}.$$

By introducing Eq. (12) and Eq. (10) into Eq. (11), we obtain

$${\mathbf{a}}_2^{*}=\frac{{\mathbf{m}}_2{\times}({\hat {\mathbf{l}}}_1{\times}({\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2))-({\hat {\mathbf{m}}}_1{\cdot}({\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2)){\hat {\mathbf{l}}}_2}{\|{\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2\|^2}.$$

Similarly, ${\mathbf {a}}_1^{*}$ can also be obtained,

$${\mathbf{a}}_1^{*}=\frac{-{\mathbf{m}}_1{\times}({\hat {\mathbf{l}}}_2{\times}({\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2))+({\hat {\mathbf{m}}}_2{\cdot}({\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2)){\hat {\mathbf{l}}}_1}{\|{\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2\|^2}.$$

Particularly, if $d=0$, i.e., Eq. (8) holds, lines ${l}_1$ and ${l}_2$ intersect and the intersection point satisfies

$$\begin{aligned} {\mathbf{a}}^{*} & ={\mathbf{a}}_1^{*}={\mathbf{a}}_2^{*}\\ & =[({\mathbf{m}}_1{\cdot}{\hat {\mathbf{l}}}_2){\mathbf{I}}_3 - {\hat {\mathbf{l}}}_2{\mathbf{m}}^T_1 + {\hat {\mathbf{l}}}_1{\mathbf{m}}^T_2]\frac{{\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2}{\|{\hat {\mathbf{l}}}_1{\times}{\hat {\mathbf{l}}}_2\|^2}, \end{aligned}$$
where ${\mathbf {I}}_3$ is a $3{\times }3$ identity matrix. The intersection of two haze-lines, the air-light, can be analytically obtained with Eq. (15).

4. Proposed method

Once the analytical solution of the air-light is derived, it can be estimated using the robust estimation technique, the RANSAC, via finding the haze-lines’ intersection with the largest support set in RGB space. Similar to [18], a set of distinct colors, $\{{{\mathbf {I}}}_n\}_{n=1}^{N}$, is obtained by statistically analyzing colors of the input hazy image, where ${N}$ is the number of distinct colors in $\{{ {\mathbf {I}}}_n\}_{n=1}^{N}$. $\{{ {\mathbf {I}}}_n\}_{n=1}^{N}$ is taken as the input of the RANSAC.

4.1 Generate the air-light candidate by random sampling

At first, an air-light candidate is generated by random sampling. One sample containing four color points, $\{{\mathbf {p}},{\mathbf {q}},{\mathbf {r}},{\mathbf {s}}\}$, is randomly selected from the current color set $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$, which has an initial value of $\{{{\mathbf {I}}}_n\}_{n=1}^{N}$.

If Eq. (4) and Eq. (8) hold, lines determined by $\{{\mathbf {p}},{\mathbf {q}},{\mathbf {r}},{\mathbf {s}}\}$ intersect. Three intersections, i.e., air-light candidates, can be computed by Eq. (15). Considering that the value of the air-light is generally larger than intensities of most pixels in hazy images, the largest (i.e., brightest) one among three intersections is selected as the candidate air-light ${\breve {\mathbf {A}}}$. The corresponding lines are denoted as ${l}_1:\,(\hat {\mathbf {l}}^T_1, {\mathbf {m}}^T_1)^T$ and ${l}_2:\,(\hat {\mathbf {l}}^T_2, {\mathbf {m}}^T_2)^T$. Then, update the current color set $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$ by moving four points $\{{\mathbf {p}},{\mathbf {q}},{\mathbf {r}},{\mathbf {s}}\}$ contained in this sample from $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$ to the support set of ${\breve {\mathbf {A}}}$, ${\mathbf \Theta }_{\breve {\mathbf {A}}}$.

Otherwise, if either of Eq. (4) and Eq. (8) does not hold, a new sample should be randomly drawn until an air-light candidate ${\breve {\mathbf {A}}}$ is obtained.

4.2 Search for the air-light candidate’s support set

Once an air-light candidate ${\breve {\mathbf {A}}}$ is obtained, its support points are searched in the current color set $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$.

Firstly, points on the haze-lines which generate the current air-light candidate, ${l}_1: (\hat {\mathbf {l}}^T_1, {\mathbf {m}}^T_1)^T$ and ${l}_2: (\hat {\mathbf {l}}^{T}_{2}, {\mathbf {m}}^T_2)^T$, are searched. Each color point $\mathbf {w}$ is taken from $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$ in turn to be assessed whether it is on line ${l}_1$ or ${l}_2$ by analyzing whether ${\mathbf {w}}{\times }{\hat {\mathbf {l}}_1}={\mathbf {m}}_1$ or ${\mathbf {w}}{\times }{\hat {\mathbf {l}}_2}={\mathbf {m}}_2$ holds. Considering that noise inevitably occurs in practice, it can be considered that ${\mathbf {w}}$ is on line ${l}_1$ (or ${l}_2$) if

$$\|{\mathbf{w}}{\times}{\hat {\mathbf{l}}}-{\mathbf{m}}\| {\leq}{\tau}$$
holds, where ${\hat {\mathbf {l}}}={\hat {\mathbf {l}}}_1$ and ${\hat {\mathbf {m}}}={\hat {\mathbf {m}}}_1$ for ${l}_1$ (or ${\hat {\mathbf {l}}}={\hat {\mathbf {l}}}_2$ and ${\hat {\mathbf {m}}}={\hat {\mathbf {m}}}_2$ for ${l}_2$). The distance threshold $\tau$, which adaptively varies with the distance [18] between point ${\mathbf {w}}$ and the current candidate air-light ${\breve {\mathbf {A}}}$, satisfies
$$\tau=\tau_0{\cdot}(1+\frac{\|{\mathbf{w}}-{\breve {\mathbf{A}}}\|}{\sqrt 3}),$$
where $\tau _0$ is a pre-defined distance threshold.

If $\mathbf {w}$ is on the haze-line ${l}_1$ (or ${l}_2$), it is a support point of ${\breve {\mathbf {A}}}$. Otherwise, a new color point $\mathbf {w}$ is selected from the current color set $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$ and the abovementioned process in this Section is iteratively applied until all elements of the current color set $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$ have been traversed. If ${l}_1$ and ${l}_2$ have sufficient support points (at least 10 points for each line in our experiments), i.e., ${l}_1$ and ${l}_2$ are haze-lines, the current ${\breve {\mathbf {A}}}$ is a good candidate. Then, the searched support points of ${\breve {\mathbf {A}}}$, $\{\mathbf {w}\}$, are moved from $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$ to ${\mathbf \Theta }_{\breve {\mathbf {A}}}$. Otherwise, the current air-light candidate ${\breve {\mathbf {A}}}$ is discarded by terminating the current step. And a new one is generated by going back to the first step of Section 4.1.

Secondly, once the current air-light candidate ${\breve {\mathbf {A}}}$ is verified to be a good candidate by searching its support points on lines ${l}_1$ and ${l}_2$, its support points outside of lines ${l}_1$ and ${l}_2$ are further searched in the current color set $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$. That is, candidate haze-lines passing through ${\breve {\mathbf {A}}}$ and their support points are searched. One point $\mathbf {v}$ is randomly selected (and deleted) from $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$ to generate a candidate haze-line $(\hat {\mathbf {l}}^{T}, {\mathbf {m}}^T)^T$ with the current air-light candidate ${\breve {\mathbf {A}}}$. The strategy described in the first step of this Section is used to determine the support points of ${\breve {\mathbf {A}}}$ on the candidate haze-line $(\hat {\mathbf {l}}^{T}, {\mathbf {m}}^T)^T$. If there exists a sufficient amount of $\{{\mathbf {u}}_i\}$ on the generated candidate haze-line $(\hat {\mathbf {l}}^{T}, {\mathbf {m}}^T)^T$, which is taken as 10 in our experiments, i.e., the cardinality of $\{{\mathbf {u}}_i\}$, $C_{\{{\mathbf {u}}_i\}}$, is larger than 10, it is a good haze-line candidate. Then, the selected point $\mathbf {v}$ and points $\{{\mathbf {u}}_i\}$ are all support points of ${\breve {\mathbf {A}}}$, which are all transferred from the current color set $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$ to the support set of ${\breve {\mathbf {A}}}$, ${\mathbf \Theta }_{\breve {\mathbf {A}}}$. Otherwise, a new color point $\mathbf {v}$ is drawn from $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$ to generate a new candidate haze-line, and then determine the support points of ${\breve {\mathbf {A}}}$ on the generated candidate haze-line. This process is repeated until the current color set $\{{\breve {\mathbf {I}}}_n\}_{n=1}^{\breve N}$ is empty.

Finally, the cardinality of the support set ${\mathbf \Theta }_{\breve {\mathbf {A}}}$ of the current air-light candidate ${\breve {\mathbf {A}}}$, $C_{\breve {\mathbf {A}}}$, is computed and compared with the current optimal cardinality $C_{optim}$. If $C_{\breve {\mathbf {A}}}$ is larger than $C_{optim}$, $C_{\breve {\mathbf {A}}}$ is considered as $C_{optim}$. Correspondingly, the current air-light candidate ${\breve {\mathbf {A}}}$ and its support set ${\mathbf \Theta }_{\breve {\mathbf {A}}}$ are considered as the current optimal air-light ${\mathbf {A}}_{optim}$ and the correspondent optimal support set ${\mathbf \Theta }_{optim}$, respectively. Otherwise, the current $C_{optim}$, ${{\mathbf {A}}}_{optim}$ and ${\mathbf \Theta }_{optim}$ remain unchanged.

4.3 Iteratively update

The abovementioned process is iterated until the iteration number $K$ equals to the maximal sampling number $K_0$. During the process, $K_0$ is updated as follows [27],

$$K_0=log(z)/log(1-{\omega}^n_0),$$
where $z$ is the probability that at least one of $K_0$ random samples does not include an outlier, $n$ is the cardinality of a sample, and ${\omega }_0=C_{optim}/{N}$ is the inlier rate, which increases with the increase of current optimal cardinality $C_{optim}$. The value of $K_0$ monotonically decreases with the increase of $C_{optim}$, which is a huge number in the first few iterations while decreases with the increase of the iteration number $K$. Once $K$ equals to current $K_0$, the iteration process is terminated. The obtained optimal candidate ${\mathbf {A}}_{optim}$ is the air-light estimation result.

The proposed air-light estimation method can be summarized as Algorithm 1.

Tables Icon

Algorithm 1. Air-light estimation using haze-lines in Plüker coordinates

5. Experiments

To validate the proposed method, a series of experiments were conducted. The air-light estimation experiments were conducted to quantitatively evaluate the accuracy of the air-light estimation. Transmission map estimation and image dehazing experiments were also conducted with the estimated air-light, which further qualitatively validates the proposed method and demonstrates the subjective effect of the air-light estimation with the dehazed images and the estimated transmission maps.

The open dataset of the Weizmann Institute of Science [14] was used in both experiments. This dataset consists of 40 images depicting various scenes. Among them, there are 35 images with visible non-occluded sky regions, and 5 additional images generated by cropping out the visible non-occluded sky regions in 5 of the former 35 images. Some of these hazy images are shown in Fig. 3, which represent typical images with low, moderate, and high intensity of haze. The dataset provides not only hazy images, but also the corresponding ground truth of the air-light, which were manually extracted by marking the visible non-occluded sky regions with an infinite distance from the camera in the images [14].

 figure: Fig. 3.

Fig. 3. Some hazy images in the open dataset of the Weizmann Institute of Science [14]. From left to right, the haze intensity of three images is low, moderate and high, respectively.

Download Full Size | PDF

5.1 Air-light estimation

We start by evaluating the accuracy of the air-light estimation. Parameters are initialized as follows: ${N}=1500$, $n=4$, $z=0.95$, $\tau _0 = 0.02$, $K=0$ and $C_{optim}=0$.

The proposed method is performed to estimate the air-light for each image in the open dataset [14] of the Weizmann Institute of Science. The $L_2$ errors between the estimated air-light and the ground truth are computed, and the results for each image are shown in Fig. 4, where the index of Image is in alphabetical order of image names. The statistics on the entire dataset are presented in Table 1. To make a comparison, the state-of-the-arts, such as Berman [18], Gautam [11], Bahat [14], He [7] and Sulami [16], are also performed on the same dataset. Results are also shown in Fig. 4 and Table 1. In addition, results of deep learning-based methods [24,25] on the same dataset reported in [25] are also listed in Table 1.

 figure: Fig. 4.

Fig. 4. $L_2$ errors of the estimated air-light

Download Full Size | PDF

Tables Icon

Table 1. Statistical values of $L_2$ errors of the estimated air-light 3pt

Figure 4 shows that in most cases the proposed method has the least $L_2$ estimation errors in comparison with the state-of-the-arts. Especially, for the $8^{th}$, $11^{th}$, $18^{th}$, $20^{th}$, and $24^{th}$ image, which is generated by cropping from the $7^{th}$, $10^{th}$, $17^{th}$, $19^{th}$, and $23^{rd}$ image respectively to remove sky regions, even though the sky is invisible in these images, we can see in Fig. 4 that the proposed method can still and even more accurately estimate the air-light. Table 1 shows that the proposed method dramatically improves the air-light estimation accuracy and has the least mean value, median value and variance of $L_2$ errors in comparison with the state-of-the-arts. Both Fig. 4 and Table 1 show that the proposed method can more accurately and robustly estimate the air-light than the state-of-the-arts.

The cardinality of a sample, $n=4$, and the huge sampling space, make theoretical value of the maximal sampling number $K_0$ is huge. Althoug the proposed adaptive scheme to determine $K_0$ can reduce the computational cost, it is still huge. Due to the randomness of RANSAC, the execution time of the proposed method varies for each execution. According to the statistics that we collected during the experiments, the execution time of the proposed method varies from 32.95 to 949.76 seconds. In contrast, that of Berman [18] varies form 2.97 to 9.35 secondes. Various factors, such as the image size and the color number, affect the execution time. Although manully assigning a small value to the maximal sampling number $K_0$ can dramatically reduce the execution time, the optimal estimation can’t be guaranteed. However, the proposed method can guarantee the optimal estimation.

It is also noteworthy that the proposed method has poor results for few images, such as the $35^{th}$ and $36^{th}$ image, which may result from the particular distribution of colors. It can be seen in the $35^{th}$ image, which is shown in the $3^{rd}$ column of Fig. 3, that there are only a few colors, and scene points in the same colors have small depth ranges. These facts make haze-lines scarce and most haze-lines too short to be accurately detected, resulting in a bad air-light estimation with insufficient and inaccurate haze-lines.

5.2 Image dehazing

The proposed method is further validated by performing image dehazing and transmission map estimation with the estimated air-light. Figure 5 shows some dehazing images and estimated transmission maps. Since there is no ground truth of haze-free images, the no-reference image quality score, naturalness image quality evaluator (NIQE) [28], is used to objectively evaluate the proposed method. To make a comparison, the results of the state-of-the-arts, such as Berman [18], Gautam [11], Bahat [14], He [7] and Sulami [16], are also shown in Fig. 5 and Table 2. It can be seen although the same method of image dehazing [15] is used, results of image dehazing and transmission map estimation vary with the air-light estimated by different methods. From the estimated air-light shown at the top left of each dehazed image in Fig. 5, the proposed method has the best results, which are the most close to the ground truth. Figure 5 also shows that the dehazed images and estimated transmission maps of the proposed method are also the most close to those of the results estimated with the air-light ground truth. That is, the proposed method has the better subjective effect than the state-of-the-arts. In addition, the NIQE values shown in Table 2 reveal the proposed method also has the best objective effect.

 figure: Fig. 5.

Fig. 5. Some results of image dehazing. (a), (b) and (c) corresponds to the $4^{th}$, $23^{rd}$ and $34^{th}$ image respectively. For each sub-figure, the first row shows the dehazing results, and the second row shows the estimated transmission map. The estimated air-light is shown at the top left of each dehazed image.

Download Full Size | PDF

Tables Icon

Table 2. Mean NIQE of dehazed images with the estimated air-light

So, the proposed method has better subjective and objective dehazing effect. All of these show that the proposed method outperforms the state-of-the-arts, which is consistent with the conclusion of the air-light estimation experiment.

5.3 Limitations

Although the proposed method can accurately and robustly estimate the air-light, its computational cost is high currently since a large sampling number is required to ensure an optimal sample under the RANSAC framework. In some cases, the result is only a local optimal rather than a global optimal. In addition, few hazy images have poor results since haze-lines are too scarce and/or short to be accurately estimated, which is due to the limited distribution of colors or the narrow variation range of scene depth.

6. Conclusions

In this paper, the analytical solution of the air-light in a hazy image is derived by analyzing the geometric relationship between haze-lines with their Plüker coordinates description in 3D RGB space. Then, a novel method of air-light estimation for single hazy image using haze-lines described in Plüker coordinates is proposed. Extensive experiments validate that the proposed method can more robustly and accurately estimate the air-light. In the future, we will focus on reducing the sampling number under the RANSAC framework and ensuring the global optimal.

Funding

National Natural Science Foundation of China (61772050); National Key Research and Development Program of China (2018AAA0100802).

Disclosures

The authors declare no conflicts of interest.

Data availability

Data underlying the results presented in this paper are available in Ref. [14].

References

1. W. E. K. Middleton, “Vision through the atmosphere,” Phys. Today 7(3), 21 (1954). [CrossRef]  

2. J. Vazquez-Corral, G. D. Finlayson, and M. Bertalmío, “Physical-based optimization for non-physical image dehazing methods,” Opt. Express 28(7), 9327 (2020). [CrossRef]  

3. J. B. Wang, K. Lu, J. Xue, N. He, and L. Shao, “Single image dehazing based on the physical model and MSRCR algorithm,” IEEE Trans. Circuits Syst. Video Technol. 28(9), 2190–2199 (2018). [CrossRef]  

4. S. Zheng and L. Wang, “Fast single image dehazing using morphological reconstruction and saturation compensation,” LNCS 13141, 493–504 (2022). [CrossRef]  

5. R. Tan, “Visibility in bad weather from a single image,” in Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (IEEE, 2008), pp. 1–8.

6. R. Fattal, “Single image dehazing,” ACM Trans. Graph. 27(3), 1–9 (2008). [CrossRef]  

7. K. He, J. Sun, and X. Tang, “Single image haze removal using dark channel prior,” IEEE Trans. Pattern Anal. Mach. Intell. 33(12), 2341–2353 (2011). [CrossRef]  

8. G. Meng, Y. Wang, J. Duan, S. Xiang, and C. Pan, “Efficient image dehazing with boundary constraint and contextual regularization,” in Proceedings of IEEE International Conference on Computer Vision (IEEE, 2013), pp. 617–624.

9. J. B. Wang, N. He, L. L. Zhang, and K. Lu, “Single image dehazing with a physical model and dark channel prior,” Neurocomputing 149, 718–728 (2015). [CrossRef]  

10. M. Zhu, B. He, and Q. Wu, “Single image dehazing based on dark channel prior and energy minimization,” IEEE Signal Process. Lett. 25(2), 174–178 (2018). [CrossRef]  

11. S. Gautam, T. K. Gandhi, and B. K. Panigrahi, “An improved air-light estimation scheme for single haze images using color constancy prior,” IEEE Signal Process. Lett. 27, 1695–1699 (2020). [CrossRef]  

12. Q. Zhu, J. Mai, and L. Shao, “A fast single image haze removal algorithm using color attenuation prior,” IEEE Trans. Image Process. 24(11), 3522–3533 (2015). [CrossRef]  

13. R. Fattal, “Dehazing using color-lines,” ACM Trans. Graph. 34(1), 1–14 (2014). [CrossRef]  

14. Y. Bahat and M. Irani, “Blind dehazing using internal patch recurrence,” in Proceedings of the IEEE Conference on Computational Photography (IEEE, 2016), pp. 1–9.

15. D. Berman, T. Treibitz, and S. Avidan, “Non-local image dehazing,” in Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (IEEE, 2016), pp. 1674–1682.

16. M. Sulami, I. Geltzer, R. Fattal, and M. Werman, “Automatic recovery of the atmospheric light in hazy images,” in Proceedings of the IEEE Conference on Computational Photography (IEEE, 2014), pp. 1–11.

17. D. Berman, T. Treibitz, and S. Avidan, “Air-light estimation using haze-lines,” in Proceedings of the IEEE Conference on Computational Photography (IEEE, 2017), pp. 1–9.

18. D. Berman, T. Treibitz, and S. Avidan, “Single image dehazing using haze-lines,” IEEE Trans. Pattern Anal. Mach. Intell. 42(3), 720–734 (2020). [CrossRef]  

19. X. Zhang, T. Wang, G. Tang, L. Zhao, Y. Xu, and S. Maybank, “Single image haze removal based on a simple additive model with haze smoothness prior,” IEEE Trans. Circuits Syst. Video Technol. 32(6), 3490–3499 (2022). [CrossRef]  

20. S. Satrasupalli, E. Daniel, and S. R. Guntur, “Single image haze removal based on transmission map estimation using Encoder-Decoder-based deep learning architecture,” Optik 248, 168197 (2021). [CrossRef]  

21. S. Satrasupalli, E. Daniel, and S. R. Gunturu, “Single image haze removal using CNN based encoder-decoder architecture,” in Proceedings of 2022 International Conference on Communication, Computing and Internet of Things (IC3IoT) (IEEE, 2022), pp. 1–4.

22. M. Song, R. Li, R. Guo, G. Ding, Y. Wang, and J. Wang, “Single image dehazing algorithm based on optical diffraction deep neural networks,” Opt. Express 30(14), 24394 (2022). [CrossRef]  

23. B. Cai, X. Xu, K. Jia, C. Qing, and D. Tao, “DehazeNet: An end-to-end system for single image haze removal,” IEEE Trans. Image Process. 25(11), 5187–5198 (2016). [CrossRef]  

24. H. Zhang and V. M. Patel, “Densely connected pyramid dehazing network,” in Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (IEEE, 2018), pp. 3194–3203.

25. Y. Wang, L. P. Chau, and X. Ma, “Airlight estimation based on distant region segmentation,” in Proceedings of IEEE International Symposium on Circuits and Systems (IEEE, 2019), pp. 1–5.

26. N. A. Husain and M. S. M. Rahim, “The dynamic scattering coefficient on image dehazing method with different haze conditions,” Lect. Notes Inst. for Comput. Sci. Soc. Informatics Telecommun. Eng. 429, 223–241 (2022). [CrossRef]  

27. M. A. Fischler and R. C. Bolles, “Random Sample Consensus: a paradigm for model fitting with applications to image analysis and automated cartography,” Commun. ACM. 24(6), 381–395 (1981). [CrossRef]  

28. A. Mittal, R. Soundararajan, and A. C. Bovik, “Making a completely blind image quality analyzer,” IEEE Signal Process. Lett. 20(3), 209–212 (2013). [CrossRef]  

Data availability

Data underlying the results presented in this paper are available in Ref. [14].

14. Y. Bahat and M. Irani, “Blind dehazing using internal patch recurrence,” in Proceedings of the IEEE Conference on Computational Photography (IEEE, 2016), pp. 1–9.

Cited By

Optica participates in Crossref's Cited-By Linking service. Citing articles from Optica Publishing Group journals and other participating publishers are listed here.

Alert me when this article is cited.


Figures (5)

Fig. 1.
Fig. 1. Diagram of the air-light and haze-lines. Scene points in same colors are labeled with same marks. (a) Hazy image. (b) Haze-lines intersect at the air-light in RGB space.
Fig. 2.
Fig. 2. Two lines $l_1$ and $l_2$ in 3D RGB space
Fig. 3.
Fig. 3. Some hazy images in the open dataset of the Weizmann Institute of Science [14]. From left to right, the haze intensity of three images is low, moderate and high, respectively.
Fig. 4.
Fig. 4. $L_2$ errors of the estimated air-light
Fig. 5.
Fig. 5. Some results of image dehazing. (a), (b) and (c) corresponds to the $4^{th}$, $23^{rd}$ and $34^{th}$ image respectively. For each sub-figure, the first row shows the dehazing results, and the second row shows the estimated transmission map. The estimated air-light is shown at the top left of each dehazed image.

Tables (3)

Tables Icon

Algorithm 1. Air-light estimation using haze-lines in Plüker coordinates

Tables Icon

Table 1. Statistical values of L 2 errors of the estimated air-light 3pt

Tables Icon

Table 2. Mean NIQE of dehazed images with the estimated air-light

Equations (18)

Equations on this page are rendered with MathJax. Learn more.

I ( x ) = t ( x ) J ( x ) + [ 1 t ( x ) ] A
I ( x ) = t ( x ) [ J ( x ) A ] + A .
d e t ( [ p ¯ q ¯ r ¯ s ¯ ] ) = 0 ,
l ^ 1 × l ^ 2 0
d = m 21 .
l ^ 1 m 21 = m 21 c o s ( α + π 2 ) = d s i n α .
d = | l ^ 1 m 21 | | s i n α | = | l ^ 1 [ ( a 2 a 1 ) × l ^ 2 ] | l ^ 2 × l ^ 1 = | l ^ 1 ( a 2 × l ^ 2 ) l ^ 1 ( a 1 × l ^ 2 ) | l ^ 2 × l ^ 1 = | l ^ 1 m 2 + l ^ 2 m 1 | l ^ 2 × l ^ 1 .
l ^ 1 m 2 + l ^ 2 m 1 = 0 ,
l ^ 2 = ( l ^ 1 l ^ 2 ) l ^ 1 + l ^ 1 × l ^ 2 u ^ .
a 2 l ^ 2 = ( l ^ 1 l ^ 2 ) ( a 2 l ^ 1 ) m 1 ( l ^ 1 × l ^ 2 ) .
a 2 = l ^ 2 × m 2 + ( a 2 l ^ 2 ) l ^ 2 .
a 2 l ^ 1 = m 2 ( l ^ 1 × l ^ 2 ) ( l ^ 1 l ^ 2 ) ( m 1 ( l ^ 1 × l ^ 2 ) ) l ^ 1 × l ^ 2 2 .
a 2 = m 2 × ( l ^ 1 × ( l ^ 1 × l ^ 2 ) ) ( m ^ 1 ( l ^ 1 × l ^ 2 ) ) l ^ 2 l ^ 1 × l ^ 2 2 .
a 1 = m 1 × ( l ^ 2 × ( l ^ 1 × l ^ 2 ) ) + ( m ^ 2 ( l ^ 1 × l ^ 2 ) ) l ^ 1 l ^ 1 × l ^ 2 2 .
a = a 1 = a 2 = [ ( m 1 l ^ 2 ) I 3 l ^ 2 m 1 T + l ^ 1 m 2 T ] l ^ 1 × l ^ 2 l ^ 1 × l ^ 2 2 ,
w × l ^ m τ
τ = τ 0 ( 1 + w A ˘ 3 ) ,
K 0 = l o g ( z ) / l o g ( 1 ω 0 n ) ,
Select as filters


Select Topics Cancel
© Copyright 2024 | Optica Publishing Group. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.