Infrared Image Adaptive Canny Edge-detection of Aircraft Skin Based on Fast Fireworks Algorithm
-
摘要: 针对传统自适应Canny算法阈值选取精度低、速度慢的不足,提出基于快速烟花算法(Fast Fireworks Algorithm,FFWA)的自适应Canny边缘检测算法,该算法采用最大类间方差法结合快速烟花算法对检测和连接边缘的高低阈值进行自动设定。快速烟花算法对传统烟花算法的爆炸半径,爆炸火花产生方式与选择策略进行改进。实验结果表明,快速烟花算法比传统烟花算法的计算时间节省了36%,在稳定性方面也有了可观的提升,基于快速烟花算法的自适应Canny边缘检测算法在精度保持不变的情况下,计算速度比改进前加快了49%,使飞机蒙皮损伤热像图的边缘检测效果更加理想。Abstract: To address the low accuracy and slow speed of the traditional adaptive Canny algorithm in selecting the threshold value, an improved algorithm is herein proposed. The proposed algorithm utilizes the Otsu and fast fireworks algorithm (FFWA) to automatically set the high and low detection thresholds and the connecting edges. Consequently, the explosion radius, the production method, and selection strategy are improved as compared to those of the traditional fireworks algorithm, thereby increasing the speed and accuracy of the Otsu calculation. The experimental results show that the calculation speed of the fast fireworks algorithm increased by 36% as compared to that of the traditional fireworks algorithm. Moreover, the stability also increased considerably. The improved adaptive Canny algorithm not only maintains the same precision but also decreases the calculation time by 49%. This makes the result of edge detection of aircraft skin infrared images more ideal.
-
Key words:
- edge-detection /
- fireworks algorithm /
- Canny algorithm /
- Otsu /
- adaptive
-
表 1 基准测试函数
Table 1. Standard test function
Name Function Range Dimension Optimal Sphere ${f_1}\left( x \right) = \sum\limits_{i = 1}^n {x_i^2} $ [-100, 100]d 30 0 Ackley ${f_2}(x) = - 20\exp ( - 0.2\sqrt {\sum\limits_{i = 1}^d {x_i^2} } ) - \exp (\frac{1}{d})\sum\limits_{i = 1}^d {\cos (2{\rm{ \mathsf{ π} }}{x_i})} + 20 - e$ [-32, 32]d 30 0 Griewank ${f_3}(x) = \frac{1}{{4000}}\sum\limits_{i = 1}^d {x_i^2} - \prod\limits_{i = 1}^d {\cos (\frac{{{x_i}}}{{\sqrt i }})} + 1 $ [-600, 600]d 30 0 Six-Hump Camel-Black ${f_4}(x) = 4x_1^2 - 2.1x_1^4 + \frac{1}{3}x_1^6 + {x_1}{x_2} - 4x_2^2 + 4x_2^4 $ [-5, 5]2 2 -1.03162 表 2 五种算法的参数设置
Table 2. Parameter Settings
Algorithm Common Parameters Mutations Acceptance probability Shrinkage Rate Transfer parameters Control factor Mutation probability FFWA N=5
Er=20
En=20
a=0.2
b=0.81 0.99 FWA 2 IFWA 2 21 CFWA 2 0.15 dynFWA kd=1.2
sx=0.8表 3 测试函数测试结果对比
Table 3. Test function test results comparison
Algorithm Fun Optimal Worst Average Run Time/s Fun Optimal Worst Average Run Time/s FFWA f1 0 0 0 0.85 f3 0 1.078×10-5 2.501×10-5 1.04 FWA 0 2.887×10-2 5.559×10-5 1.33 9.716×10-5 7.410×10-1 2.552×10-5 1.50 dynFWA 1.636×10-4 1.222 1.328×10-3 1.06 3.414×10-4 1.053 5.513×10-3 1.19 IFWA 4.584×10-1 4.839×10-3 4.837×10-2 1.28 1.113E-01 6.591×10-1 4.447×10-1 1.51 CFWA 2.032×10-5 2.996×10-1 2.842×10-5 1.25 0 2.285×10-1 4.311×10-4 1.46 FFWA f2 1.216×10-5 1.078×10-1 2.601×10-4 1.03 f4 -1.031628 -1.031628 -1.031628 0.69 FWA 1.215×10-5 1.880×10-1 2.634×10-4 1.51 -1.031628 -1.031613 -1.031620 1.04 dynFWA 5.001×10-4 4.203 2.611×10-3 1.27 -1.031628 0.007603 -1.031614 0.87 IFWA 2.093×10-4 1.666 4.537×10-4 1.46 -1.031628 -1.031628 -1.031628 0.96 CFWA 8.282×10-5 6.323×10-4 2.220×10-4 1.46 -1.031628 -1.031624 -1.031626 1.03 表 4 各个算法的实验结果
Table 4. The experimental results of each algorithm
Mean Convergence Time/s Total Error Average number of iterations Hyd Deb Cra Cor Hyd Deb Cra Cor Hyd Deb Cra Cor t=20 s FFWA 1.116 1.112 1.116 1.112 0 0 1 0 4.5 4 5 4.5 FWA 1.752 1.750 1.752 1.750 9 11 9 10 6.5 6.5 6 6 dynFWA 1.429 1.411 1.429 1.411 4 2 4 3 5 5 6 5 IFWA 1.644 1.640 1.644 1.640 0 1 2 1 5 4.5 5 5 CFWA 1.539 1.537 1.539 1.537 0 2 0 1 5 5 5.5 4 t=100 s FFWA 1.100 1.115 1.100 1.115 0 1 0 1 4 4.5 4 5 FWA 1.771 1.690 1.771 1.690 10 9 9 7 6 6 5 6 dynFWA 1.430 1.381 1.430 1.381 1 2 4 3 5 5 5 6 IFWA 1.644 1.640 1.644 1.640 1 0 0 2 5 4.5 4 5 CFWA 1.539 1.537 1.539 1.537 0 0 2 4 5 6 5 4.5 t=200 s FFWA 1.110 1.109 1.112 1.110 0 1 0 1 5 5 4.5 6 FWA 1.746 1.742 1.757 1.751 5 7 9 10 6.5 6 5 7 dynFWA 1.427 1.408 1.423 1.412 1 4 4 6 5 5 4.5 4.5 IFWA 1.647 1.639 1.645 1.640 0 1 0 2 5 4.5 4 4 CFWA 1.539 1.537 1.537 1.537 1 0 0 1 5 5 5 4.5 表 5 4种算法检测对比结果
Table 5. The comparison results of four algorithms
Algorithm Run Time/s Threshold PFOM Hyd Deb Cra Cor Hyd Deb Cra Cor Hyd Deb Cra Cor Proposed method 2.18 2.18 2.06 2.13 133 137 144 96 0.83 0.96 0.87 0.81 Global threshold method 3.15 3.15 3.12 3.20 139 120 130 112 0.51 0.74 0.76 0.76 Maximum entropy method 4.59 4.58 4.51 5.02 120 120 182 80 0.70 0.96 0.83 0.85 Otsu method 4.33 4.29 4.30 4.17 133 137 144 96 0.83 0.96 0.87 0.81 -
[1] 王昊. 基于机器视觉的飞机蒙皮损伤检测与寿命分析方法[D]. 南京: 南京航空航天大学, 2013.WANG Hao. Aircraft Skin Damage Detection and Life Cycle Analysis Method Based on Machine Vision[D]. Nanjing: Nanjing University College of Automation Engineering, 2013. [2] CHENG Sheng, FENG Jianfei, DENG Faqing. A Summary of Nondestructive Testing Application in Chinese Civil Aircraft Industry[J]. Nondestructive Testing, 2017, 39(4): 76-79. http://en.cnki.com.cn/Article_en/CJFDTOTAL-WSJC201704017.htm [3] Ammar K Al-Musawi, Fatih Anayi, Michael Packianather. Three-phase induction motor fault detection based on thermal image segmentation[J]. Infrared Physics & Technology, 2020, 104: 1350-4495. http://www.sciencedirect.com/science/article/pii/S1350449519304207 [4] SHI H, Ward R. Canny edge based image expansion[C]//Circuits and Systems, IEEE International Symposium on, 2002: 1-1. DOI: 10.1109/ISCAS.2002.1009958. [5] 李二森, 张保明, 周晓明, 等. 自适应Canny边缘检测算法研究[J]. 测绘科学, 2008, 66(6): 120-121. https://www.cnki.com.cn/Article/CJFDTOTAL-CHKD200806042.htmLI Ersen, ZHANG Baoming, ZHOU Xiaoming, et al. Research on the algorithm of adaptive Canny edge detection[J]. Surveying and Mapping Science, 2008, 66(6): 120-121. https://www.cnki.com.cn/Article/CJFDTOTAL-CHKD200806042.htm [6] 杜磊, 李立轻, 汪军, 等. 几种基于图像自适应阈值分割的织物疵点检测方法比较[J]. 纺织学报, 2014, 35(6): 56-60. https://www.cnki.com.cn/Article/CJFDTOTAL-FZXB201406011.htmDU Lei, LI Liqing, WANG Jun, et al. Comparison of several fabric defect detection methods based on image adaptive threshold segmentation[J]. Textile Journal, 2014, 35(6): 56-60. https://www.cnki.com.cn/Article/CJFDTOTAL-FZXB201406011.htm [7] 郭方方, 严高师, 李旭东. 一种改进的基于Otsu算法的Canny红外边缘检测方法[J]. 红外, 2010, 31(7): 24-27. doi: 10.3969/j.issn.1672-8785.2010.07.005GUO Fangfang, YAN Gaoshi, LI Xudong, et al. An Improved Canny Infrared Edge Detection Method Based on Otsu Algorithm[J]. Infrared, 2010, 31(7): 24-27 doi: 10.3969/j.issn.1672-8785.2010.07.005 [8] 宋人杰, 刘超, 王保军. 一种自适应的Canny边缘检测算法[J]. 南京邮电大学学报: 自然科学版, 2018, 176(3): 76-80. https://www.cnki.com.cn/Article/CJFDTOTAL-NJYD201803012.htmSONG Renjie, LIU Chao, WANG Baojun. An adaptive Canny edge detection algorithm[J]. Journal of Nanjing University of Posts and Telecommunications: Natural Science Edition, 2018, 176(3): 76-80. https://www.cnki.com.cn/Article/CJFDTOTAL-NJYD201803012.htm [9] TAN Y, ZHU Y. Fireworks Algorithm for Optimization[C]//Advances in Swarm Intelligence, First International Conference, 2010: 12-15. [10] 谭营. 烟花算法引论[M]. 北京: 科学出版社, 2015.TAN Ying. Introduction to Fireworks Algorithm[M]. Beijing: Science Press, 2015. [11] TAN Ying, ZHENG Shaoqiu. Recent advances in fireworks algorithm[J]. CAAI Transactions on Intelligent Systems, 2014, 9(5) : 515-528. http://d.wanfangdata.com.cn/periodical/xdkjyc201405001 [12] 王亮, 郭星. 基于柯西烟花算法的大规模服务组合优化[J]. 计算机工程与应用, 2018, 54(24): 34-40. doi: 10.3778/j.issn.1002-8331.1712-0342WANG Liang, GUO Xing. Large-scale service portfolio optimization based on Cauchy fireworks algorithm[J]. Computer Engineering and Applications, 2018, 54(24): 34-40. doi: 10.3778/j.issn.1002-8331.1712-0342 [13] ZHENG S, LI J, Janecek A, et al. A Cooperative Framework for Fireworks Algorithm[J]. IEEE/ACM Transactions on Computational Biology and Bioinformatics, 2017, 14(1): 27-41. doi: 10.1109/TCBB.2015.2497227 [14] 张水平, 李殷俊, 高栋, 等. 带有动态爆炸半径的增强型烟花算法[J]. 计算机工程与应用, 2019, 961(18): 56-63. https://www.cnki.com.cn/Article/CJFDTOTAL-JSGG202018007.htmZHANG Shuiping, LI Yinjun, GAO Dong. Enhanced fireworks algorithm with dynamic explosion radius[J]. Computer Engineering and Applications, 2019, 961(18): 56-63. https://www.cnki.com.cn/Article/CJFDTOTAL-JSGG202018007.htm [15] LI J, ZHENG S, TAN Y. The Effect of Information Utilization: Introducing a Novel Guiding Spark in the Fireworks Algorithm[J]. IEEE Transactions on Evolutionary Computation, 2017, 21(1): 491-501. http://ieeexplore.ieee.org/document/7508443/ [16] 陶小华, 陈基漓, 谢晓兰. 具有导向功能的改进烟花算法[J]. 计算机工程与设计, 2019, 40(12): 3479-3486. https://www.cnki.com.cn/Article/CJFDTOTAL-SJSJ201912020.htmTAO Xiaohua, CHEN Jili, XIE Xiaolan. Improved fireworks algorithm with guidance function[J]. Computer Engineering and Design, 2019, 40(12): 3479-3486. https://www.cnki.com.cn/Article/CJFDTOTAL-SJSJ201912020.htm [17] YANG W, KE Liangjun. An improved fireworks algorithm for the capacitated vehicle routing problem[J]. Frontiers of Computer Science, 2019, 13(3): 552-564. doi: 10.1007/s11704-017-6418-9 [18] LIU J, ZHENG S, TAN Y. The Improvement on Controlling Exploration and Exploitation of Firework Algorithm[M]. Advances in Swarm Intelligence Berlin: Springer, 2013: 11-23. [19] ZHENG S, Janecek A, Tan Y. Enhanced Fireworks Algorithm[C]//Evolutionary Computation (CEC), IEEE Congress on., 2013: 2069-2077. [20] RONG Cheng, BAI Yanping, ZHAO Yu, et al. Improved fireworks algorithm with information exchange for function optimization[J]. Knowledge-Based Systems, 2019, 163: 82-90. doi: 10.1016/j.knosys.2018.08.016 [21] ZHENG S, Janecek A, LI J, et al. Dynamic search in fireworks algorithm[C]//2014 IEEE Congress on Evolutionary Computation (CEC), 2014: 3222-3229. [22] 李姗姗, 陈莉, 张永新, 等. 结合四元数与最小核值相似区的边缘检测[J]. 中国图象图形学报, 2017, 22(7): 915-925. https://www.cnki.com.cn/Article/CJFDTOTAL-ZGTB201707006.htmLI Shanshan, CHEN Li, ZHANG Yongxin, et al. The Edge Detection algorithm Combining Dimension Univalue segment Depreciation and Quaternion[J]. Journal of China Images & amp; Graphics, 2017, 22(7): 915-925. https://www.cnki.com.cn/Article/CJFDTOTAL-ZGTB201707006.htm