改进萤火虫优化算法在运动阴影去除方面的应用

刘磊, 曹民, 张晓. 改进萤火虫优化算法在运动阴影去除方面的应用[J]. 光电工程, 2019, 46(4): 180120. doi: 10.12086/oee.2019.180120
引用本文: 刘磊, 曹民, 张晓. 改进萤火虫优化算法在运动阴影去除方面的应用[J]. 光电工程, 2019, 46(4): 180120. doi: 10.12086/oee.2019.180120
Liu Lei, Cao Min, Zhang Xiao. Application of improved firefly optimization algorithm in motion shadow removal[J]. Opto-Electronic Engineering, 2019, 46(4): 180120. doi: 10.12086/oee.2019.180120
Citation: Liu Lei, Cao Min, Zhang Xiao. Application of improved firefly optimization algorithm in motion shadow removal[J]. Opto-Electronic Engineering, 2019, 46(4): 180120. doi: 10.12086/oee.2019.180120

改进萤火虫优化算法在运动阴影去除方面的应用

  • 基金项目:
    国家重大仪器设备开发专项(2016YFF0101402);上海高校青年教师培训计划资助项目(ZZsl15008)
详细信息
    作者简介:
    通讯作者: 曹民(1970-),男,博士,高级工程师,主要从事图像处理、港机自动化、自动导航、天线充电、智能车灯等研究。E-mail:mincao@usst.edu.cn
  • 中图分类号: TN29;TP18

Application of improved firefly optimization algorithm in motion shadow removal

  • Fund Project: Supported by National Major Instrument and Equipment Development Special (2016YFF0101402) and Shanghai University Young Teachers Training Program Funded Projects (ZZsl15008)
More Information
  • 运动阴影与目标物体粘连,具有运动一致性,常常被误检测为运动目标的一部分。运动阴影的存在改变了运动物体的形状,影响运动目标前景的进一步分析。为了解决这一问题,提出了一种基于改进萤火虫优化算法的运动阴影去除算法。通过基于种群历史最佳位置影响的改进萤火虫算法(IFA)优化2-Otsu(二维最大类间差法)距离测度函数的寻优过程,获得最佳阈值,并以此进行图像分割,去除运动阴影,并同传统2-Otsu法、粒子群算法(PSO)优化2-Otsu法、萤火虫算法(FA)优化2-Otsu法进行比较。实验结果证明,该方法较其他三种方法分别快2.69倍,1.42倍,1.21倍;另外,在区域一致性、阴影检测率和识别率方面均优于其他三种算法,验证了方法的有效性。

  • Overview: Moving shadow removal is an important research field in computer vision. The purpose is to eliminate the influence of moving shadow on the foreground of moving objects, so as to extract the foreground of moving objects accurately. The moving shadow has similar motion characteristics with the object, often is detected as part of the foreground of the moving target. The geometric characteristics such as the shape and the center of mass of moving objects will appear errors due to the existence of shadows, which will affect the measurement, location, tracking and segmentation of moving objects. It increases the difficulty of moving object detection, and has a bad effect on subsequent recognition and tracking. Currently, shadow removal methods are mainly based on color and texture. The method based on color information uses the invariance of shadows to remove the shadows in the target detection results. However, one disadvantage of this method is that they can only detect small shadows in a frame, and are insensitive to the recognition and shadow detection of dark-tone targets. Texture-based methods use the texture similarity features of shadows to remove the shadow areas, but there are some defects in dealing with flat areas and similar foreground and background textures. Although there are many shadow removal algorithms, the existing algorithms are only applicable to a specific target or a specific application scenario, and the output of the algorithm needs to be improved. To solve this problem, a moving shadow removal algorithm based on improved glowworm optimization algorithm is proposed. That is, the optimal threshold is obtained by optimizing the 2-Otsu distance measure function based on the improved glowworm algorithm which is based on the influence of the best position in the population history, and then the image is segmented and the moving shadow is removed. The results are compared with the traditional 2-Otsu method, particle swarm optimization 2-Otsu method and firefly optimization 2-Otsu method. Experimental results show that this method is 2.69 times, 1.42 times, and 1.21 times faster than the other three methods. The improved algorithm not only has fewer parameters, simpler operation, better stability and global optimization effect, but also has faster convergence speed. The improved firefly algorithm solves the problems of the 2-Otsu method, such as large amount of calculation, high computational complexity and poor real-time performance. Compared with the other three shadow removal algorithms, the algorithm in this paper has been effectively improved in terms of time, region consistency, shadow detection efficiency, detection accuracy and target integrity. Experiments show that the algorithm improves shadow removal efficiency and algorithm speed.

  • 加载中
  • 图 1  传统Otsu的阈值分割图

    Figure 1.  Threshold segmentation graph of traditional Otsu

    图 2  改进萤火虫算法原理图

    Figure 2.  IFA algorithm schematic diagram

    图 3  基于IFA的阴影去除算法流程图

    Figure 3.  Flow chart of shadow removal algorithm based on IFA

    图 4  FA与IFA的迭代过程

    Figure 4.  The iterative process of FA and IFA

    图 5  Highway视频序列阴影去除效果图。(a)视频帧;(b)阴影去除前结果;(c)传统2-Otsu阴影去除结果;(d) PSO优化2-Otsu阴影去除结果;(e) FA优化2-Otsu阴影去除结果;(f) IFA优化2-Otsu阴影去除结果

    Figure 5.  Highway video sequence shadow removal effect diagram. (a) Video frame; (b) Result without shadow removal; (c) Shadow removal result of traditional 2-Otsu; (d) PSO optimized 2-Otsu shadow removal result; (e) FA optimized 2-Otsu shadow removal result; (f) IFA optimized 2-Otsu shadow removal result

    图 6  Bungalows视频序列阴影去除效果图。(a)视频帧;(b)阴影去除前结果;(c)传统2-Otsu阴影去除结果;(d) PSO优化2-Otsu阴影去除结果;(e) FA优化2-Otsu阴影去除结果;(f) IFA优化2-Otsu阴影去除结果

    Figure 6.  Bungalows video sequence shadow removal effect diagram. (a) Video frame; (b) Result without shadow removal; (c) Shadow removal result of traditional 2-Otsu; (d) PSO optimized 2-Otsu shadow removal result; (e) FA optimized 2-Otsu shadow removal result; (f) IFA optimized 2-Otsu shadow removal result

    图 7  Outdoor视频序列阴影去除效果图。(a)视频帧;(b)阴影去除前结果;(c)传统2-Otsu阴影去除结果;(d) PSO优化2-Otsu阴影去除结果;(e) FA优化2-Otsu阴影去除结果;(f) IFA优化2-Otsu阴影去除结果

    Figure 7.  Outdoor video sequence shadow removal effect diagram. (a) Video frame; (b) Result without shadow removal; (c) Shadow removal result of traditional 2-Otsu; (d) PSO optimized 2-Otsu shadow removal result; (e) FA optimized 2-Otsu shadow removal result; (f) IFA optimized 2-Otsu shadow removal result

    图 8  Indoor视频序列阴影去除效果图。(a)视频帧;(b)阴影去除前结果;(c)传统2-Otsu阴影去除结果;(d) PSO优化2-Otsu阴影去除结果;(e) FA优化2-Otsu阴影去除结果;(f) IFA优化2-Otsu阴影去除结果

    Figure 8.  Indoor video sequence shadow removal effect diagram. (a) Video frame; (b) Result without shadow removal; (c) Shadow removal result of traditional 2-Otsu; (d) PSO optimized 2-Otsu shadow removal result; (e) FA optimized 2-Otsu shadow removal result; (f) IFA optimized 2-Otsu shadow removal result

    图 9  四种算法区域一致性对比

    Figure 9.  Comparison of four algorithms for regional consistenc

    图 10  不同算法阴影检测对比

    Figure 10.  Contrast of shadow detection in different algorithms

    图 11  不同算法阴影识别率对比

    Figure 11.  Comparison of shadow recognition rate of different algorithms

    图 12  不同算法计算分割阈值用时对比

    Figure 12.  Time comparison of different algorithms for calculating segmentation threshold

    表 1  IFA算法参数

    Table 1.  IFA algorithm parameters

    参数名
    最大吸引度β0 1
    随机步长因子α 0.5
    萤火虫的个数m 50
    最大迭代次数T 50
    下载: 导出CSV

    表 2  种群规模对算法性能的影响

    Table 2.  The impact of population size on the performance of the algorithm

    种群规模 迭代次数 分割阈值 运行时间/s
    30 50 (124, 144) 0.46
    50 50 (135, 149) 0.51
    70 50 (134, 148) 0.65
    下载: 导出CSV

    表 3  αγ对算法性能的影响

    Table 3.  The impact of step factor α and light intensity coefficient γ on the performance of the algorithm

    α γ 分割阈值 运行时间/s
    0.4 1 (131, 153) 0.54
    0.5 1 (135, 149) 0.51
    0.6 1 (143, 158) 0.52
    下载: 导出CSV

    表 4  四种算法分割阈值对比

    Table 4.  Segmentation threshold contrast of four algorithms

    视频序列 2-Otsu法 PSO优化
    2-Otsu法
    FA优化
    2-Otsu法
    本文IFA优化
    2-Otsu法
    Highway (127, 106) (147, 129) (124, 102) (122, 101)
    Bungalows (132, 109) (134, 108) (125, 99) (121, 97)
    Outdoor (78, 88) (79, 90) (76, 85) (75, 84)
    Indoor (138, 156) (140, 158) (136, 151) (135, 149)
    下载: 导出CSV
  • [1]

    Zheng L X, Ruan X Y, Chen Y B, et al. Shadow removal for pedestrian detection and tracking in indoor environments[J]. Multimedia Tools and Applications, 2017, 76(18): 18321-18337. doi: 10.1007/s11042-016-3880-6

    [2]

    Yang W D, Guo W, Peng K, et al. Research on removing shadow in workpiece image based on homomorphic filtering[J]. Procedia Engineering, 2012, 29: 2360-2364. doi: 10.1016/j.proeng.2012.01.315

    [3]

    Vicente T F Y, Hoai M, Samaras D. Leave-one-out kernel optimization for shadow detection and removal[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2018, 40(3): 682-695. doi: 10.1109/TPAMI.2017.2691703

    [4]

    Zhou Y H, Sun L, Zhang J B. A shadow elimination method based on color and texture[C]//Proceedings of 2010 IEEE International Conference on Intelligent Computing and Intelligent Systems, Xiamen, China, 2010: 8-11.

    [5]

    Jia Y, Yu X, Dai J, et al. A novel moving cast shadow detection of vehicles in traffic scene[M]//Yang J, Fang F, Sun C Y. Intelligent Science and Intelligent Data Engineering. Berlin, Heidelberg: Springer, 2013: 115-124.

    [6]

    Leone A, Distante C. Shadow detection for moving objects based on texture analysis[J]. Pattern Recognition, 2007, 40(4): 1222-1233. doi: 10.1016/j.patcog.2006.09.017

    [7]

    曹健, 陈红倩, 张凯, 等.结合区域颜色和纹理的运动阴影检测方法[J].机器人, 2011, 33(5): 628-633. doi: 10.3724/SP.J.1218.2011.00628

    Cao J, Chen H Q, Zhang K, et al. Moving cast shadow detec -tion based on region color and texture[J]. Robot, 2011, 33(5): 628-633. doi: 10.3724/SP.J.1218.2011.00628

    [8]

    Al-Najdawi N. Cast shadow modelling and detection[J]. Loughborough University, 2006. Ai-Najdawi N, Bez H E, Edirisinghe E A. A Novel Approach For Cast Shadow Modelling and Detection[C]//Iet International Conference on Visual Information Engineering. IET, 2007: 553-558.

    [9]

    Sanin A, Sanderson C, Lovell B C. Improved shadow removal for robust person tracking in surveillance scenarios[C]//Proceedings of the 20th International Conference on Pattern Recognition, Istanbul, Turkey, 2010: 141-144.

    [10]

    胡小兵, 黄席樾.基于蚁群优化算法的0-1背包问题求解[J].系统工程学报, 2005, 20(5): 520-523. http://d.old.wanfangdata.com.cn/Periodical/xtgcxb200505013

    Hu X B, Huang X Y. Solving 0-1 knapsack problem based on ant colony optimization algorithm[J]. Journal of Systems Engineering, 2005, 20(5): 520-523. http://d.old.wanfangdata.com.cn/Periodical/xtgcxb200505013

    [11]

    朱立军, 苑玮琦.一种改进蚁群算法的睫毛提取[J].光电工程, 2016, 43(6): 44-50. doi: 10.3969/j.issn.1003-501X.2016.06.008

    Zhu L J, Yuan W Q. An eyelash extraction method based on improved ant colony algorithm[J]. Opto-Electronic Engineering, 2016, 43(6): 44-50. doi: 10.3969/j.issn.1003-501X.2016.06.008

    [12]

    刘桂红, 赵亮, 孙劲光, 等.一种改进粒子群优化算法的Otsu图像阈值分割方法[J].计算机科学, 2016, 43(3): 309-312. doi: 10.3969/j.issn.1007-0249.2003.05.020

    Liu G H, Zhao L, Sun J G, et al. An Otsu image threshold segmentation method based on improved particle swarm optimization[J]. Computer Science, 2016, 43(3): 309-312. doi: 10.3969/j.issn.1007-0249.2003.05.020

    [13]

    Li G S, Chou W S. Path planning for mobile robot using self-adaptive learning particle swarm optimization[J]. Science China Information Sciences, 2018, 61(5): 052204. doi: 10.1007/s11432-016-9115-2

    [14]

    Liu Z G, Ji X H, Liu Y X. Hybrid non-parametric particle swarm optimization and its stability analysis[J]. Expert Systems with Applications, 2017, 92: 256-275. doi: 10.1016/j.asoc.2014.12.015

    [15]

    许川佩, 蔡震, 胡聪.基于蚁群算法的数字微流控生物芯片在线测试路径优化[J].仪器仪表学报, 2014, 35(6): 1417-1424. http://d.old.wanfangdata.com.cn/Periodical/yqyb201406029

    Xu C P, Cai Z, Hu C. On-line test path optimization for digital microfluidic biochips based on ant colony algorithm[J]. Chinese Journal of Scientific Instrument, 2014, 35(6): 1417-1424. http://d.old.wanfangdata.com.cn/Periodical/yqyb201406029

    [16]

    Zhou C H, Tian L W, Zhao H W, et al. A method of two-dimensional Otsu image threshold segmentation based on improved firefly algorithm[C]//Proceedings of 2015 IEEE International Conference on Cyber Technology in Automation, Control, and Intelligent Systems, Shenyang, China, 2015: 1420-1424.

    [17]

    Huang L, Fang Y M, Zuo X Q, et al. Automatic change detection method of multitemporal remote sensing images based on 2D-otsu algorithm improved by firefly algorithm[J]. Journal of Sensors, 2015, 2015: 327123. http://www.wanfangdata.com.cn/details/detail.do?_type=perio&id=1220e0565a0ba3d9bf8a2aa61edc5fb6

    [18]

    Lieu Q X, Do D T T, Lee J. An adaptive hybrid evolutionary firefly algorithm for shape and size optimization of truss structures with frequency constraints[J]. Computers & Structures, 2018, 195: 99-112. http://www.wanfangdata.com.cn/details/detail.do?_type=perio&id=1e5f1454f7829991e4a40a881ae35e12

    [19]

    刘金, 金炜东.噪声图像的快速二维Otsu阈值分割[J].计算机应用研究, 2013, 30(10): 3169-3171, 3200. doi: 10.3969/j.issn.1001-3695.2013.10.072

    Liu J, Jin W D. Fast thresholding algorithm of 2D Otsu for low SNR image[J]. Application Research of Computers, 2013, 30(10): 3169-3171, 3200. doi: 10.3969/j.issn.1001-3695.2013.10.072

    [20]

    Ojala T, Pietikainen M, Maenpaa T. Multiresolution gray-scale and rotation invariant texture classification with local binary patterns[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2002, 24(7): 971-987. doi: 10.1109/TPAMI.2002.1017623

  • 加载中

(12)

(4)

计量
  • 文章访问数:  17843
  • PDF下载数:  2372
  • 施引文献:  0
出版历程
收稿日期:  2018-03-13
修回日期:  2018-12-21
刊出日期:  2019-04-01

目录

/

返回文章
返回