﻿ 基于改进DCP水下图像增强算法研究
 舰船科学技术  2022, Vol. 44 Issue (23): 132-136    DOI: 10.3404/j.issn.1672-7649.2022.23.026 PDF

Research on underwater image enhancement algorithm based on improved DCP
WU Zhe, GUO Wen-yong, CAO Cheng-hao
College of Power Engineering, Naval University of Engineering, Wuhan 430033, China
Abstract: In order to improve the maintenance support ability of shipmen to ships, especially the inspection, cleaning, cutting or maintenance of underwater parts and auxiliary devices of ships, and underwater visual aids are needed. In view of the shortcomings of underwater images, such as low definition, fuzzy, serious color deviation, low contrast, dark brightness and so on. Based on the in-depth analysis of common image enhancement algorithms, after screening, the improved dark channel first algorithm is used to enhance the underwater image, improve the contrast of underwater image and correct the color of underwater image to adapt to the acquisition of image information by human eyes. Firstly, the traditional dark channel a priori algorithm is used to correct the image color, so that the image looks more uniform and has higher contrast. Then the dark channel prior algorithm is improved, and the transmission rate of the improved algorithm model is higher, PSNR is more balanced, the noise in the picture is smaller and clearer, which can meet the observation requirements of underwater images.
Key words: ship maintenance support     underwater image     contrast ratio     color correction     transmit rate
0 引　言

1 影响水下图像质量的因素

 图 1 水下图像形成过程 Fig. 1 Underwater image formation process

 $L = {L_0}{e^{ - cr}}。$ (1)

 $L\left( {x,\lambda } \right) = {L_0}\left( {x,\lambda } \right){e^{ - a\left( \lambda \right)r\left( x \right)}}。$ (2)

 $L\left( {x,\lambda } \right) = {L_0}\left( {x,\lambda } \right){e^{ - b\left( \lambda \right)r\left( x \right)}}，$ (3)

 $L\left( {x,\lambda } \right) = {L_0}\left( {x,\lambda } \right){e^{ - c\left( \lambda \right)r\left( x \right)}}。$ (4)

2 传统暗通道先验算法的应用

 图 2 实验水箱 Fig. 2 The water tank

 ${I_\lambda }\left( x \right) = {J_\lambda }\left( x \right){t_\lambda }\left( x \right) + {B_{\lambda ,\infty }}\left( {1 - {t_\lambda }\left( x \right)} \right)。$ (5)

 ${J^{dark}}\left( x \right) = \mathop {\min }\limits_{y \in \Omega \left( x \right)} \left( {\mathop {\min }\limits_{c \in \left\{ {r,g,b} \right\}} {J^c}\left( y \right)} \right)。$ (6)

 图 3 原图及暗通道图 Fig. 3 Original drawing and dark channel drawing

 图 4 暗通道先验算法流程图 Fig. 4 Flow chart of dark channel a priori algorithm

 \begin{aligned}[b] & \mathop {\min }\limits_{x \in \varOmega \left( y \right)} \left( {\mathop {\min }\limits_{\lambda \in \left( {r,g,b} \right)} {I_\lambda }\left( x \right)} \right) = \mathop {\min }\limits_{x \in \varOmega \left( y \right)} \left[ {\mathop {\min }\limits_{\lambda \in \left( {r,g,b} \right)} \left( {{J_\lambda }\left( x \right){t_\lambda }\left( x \right)} \right)} \right] + \\ & \mathop {\min }\limits_{x \in \varOmega \left( y \right)} \left[ {\mathop {\min }\limits_{\lambda \in \left( {r,g,b} \right)} \left( {{B_{\lambda ,\infty }}\left( {1 - {t_\lambda }\left( x \right)} \right)} \right)} \right]。\end{aligned} (7)

 $t\left( x \right){\text{ = }}1 - \mathop {\min }\limits_{x \in \varOmega \left( y \right)} \left( {\mathop {\min }\limits_{\lambda \in \left( {r,g,b} \right)} \frac{{{I_\lambda }\left( x \right)}}{{{B_{\lambda ,\infty }}}}} \right)。$ (8)

 $t\left( x \right){\text{ = }}1 - \omega \mathop {\min }\limits_{x \in \varOmega \left( y \right)} \left( {\mathop {\min }\limits_{\lambda \in \left( {r,g,b} \right)} \frac{{{I_\lambda }\left( x \right)}}{{{B_{\lambda ,\infty }}}}} \right)。$ (9)

 ${J_\lambda }\left( x \right) = \frac{{{I_\lambda }\left( x \right) - {B_{\lambda ,\infty }}}}{{\max \left( {t\left( x \right),{t_0}} \right)}} + {B_{\lambda ,\infty }} 。$ (10)

 图 5 水下图像处理结果 Fig. 5 Underwater image processing results

 图 6 改进后算法流程图 Fig. 6 Flowchart of the improved algorithm

3 改进暗通道先验理论

 $satuationg{\text{ = max}}\left( {R,G,B} \right) - \min \left( {R,G,B} \right)。$ (11)

 $satuation{g_{low}}=\rho \bullet {\text{avg}}\left( {satuationg} \right)。$ (12)

 $\mathop {\min }\limits_{x \in \varOmega \left( y \right)} \frac{{{I_\lambda }\left( x \right)}}{{{B_{\lambda ,\infty }}}} = \mathop {\min }\limits_{x \in \varOmega \left( y \right)} \frac{{{J_\lambda }\left( x \right){t_\lambda }\left( x \right)}}{{{B_{\lambda ,\infty }}}} + 1 - {t_\lambda }\left( x \right)，$ (13)

 \begin{aligned}[b] \mathop {\min }\limits_{\lambda \in \left\{ {r,g,b} \right\}} \left[ {\mathop {\min }\limits_{x \in \varOmega \left( y \right)} \frac{{{I_\lambda }\left( x \right)}}{{{B_{\lambda ,\infty }}}}} \right] = & \mathop {\min }\limits_{\lambda \in \left\{ {r,g,b} \right\}} \left[ {\mathop {\min }\limits_{x \in \varOmega \left( y \right)} \frac{{{J_\lambda }\left( x \right){t_\lambda }\left( x \right)}}{{{B_{\lambda ,\infty }}}}} \right] +\\ & 1 - \mathop {\min }\limits_{\lambda \in \left\{ {r,g,b} \right\}} \left[ {{t_\lambda }\left( x \right)} \right] ，\end{aligned} (14)

 $\mathop {\min }\limits_{\lambda \in \left\{ {r,g,b} \right\}} \left[ {{t_\lambda }\left( x \right)} \right]{\text{ = 1}} - \mathop {\min }\limits_{\lambda \in \left\{ {r,g,b} \right\}} \left[ {\mathop {\min }\limits_{x \in \varOmega \left( y \right)} \frac{{{I_\lambda }\left( x \right)}}{{{B_{\lambda ,\infty }}}}} \right]。$ (15)

 图 7 三通道颜色传输图 Fig. 7 Three- channel color transmission diagram

3.1 水下图像场景还原

 图 8 场景还原图 Fig. 8 Scene restoration diagram
3.2 颜色校正

3.3 水下图像试验

 ${R_{avg}} = \frac{1}{{MN}}\sum\limits_{i = 1}^M {\sum\limits_{j = 1}^N {{I_r}\left( {i,j} \right)} } ，$ (16)
 ${G_{avg}} = \frac{1}{{MN}}\sum\limits_{i = 1}^M {\sum\limits_{j = 1}^N {{I_g}\left( {i,j} \right)} }，$ (17)
 ${B_{avg}} = \frac{1}{{MN}}\sum\limits_{i = 1}^M {\sum\limits_{j = 1}^N {{I_b}\left( {i,j} \right)} }。$ (18)

 $gainA = \frac{{\max \left( {{R_{avg}},{G_{avg}},{B_{avg}}} \right)}}{{\min \left( {{R_{avg}},{G_{avg}},{B_{avg}}} \right)}}，$ (19)
 $gainB = \frac{{\max \left( {{R_{avg}},{G_{avg}},{B_{avg}}} \right)}}{{{m} ed\left( {{R_{avg}},{G_{avg}},{B_{avg}}} \right)}}。$ (20)

 $\begin{gathered} {{\tilde I}_{\min }}\left( {{R_{avg}},{G_{avg}},{B_{avg}}} \right) = gainA \times \\ {I_{\min }}\left( {{R_{avg}},{G_{avg}},{B_{avg}}} \right)，\\ \end{gathered}$ (21)
 $\begin{gathered} {{\tilde I}_{{m} {\text{ed}}}}\left( {{R_{avg}},{G_{avg}},{B_{avg}}} \right) = gainB \times \\ {I_{{m} ed}}\left( {{R_{avg}},{G_{avg}},{B_{avg}}} \right)。\\ \end{gathered}$ (22)

 图 9 改进后算法处理结果 Fig. 9 Processing results of improved algorithm
4 结　语

 [1] 朱振杰. 基于视觉的水下目标识别系统研究[D]. 镇江: 江苏科技大学, 2010, 46(9): 19–25. [2] 孙贝. 基于视觉的水下目标识别算法研究[D]. 哈尔滨: 哈尔滨工业大学, 2017. [3] 郝琨, 王阔, 赵璐, 等. 基于图像增强与改进YOLOv3的生物检测算法[J]. 吉林大学学报(工学版), 2022, 52(5): 1088-1097. HAO KUN, WANG KUO, ZHAO LU, et al. Biological detection algorithm based on image enhancement and improved yolov3 [J]. Journal of Jilin University (Engineering and Technology Edition), 2022, 52(5): 1088-1097. [4] 张阳, 徐爽, 朱建军, 等. 水下视觉SLAM图像增强研究[J]. 信息技术, 2015(5): 25-30. ZHANG Yang, XU Shuang, ZHU Jian-jun, et al. Research on underwater visual slam image enhancement[J]. Information technology, 2015(5): 25-30. [5] 陈超. 水下图像增强算法研究及其应用[D]. 大连: 大连理工大学, 2016. [6] 宋鑫, 熊淑华, 何小海, 等. 基于HSI空间的Retinex低照度图像增强算法[J]. 图像与信号处理, 2017, 6(1): 29-36. SONG Xin, XIONG Shu-hua, HE Xiao-hai, et al. Retinex low illumination image enhancement algorithm based on HSI space[J]. Image and Signal Processing, 2017, 6(1): 29-36. DOI:10.12677/JISP.2017.61004 [7] 宋绍剑, 朱靖旭. 基于Mask R-CNN和迁移学习的水下生物目标识别研究[J]. 计算机应用研究, 2020, 31(S02): 386-388+391. Song Shaojian, Zhu Jingxu. Research on underwater biological target recognition based on mask r-cnn and transfer learning [J]. Computer Application Research, 2020, 31(S02): 386-388+391. [8] 徐萌. 基于机器视觉的水下海参图像识别技术研究[D]. 济南: 山东大学, 2020. [9] 张琦, 张荣梅, 陈彬. 基于深度学习的医疗影像识别技术研究综述[J]. 河北省科学院学报, 2020, v.37(133): 5-12. [10] 周星宇. 水下目标运动要素辨识及搜索策略研究[D]. 哈尔滨: 哈尔滨工程大学. [11] YU S C, KIM T W , MARANI G , et al. Real-time 3D sonar image recognition for underwater vehicles[C]// Symposium on Underwater Technology & Workshop on Scientific Use of Submarine Cables & Related Technologies. IEEE, 2007: 142–146. [12] JIN L, HONG L. Deep learning for underwater image recognition in small sample size situations[C]// Oceans. IEEE, 2017. [13] ZHAO M, HU C, WEI F, et al. Real-time underwater image recognition with FPGA embedded system for convolutional neural network[J]. Sensors, 2019, 19(2): 350. DOI:10.3390/s19020350