一种暗通道优先的快速自动白平衡算法

王飞, 王伟. 一种暗通道优先的快速自动白平衡算法[J]. 光电工程, 2018, 45(1): 170549. doi: 10.12086/oee.2018.170549
引用本文: 王飞, 王伟. 一种暗通道优先的快速自动白平衡算法[J]. 光电工程, 2018, 45(1): 170549. doi: 10.12086/oee.2018.170549
Wang Fei, Wang Wei. An automatic white balance method via dark channel prior[J]. Opto-Electronic Engineering, 2018, 45(1): 170549. doi: 10.12086/oee.2018.170549
Citation: Wang Fei, Wang Wei. An automatic white balance method via dark channel prior[J]. Opto-Electronic Engineering, 2018, 45(1): 170549. doi: 10.12086/oee.2018.170549

一种暗通道优先的快速自动白平衡算法

详细信息
    作者简介:
  • 中图分类号: TP391.41

An automatic white balance method via dark channel prior

More Information
  • 针对目前自动白平衡算法中存在的白色区域检测错误导致白平衡失效的问题,本文提出了一种基于暗通道优先的白平衡算法。首先估计光线透射率,然后根据光线透射率来提取白色区域,去除掉高饱和度的区域。最后为了校正颜色并保证图像亮度不变化,在CIE-XYZ颜色空间相对于亮度通道Y来计算校正增益。实验表明,本文的算法和现有的一些经典算法相比,在主观视觉和客观评价上都取得了较好的效果,且在嵌入式设备上速率大于150 frames /s。

  • Overview: Color is an important feature in the field of computer vision, as it relates to the practical vision problems such as designing an object recognition or classification tasks. For human beings, the brain will let people feel who is in a natural white light environment, while this is difficult for a computer, Given a pixel with blue color, how can a computer distinguish that the color is resulted by a white object under a blue lighting source or a blue object under a white lighting source? In order to address this question, we need to remove illuminated color of the light source, which is specified as white balance problem. In general, there are three types of color constancy approaches, summarized as statistics-based, traditional learning based and deep learning based ones, respectively. Although the latter two have achieved excellent results, but due to the low speed, it is not practical. The statistics-based method has the problem of white region or white points detection error which leads to white balance failure. In order to solve this problem this paper proposes a white balance method based on dark channel prior. First, get the dark channel image, extract the white region in the image according to the dark channel, and then remove the region with high saturation. Finally, in order to correct the color and ensure that the image brightness does not change, we calculate the correction gain in the CIE-XYZ color space relative to the luminance channel Y. By removing the region with high saturation, we define a threshold transformation. Through a large number of experiments, we obtain a threshold K which can effectively eliminate the high light area, and this makes the white area more stable. In order to make the algorithm run on a low frequency ARM, we tested the white balance effect under different down sampling which shows that the speed is only 5ms under the size of 1/16, and the effect does not have much impact. Experimental results show that our algorithm has achieved good results both in subjective and objective evaluation compared with some classical algorithms. Meanwhile, we compared our method with a Nikon camera. Our method is excellent, and it's better than Canon in detail. We use our algorithm instead of the white balance algorithm in HI3516D. The test shows that our method can achieve 150 frame/sec and the effect is better than the algorithm in HI3516D.

  • 加载中
  • 图 1  白色区域提取过程。(a)原始偏色图像;(b)暗通道图像;(c)估计出的光透射模型;(d)为最终提取的为稳定的白色区域。(图中红色框的区域从视觉来看是很明显的过饱和的区域,本文的算法在提取白色区域的时候有效的排除了这部分区域)

    Figure 1.  White region extraction process. (a) Original color cast image. (b) Dark channel image. (c) Light transmission model; (d) The final stable white region. (The region of the red frame from the visual point of view is very obvious in the supersaturated region, and our algorithm effectively eliminates this part of the region when extracting white regions.)

    图 2  不同阈值K的取值时的误差比较

    Figure 2.  Error comparison of different K values

    图 3  室内图片五种白平衡算法对比效果图。(a)原始图像(53.95);(b) GWM (26.92);(c) PRM (27.02);(d) Grey-Edge (19.11);(e) Ada-Threshold (22.80);(f)本文算法(11.91)

    Figure 3.  White balance results of the indoor image using five different automatic white balance methods. (a) Original image (53.95); (b) GWM (26.92); (c) PRM (27.02); (d) Grey-Edge (19.11); (e) Ada-Threshold (22.80); (f) Our method(11.91).

    图 4  室外图片白平衡算法对比效果图。(a)原始图像(59.03);(b) G WM (11.40);(c) PRM (11.70);(d) Grey-Edge (5.02);(e) Ada-Threshold (8.06);(f)本文算法(4.12)

    Figure 4.  White balance results of the outdoor image using five different automatic white balance methods. (a) Original image (59.03); (b) GWM (11.40); (c) PRM (11.70); (d) Grey-Edge (5.02); (e) Ada-Threshold (8.06); (f) Our method (4.12)

    图 5  尼康D7100白平衡与本文算法的比较。(a), (d)原始图像;(b), (e)相机白平衡;(c), (f)本文白平衡

    Figure 5.  White balance results using Nikon D7100 and our method. (a), (d) Original image; (b), (e) D7100 auto white balance; (c), (f) Our auto white balance

    图 6  HI3516D白平衡与本文算法的比较。(a), (d)原始图像;(b), (e) HI3516D白平衡;(c), (f)本文白平衡

    Figure 6.  White balance results using HI3516D and our method. (a), (d) Original image; (b), (e) HI3516D auto white balance; (c), (f) Our auto white balance

    表 1  算法在不同下采样下误差及耗时

    Table 1.  Error and speed of our method

    下采样比例 最大误差 最小误差 平均误差 耗时/ms
    1 12.48 2.00 6.40 96
    1/2 12.16 2.44 6.70 31
    1/4 12.56 2.23 6.63 22
    1/8 12.56 2.82 6.92 11
    1/16 13.22 2.44 6.85 5
    1/32 13.37 3.31 7.28 4
    下载: 导出CSV

    表 2  几种白平衡算法误差比较

    Table 2.  Max/Min/Mean error of white balance on testing

    Dataset GWM
    Min/Max/Mean
    PRM
    Min/Max/Mean
    Ada-Threshold
    Min/Max/Mean
    Grey-Edge
    Min/Max/Mean
    Our method
    Min/Max/Mean
    Indoor(18) 16.06/33.07/21.13 14.14/34.05/23.02 4.24/31.08/18.14 4.58/26.09/12.48 4.35/14.49/10.53
    Outdoor(30) 8.06/20.29/12.32 9.38/23.06/16.24 5.38/16.40/9.38 1.41/13.33/7.41 1.41/11.09/5.29
    Other (20) 8.60/19.94/14.17 7.61/28.17/20.19 2.23/17.29/11.95 2.0/16.30/6.40 2.44/10.44/5.83
    下载: 导出CSV
  • [1]

    Lukac R. Refined automatic white balancing[J]. Electronics Letters, 2007, 43 (8): 445-446. doi: 10.1049/el:20070142

    [2]

    Zhang B Y, Batur A U. A real-time auto white balance algorithm for mobile phone cameras[C]//Proceedings of 2012 IEEE International Conference on Consumer Electronics, 2012: 1-4.http://ieeexplore.ieee.org/abstract/document/6161743/

    [3]

    Buchsbaum G. A spatial processor model for object colour perception[J]. Journal of the Franklin Institute, 1980, 310 (1): 1-26. doi: 10.1016/0016-0032(80)90058-7

    [4]

    Liu Y C, Chan W H, Chen Y Q. Automatic white balance for digital still camera[J]. IEEE Transactions on Consumer Electronics, 1995, 41 (3): 460-466. doi: 10.1109/30.468045

    [5]

    Weng C C, Chen N H, Fuh C S. A novel automatic white balance method for digital still cameras[C]//Proceedings of IEEE International Symposium on Circuits and System, 2005, 4: 3801-3804.http://ieeexplore.ieee.org/abstract/document/1465458/

    [6]

    Dong C, Loy C C, He Kaiming, et al. Learning a deep convolutional network for image super-resolution[M]//FLEET D, PAJDLA T, SCHIELE B, et al. Computer Vision-ECCV 2014. Cham: Springer, 2014: 184-199.

    [7]

    Cheng D L, Price B, Cohen S, et al. Effective learning-based illuminant estimation using simple features[C]//Proceedings of 2015 IEEE Conference on Computer Vision and Pattern Recognition, 2015: 1000-1008.

    [8]

    Barron J T. Convolutional color constancy[C]//Proceedings of 2015 IEEE International Conference on Computer Vision, 2015: 379-387.

    [9]

    Barron J T. Convolutional color constancy[C]//Proceedings of 2015 IEEE International Conference on Computer Vision, 2015: 379-387.

    [10]

    Liu Y C, Chan W H, Chen Y Q. Automatic white balance for digital still camera[J]. IEEE Transactions on Consumer Electronics, 1995, 41(3): 460-466. doi: 10.1109/30.468045

    [11]

    He K M, Sun J, Tang X O. Single image haze removal using dark channel prior[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2011, 33(12): 2341-2353. doi: 10.1109/TPAMI.2010.168

    [12]

    Yeh C H, Kang L W, Lee M S, et al. Haze effect removal from image via haze density estimation in optical model[J]. Optics Express, 2013, 21(22): 27127-27141. doi: 10.1364/OE.21.027127

    [13]

    Gehler P V, Rother C, Blake A, et al. Bayesian color constancy revisited[C]//Proceedings of IEEE Conference on Computer Vision and Pattern Recognition, 2008: 1-8.http://ieeexplore.ieee.org/abstract/document/4587765/

    [14]

    Cheng D L, Prasad D K, Brown M S. Illuminant estimation for color constancy: why spatial-domain methods work and the role of the color distribution[J]. Journal of the Optical Society of America A, 2014, 31 (5): 1049-1058. doi: 10.1364/JOSAA.31.001049

  • 加载中

(6)

(2)

计量
  • 文章访问数:  7391
  • PDF下载数:  3524
  • 施引文献:  0
出版历程
收稿日期:  2017-10-19
修回日期:  2017-11-27
刊出日期:  2018-01-15

目录

/

返回文章
返回