Retinex mine image enhancement algorithm based on TopHat weighted guided filtering
-
摘要: 煤矿井下光源分布不均、整体光线弱导致图像亮度低、不清晰,传统Retinex算法在处理矿井低照度图像时存在细节丢失、边缘模糊和光晕等问题。针对上述问题,提出了一种基于TopHat加权引导滤波的Retinex算法(THWGIF−Retinex)对矿井图像进行增强。首先将图像从RGB空间转换到HSV空间,并将其分离成色调、饱和度、亮度3个通道分量。其次,利用TopHat变换改进加权引导滤波的权重因子,进而从亮度分量中提取出图像的光照分量,实现光照分量的边缘增强。然后,采用自适应Gamma校正函数校正光照分量和饱和度分量,并通过Retinex算法从光照分量中获取反射分量,进一步提升图像光源处的细节和色彩效果;最后,合并色调分量、校正后的饱和度分量、反射分量并转换到RGB空间,得到增强的矿井图像。从主观评价和客观评价2个方面对THWGIF−Retinex算法、多尺度Retinex(MSR)算法、加权引导滤波的Retinex(WGIF−Retinex)算法进行对比验证。主观评价结果表明:对于无强光直射的矿井低照度原始图像,经THWGIF−Retinex算法增强后的图像色彩还原度较高,且图像边缘更清晰,视觉效果明显增强。对于有强光直射的矿井低照度原始图像,THWGIF−Retinex算法对光晕有很好的改善效果,且在还原暗区域的细节信息和清晰度上优于WGIF−Retinex算法。客观评价结果表明:对于无强光直射的矿井低照度图像,经THWGIF−Retinex算法增强后的图像信息熵提高了12.50%,平均梯度提高了109.07%,标准差提高了52.44%,无参考结构清晰度(NRSS)提高了45.46%。对于有强光直射的矿井低照度图像,与MSR算法相比,经THWGIF−Retinex算法增强后的图像信息熵提高了1.24%,平均梯度提高了81.44%,标准差提高了18.23%,NRSS提高了36.67%;与WGIF−Retinex算法相比,THWGIF−Retinex算法在信息熵方面有所降低,但在平均梯度和NRSS方面有较大改善,分别提高了72.34%和23.87%。
-
关键词:
- 矿井图像增强 /
- 矿井低照度图像 /
- TopHat加权引导滤波 /
- Retinex /
- 自适应Gamma校正
Abstract: The uneven distribution of light sources and weak light in coal mines lead to low brightness and unclear image. The traditional Retinex algorithm has the problems of detail loss, edge blur and halo when processing low illumination images of coal mines. In order to solve the above problems, a new algorithm named THWGIF-Retinex based on TopHat weighted guided filtering is proposed to enhance the mine image. Firstly, the image is transformed from RGB space to HSV space. Then the image is separated into three channel components of hue, saturation and brightness. Secondly, the TopHat transform is used to improve the weight factor of the weighted guided filtering. The illumination component of the image is extracted from the brightness component. The edge enhancement of the brightness component is realized. Thirdly, the illumination component and the saturation component are corrected by adopting a self-adaptive gamma correction function. The reflection component is obtained from the illumination component by the Retinex algorithm. The details and color effect of the image light source are further improved. Finally, the hue component, the corrected saturation component and the reflection component are combined and converted to RGB space to obtain an enhanced mine image. The THWGIF-Retinex algorithm, multi-scale Retinex (MSR) algorithm and weighted guided filtering Retinex (WGIF-Retinex) algorithm are compared and verified from subjective evaluation and objective evaluation. The subjective evaluation results show that the original image of low illumination without strong light is enhanced by the THWGIF-Retinex algorithm. The color reproduction degree of the image is higher, the image edge is clearer, and the visual effect is obviously enhanced. The THWGIF-Retinex algorithm has a good effect on halo reduction for the mine low-illumination original image with strong light. The THWGIF-Retinex algorithm is better than the WGIF-Retinex algorithm in restoring the details and clarity of dark areas. The objective evaluation results show that the information entropy, the average gradient, the standard deviation and the no-reference structural sharpness (NRSS) of the image enhanced by the THWGIF-Retinex algorithm are increased by 12.50%, 109.07%, 52.44% and 45.46% respectively for the low illumination images without strong light. Compared with the MSR algorithm, the information entropy, average gradient, standard deviation and NRSS of the image enhanced by the THWGIF-Retinex algorithm are increased by 1.24%, 81.44%, 18.23% and 36.67% respectively for the mine low illumination image with strong light. Compared with the WGIF-Retinex algorithm, the THWGIF-Retinex algorithm has lower information entropy. However, the average gradient and NRSS are improved by 72.34% and 23.87% respectively. -
表 1 矿井图像1客观评价结果
Table 1. Objective evaluation results of mine image 1
图像 信息熵 平均梯度 标准差 NRSS 原始图像 6.427 9 3.599 5 26.060 7 0.428 2 MSR算法增强后图像 6.839 3 3.887 1 32.778 3 0.422 7 WGIF−Retinex算法增强后图像 7.311 7 5.347 2 40.859 0 0.551 2 THWGIF−Retinex算法增强后图像 7.231 6 7.525 6 39.728 8 0.622 9 表 2 矿井图像2客观评价结果
Table 2. Objective evaluation results of mine image 2
图像 信息熵 平均梯度 标准差 NRSS 原始图像 6.511 8 4.855 3 33.418 9 0.399 5 MSR算法增强后图像 7.263 5 4.984 2 36.312 5 0.442 0 WGIF−Retinex算法增强后图像 7.455 9 5.247 3 46.694 2 0.487 7 THWGIF−Retinex算法增强后图像 7.355 0 9.043 4 42.932 8 0.604 1 -
[1] 尹小英. 浅析智慧矿山综合监控系统设计[J]. 内蒙古煤炭经济,2020(20):127-128. doi: 10.3969/j.issn.1008-0155.2020.20.063YIN Xiaoying. Brief analysis on the design of intelligent mine comprehensive monitoring system[J]. Inner Mongolia Coal Economy,2020(20):127-128. doi: 10.3969/j.issn.1008-0155.2020.20.063 [2] 刘晓阳,乔通,乔智. 基于双边滤波和Retinex算法的矿井图像增强方法[J]. 工矿自动化,2017,43(2):49-54.LIU Xiaoyang,QIAO Tong,QIAO Zhi. Image enhancement method of mine based on bilateral filtering and Retinex algorithm[J]. Industry and Mine Automation,2017,43(2):49-54. [3] 张立亚,郝博南,孟庆勇,等. 基于HSV空间改进融合Retinex算法的井下图像增强方法[J]. 煤炭学报,2020,45(增刊1):532-540. doi: 10.13225/j.cnki.jccs.2020.0514ZHANG Liya,HAO Bonan,MENG Qingyong,et al. Method of image enhancement in coal mine based on improved Retinex fusion algorithm in HSV space[J]. Journal of China Coal Society,2020,45(S1):532-540. doi: 10.13225/j.cnki.jccs.2020.0514 [4] HU Haokun, CAO Wei, YUAN Jieyu, et al. A low-illumination image enhancement algorithm based on morphological-Retinex(MR) operator[C].IEEE/ACIS 6th International Conference on Big Data, Cloud Computing, and Data Science, Zhuhai, 2021: 66-72. [5] 智宁,毛善君,李梅. 基于照度调整的矿井非均匀照度视频图像增强算法[J]. 煤炭学报,2017,42(8):2190-2197.ZHI Ning,MAO Shanjun,LI Mei. Enhancement algorithm based on illumination adjustment for non-uniform illuminance video images in coal mine[J]. Journal of China Coal Society,2017,42(8):2190-2197. [6] 李晓宇,吕进来,郝晓丽. 一种改进的Retinex矿井图像增强算法[J]. 科学技术与工程,2020,20(29):12028-12034. doi: 10.3969/j.issn.1671-1815.2020.29.030LI Xiaoyu,LYU Jinlai,HAO Xiaoli. An improved enhancement algorithm of mine image based on Retinex[J]. Science Technology and Engineering,2020,20(29):12028-12034. doi: 10.3969/j.issn.1671-1815.2020.29.030 [7] MU Qi,WANG Xinyue,WEI Yanyan,et al. Low and non-uniform illumination color image enhancement using weighted guided image filtering[J]. Computational Visual Media,2021,7(4):529-546. doi: 10.1007/s41095-021-0232-x [8] WANG Guoqing,WANG Jun,LI Ming,et al. Hand vein image enhancement based on multi-scale top-hat transform[J]. Cybernetics and Information Technologies,2016,16(2):125-134. doi: 10.1515/cait-2016-0025 [9] SHI Haiyan,NGAIMING K,GU Fang,et al. Gradient-guided color image contrast and saturation enhancement[J]. International Journal of Advanced Robotic Systems,2017,14(3):1-5. [10] 李鹏飞,何小海,卿粼波,等. 暗通道融合亮通道优化的夜间图像去雾算法[J]. 液晶与显示,2021,36(4):596-604. doi: 10.37188/CJLCD.2020-0208LI Pengfei,HE Xiaohai,QING Linbo,et al. Nighttime dehazing algorithm of dark channel and bright channel fusion optimization[J]. Chinese Journal of Liquid Crystals and Displays,2021,36(4):596-604. doi: 10.37188/CJLCD.2020-0208 [11] 刘颖,刘佳琳,刘卫华,等. 基于加权引导滤波的Retinex刑侦图像增强[J]. 西安邮电大学学报,2018,23(5):30-36.LIU Ying,LIU Jialin,LIU Weihua,et al. A Retinex criminal investigation image enhanced algorithm based on weighted guided filtering[J]. Journal of Xi'an University of Posts and Telecommunications,2018,23(5):30-36. [12] 许凤麟,苗玉彬,张铭. 基于彩色加权引导滤波−Retinex算法的导航图像增强[J]. 上海交通大学学报,2019,53(8):921-927.XU Fenglin,MIAO Yubin,ZHANG Ming. Navigation image enhancement based on color weighted guided image filtering-Retinex algorithm[J]. Journal of Shanghai Jiaotong University,2019,53(8):921-927. [13] 汤子麟,刘翔,张星. 光照不均匀图像的自适应增强算法[J]. 计算机工程与应用,2021,57(21):216-223. doi: 10.3778/j.issn.1002-8331.2010-0368TANG Zilin,LIU Xiang,ZHANG Xing. Adaptive enhancement algorithm for non-uniform illumination images[J]. Computer Engineering and Applications,2021,57(21):216-223. doi: 10.3778/j.issn.1002-8331.2010-0368 [14] HERRERA-ARELLANO M A,PEREGRINA-BARRETO H,TEROL-VILLALOBOS I. Visible-NIR image fusion based on top-hat transform[J]. IEEE Transactions on Image Processing,2021,30:4962-4972. doi: 10.1109/TIP.2021.3077310 [15] SENGUPTA D,BISWAS A,GUPTA P. Non-linear weight adjustment in adaptive gamma correction for image contrast enhancement[J]. Multimedia Tools and Applications,2021,80(3):3835-3862. doi: 10.1007/s11042-020-09583-1 [16] 龙鑫,何国田. 基于多层融合和细节恢复的图像增强方法[J]. 计算机应用研究,2020,37(2):584-587.LONG Xin,HE Guotian. Image enhancement method based on multi-layer fusion and detail restoration[J]. Application Research of Computers,2020,37(2):584-587. [17] WANG Ping,WANG Zhiwen,LYU Dong,et al. Low illumination color image enhancement based on Gabor filtering and Retinex theory[J]. Multimedia Tools and Applications,2021,80(4):17705-17719. [18] ZHAO Chaoyue,JIA Ruisheng,LIU Qingming,et al. Image dehazing method via a cycle generative adversarial network[J]. IET Image Processing,2020,14(2):4240-4247. [19] 陈宏辉,胡小平,彭向前. 基于改进MSR的小波变换图像增强算法[J]. 计算机科学与应用,2021,11(4):1149-1156. doi: 10.12677/CSA.2021.114118CHEN Honghui,HU Xiaoping,PENG Xiangqian. Wavelet transform image enhancement algorithm based on improved MSR[J]. Computer Science and Application,2021,11(4):1149-1156. doi: 10.12677/CSA.2021.114118 [20] 景文博,邹欢欢,张家铭,等. 基于相位差异法的简易光学系统的图像复原方法[J]. 光子学报,2019,48(9):87-98.JING Wenbo,ZOU Huanhuan,ZHANG Jiaming,et al. Simple optical system image restoration method based on phase diversity[J]. Acta Photonica Sinica,2019,48(9):87-98.