Print

发布时间: 2019-02-16
摘要点击次数:
全文下载次数:
DOI: 10.11834/jig.180450
2019 | Volume 24 | Number 2




    图像处理和编码    




  <<上一篇 




  下一篇>> 





混合先验与加权引导滤波的图像去雾算法
expand article info 李喆, 李建增, 胡永江, 张岩
陆军工程大学无人机工程系, 石家庄 050003

摘要

目的 图像去雾是降低雾、霾、沙等低能见度成像环境对图像的退化影响,提高图像信息获取质量的过程。为了消除先验盲区,同时进一步提高去雾图像边缘细节的清晰度,提出一种混合先验与加权引导滤波的图像去雾算法。方法 首先改进大气光值估计方法,提高大气光值估计的准确性。然后利用混合先验理论求取双约束区域的大气透射率,一定程度上消除了先验盲区,提高了去雾算法的鲁棒性。最后利用加权引导滤波算法优化透射率图,提高了图像边缘细节的清晰度。结果 本文以通用去雾测试图像和小型无人机拍摄的雾天图像作为实验对象,通过对比分析4种组合步骤算法的复原效果,验证本文各步骤改进方法的合理性与整体算法的优越性。实验结果表明:混合先验理论改善了暗原色先验在明亮区域的失真现象和颜色衰减先验对浓雾处理上的不足,取得了较好的视觉效果;加权引导滤波改善了图像边缘模糊的现象,使复原后的图像边缘细节更加清晰;相较传统算法,本文算法视觉效果更好,去雾图像边缘细节更加明显,综合评价指标均值提升幅度较大。结论 针对有雾图像复原,通过理论分析和实验验证,说明了本文各步骤的改进具有一定的优越性,所提的算法具有较强的鲁棒性。

关键词

图像去雾; 混合先验; 双约束区域; 引导滤波; 大气光值

Mixed prior and weighted guided filter image dehazing algorithm
expand article info Li Zhe, Li Jianzeng, Hu Yongjiang, Zhang Yan
Department of UAV Engineering, Army Engineering University, Shijiazhuang 050003, China
Supported by: National Natural Science Foundation of China (51307183)

Abstract

Objective Image dehazing is a process of reducing the degradation effect of low-visibility imaging environment, such as fog, sputum, and sand, and improving the quality of image information acquisition. Image dehazing mainly solves the problems of image feature information blur, low contrast, gray-level concentration, and color distortion. At present, image dehazing methods are mainly divided into two categories, namely, image restoration and image enhancement. A dehazing algorithm based on image restoration is used to establish a physical model of image degradation in restoring the clear image in a targeted manner by analyzing the degradation mechanism of the image and by using prior knowledge or assumptions. The dehazing algorithm is more targeted compared with image enhancement algorithms. Deblurring is better and image information is complete, which should be investigated. Therefore, an image dehazing algorithm based on mixed prior and weighted guided filter (MPWGF) is proposed to eliminate the prior blind zone and improve the sharpness of the edge detail of haze-free images. Method First, a new method of atmospheric light value estimation is proposed to reduce the limitation of atmospheric light value estimation and utilize the advantage of mixed prior conditions. Pixel positions of 0.1% before brightness in dark channel and depth maps are extracted, and coordinate points extracted from the two images are compared. The coordinate points are retained when two images are observed simultaneously; otherwise, the values with the highest brightness that correspond to the remaining coordinate points in the original image are eliminated. This method can eliminate outliers to some extent and improves the accuracy of atmospheric light estimation. Then, mixed prior theory is used to calculate the atmospheric transmission of the double-constraint region, which eliminates the prior blind zone to a certain extent. This theory improves the robustness of the dehazing algorithm. The dark channel prior (DCP) and color attenuation prior (CAP) have good recovery effects and can compensate for the existence of the prior blind zone. Therefore, an effective region segmentation method is proposed to segment the bright and foggy regions of blurred images. On the basis of regional characteristics, DCP and CAP are used to obtain atmospheric transmittance maps to solve the prior blind region problem in which a single prior estimation method affects the robustness of the restoration algorithm. Finally, an adaptive guided filter algorithm is used to optimize the transmission map, which improves the sharpness of the image edge details. The obtained coarse transmittance map should be refined to eliminate the halo and block artifacts that locally exist in the restored image. A traditional transmittance map optimization algorithm has poor edge retention capability and serious loss of details. Thus, this study proposes an adaptive weighted guidance filtering algorithm based on the traditional algorithm. The edge detail improvement of the fine transmittance map is achieved by adding an adaptive weighted factor. Result In this study, the general dehazing test image and foggy image captured by a small UAV are taken as experimental objects. The rationality of the improved methods and the superiority of the overall algorithm are verified by comparing and analyzing the restoration effects of the four combined step algorithms. Experimental results show that the mixed prior theory improves the distortion of the dark priori in the bright region and the deficiency of CAP in dense fog processing and achieves better visual effect. Weighted guided filtering improves the image edge blurring and makes the image edge details clear after restoration. In comparison with other comparison algorithms, the proposed method has better visual effects, and the edge details of haze-free images are more evident. The average increase of comprehensive evaluation index is large. Conclusion For the restoration of hazy images, the superiority of the proposed improved model is demonstrated through theoretical analysis and experimental verification. The restoration of the proposed algorithm is better than that with the traditional algorithm. The main conclusions are summarized as follows. Mixed prior theory can improve the prior blind area problem in DCP and CAP theories to a certain extent, and the effect of image defogging is better. The adaptive guided filtering algorithm can optimize the transmittance image better and improve the edge sharpness of the defogging image. The image defogging effect can be improved by combining hybrid prior theory with the adaptive guided filtering algorithm. Under the same conditions, the proposed algorithm has better image restoration effect compared with the traditional fog removal algorithm. In this study, several limitations are observed in the parameter setting of regional segmentation, such as the adjustment of parameters through experience and insufficient certain theoretical basis. The parameter setting will be investigated in our future study. MPWGF has broad application prospects in image restoration, artificial intelligence, photogrammetry, and other fields.

Key words

image dehazing; mixed prior; double constraint region; guided filter; atmospheric light

0 引言

图像去雾是降低雾、霾、沙等低能见度成像环境对图像的退化影响,提高图像信息获取质量的过程[1]。其主要解决图像特征信息模糊、对比度低、灰度集中、色彩失真等问题[2]。目前图像去雾方法主要分为图像复原和图像增强两大类[3],基于图像复原的去雾算法通过分析图像的退化机理,利用先验知识或其他辅助信息,建立图像降质的物理模型,有针对性地复原出清晰图像。相较图像增强算法,图像复原算法针对性更强,去模糊效果更好,信息保存更完整。因此对其研究具有重要意义。

在图像复原去雾方面,学者做了大量工作:Tan[4]提出一种对比度先验复原算法。统计发现无雾图像较有雾图像对比度更高,根据此先验条件,首先最大化有雾图像对比度,然后结合大气光值抑制复原图像的像素值,最后用马尔可夫模型进一步优化复原效果。该算法具有一定的适用性,但由于未考虑图像退化模型,因此复原图像颜色容易过饱和,失真现象明显。Fattal[5]提出一种反射率先验复原算法。研究发现物体表面反射率与光线透射率局部不相关,根据此先验条件估计透射率图,进而带入大气散射模型得到复原图像。该算法引入退化模型较好地解决了失真现象,但由于复原过程需要足够的物理色彩信息支撑,所以当色彩信息较少时处理效果较差。He等人[6]提出基于暗原色先验(DCP)的复原算法。对大量户外无雾图像的统计发现,除天空、白色景物等高亮度区域外,在大多数图像的局部区域中存在某些像素点在某个通道上有很低的值,根据此先验条件得到透射率图,并利用软抠图算法(soft matting)对其进行细化。该算法思路新颖独特,具有较强的鲁棒性,但由于soft matting算法的过程复杂,导致算法实时性较差。文献[7-10]在文献[6]基础上提出了改进算法。在透射率估计阶段中利用双边滤波[7]和中值滤波[8]代替最小值滤波,在透射率图细化阶段利用双边滤波[9]和引导滤波[10]代替soft matting算法。这些改进一定程度上提高了算法的鲁棒性与实时性,但由于DCP对高亮度区域处理的先天不足,制约了此类算法的进一步发展。Zhu等人[11]提出基于颜色衰减先验(CAP)的复原算法。对大量户外有雾图像的统计发现,任意区域雾的浓度与该区域像素点的亮度和饱和度之差成正比,利用此先验条件建立关于景深的线性模型,其中模型中的相关系数通过训练得到,最后通过景深图间接得到透射率图。该算法简单有效,实时性强,复原图像主观视觉效果较好,解决了DCP算法在高亮度区域的缺陷,但由于景深模型本身的缺陷,对浓雾区域的处理效果较差。

上述算法针对图像复原去雾进行了创新与改进,但仍存在以下问题:先验条件存在盲区,使透射率图估计出现偏差;透射率图优化算法边缘保持能力较差,导致得到的精透射率图细节损失严重。

针对以上问题,本文提出一种混合先验与加权引导滤波(MPWGF)的图像去雾算法。首先改进大气光值估计方法,然后利用混合先验理论求取双约束区域的大气透射率,随后利用加权引导滤波算法优化透射率图,最后进行了实验验证。

1 MPWGF算法流程

基于先验理论的图像去雾算法一般分为4个步骤:大气光值估计、大气透射率估计、透射率图优化和大气退化模型求解。本文针对前3个主要步骤进行了改进与优化,提出了MPWGF算法,具体流程如图 1所示。

图 1 MPWGF算法流程图
Fig. 1 Diagram of the MPWGF

1) 双约束区域分割。首先求取模糊图像的暗通道图和亮度通道图,然后在两个通道图中设置阈值,对浓雾区域和高亮区域进行约束,最后利用双约束条件划分出4个像素区域。

2) 大气光值估计。提出一种新的大气光值估计方法,提高大气光值估计的准确性。

3) 大气透射率估计。针对步骤1)得到的4个像素区域,提出基于混合先验的大气透射率估计方法,提高透射率估计的鲁棒性。

4) 透射率图优化。提出一种自适应加权引导滤波算法对粗大气透射率图进行优化,提高精透射率图像边缘细节的清晰度。

5) 大气退化模型求解。在低能见度成像环境下,大气散射模型定义为

$ I\left( x \right) = J\left( x \right)t\left( x \right) + A\left( {1 - t\left( x \right)} \right) $ (1)

式中,$\boldsymbol{I}$表示拍摄到的雾天模糊影像,$\boldsymbol{J}$表示复原出的清晰影像,$\boldsymbol{t}$为大气透射率图,$A$为估计的大气光值,将步骤2)和步骤4)中得到的$A$$\boldsymbol{t}$代入式(1),得到复原清晰图像

$ J\left( x \right) = \frac{{I\left( x \right) - A}}{{\min \left( {\max \left( {t\left( x \right),{t_0}} \right),{t_1}} \right)}} + A $ (2)

式中,为了避免$t$($x$)过大或过小导致图像失真,引入参数${t_0}$${t_1}$对其进行限制,本文令${t_0}$=0.1,${t_1}$=0.9。

2 基于混合先验的大气透射率估计方法

2.1 本文算法

由于DCP和CAP均具有较好的复原效果,且可较好地弥补各自存在的先验盲区,所以本文提出一种混合先验的大气透射率估计方法,解决基于单一先验估计方法存在先验盲区,影响复原算法鲁棒性的问题。首先通过一种有效的区域分割方法对模糊图像的高亮区域和浓雾区域进行分割,然后根据各区域特点,利用DCP和CAP混合求取大气透射率图,一定程度上去除先验盲区,具体流程如下:

1) 分别计算模糊图像的暗通道图${\mathit{\boldsymbol{I}}_{{\rm{dark}}}}$[6]和深度图像$\boldsymbol{d}$[11]

$ {I_{{\rm{dark}}}}\left( x \right) = \mathop {\min }\limits_{y \in \mathit{\boldsymbol{ \boldsymbol{\varOmega} }}\left( x \right)} \left( {\mathop {\min }\limits_{c \in \left\{ {{\rm{r}},{\rm{g}},{\rm{b}}} \right\}} {I_c}\left( y \right)} \right) $ (3)

$ d\left( x \right) = \mathop {\min }\limits_{y \in \mathit{\boldsymbol{ \boldsymbol{\varOmega} }}\left( x \right)} \left( {{\theta _0} + {\theta _1}{I_{\rm{v}}}\left( y \right) + {\theta _2}{I_{\rm{s}}}\left( y \right) + \delta \left( y \right)} \right) $ (4)

式中,${\mathit{\boldsymbol{I}}_c}$为模糊图像$\boldsymbol{I}$在RGB颜色空间中的一个颜色通道,$\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}\left(x \right)$为以$x$为中心的一个区域,${\mathit{\boldsymbol{I}}_{\rm{v}}}$${\mathit{\boldsymbol{I}}_{\rm{s}}}$分别为HSV颜色空间中的亮度通道图和饱和度通道图,$\mathit{\boldsymbol{\delta }}$为利用随机变量代表的深度图像随机误差,${\theta _0}$${\theta _1}$${\theta _2}$为线性系数。

2) 为了从图像中将高亮区域和浓雾区域有效识别出来,本文提出一种双约束区域分割方法对像素点所在区域进行重新定义, 即

$ I\left( x \right) = \left\{ {\begin{array}{*{20}{c}} \begin{array}{l} {I_1}\left( x \right)\\ {I_2}\left( x \right)\\ {I_3}\left( x \right)\\ {I_4}\left( x \right) \end{array}&\begin{array}{l} {I_{{\rm{dark}}}}\left( x \right) > \alpha ,{I_{\rm{v}}}\left( x \right) > \beta \\ {I_{{\rm{dark}}}}\left( x \right) > \alpha ,{I_{\rm{v}}}\left( x \right) \le \beta \\ {I_{{\rm{dark}}}}\left( x \right) \le \alpha ,{I_{\rm{v}}}\left( x \right) > \beta \\ {I_{{\rm{dark}}}}\left( x \right) \le \alpha ,{I_{\rm{v}}}\left( x \right) \le \beta \end{array} \end{array}} \right. $ (5)

式中,${\mathit{\boldsymbol{I}}_1}$为高亮度浓雾区域,${\mathit{\boldsymbol{I}}_2}$为非高亮度浓雾区域,${\mathit{\boldsymbol{I}}_3}$为高亮度非浓雾区域,${\mathit{\boldsymbol{I}}_4}$为非高亮度非浓雾区域,$\alpha $$\beta $为区域划分阈值。由于${I_{{\rm{dark}}}}\left(x \right) \ge {I_{\rm{v}}}\left(x \right)$,当$\alpha > \beta $时,图像中将不包含${\mathit{\boldsymbol{I}}_2}$区域。

3) 为了降低大气光值估计的局限性,结合提出的混合先验策略,提出一种新的大气光值估计方法。首先分别提取暗通道图和深度图中亮度前0.1%的像素位置,然后对照两幅图像提取到的坐标点位置,若同时存在两幅图中则保留,反之则剔除,最后在原图中寻找保留下来的坐标点所对应具有最高亮度的值作为大气光值$A$

4) 为了提高大气透射率估计的鲁棒性,提出一种混合先验策略对大气透射率进行估计, 即

$ t\left( x \right) = m\left( x \right){t_{{\rm{dark}}}}\left( x \right) + n\left( x \right){t_{{\rm{color}}}}\left( x \right) $ (6)

$ m\left( x \right) = \left\{ {\begin{array}{*{20}{c}} 0&{x \in {\mathit{\boldsymbol{I}}_1}}\\ 1&{x \in {\mathit{\boldsymbol{I}}_2}}\\ 0&{x \in {\mathit{\boldsymbol{I}}_3}}\\ \lambda &{x \in {\mathit{\boldsymbol{I}}_4}} \end{array}} \right. $ (7)

$ n\left( x \right) = 1 - m\left( x \right) $ (8)

式中,$m$$n$为混合先验系数矩阵,$\lambda $为先验系数$m$在非高亮度非浓雾区域的具体参数,${\mathit{\boldsymbol{t}}_{{\rm{dark}}}}$为暗原色先验得到的粗透射率,${\mathit{\boldsymbol{t}}_{{\rm{color}}}}$为颜色衰减先验得到的粗透射率,由文献[6]和文献[11]可得

$ {t_{{\rm{dark}}}}\left( x \right) = 1 - \omega \mathop {\min }\limits_{y \in \mathit{\boldsymbol{ \boldsymbol{\varOmega} }}\left( x \right)} \left( {\mathop {\min }\limits_{c \in \left\{ {{\rm{r}},{\rm{g}},{\rm{b}}} \right\}} \frac{{{I_c}\left( y \right)}}{A}} \right) $ (9)

$ {t_{{\rm{color}}}}\left( x \right) = {{\rm{e}}^{ - \eta d\left( x \right)}} $ (10)

式中,$\omega $为保真系数,$\eta $为大气散射系数。

2.2 相关说明

1) DCP不适用于高亮区域,但相较其他先验算法,其对浓雾区域的处理较好,而CAP不适用于浓雾区域,但可以较好解决高亮区域复原失真的问题,互补性较强;DCP与CAP的先验特性较为相似,且算法实现思路基本相同,可实现性较高。

2) 暗通道值的大小可近似描述图像中雾气浓度的大小,其值越大雾的浓度越大;亮度通道值可直接表示图像的亮度,其值越大亮度越大。本文利用暗通道图和亮度通道图组成的双约束条件对图像的高亮区域和浓雾区域进行划分,具有一定的理论依据。

3) 本文充分利用混合先验条件这一优势,提出一种新的大气光值估计方法,此方法可一定程度上剔除异常值,提高大气光值估计的准确性。

4) ${\mathit{\boldsymbol{I}}_2}$${\mathit{\boldsymbol{I}}_3}$区域的取值较好理解,根据各自区域特性,${\mathit{\boldsymbol{I}}_2}$区域只进行DCP,${\mathit{\boldsymbol{I}}_3}$区域只进行CAP。${\mathit{\boldsymbol{I}}_4}$区域进行混合先验,通过参数$\lambda $对两种先验所占比例进行合理调节,进一步优化复原效果。${\mathit{\boldsymbol{I}}_1}$区域仍存在先验盲区,考虑到DCP处理此区域失真现象明显,为简化计算,此部分也只进行CAP。

5) 参数说明:步骤1)中,$\mathit{\boldsymbol{ \boldsymbol{\varOmega} }}$由最小滤波半径决定,区域窗口越大,包含暗通道的概率就越大,则暗通道越黑,导致去雾的效果不明显,参考文献[6]最小滤波半径的取值为15。深度模型的系数由大量有雾图像和对应的景深图像组成的训练样本通过训练得到,参考文献[11]取${\theta _0}$=0.121 779,${\theta _1}$=0.959 710,${\theta _2}$=-0.780 245,$\sigma $=0.041 337。步骤4)中,$\omega $∈(0, 1]用以保留图像的深度感,防止图像失真,$\eta $决定图像去模糊的程度,其过大或过小都将使复原图像失真。

3 自适应加权引导滤波

3.1 具体流程

为消除复原图像局部存在的光晕和块状效应,需要对得到的粗透射率图进行细化处理[12]。由于传统透射率图优化算法存在边缘保持能力差、细节损失严重的问题,所以本文在文献[10]算法的基础上提出一种自适应加权引导滤波算法,通过添加自适应权重因子,以达到进一步提升精透射率图边缘细节清晰程度的目的,具体流程如下:

1) 通过2×2邻域的一阶偏导有限差分,计算预处理后引导图像的梯度信息,减少边缘细节的损失, 即

$ \left\{ \begin{array}{l} {M_x}\left( {i,j} \right) = \left( {I'\left( {i,j + 1} \right) - I'\left( {i,j} \right) + } \right.\\ \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\left. {I'\left( {i + 1,j + 1} \right) - I'\left( {i + 1,j} \right)} \right)/2\\ {M_y}\left( {i,j} \right) = \left( {I'\left( {i,j} \right) - I'\left( {i + 1,j} \right) + } \right.\\ \;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\left. {I'\left( {i,j + 1} \right) - I'\left( {i + 1,j + 1} \right)} \right)/2\\ M\left( {i,j} \right) = \sqrt {{{\left( {{M_x}\left( {i,j} \right)} \right)}^2} + {{\left( {{M_y}\left( {i,j} \right)} \right)}^2}} \end{array} \right. $ (11)

式中,${\mathit{\boldsymbol{I'}}}$为引导图像,$\boldsymbol{M}$为梯度图像。

2) 利用最大类间方差法(OTSU)[13]计算最佳分割阈值$k$,实现对边缘区域与非边缘区域的自适应分割。

3) 设计一个分段函数模型,模拟理想权值变化规律。在非边缘区域正则项不做变化,而在边缘区域,引入文献[14]中性能优异的指数模型, 即

$ T\left( {i,j} \right) = \left\{ \begin{array}{l} 1\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;M\left( {i,j} \right) \le k\\ \beta + {\left( {M\left( {i,j} \right) - k} \right)^{ - M\left( {i,j} \right)/k}}\;\;\;\;M\left( {i,j} \right) > k \end{array} \right. $ (12)

式中,$\beta $为常数项,防止被除数为零。

4) 利用步骤3)中得到的分段函数模型计算自适应权重因子,控制不同区域的平滑程度

$ \mathit{\boldsymbol{\varepsilon '}} = \frac{\mathit{\boldsymbol{\varepsilon }}}{\mathit{\boldsymbol{T}}} $ (13)

式中,${\mathit{\boldsymbol{\varepsilon '}}}$为自适应权重因子,$\mathit{\boldsymbol{\varepsilon }}$为传统引导滤波算法中的权重因子。

步骤1)—4)为自适应权重因子的计算过程,具体流程如图 2所示。

图 2 自适应权重因子计算流程图
Fig. 2 Flow chart of adaptive weight factor calculation

5) 将自适应权重因子代入文献[8]中的能量公式,实现对粗透射率图的鲁棒自适应引导滤波。

3.2 相关说明

1) 由文献[10]可知,正则项参数$\mathit{\boldsymbol{\varepsilon }}$是调节滤波幅度的重要指标,$\mathit{\boldsymbol{\varepsilon }}$的值越小滤波幅度越小,因此利用像素间的纹理差异自适应调节$\mathit{\boldsymbol{\varepsilon }}$,可以达到控制边缘与非边缘区域滤波幅度的目的,即在边缘区域降低滤波幅度,在非边缘区域保持或增加滤波幅度。

2) 边缘检测算法一定程度上会削弱图像细节信息,影响边缘保留效果,而图像的梯度值可以直接反映出图像的边缘特性,因此本文选择直接根据梯度值确定边缘信息作用于自适应权重因子,可以更好地保护边缘细节。

3) OTSU算法选取使类间方差最大的像素值作为分割阈值,可以快速确定边缘与非边缘区域分割的最佳阈值,相较自设定阈值的方法,其自适应性和鲁棒性更强[13]

4) 分段函数模型可以较好地模拟理想权值变化规律,提出的自适应加权引导滤波算法具有较强的边缘保持能力。

4 实验验证

4.1 实验设置

4.1.1 实验平台参数

笔记本计算机:R720-15IKB;CPU:Inter(R)-Core(TM) i7-7700HQ 2.80 GHz;内存:8 G;操作系统:Win10 64位;编程环境:MATLAB R2015a。

4.1.2 数据集

实验采用通用去雾测试图像和小型无人机拍摄的雾天图像验证复原算法的鲁棒性。通用模糊测试图像来源于Fattal[5]、He等人[6, 10]、Xu等人[7]、Zhu等人[11]项目主页,如图 3所示。小型无人机拍摄的模糊图像随机取自DJI Phantom 3 Professional型无人机拍摄的系列有雾图像集,如图 4所示。为便于后续综合评价对比,将数据集图像大小统一为400×300像素。

图 3 通用测试图像
Fig. 3 General test images
图 4 小型无人机拍摄的有雾图像
Fig. 4 Haze images taken by small UAVs

4.1.3 实验对象及相关参数设置

为了验证各步骤改进的合理性与整体算法的优越性,本文按照算法的各步骤设计了4组实验对象。

复原算法步骤如下:

1) 大气透射率估计方法。A1:基于暗原色先验的大气透射率估计方法;A2:基于颜色衰减先验的大气透射率估计方法;A3:基于混合先验的大气透射率估计方法。

2) 透射率图优化算法。B1:引导滤波;B2:自适应加权引导滤波。

实验对象如表 1所示,实验中主要参数设置如表 2所示。

表 1 实验对象
Table 1 Experimental subjects

下载CSV
算法序号算法
1A1+B1(文献[10])
2A2+B1(文献[11])
3A3+B1(混合先验)
4A3+B2(本文)

表 2 参数设置
Table 2 Parameter settings

下载CSV
主要参数 取值
引导滤波的滤波半径${r_1}$ 60
引导滤波的方差增量$e$ 10-3
最小值滤波的滤波半径${r_2}$ 15
保真系数$\omega $ 0.9
大气散射系数$\mu $ 1

本文算法与步骤涉及的其他参数文中均已给出。

4.1.4 评估准则

考虑到清晰图像相对于有雾图像应具有更大的对比度、更多的信息、更加清晰的纹理细节[15],引入标准差、平均梯度和信息熵对图像复原效果进行客观评价。

1) 标准差。标准差反映整幅图像的对比度,值越大复原图像整体清晰度越高,其数学表达式为

$ \sigma = \sqrt {\frac{{\sum\limits_{i = 1}^n {{{\left( {{x_i} - \bar x} \right)}^2}} }}{n}} $ (14)

式中,$n$表示总像素数,${x_i}$表示单个像素点的像素值,${\bar x}$表示像素均值。

2) 平均梯度。平均梯度反映图像$\boldsymbol{f}$细节纹理的清晰程度,值越高复原图像细节纹理越明显,其数学表达式为

$ \begin{array}{*{20}{c}} {{g_{{\rm{ave}}}} = }\\ {\frac{1}{{mn}}\sum\limits_{x = 1}^m {\sum\limits_{y = 1}^n {\sqrt {\frac{{{{\left( {\frac{{\partial f\left( {x,y} \right)}}{{\partial x}}} \right)}^2} + {{\left( {\frac{{\partial f\left( {x,y} \right)}}{{\partial y}}} \right)}^2}}}{2}} } } } \end{array} $ (15)

式中,$m$$n$表示图像尺寸,($x$, $y$)为像素点坐标。

3) 信息熵。信息熵反映图像包含的信息量大小,值越高复原图像传递的信息量越大,其数学表达式为

$ H = \sum\limits_{i = 0}^{k - 1} {{p_i}\log _2^{{p_i}}} $ (16)

式中,$k$表示整幅图像的灰度级,${p_i}$表示每个灰度级出现的概率。

4) 综合评价指标。为更直观地对复原图像进行评价,参考文献[16]的方法,将上述3个指标进行极差归一化后求和得到一个综合评价指标,值越大表明图像复原效果越好,极差归一化的数学表达式为

$ \begin{array}{*{20}{c}} {{y_{ij}} = \frac{{{x_{ij}} - \mathop {\min }\limits_{1 \le i \le m} {x_{ij}}}}{{\mathop {\min }\limits_{1 \le i \le m} {x_{ij}} - \mathop {\min }\limits_{1 \le i \le m} {x_{ij}}}}}\\ {1 \le i \le m,1 \le j \le i} \end{array} $ (17)

式中,$n$表示指标数量,$m$表示对比算法的数量。

4.1.5 实验过程

整个实验遵循控制变量原则,在相同的实验环境下,利用表 1中的4种组合算法对数据集中的图像进行复原,通过对复原图像在主观视觉和客观指标两方面的对比分析,验证MPWGF各步骤改进的合理性与整体算法的优越性。

4.2 实验结果

实验结果如表 3表 4图 5图 6所示。

表 3 算法指标对比
Table 3 Comparisons of different methods' indicators

下载CSV
算法 指标 图像
Cones Pumpkin Canon Mountain Palace UAV1 UAV2
文献[10] $\sigma $ 29.665 5 36.598 7 32.369 5 46.402 6 42.493 7 53.643 57.138 6
${g_{{\rm{ave}}}}$ 0.032 4 0.040 7 0.034 7 0.026 5 0.042 0.028 0.027 4
$H$ 6.841 6 7.041 6.910 6 6.796 7 7.285 6 7.236 3 7.424 7
文献[11] $\sigma $ 30.789 2 40.665 5 28.744 7 45.789 4 38.853 5 65.287 1 67.480 8
${g_{{\rm{ave}}}}$ 0.027 4 0.036 0.022 5 0.022 7 0.038 1 0.027 9 0.026 7
$H$ 6.863 8 7.148 6 6.839 2 6.881 9 7.173 8 7.291 7.413 7
混合先验 $\sigma $ 32.945 1 43.192 4 33.181 51.784 8 43.327 2 68.373 5 71.433 7
${g_{{\rm{ave}}}}$ 0.032 3 0.044 1 0.031 8 0.028 4 0.042 8 0.029 6 0.028 7
$H$ 6.931 5 7.176 7.000 5 6.900 3 7.329 1 7.383 4 7.489 6
本文 $\sigma $ 33.794 43.699 1 33.217 2 51.891 4 43.388 8 68.559 9 71.848 2
${g_{{\rm{ave}}}}$ 0.033 2 0.044 6 0.032 4 0.028 5 0.045 7 0.032 8 0.032 2
$H$ 6.954 5 7.213 8 7.030 5 6.923 8 7.357 1 7.427 5 7.559 9
注:加粗字体为最优结果。

表 4 算法综合评价指标均值
Table 4 The mean value of the synthetic index of the algorithm results

下载CSV
文献[10]文献[11]混合先验本文
1.151.041.461.59
图 5 不同算法图像复原效果图
Fig. 5 Image restoration effect diagram by different algorithms
((a) original images; (b) reference [10]; (c) reference [11]; (d) mixed prior algorithm; (e) ours)
图 6 算法综合指标对比图
Fig. 6 Algorithm comprehensive index contrast diagram

对实验结果分析如下:

1) 对比图 5(b)(d)发现:基于混合先验的复原算法,较好改善了暗原色先验在明亮区域的失真现象和颜色衰减先验对浓雾处理上的不足,取得了较好的视觉效果。

2) 对比图 5(d) (e)发现:自适应引导滤波,较好改善了图像边缘模糊的现象,使复原后的图像边缘细节更加清晰。

3) 由表 3分析可得:对比3种客观评价指标,基于混合先验的复原算法较其他两种先验算法所复原的图像评价指标更高,基于自适应引导滤波的复原算法较基于传统引导滤波的复原算法评价指标更高或接近最高。

4) 由图 6表 4可得,相较传统算法,本文提出的算法综合评价指标最高,复原效果更好。

5) 整体实验从主客观两方面验证了本文改进的各步骤具有一定的优越性,所提的算法具有较强的鲁棒性。

5 结论

本文提出MPWGF算法,并通过理论与实验验证了算法的可行性与优势。主要得到以下结论:

1) 混合先验理论可以在一定程度上改善暗原色先验理论和颜色衰减理论存在先验盲区的问题,且对图像去雾处理效果较好。

2) 自适应引导滤波算法可以使透射率图优化效果更好,从而提高去雾图像的边缘清晰度。

3) 将混合先验理论和自适应引导滤波算法相结合,可以使图像去雾效果得到较好提升。

4) 相同条件下,相较传统去雾算法,本文提出的算法图像复原效果更好。

5) 本文在区域分割参数设置上仍存在不足,仅通过经验对参数进行调剂,缺乏一定的理论依据,今后将进一步对参数设置进行研究。

6) MPWGF在图像复原、人工智能、摄影测量等多个领域,具有广阔的应用前景。

参考文献

  • [1] Xiao J S, Gao W, Zou B Y, et al. Image dehazing based on sky-constrained dark channel prior[J]. Acta Electronica Sinica, 2017, 45(2): 346–352. [肖进胜, 高威, 邹白昱, 等. 基于天空约束暗通道先验的图像去雾[J]. 电子学报, 2017, 45(2): 346–352. ] [DOI:10.3969/j.issn.0372-2112.2017.02.012]
  • [2] Ancuti C, Ancuti C O, Timofte R, et al. NTIRE 2018 challenge on image dehazing: methods and results[C]//Proceedings of 2018 IEEE Conference on Computer Vision and Pattern Recognition. Salt Lake: IEEE, 2018: 891-901.
  • [3] Wu D, Zhu Q S. The latest research progress of image dehazing[J]. Acta Automatica Sinica, 2015, 41(2): 221–239. [吴迪, 朱青松. 图像去雾的最新研究进展[J]. 自动化学报, 2015, 41(2): 221–239. ] [DOI:10.16383/j.aas.2015.c131137]
  • [4] Tan R T. Visibility in bad weather from a single image[C]//Proceedings of 2008 IEEE Conference on Computer Vision and Pattern Recognition. Anchorage, AK, USA: IEEE, 2008: 1-8.[DOI:10.1109/CVPR.2008.4587643]
  • [5] Fattal R. Single image dehazing[J]. ACM Transactions on Graphics (TOG), 2008, 24(3): #72. [DOI:10.1145/1360612.1360671]
  • [6] He K M, Sun J, Tang X O. Single image haze removal using dark channel prior[C]//Proceedings of 2009 IEEE Conference on Computer Vision and Pattern Recognition. Miami, FL, USA: IEEE, 2009: 1956-1963.[DOI:10.1109/CVPR.2009.5206515]
  • [7] Xu H R, Guo J M, Liu Q, et al. Fast image dehazing using improved dark channel prior[C]//Proceedings of 2012 IEEE International Conference on Information Science and Technology. Hubei, China: IEEE, 2012: 663-667.[DOI:10.1109/ICIST.2012.6221729]
  • [8] Gibson K B, Võ D T, Nguyen T Q. An investigation of dehazing effects on image and video coding[J]. IEEE Transactions on Image Processing, 2012, 21(2): 662–673. [DOI:10.1109/TIP.2011.2166968]
  • [9] Wang Y F, Yin C L, Huang Y M, et al. Image haze removal using a bilateral filter[J]. Journal of Image and Graphics, 2014, 19(3): 386–392. [王一帆, 尹传历, 黄义明, 等. 基于双边滤波的图像去雾[J]. 中国图象图形学报, 2014, 19(3): 386–392. ] [DOI:10.11834/jig.20140307]
  • [10] He K M, Sun J, Tang X O. Guided image filtering[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2013, 35(6): 1397–1409. [DOI:10.1109/TPAMI.2012.213]
  • [11] Zhu Q S, Mai J M, Shao L. A Fast single image haze removal algorithm using color attenuation prior[J]. IEEE Transactions on Image Processing, 2015, 24(11): 3522–3533. [DOI:10.1109/TIP.2015.2446191]
  • [12] Shen Y Y, Liu C X, Zhang J D, et al. Atmospheric light correction and transmission optimization based robust image dehazing[J]. Journal of Computer-Aided Design & Computer Graphics, 2017, 29(9): 1604–1612. [沈逸云, 刘春晓, 张金栋, 等. 鲁棒图像去雾的大气光校正与透射率优化算法[J]. 计算机辅助设计与图形学学报, 2017, 29(9): 1604–1612. ] [DOI:10.3969/j.issn.1003-9775.2017.09.003]
  • [13] Otsu N. A threshold selection method from gray-level histograms[J]. IEEE Transactions on Systems, Man, and Cybernetics, 1979, 9(1): 62–66. [DOI:10.1109/TSMC.1979.4310076]
  • [14] Xie W, Zhou Y Q, You M. Improved guided image filtering integrated with gradient information[J]. Journal of Image and Graphics, 2016, 21(9): 1119–1126. [谢伟, 周玉钦, 游敏. 融合梯度信息的改进引导滤波[J]. 中国图象图形学报, 2016, 21(9): 1119–1126. ] [DOI:10.11834/jig.20160901]
  • [15] Li J T, Zhang Y J. Improvements of image haze removal algorithm and its subjective and objective performance evaluation[J]. Optics and Precision Engineering, 2017, 25(3): 735–741. [李佳童, 章毓晋. 图像去雾算法的改进和主客观性能评价[J]. 光学精密工程, 2017, 25(3): 735–741. ] [DOI:10.3788/OPE.20172503.0735]
  • [16] Huang Y Q, Ding W R, Li H G. Haze removal for UAV reconnaissance images using layered scattering model[J]. Chinese Journal of Aeronautics, 2016, 29(2): 502–511. [DOI:10.1016/j.cja.2016.01.012]