«上一篇 下一篇»
  计算机工程  2022, Vol. 48 Issue (6): 222-227  DOI: 10.19678/j.issn.1000-3428.0062355
0

引用本文  

李莉, 王新强, 银珊. 基于衰减补偿与直方图拉伸的水下图像增强算法[J]. 计算机工程, 2022, 48(6), 222-227. DOI: 10.19678/j.issn.1000-3428.0062355.
LI Li, WANG Xinqiang, YIN Shan. Underwater Image Enhancement Algorithm Based on Attenuation Compensation and Histogram Stretching[J]. Computer Engineering, 2022, 48(6), 222-227. DOI: 10.19678/j.issn.1000-3428.0062355.

基金项目

国家自然科学基金(41561079, 62005059)

作者简介

李莉(1978—),女,讲师、硕士,主研方向为水下图像处理、光电信息处理;
王新强,正高级实验师、硕士;
银珊,副教授、博士

文章历史

收稿日期:2021-08-16
修回日期:2021-09-24
基于衰减补偿与直方图拉伸的水下图像增强算法
李莉 , 王新强 , 银珊     
桂林电子科技大学 电子工程与自动化学院,广西 桂林 541004
摘要:水下物理环境复杂多变,导致获取的水下图像颜色失真、对比度低且细节模糊,影响了水下场景探测的准确性。结合衰减补偿和直方图拉伸技术,提出水下图像增强算法ACHS。根据不同颜色通道的衰减特性,设计基于衰减补偿的颜色校正方法解决水下图像颜色失真问题。将需要颜色校正的水下图像从RGB颜色模型转换到LAB颜色模型,使用引导滤波将亮度通道L分解为基础层和细节层,同时提出基于K-means聚类的双直方图增强算法用于增强基础层的对比度,通过Gamma校正突显细节层的纹理结构。在此基础上,累加亮度通道L的基础层和细节层,并将其从LAB颜色模型转换到RGB颜色模型以获取最终的增强图像。实验结果表明,与GDCP、REBE、WaterNet等算法相比,经该算法增强的水下图像可视度较高,并且具有自然的颜色和清晰的细节。
关键词水下图像增强    衰减补偿    双直方图    颜色校正    细节增强    
Underwater Image Enhancement Algorithm Based on Attenuation Compensation and Histogram Stretching
LI Li , WANG Xinqiang , YIN Shan     
School of Electronic Engineering and Automation, Guilin University of Electronic Technology, Guilin, Guangxi 541004, China
Abstract: The complex and changeable underwater physical environment leads to the color distortion, low contrast and fuzzy details of the acquired underwater image, which affects the accuracy of underwater scene detection.An underwater image enhancement algorithm based on attenuation compensation and histogram stretching, named ACHS, is proposed.Firstly, a color correction method based on attenuation compensation is proposed according to the attenuation characteristics of different color channels, which can effectively solve color distortion in underwater images.Then, the color-corrected underwater image is converted from the RGB color model to the LAB color model, and the brightness channel L is decomposed into the base and detail layers using a guided filter.Meanwhile, a K-means clustering-based dual histogram enhancement algorithm is proposed to enhance the contrast of the base layer, and gamma correction is used to highlight the texture structure of the detail layer.Finally, the base and detail layers of the brightness channel L are accumulated and converted from the LAB color model to the RGB color model to obtain the final enhanced image.The experimental results show that, compared with GDCP, REBE, WaterNet algorithms, et al, underwater images enhanced using the proposed algorithm exhibit natural colors, high visibility, and clear details.
Key words: underwater image enhancement    attenuation compensation    dual histogram    color correction    details enhancement    

开放科学(资源服务)标志码(OSID):

0 概述

受复杂水下物理环境的影响,水下图像经常存在颜色失真、低对比度、细节模糊等问题[1-3]。低质量的水下图像对探知水下场景带来了极大挑战,因此,研究有效的水下图像清晰化算法具有重要意义。

目前,水下图像清晰化技术主要分为图像复原和图像增强[4]两种。其中,复原算法考虑水下成像机理,估计退化模型的参数以反演清晰图像[5]。近期,暗通道启发的算法逐渐应用到水下图像去雾方面,但该算法没有充分考虑红通道的衰减,造成估计的透射率较大,复原图像较暗。文献[6]采用随机森林回归算法提高透射率估计的准确率,但该算法的运算复杂度较高。文献[7-8]提出的算法进一步提高了投射率的估计准确率,但增强的图像中引入了红色伪影。

图像增强算法通过调整图像的像素值以增强图像的颜色和对比度。文献[9]提出了基于Retinex的水下图像增强算法,该算法提高了图像的可视性,但易引入微红色。文献[10]利用Retinex分解图像的反射分量和入射分量,然后对它们采用不同的增强算法,并通过加权融合获得增强的图像,但该算法放大了噪声。文献[11]受Retinex的启发,采用模型分段和线性分段增强反射分量,通过空间平滑和线性平滑改善入射分量,但该算法求解复杂。文献[12-13]提出了自适应双直方图算法,但没有充分考虑水下图像的衰减,从而导致增强的图像出现过增强或欠增强。文献[14]提出了颜色平衡和融合的水下图像增强算法,但该算法对于衰减通道的选择考虑不足。增强算法简单且高效,在对比度增强方面表现出较好的性能,但需要充分考虑水下图像的衰减问题。最近,基于深度学习的算法逐渐应用到水下图像增强方面[15-18]。然而,高质量的训练数据和有效的网络结构制约了深度学习算法的发展。

本文提出无需先验知识假设且不必数据驱动的ACHS算法,用以增强水下图像的对比度和颜色。根据颜色通道的衰减特性计算衰减矩阵,对衰减严重的通道进行校正。同时,通过引导滤波分离LAB颜色模型中L通道的基础层和细节层,利用基于K-means聚类的双直方图增强基础层的对比度,采用Gamma校正突显细节层的纹理结构。在此基础上,将L通道的基础层和细节层进行累加并转换到RGB颜色模型,从而得到最终的增强图像。

1 ACHS算法 1.1 算法流程

ACHS算法流程如图 1所示(彩色效果见《计算机工程》官网HTML版),算法步骤如下:1)将输入图像分解为红、绿、蓝通道;2)采用基于衰减补偿的颜色校正算法以去除水下图像的颜色失真;3)在LAB颜色模型,通过引导滤波将亮度通道L通道分解为基础层和细节层,同时采用不同的增强策略分别实施增强操作;4)累加基础层和细节层以获得增强的L通道,并转换到RGB颜色模型以获取最终的增强图像。

Download:
图 1 基于衰减补偿和直方图拉伸的水下图像增强算法流程 Fig. 1 Procedure of underwater image enhancement algorithm based on attenuation compensation and dual histogram
1.2 颜色校正

颜色失真是水下图像面临的挑战性问题。传统的拉伸算法并没有充分考虑水下图像的衰减,当直接被应用到水下图像的颜色校正时,易引入红色失真[12]。此外,在浑浊或深水域获得的水下图像各个通道之间的衰减程度差异较大。因此,本文需要考虑不同颜色通道之间的衰减差异,针对不同颜色通道采用不同的校正算法。首先,利用式(1)计算各个通道的总像素值:

$ {S}_{c}=\sum\limits _{i=1}^{M}\sum\limits _{j=1}^{N}{I}_{c}\left(i, j\right), c\in \left\{R, G, B\right\} $ (1)

其中:$ M $$ N $表示图像行和列。然后,根据每个通道的总像素值对这3个颜色通道从大到小排序为$ {I}_{{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}} $$ {I}_{{\mathrm{m}}{\mathrm{i}}{\mathrm{d}}} $$ {I}_{{\mathrm{m}}{\mathrm{i}}{\mathrm{n}}} $$ {I}_{{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}} $表示最大颜色通道,也被称为衰减最弱的通道;$ {I}_{{\mathrm{m}}{\mathrm{i}}{\mathrm{d}}} $表示中间颜色通道,也被称为衰减较弱的通道;$ {I}_{{\mathrm{m}}{\mathrm{i}}{\mathrm{n}}} $表示最小颜色通道,也被称为衰减最强的通道。对于$ {I}_{{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}} $颜色通道直接采用传输的拉伸算法,表达式如下:

$ {I}_{c{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}}(i, j)=\frac{255\times \left({I}_{{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}}\left(i, j\right)-{I}_{{\mathrm{l}}{\mathrm{o}}{\mathrm{w}}}\right)}{{I}_{{\mathrm{h}}{\mathrm{i}}{\mathrm{g}}{\mathrm{h}}}-{I}_{{\mathrm{l}}{\mathrm{o}}{\mathrm{w}}}} $ (2)

其中:$ {I}_{{\mathrm{h}}{\mathrm{i}}{\mathrm{g}}{\mathrm{h}}} $$ {I}_{{\mathrm{l}}{\mathrm{o}}{\mathrm{w}}} $表示最大颜通道的最大值和最小值;$ {I}_{c{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}} $表示校正的结果,对于中间颜色通道,它相对于最大的颜色通道$ {I}_{{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}} $也有一些衰减。因此,考虑在它们之间的构建衰减矩阵$ \left[{I}_{{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}}\left(i, j\right)-{I}_{{\mathrm{m}}{\mathrm{i}}{\mathrm{d}}}\left(i, j\right)\right] $,并将其补偿给中间颜色通道。数学上,中间颜色通道的校正公式如下:

$ {I}_{c{\mathrm{m}}{\mathrm{i}}{\mathrm{d}}}(i, j)=\frac{255\times \left[\left({I}_{{\mathrm{m}}{\mathrm{i}}{\mathrm{d}}}\left(i, j\right)-{I}_{{\mathrm{l}}{\mathrm{o}}{\mathrm{w}}}\right)+\left({I}_{{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}}\left(i, j\right)-{I}_{{\mathrm{m}}{\mathrm{i}}{\mathrm{d}}}\left(i, j\right)\right)\right]}{{I}_{{\mathrm{h}}{\mathrm{i}}{\mathrm{g}}{\mathrm{h}}}-{I}_{{\mathrm{l}}{\mathrm{o}}{\mathrm{w}}}} $ (3)

最小颜色通道相对于最大颜色通道$ {I}_{{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}} $衰减最为严重。因此,需要在它们之间构建衰减矩阵$ \left[{I}_{{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}}\left(i, j\right)-{I}_{{\mathrm{m}}{\mathrm{i}}{\mathrm{n}}}\left(i, j\right)\right] $,并将其补偿给最小颜色通道。数学上,最小颜色通道的校正公式如下:

$ {I}_{c{\mathrm{m}}{\mathrm{i}}{\mathrm{n}}}(i, j)=\frac{255\times \left[\left({I}_{{\mathrm{m}}{\mathrm{i}}{\mathrm{n}}}\left(i, j\right)-{I}_{{\mathrm{l}}{\mathrm{o}}{\mathrm{w}}}\right)+\left({I}_{{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}}\left(i, j\right)-{I}_{{\mathrm{m}}{\mathrm{i}}{\mathrm{n}}}\left(i, j\right)\right)\right]}{{I}_{{\mathrm{h}}{\mathrm{i}}{\mathrm{g}}{\mathrm{h}}}-{I}_{{\mathrm{l}}{\mathrm{o}}{\mathrm{w}}}} $ (4)

图 2展示了蓝色、绿色、黄色、模糊4类退化的水下图像(彩色效果见《计算机工程》官网HTML版),从中能够清楚看到本文颜色校正算法对于这4种退化的水下图像都具有明显效果,特别适用于水下图像的颜色失真校正。

Download:
图 2 颜色校正 Fig. 2 Color correction
1.3 对比度增强

图 2所示,虽然本文的颜色校正算法可以有效移除颜色失真,但这些结果的对比度和细节纹理还需要进一步增强。在不改变颜色的前提下,有效提高水下图像的可视度是本节的研究重点。本节考虑到LAB颜色空间中亮度通道L和颜色通道AB是相互独立的。因此,通过增强L通道进一步提高输出图像的对比度。此外,为了进一步突显增强图像的纹理细节,本节采用引导滤波分解出L通道的基础层和细节层,然后,采用不同的增强策略进行增强。将颜色校正的图像从RGB颜色模型转换到LAB颜色模型,然后对其进行分层处理:

$ {L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}}={\mathrm{g}}{\mathrm{u}}{\mathrm{i}}{\mathrm{d}}{\mathrm{e}}{\mathrm{d}}\_{\mathrm{f}}{\mathrm{i}}{\mathrm{l}}{\mathrm{t}}{\mathrm{e}}{\mathrm{r}}(L, L, r, \varepsilon ) $ (5)

其中,亮度通道$ L $即可作为引导图像也可以作为被滤波的图像,$ {\mathrm{g}}{\mathrm{u}}{\mathrm{i}}{\mathrm{d}}{\mathrm{e}}{\mathrm{d}}\_{\mathrm{f}}{\mathrm{i}}{\mathrm{l}}{\mathrm{t}}{\mathrm{e}}{\mathrm{r}}\left(\right) $表示引导滤波的简化函数,且$ r $$ \varepsilon $分别被设定为16和0.01,这些参数的选择参考文献[19]。细节层是从输入图像中减去基础层如下:

$ {L}_{{\mathrm{D}}{\mathrm{e}}{\mathrm{t}}{\mathrm{a}}{\mathrm{i}}{\mathrm{l}}}=L-{L}_{B} $ (6)
1.3.1 基于K-means的双直方图增强基础层

多数水下图像前景亮度高于背景亮度,由于前景距离成像系统较近且照明相对较充足,因此本节考虑将L通道分解前景和背景两个子图像,在这里本文的L通道指的是基础层。其中,前景子图像对应的是图像直方图中的高像素,背景子图像对应的是图像直方图中的低像素。K-means作为无监督的聚类算法广泛引用到图像分割、聚类等领域。本节采用K-means聚类的思想将L通道分解为前景和背景两个子图像。首先根据距离关系定义初始化聚类的中心:

$ {C}_{x}^{O}={L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, {\mathrm{m}}{\mathrm{i}}{\mathrm{n}}}-\left(x-\frac{1}{2}\right)\frac{{L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, {\mathrm{m}}{\mathrm{a}}{\mathrm{x}}}-{L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, {\mathrm{m}}{\mathrm{i}}{\mathrm{n}}}}{X} $ (7)

其中:$ {C}_{x} $为第$ x $个类别的最初聚类中心;$ {L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, {\mathrm{m}}{\mathrm{a}}{\mathrm{x}}} $$ {L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, {\mathrm{m}}{\mathrm{i}}{\mathrm{n}}} $表示基础层的最大和最小像素值,且$ x={\mathrm{1, 2}}, \cdots , X $。然后,分配各个像素点到最近似的聚类集合中,表达式如下:

$ {D}_{x, y}={\mathrm{a}}{\mathrm{b}}{\mathrm{s}}\left({L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, y}-{C}_{x}\right) $ (8)

其中:$ {D}_{x, y} $为第$ y $个像素值到第$ x $个像素值所在聚类中心之间的距离,$ y={\mathrm{1, 2}}, \cdots , Y $$ Y $是像素点的总数目。当完成一次聚类以后,需要通过式(9)再次更新聚类中心:

$ {C}_{x}^{{\mathrm{N}}{\mathrm{e}}{\mathrm{w}}}=\frac{1}{Y}\sum \limits_{y=1}^{{Y}_{y}}{L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, y} $ (9)

其中:$ {Y}_{y} $表示式(8)被分配到$ x $类别中的像素总数。如果聚类中心的位置发生变化,则重复执行式(8),直到整个聚类过程结束。最终将第$ x $类和$ x-1 $类的聚类中心的平均值作为双直方图的分解值,表达式如下:

$ T=\frac{1}{2}\left({C}_{x}+{C}_{x-1}\right) $ (10)

$ T $作为L通道中分离前景和背景最佳阈值,然后利用阈值$ T $L通道分解为前景和背景子图像,其中小于阈值的区域定义为背景子图像,大于阈值的区域定义为前景子图像,最后采用式(11)分别对前景和背景子图像进行拉伸:

$ \left\{\begin{array}{l}{L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, {\mathrm{B}}{\mathrm{a}}{\mathrm{c}}{\mathrm{k}}{\mathrm{g}}{\mathrm{r}}{\mathrm{o}}{\mathrm{u}}{\mathrm{n}}{\mathrm{d}}}\left(i, j\right)={L}_{{\mathrm{m}}{\mathrm{i}}{\mathrm{n}}}+\left(T-{L}_{{\mathrm{m}}{\mathrm{i}}{\mathrm{n}}}\right)\times \\ {\mathrm{C}}{\mathrm{D}}{\mathrm{F}}\left({L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}}\left(i, j\right)\right), {L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}}\in \left[0, T\right)\\ {L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, {\mathrm{F}}{\mathrm{o}}{\mathrm{r}}{\mathrm{e}}{\mathrm{g}}{\mathrm{r}}{\mathrm{o}}{\mathrm{u}}{\mathrm{n}}{\mathrm{d}}}\left(i, j\right)=\left(T+1\right)+\left({L}_{{\mathrm{m}}{\mathrm{a}}{\mathrm{x}}}-\left(T+1\right)\right)\times \\ {\mathrm{C}}{\mathrm{D}}{\mathrm{F}}\left({L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}}\left(i, j\right)\right), {L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}}\in \left[T, 255\right]\end{array}\right. $ (11)

其中:$ {\mathrm{C}}{\mathrm{D}}{\mathrm{F}}\left({L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}}\left(i, j\right)\right) $表示对于任意一个输入像素$ {L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}}\left(i, j\right) $的累加概率;$ {L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, {\mathrm{B}}{\mathrm{a}}{\mathrm{c}}{\mathrm{k}}{\mathrm{g}}{\mathrm{r}}{\mathrm{o}}{\mathrm{u}}{\mathrm{n}}{\mathrm{d}}} $$ {L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, {\mathrm{F}}{\mathrm{o}}{\mathrm{r}}{\mathrm{e}}{\mathrm{g}}{\mathrm{r}}{\mathrm{o}}{\mathrm{u}}{\mathrm{n}}{\mathrm{d}}} $分别表示校正后的前景和背景子图像。最终,L通道的基础层被校正为$ {L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}}^{{\mathrm{C}}}={L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, {\mathrm{B}}{\mathrm{a}}{\mathrm{c}}{\mathrm{k}}{\mathrm{g}}{\mathrm{r}}{\mathrm{o}}{\mathrm{u}}{\mathrm{n}}{\mathrm{d}}}+{L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}, {\mathrm{F}}{\mathrm{o}}{\mathrm{r}}{\mathrm{e}}{\mathrm{g}}{\mathrm{r}}{\mathrm{o}}{\mathrm{u}}{\mathrm{n}}{\mathrm{d}}} $

1.3.2 Gamma校正增强细节层

L通道的细节层包含大量的纹理信息,如图 1所示纹理信息较暗,因此如何有效提高纹理信息的亮度是突显细节的关键。Gamma校正作为一种有效的非线性变换算法,可用于调整细节层的动态范围以突显纹理结构。基于Gamma校正的原理,细节层的校正公式如下:

$ {L}_{{\mathrm{D}}{\mathrm{e}}{\mathrm{t}}{\mathrm{a}}{\mathrm{i}}{\mathrm{l}}}^{{\mathrm{G}}}={\left({L}_{{\mathrm{D}}{\mathrm{e}}{\mathrm{t}}{\mathrm{a}}{\mathrm{i}}{\mathrm{l}}}\right)}^{\gamma } $ (12)

其中:$ {L}_{{\mathrm{D}}{\mathrm{e}}{\mathrm{t}}{\mathrm{a}}{\mathrm{i}}{\mathrm{l}}} $表示$ L $通道细节层;$ {L}_{{\mathrm{D}}{\mathrm{e}}{\mathrm{t}}{\mathrm{a}}{\mathrm{i}}{\mathrm{l}}}^{{\mathrm{G}}} $表示Gamma校正的细节层。在Gamma校正中,当$ \gamma < 1 $时,低灰度区域的动态范围增加,高灰度区域的动态范围减小;当$ \gamma > 1 $时,低灰度区域的动态范围减小,高灰度区域的动态范围增加。在细节层中纹理信息相对于图像中的其它区域显然是高灰度区域,为了进一步增大高灰度区域的动态范围,因此在本文Gamma校正中$ \gamma > 1 $。实验结果表明,当$ \gamma =1.8 $时,细节层的纹理信息能够被较好地突显。最终,利用$ {L}^{{\mathrm{C}}}={L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}}^{{\mathrm{C}}}+{L}_{{\mathrm{B}}{\mathrm{a}}{\mathrm{s}}{\mathrm{e}}}^{{\mathrm{G}}} $累加获取增强的L通道,同时将图像从LAB颜色模型转换到RGB颜色模型以获得最终的增强图像。

2 实验结果与分析

为了验证ACHS算法的有效性,本文从UIEB[16]数据集中选出蓝色、绿色、黄色、模糊4类具有代表性的水下图像进行主观评估分析。UIEB包括890张不同退化程度的水下图像。同时,从3类经典算法选择7个代表性的算法进行对比实验。复原算法:HMU[6],GDCP[7];增强算法:REBE[9],BARU[11],CBAF[14];深度学习算法:WaterNet[16],UIEC^2-Net[18]。实验平台设置为:CPU八核3.6 GHz、内存32 GB;软件为Matlab R2015b,Windows 10操作系统。

2.1 参数选择

在UIEB数据集上,引导滤波中的参数选择评估结果如表 1所示,其中加粗数据表示最优数据。从中可知,当引入滤波中的局部窗口半径和正则化参数被设定为16和0.01时,定量评估指标PCQI、UCIQE和CCF能够获得最高和近似最高的值。因此,在本文分层设计中,$ r $$ \varepsilon $被设定为16和0.01。

下载CSV 表 1 在UIEB数据集上的参数选择评估结果 Table 1 Parameter selection evaluation result on UIEB dataset
2.2 主观评估

本文选择4类具有代表性的样本进行主观评估。蓝色、绿色、黄色和模糊水下图像示例分别如图 3~图 6所示(彩色效果见《计算机工程》官网HTML版)。由于版面有限,因此本文仅展示部分主观实验结果。

Download:
图 3 不同算法的实验结果(蓝色水下图像) Fig. 3 Experimental results of different algorithms (blue underwater images)
Download:
图 4 不同算法的实验结果(绿色水下图像) Fig. 4 Experimental results of different algorithms (green underwater images)
Download:
图 5 不同算法的实验结果(黄色水下图像) Fig. 5 Experimental results of different algorithms (yellow underwater images)
Download:
图 6 不同算法的实验结果(模糊水下图像) Fig. 6 Experimental results of different algorithms (blurred underwater images)

图 3所示的蓝色水下图像实例可知:GDCP加剧了颜色失真;虽然HUM提高了图像的对比度,但引入了微红色失真;REBE、BARU和CBAF移除了颜色失真,提高了对比度,但不能有效突显细节;WaterNet校正了颜色,提高了对比度,但是增强的图像出现了黑暗的外观;UIEC^2Net在颜色校正和对比度增强方面都展示了令人满意的结果,但是在细节增强方面劣于ACHS算法;ACHS具有较好主观视觉效果,突显了细节信息。

图 4所示的绿色水下图像实例可知:GDCP不能很好地移除绿色失真;虽然HUM移除了绿色失真,但引入了微红色失真;REBE、BARU和CBAF在颜色校正和对比度增强方面都展示了令人满意的结果,但是REBE结果局部过暗,BARU和CBAF引入了局部微红色;WaterNet结果局部过暗;UIEC^2-Net在对比度增强和细节突显方面差于ACHS算法。

图 5所示的黄色水下图像实例可知:GDCP、REBE和BARU在移除红色失真方面的结果并不理想;HUM引入了不想要的蓝色失真;WaterNet移除了黄色失真,但是不能有效提高图像的可视性;CBAF和UIEC2-Net移除了黄色失真,但是在细节突显和对比度增强方面差于ACHS算法。

图 6所示的模糊水下图像实例可知:GDCP、BARU、CBAF和WaterNet去模糊效果并不理想;UHM引入了红色失真;REBE结果局部过暗;UIEC^2-Net在对比度增强方面弱于ACHS算法。

综上所述,ACHS算法能够有效地移除水下图像的颜色失真,增强输出图像的对比度和细节。

2.3 客观评估

为进一步评估本文算法的有效性,选择全参考的图像质量评估指标:均方误差(MSE)[16],边缘强度(EI)[13]和局部批次对比度(PCQI)[20],以及非参考的评估指标:水下图像彩色质量指标(UCIQE)[21]和水下图像颜色、对比度以及雾的线性评估指标(CCF)[22]。其中:MSE的值越低表明增强算法的性能越好;EI、PCQI、UCIQE和CCF的值越高表明增强算法的性能越好。为了进一步说明客观评估的有效性,使用ACHS算法和对比算法测试整个UIEB数据集。不同算法的客观评估指标如表 2所示。

下载CSV 表 2 不同算法在UIEB数据集上的客观评估指标 Table 2 Objective evaluation metric of different algorithms tested on UIEB dataset

ACHS算法在客观评估方面具有近似最高和最高的EI、PCQI、UCIQE、CCF值以及最低的MSE值。此外,ACHS算法具有最高的平均评估指标。总体而言,ACHS算法不仅具有较好的主观视觉,而且还具有较好的客观评结果。

3 结束语

本文提出一种基于衰减补偿和直方图拉伸的水下图像增强算法ACHS。结合水下图像的衰减补偿和线性拉伸技术扩大图像的动态范围,进而移除水下图像的颜色失真。同时,通过增强亮度通道的基础层和细节层,增强图像的对比度和细节。实验结果表明,ACHS算法能够使增强的图像具有自然的颜色、较高的对比度和清晰的细节。此外,算法对于雾和低光照图像也具有一定的适用性。下一步将结合水下成像模型对水下图像进行视觉质量增强探索,并继续研究简单有效的水下图像增强方法。

参考文献
[1]
LI C Y, ANWAR S, HOU J H, et al. Underwater image enhancement via medium transmission-guided multi-color space embedding[J]. IEEE Transactions on Image Processing, 2021, 30: 4985-5000. DOI:10.1109/TIP.2021.3076367
[2]
ZHANG W D, DONG L L, PAN X P, et al. A survey of restoration and enhancement for underwater images[J]. IEEE Access, 2019, 7: 182259-182279. DOI:10.1109/ACCESS.2019.2959560
[3]
王红茹, 张弓, 卢道华, 等. 基于背景光估计与颜色修正的水下图像增强[J]. 计算机工程, 2020, 46(10): 253-258.
WANG H R, ZHANG G, LU D H, et al. Underwater image enhancement based on background light estimation and color correction[J]. Computer Engineering, 2020, 46(10): 253-258. (in Chinese)
[4]
BAI L F, ZHANG W D, PAN X P, et al. Underwater image enhancement based on global and local equalization of histogram and dual-image multi-scale fusion[J]. IEEE Access, 2020, 8: 128973-128990. DOI:10.1109/ACCESS.2020.3009161
[5]
LIU R S, FAN X, ZHU M, et al. Real-world underwater enhancement: challenges, benchmarks, and solutions under natural light[J]. IEEE Transactions on Circuits and Systems for Video Technology, 2020, 30(12): 4861-4875. DOI:10.1109/TCSVT.2019.2963772
[6]
LI C Y, GUO J C, GUO C L, et al. A hybrid method for underwater image correction[J]. Pattern Recognition Letters, 2017, 94: 62-67. DOI:10.1016/j.patrec.2017.05.023
[7]
PENG Y T, CAO K M, COSMAN P C. Generalization of the dark channel prior for single image restoration[J]. IEEE Transactions on Image Processing, 2018, 27(6): 2856-2868. DOI:10.1109/TIP.2018.2813092
[8]
YANG M, SOWMYA A, WEI Z Q, et al. Offshore underwater image restoration using reflection-decomposition-based transmission map estimation[J]. IEEE Journal of Oceanic Engineering, 2020, 45(2): 521-533. DOI:10.1109/JOE.2018.2886093
[9]
FU X Y, ZHUANG P X, HUANG Y, et al. A retinex-based enhancing approach for single underwater image[C]//Proceedings of IEEE International Conference on Image Processing. Washington D.C., USA: IEEE Press, 2014: 4572-4576.
[10]
邹沛煜, 张卫东, 史金余, 等. 基于高低频分量融合的水下图像增强算法[J]. 激光与光电子学进展, 2020, 57(16): 131-142.
ZOU P Y, ZHANG W D, SHI J Y, et al. Underwater image enhancement algorithm based on fusion of high and low frequency components[J]. Laser & Optoelectronics Progress, 2020, 57(16): 131-142. (in Chinese)
[11]
ZHUANG P X, LI C Y, WU J M. Bayesian Retinex underwater image enhancement[J]. Engineering Applications of Artificial Intelligence, 2021, 101: 1-10.
[12]
ZHANG W D, PAN X P, XIE X W, et al. Color correction and adaptive contrast enhancement for underwater image enhancement[J]. Computers & Electrical Engineering, 2021, 91: 1-10.
[13]
ZHANG W D, DONG L L, ZHANG T, et al. Enhancing underwater image via color correction and Bi-interval contrast enhancement[J]. Signal Processing: Image Communication, 2021, 90: 1-10.
[14]
ANCUTI C O, ANCUTI C, DE VLEESCHOUWER C, et al. Color balance and fusion for underwater image enhancement[J]. IEEE Transactions on Image Processing, 2018, 27(1): 379-393. DOI:10.1109/TIP.2017.2759252
[15]
陈学磊, 张品, 权令伟, 等. 融合深度学习与成像模型的水下图像增强算法[J]. 计算机工程, 2022, 48(2): 243-249.
CHEN X L, ZHANG P, QUAN L W, et al. Underwater image enhancement algorithm combining deep learning and image formation model[J]. Computer Engineering, 2022, 48(2): 243-249. (in Chinese)
[16]
LI C Y, GUO C L, REN W Q, et al. An underwater image enhancement benchmark dataset and beyond[J]. IEEE Transactions on Image Processing, 2020, 29: 4376-4389. DOI:10.1109/TIP.2019.2955241
[17]
GUO Y C, LI H Y, ZHUANG P X. Underwater image enhancement using a multiscale dense generative adversarial network[J]. IEEE Journal of Oceanic Engineering, 2020, 45(3): 862-870. DOI:10.1109/JOE.2019.2911447
[18]
WANG Y D, GUO J C, GAO H, et al. UIEC2-Net: CNN-based underwater image enhancement using two color space[J]. Signal Processing: Image Communication, 2021, 96: 1-10.
[19]
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
[20]
WANG S Q, MA K D, YEGANEH H, et al. A patch-structure representation method for quality assessment of contrast changed images[J]. IEEE Signal Processing Letters, 2015, 22(12): 2387-2390. DOI:10.1109/LSP.2015.2487369
[21]
YANG M, SOWMYA A. An underwater color image quality evaluation metric[J]. IEEE Transactions on Image Processing, 2015, 24(12): 6062-6071. DOI:10.1109/TIP.2015.2491020
[22]
WANG Y, LI N, LI Z Y, et al. An imaging-inspired no-reference underwater color image quality assessment metric[J]. Computers & Electrical Engineering, 2018, 70: 904-913. DOI:10.1016/j.compeleceng.2017.12.006