计算机应用   2017, Vol. 7 Issue (2): 564-568  DOI: 10.11772/j.issn.1001-9081.2017.02.0564 0

### 引用本文

MAN Le, ZHAO Yu, WANG Haoxian. Improved nonlinear brightness-lifting model for restoring backlight images[J]. JOURNAL OF COMPUTER APPLICATIONS, 2017, 7(2): 564-568. DOI: 10.11772/j.issn.1001-9081.2017.02.0564.

### 文章历史

Improved nonlinear brightness-lifting model for restoring backlight images
MAN Le, ZHAO Yu, WANG Haoxian
School of Information and Electrical Engineering, Harbin Institute of Technology(Weihai), Weihai Shandong 264209, China
Abstract: Photo observation and identification is often influenced by insufficient light and unsuitable shooting angle when taking photos. In order to solve this problem, an image restoration method based on nonlinear brightness-lifting model was proposed. Although the existing nonlinear brightness enhancement method can improve the brightness of the backlight area, distortion still occurs in the highlighted area due to excessive promotion. On the basis of the existing image processing algorithm, a new adaptive backlight images restoration method based on nonlinear brightness improvement model was proposed. Image segmentation processing and logarithmic function were used to enhance image brightness, in which the threshold was determined by Otsu threshold processing, and the adjustment coefficient in the transition function was calculated by the ratio between pixels of backlight area and total pixels. Simulation results show that, compared with the method of using the logarithmic function conversion relation and adjusting the image brightness in the HSI space model, the proposed method not only improves the image quality and preserves the nature of image without distortion, but also has a good improvement in performance.
Key words: backlight image    brightness    nonlinearity    adaptation    Otsu threshold processing
0 引言

 图 1 逆光条件下拍摄图像 Figure 1 Photos taken in backlight condition

1 现有的亮度调节模型

 图 2 彩色空间表示方式 Figure 2 Representations of color space

 $H = \left\{ {\begin{array}{*{20}{r}} {\theta ,B \le G}\\ {360 - \theta ,B > G} \end{array}} \right.$ (1)
 $S = 1 - \frac{3}{{(R + G + B)}}[\min (R,G,B)]$ (2)
 $I = \frac{1}{3}(R + G + B)$ (3)

 $\theta = \arccos \frac{{\frac{1}{2}[(R - G) + (R - B)]}}{{{{[{{(R - G)}^2} + (R - B)(G - B)]}^{\frac{1}{2}}}}}$ (4)

 ${g_n}\left( {x,y} \right) = Tr\left[ {{f_n}\left( {x,y} \right)} \right]$ (5)

1.1 分段线性调节

 ${g_n}(x,y) = \left\{ \begin{array}{r} {k_1} \times {f_n}(x,y) + {b_1},{f_n}(x,y) \le \tau \\ {k_2} \times {f_n}(x,y) + {b_2},{f_n}(x,y) > \tau \end{array} \right.$ (6)

 图 3 分段线性调节结果对比 Figure 3 Results comparison of segmented linear adjustment
1.2 非线性调节

 ${g_n}(x,y) = C \times {\rm{lb}}[D \times {f_n}(x,y) + 1]$ (7)

 $C = \frac{1}{{{\mathop{\rm l}\nolimits} {\rm{b}}(D + 1)}}$ (8)

 图 4 非线性调节结果对比 Figure 4 Results comparison of nonlinear adjustment
2 对非线性亮度调节的改进

2.1 分段阈值选取

T值的选取应该做到能有效区分逆光区域和非逆光区域，因此本文利用Otsu阈值分割方法[17]计算T，具体方法如下。设逆光图像大小为M×N像素，令{0,1/L，2/L，…,(L-1) /L}表示L个亮度级，ni表示亮度级为i的像素数，则图像像素总数MN=n0+n1+…+nL-1，令pi=ni/MN表示亮度级为i的像素占比，假设阈值T(0 ＜T＜(L-1) /L)把图像亮度分为两类C1C2(即逆光区域和非逆光区域)，则阈值T为能够使类间方差σB2达到最大的值，即令下式达到最大值:

 $\sigma _B^2(T) = \frac{{{{[{m_I}{P_1}(T) - m(T)]}^2}}}{{{P_1}(T)[1 - {P_1}(T)]}}$ (9)

 ${P_1}(T) = \sum\limits_{i = 0}^T {{p_i}}$ (10)
 $m(T) = \sum\limits_{i = 0}^T {i{p_i}}$ (11)
 ${m_I} = \sum\limits_{i = 0}^{L - 1} {i{p_i}}$ (12)
2.2 调节系数选取

 ${g_n}(x,y) = \left\{ \begin{array}{r} {C_1} \times {\mathop{\rm l}\nolimits} {\rm{b[}}{D_1} \times {f_n}(x,y) + 1],{f_n}(x,y) \le T\\ {C_2} \times {\mathop{\rm l}\nolimits} {\rm{b}}[{D_2} \times {f_n}(x,y) + 1],{f_n}(x,y) > T \end{array} \right.$ (13)
 ${C_i} = \frac{1}{{{\mathop{\rm l}\nolimits} {\rm{b}}({D_i} + 1)}};i = 1,2$ (14)

 ${D_i} = \left\{ \begin{array}{r} A,{f_n}(x,y) \le T,i = 1\\ \frac{{T \times A - T}}{{(1 - T){f_n}(x,y)}} - \frac{{T \times A - 1}}{{1 - T}},{f_n}(x,y) > T,i = 2 \end{array} \right.$ (15)

 $A = k \times \sqrt {\frac{{{n_{[{f_n}(x,y) \le T]}}}}{{MN - {n_{[{f_n}(x,y) \le T]}}}}}$ (16)

 图 5 本文算法流程 Figure 5 Flow of the proposed algorithm
3 结果及分析 3.1 恢复结果应用

 图 6 两种方法恢复结果对比 Figure 6 Comparison of recovery results by two methods

3.2 恢复效果判断准则

4 结语

 [1] 甘波, 魏廷存, 郑然. CMOS图像传感器芯片的自动白平衡算法[J]. 液晶与显示, 2011, 26 (2) : 224-228. ( GAN B, WEI T C, ZHENG R. Automatic white balance algorithm for CMOS image sensor chip[J]. Chinese Journal of Liquid Crystals and Displays, 2011, 26 (2) : 224-228. doi: 10.3788/YJYXS ) [2] 郭惠楠.彩色数字相机成像系统的关键性技术研究[D].西安:西安光学精密机械研究所,2014:18-22. ( GUO H N. Research on the key technology of color digital camera imaging system[D]. Xi'an:Xi'an Institute of Optics and Fine Mechanics, 2014:18-22. ) [3] 陈参宁, 邓华秋, 王剑华. 基于光圈控制的自动曝光算法研究[J]. 传感器与微系统, 2011, 30 (11) : 46-48. ( CHEN C N, DENG H Q, WANG J H. Research on automatic exposure algorithm based on iris control[J]. Transducer and Microsystem Technologies, 2011, 30 (11) : 46-48. ) [4] 刘操, 郑宏, 黎曦. 基于自适应亮度基准漂移的十字路口交通图像增强处理研究[J]. 武汉大学学报(信息科学版), 2015, 40 (10) : 1381-1385. ( LIU C, ZHENG H, LI X. Traffic image enhancement processing based on adaptive luminance reference drift[J]. Geomatics and Information Science of Wuhan University, 2015, 40 (10) : 1381-1385. ) [5] GRAHAM D, SCHWARZ B, CHATTERJEE A, et al. Preference for luminance histogram regularities in natural scenes[J]. Vision Research, 2016, 120 : 11-21. doi: 10.1016/j.visres.2015.03.018 [6] SANTHI K, WAHIDA B R S D. Contrast enhancement using brightness preserving histogram plateau limit technique[J]. International Journal of Engineering and Technology, 2014, 6 (3) : 1447-1453. [7] 杨俊, 赵忠明. 基于IHS变换和亮度调节的遥感图像融合方法[J]. 计算机应用研究, 2007, 24 (4) : 195-197. ( YANG J, ZHAO Z M. Research on remote sensing image fusion method based on IHS transform and brightness adjustment[J]. Application Research of Computers, 2007, 24 (4) : 195-197. ) [8] ZHANG H. A novel enhancement algorithm for low-illumination images[C]//CISP 2013:Proceedings of the 6th International Congress on Image and Signal Processing. Piscataway, NJ:IEEE, 2013:240-244. [9] 张雪峰, 赵莉. 基于改进Retinex的图像增强算法[J]. 南京理工大学学报(自然科学版), 2016, 40 (1) : 24-28. ( ZHANG X F, ZHAO L. Image enhancement algorithm based on improved Retinex[J]. Journal of Nanjing University of Science and Technology, 2016, 40 (1) : 24-28. ) [10] 刘毅, 贾旭芬, 田子建. 一种基于同态滤波原理的井下光照不均图像处理方法[J]. 工矿自动化, 2013, 39 (1) : 9-12. ( LIU Y, JIA X F, TIAN Z J. A processing method for underground image of uneven illumination based on homomorphic filtering theory[J]. Industry and Mine Automation, 2013, 39 (1) : 9-12. ) [11] KANG G-Y, HUANG J-W, LI D-H, et al. A novel algorithm for uneven illumination image enhancement[C]//IMCCC 2012:Proceedings of the Second International Conference on Instrumentation, Measurement Computer Communication and Control. Washington, DC:IEEE Computer Society, 2012:831-833. [12] WANG S, ZHENG J, HU H-M. Naturalness preserved enhancement algorithm for nonuniform illumination images[J]. IEEE Transactions on Image Processing, 2013, 22 (9) : 3538-3548. doi: 10.1109/TIP.2013.2261309 [13] SHIN Y, JEONG S, LEE S. Efficient naturalness restoration for nonuniform illumination images[J]. IET Image Processing, 2015, 9 (8) : 662-671. doi: 10.1049/iet-ipr.2014.0437 [14] YUN H J, WU Z Y, WANG G J, et al. A novel enhancement algorithm combined with improved fuzzy set theory for low illumination images[J]. Mathematical Problems in Engineering, 2016 (8) : 1-9. [15] GONZALEZ R C. Digital Image Processing[M]. New Jersey: Pearson Prentice Hall, 2008 : 257 -262. [16] 高彦平.图像增强方法的研究与实现[D].武汉:华中科技大学,2008:12-28. ( GAO Y P. Research and implementation of image enhancement method[D]. Wuhan:Huazhong University of Science and Technology, 2008:12-28. ) [17] SUSRAMA I G, PURNAMA K E, PURNOMO M H. Automated analysis of human sperm number and concentration (oligospermia) using Otsu threshold method and labelling[J]. IOP Conference Series:Materials Science and Engineering, 2016, 105 (1) : 12038-12048.