吉林大学学报(工学版) ›› 2025, Vol. 55 ›› Issue (4): 1426-1435.doi: 10.13229/j.cnki.jdxbgxb.20230709

• 计算机科学与技术 • 上一篇    下一篇

基于改进北方苍鹰优化算法的激光焊缝图像分类

邹红波1,2(),李奇隆1,2   

  1. 1.三峡大学 电气与新能源学院,湖北 宜昌 443000
    2.梯级水电及新能源运行与控制湖北省重点实验室,湖北 宜昌 443002
  • 收稿日期:2023-07-27 出版日期:2025-04-01 发布日期:2025-06-19
  • 作者简介:邹红波(1978-),男,副教授,博士. 研究方向: 虚拟仪器, 信号仿真处理.E-mail:202008540021023@ctgu.edu.cn
  • 基金资助:
    国家自然科学基金项目(52107108)

Laser weld image classification based on improved Northern Goshawk optimization algorithm

Hong-bo ZOU1,2(),Qi-long LI1,2   

  1. 1.College of Electrical and New Energy,China Three Gorges University,Yichang 443000,China
    2.Hubei Provincial Key Laboratory of Cascade Hydropower and New Energy Operation and Control,Yichang 443002,China
  • Received:2023-07-27 Online:2025-04-01 Published:2025-06-19

摘要:

针对多种类型激光焊缝识别计算复杂度高、分类准确度低的问题,提出了一种基于改进北方苍鹰算法(UNGO)的激光焊缝图像识别分类算法,在传统支持向量机算法(SVM)的基础上与改进北方苍鹰算法(UNGO-SVM)结合,并通过混沌优化与莱维飞行中贪婪学习策略增加算法搜索能力,同时帮助算法克服陷入局部最优情况,提高算法的收敛精度和图像分类准确度。实验结果表明,UNGO-SVM在保证算法收敛度的同时分类准确率提升至99.15%,相比较SVM、NGO-SVM、DOA-SVM、GOA-SVM分别提升了21%、5%、10%和11%,证明了该方法的可行性和较强的利用价值。

关键词: 北方苍鹰算法, 图像识别分类, 支持向量机, 立方混沌, 贪婪学习策略

Abstract:

In order to solve the problems of high computational complexity and low recognition and classification accuracy in the recognition of various types of laser welding seams, this paper proposes a laser welding seam image recognition and classification algorithm based on the improved Northern Goshawk algorithm(UNGO), which combines the traditional support vector machine algorithm(SVM) with the improved Northern Goshawk optimization algorithm(UNGO-SVM), and increases the algorithm search ability through chaos optimization and Levi's greedy learning strategy in flight. At the same time, it helps the algorithm overcome the situation of falling into local optimum, and improves the convergence accuracy and image classification accuracy of the algorithm. The experimental results show that this algorithm (UNGO-SVM) improves the classification accuracy to 99.15% while ensuring the convergence of the algorithm. Finally, compared with SVM, NGO-SVM,DOA-SVM,GOA-SVM improves by 21%,5% ,10% and 11% respectively, proving the feasibility and strong utilization value of this method.

Key words: Northern Goshawk algorithm, image recognition classification, support vector machine, cubic chaos, greedy learning strategy

中图分类号: 

  • TG409

图1

Sine映射混沌分布图、直方图"

图2

总体流程图"

图3

各类型焊缝的图像处理"

表1

焊缝特征参数分类对照图"

序号面积最佳阈值长度最小宽度最大宽度

像素

个数

组号
193.634.5121.562.758.2138 4464
289.364.6220.782.657.9836 8704
361.453.7515.482.186.1930 4522
424.962.128.321.125.7815 3631
525.122.158.171.246.0217 3541
671.554.2318.652.366.7832 4523

7

8

9

10

11

12

72.15

70.69

58.85

62.36

25.52

24.87

4.16

4.06

3.71

3.77

2.20

2.22

17.98

16.61

13.85

14.51

8.25

8.35

2.47

2.33

2.22

2.17

1.62

1.25

7.12

6.81

6.16

6.24

6.11

6.07

33 847

32 993

31 185

30 419

18 854

17 862

3

3

2

2

1

1

13

14

15

16

17

18

19

20

?

369

370

91.65

90.78

62.85

71.63

60.78

61.55

26.01

25.89

?

72.56

94.23

4.68

4.58

3.66

4.11

3.84

3.75.

2.26

2.14

?

4.18

4.80

20.69

21.85

12.96

18.88

15.24

16.22

8.99

8.65

?

19.79

21.00

2.76

2.57

2.19

2.51

2.01

2.21

1.51

1.63

?

2.43

2.70

8.64

8.28

6.16

6.88

6.33

6.22

6.10

6.08

?

7.01

8.06

37 895

36 824

30 855

34 789

31 122

30 888

16 788

15 793

?

33 786

37 321

4

4

2

3

2

2

1

1

?

3

4

表2

参数寻优结果对比"

优化

算法

型号

类别

最优

c

最优

g

正确率/%运行时间/s
UNGO

U型

L型

O型

S型

1.25

2.16

7.85

5.42

1.76

2.57

4.55

6.13

99.13

98.86

100

97.06

4.89

4.65

5.03

4.73

NGO

U型

L型

O型

S型

1.28

2.45

6.69

6.65

1.77

2.87

5.63

6.01

92.53

93.75

91.77

94.96

2.89

2.88

2.45

2.38

GOA

U型

L型

O型

S型

8.25

15.23

10.15

8.83

0.45

11.99

15.10

4.56

82.45

80.56

81.14

84.28

10.88

11.03

10.45

12.62

DOA

U型

L型

O型

S型

0.15

0.82

0.45

0.32

1.87

1.05

0.98

2.06

86.36

87.50

90.78

89.78

3.06

3.65

3.89

3.97

图4

SVM分类算法训练集和测试集的结果对比"

图5

NGO-SVM分类算法训练集和测试集的结果对比"

图6

UNGO-SVM分类算法训练集和测试集的结果对比"

图7

GOA-SVM分类算法训练集和测试集的结果对比"

图8

DOA-SVM分类算法训练集和测试集的结果对比"

表3

各分类算法识别率对比"

分类算法

样本

分类

样本

个数

正确识别个数错误识别个数总识别率/%
DOA-SVM

1

2

3

4

122

85

71

92

110

76

60

82

11

12

11

10

90.03
NGO-SVM

1

2

3

4

122

85

71

92

117

82

69

87

5

3

2

5

95.99
GOA-SVM

1

2

3

4

122

85

71

92

107

71

55

76

15

16

16

16

88.5
SVM

1

2

3

4

122

85

71

92

95

63

53

72

27

22

18

20

78.5
UNGO-SVM

1

2

3

4

122

85

71

92

122

85

70

91

0

0

1

1

99.5

图9

UNGO与NGO算法适应值收敛曲线对比"

[1] 李想, 黄瑞生, 滕彬, 等. 真空激光焊接技术研究进展[J]. 电焊机, 2023, 53(4): 46-55.
Li Xiang, Huang Rui-sheng, Teng Bin, et al. Research progress of vacuum laser welding technology[J]. Welding Machine, 2023, 53(4): 46-55.
[2] 岳考捷, 贾晨, 王云嵩, 等. 镍基合金薄板激光焊接研究进展[J]. 光电工程, 2022, 49(12): 26-44.
Yue Kao-jie, Jia Chen, Wang Yun-song, et al. Research progress in laser welding of nickel base alloy sheet[J]. Optoelectronics, 2022, 49(12): 26-44.
[3] 孙悦庆, 苏统华, 李松泽. 基于多模型融合的焊接质量检测系统的设计与实现[C]//中国金属学会第十三届中国钢铁年会论文集——4.轧制与热处理,重庆, 中国, 2022: 133-142.
[4] 兰凌霄. 基于视觉的压力容器焊缝识别及缺陷分类[D]. 呼和浩特:内蒙古工业大学机械工程学院,2021.
Lan Ling-xiao. Visual based weld seam recognition and defect classification for pressure vessels[D]. Hohhot: School of Mechanical Engineering, Inner Mongolia University of Technology, 2021.
[5] 伏喜斌. 基于支持向量机的焊缝超声TOFD缺陷分类识别[J]. 无损检测, 2018, 40(6): 52-57.
Fu Xi-bin. Weld ultrasonic TOFD defect classification and identification based on support vector machine[J]. Non Destructive Testing, 2018, 40(6): 52-57.
[6] Thanki R. A deep neural network and machine learning approach for retinal fundus image classification[J]. Healthcare Analytics, 2023, 3(3): No.100140.
[7] 黄宇, 陈渡. 基于轮廓变换域的图像模糊增强算法[J]. 多媒体工具和应用, 2019, 79(47/48): 35017-35032.
Huang Yu, Chen Du. Image blur enhancement algorithm based on contour transformation domain[J]. Multimedia Tools and Applications, 2019, 79(47/48): 35017-35032.
[8] 刘仁云, 孙秋成, 王春艳. 数字图像中边缘检测算法研究[M]. 北京: 科学出版社, 2015.
[9] 王文宁, 王汇源, 牟文英. 一种新的灰度直方图分割阈值的自动检测方法[J]. 计算机工程应用, 2005, 41(26): 1002-1007.
Wang Wen-ning, Wang Hui-yuan, Mou Wen-ying. A new automatic detection method of gray histogram segmentation threshold[J]. Computer Engineering Application, 2005, 41(26): 1002-1007.
[10] 姜旭磊, 孙宝, 范凯,等. 北方苍鹰优化方法可视化实验系统的设计与实现[J]. 数字技术与应用, 2023, 41(1): 168-170.
Jiang Xu-lei, Sun Bao, Fan Kai, et al Design and implementation of a visualization experimental system for the optimization method of northern eagleJ ]. Digital Technology and Applications, 2023, 41(1): 168-170.
[11] 李荣, 徐燕华. 基于视觉信息的图像特征提取算法研究[J]. 电子设计工程, 2016, 24(9): 188-190.
Li Rong, Xu Yan-hua. Research on image feature extraction algorithms based on visual information[J]. Electronic Design Engineering, 2016, 24(9): 188-190.
[12] Bhat N N, Kumari K, Dutta S, et al. Friction stir weld classification by applying wavelet analysis and support vector machine on weld surface images[J]. Journal of Manufacturing Processes, 2015, 20(20):274-281.
[13] 王凌. 智能优化算法及其应用[M]. 北京:清华大学出版社, 2004.
[14] 郭振洲, 刘然, 拱长青,等. 基于灰狼算法的改进研究[J]. 计算机应用研究, 2017, 34(12): 3603-3606, 3610.
Guo Zhen-zhou, Liu Ran, Gong Chang-qing, et al. Research on improvement based on grey wolf algorithm[J]. Computer Application Research, 2017, 34(12): 3603-3606, 3610.
[15] 刘道华, 原思聪, 兰洋,等. 混沌映射的粒子群优化方法[J]. 西安电子科技大学学报, 2010, 37(4): 764-769.
Liu Dao-hua, Yuan Si-cong, Lan Yang, et al. Particle swarm optimization method for chaotic mapping[J]. Journal of Xidian University, 2010, 37(4): 764-769.
[16] Xu M. A modified chaos-based image encryption algorithm[J]. Journal of Software, 2015,10(8): 931-938.
[17] 王宇平, 刘大莲. 基于平滑技术和一维搜索的全局优化进化算法及其收敛性[J]. 计算机学报, 2006(4):4670-4675.
Wang Yu-ping, Liu Da-lian. Global optimization evolutionary algorithm based on smoothing technique and one-dimensional search and its convergence[J]. Journal of Computer Science, 2006 (4): 4670-4675.
[18] 刘晓龙, 宁芊, 赵成萍,等. 基于莱维飞行的鸟群优化算法[J]. 计算机测量与控制, 2016,24(12): 194-197.
Liu Xiao-long, Ning Qian, Zhao Cheng-ping, et al. Bird swarm optimization algorithm based on Levy flight[J]. Computer Measurement and Control, 2016,24 (12): 194-197.
[19] Modelling of photovoltaic solar panel for maximum power point tracking[J]. International Journal of Science and Research (IJSR), 2016, 5(5): 1769-1771.
[20] Zhou Z, Li F, Zhu H, et al. An improved genetic algorithm using greedy strategy toward task scheduling optimization in cloud environments[J]. Neural Computing and Applications, 2019, 32 (6): 1531-1541.
[21] 张素琪, 滕建辅, 顾军华. 基于多维贪婪搜索的人工蜂群算法[J]. 计算机工程, 2014, 40(11): 189-194.
Zhang Su-qi, Teng Jian-fu, Gu Jun-hua. Artificial bee colony algorithm based on multidimensional greedy search[J]. Computer Engineering, 2014, 40(11): 189-194.
[22] 黎静华, 韦化. 适合于机组组合问题的贪婪随机自适应搜索模型[J]. 电网技术, 2010, 34(4): 119-123.
Li Jing-hua, Wei Hua. A greedy random adaptive search model suitable for unit commitment problem[J]. Grid Technology, 2010,34 (4): 119-123.
[23] 陈光英, 张千里, 李星. 基于SVM分类机的入侵检测系统[J]. 通信学报, 2002, 23(5): 51-56.
Chen Guang-ying, Zhang Qian-li, Li Xing. Intrusion detection system based on SVM classifier[J]. Journal of Communications, 2002, 23(5): 51-56.
[1] 关亮亮,田国红. 基于动力学分析的汽车减震器示功图故障检测算法[J]. 吉林大学学报(工学版), 2024, 54(5): 1221-1226.
[2] 高海龙,徐一博,刘坤,李春阳,卢晓煜. 基于多源数据融合的高速公路路网短时交通流参数实时预测[J]. 吉林大学学报(工学版), 2024, 54(1): 155-161.
[3] 龙恩深,班光泽. 基于小波包信包提取的空调制冷压缩机怠速噪声诊断算法[J]. 吉林大学学报(工学版), 2023, 53(7): 1929-1934.
[4] 田野,李楠楠,刘君巍,姜生元,王储,张伟伟. 基于支持向量机的模拟月壤临界尺度颗粒切削负载识别[J]. 吉林大学学报(工学版), 2023, 53(7): 2143-2151.
[5] 李岩,张久鹏,陈子璇,黄果敬,王培. 基于PCA-PSO-SVM的沥青路面使用性能评价[J]. 吉林大学学报(工学版), 2023, 53(6): 1729-1735.
[6] 吴剑,许斌. 基于CEEMDAN理论的堆积层滑坡位移区间预测模型及仿真[J]. 吉林大学学报(工学版), 2023, 53(2): 562-568.
[7] 宋世军,樊敏. 基于谱聚类的多维数据集异常数据检测方法[J]. 吉林大学学报(工学版), 2023, 53(10): 2917-2922.
[8] 郭世杰,张学炜,张楠,乔冠,唐术锋. 机床主轴热关键点选择与典型转速热误差预测[J]. 吉林大学学报(工学版), 2023, 53(1): 72-81.
[9] 王奎洋,何仁. 基于支持向量机的制动意图识别方法[J]. 吉林大学学报(工学版), 2022, 52(8): 1770-1776.
[10] 罗巍,卢博,陈菲,马腾. 基于PSO-SVM及时序环节的数控刀架故障诊断方法[J]. 吉林大学学报(工学版), 2022, 52(2): 392-399.
[11] 侯春萍,赵春月,王致芃,田海瑞. 基于有效异常样本构造的视频异常检测算法[J]. 吉林大学学报(工学版), 2021, 51(5): 1823-1829.
[12] 院老虎,连冬杉,张亮,刘义. 基于密集连接卷积网络和支持向量机的飞行器机械部件故障诊断[J]. 吉林大学学报(工学版), 2021, 51(5): 1635-1641.
[13] 王康,姚猛,李立犇,李建桥,邓湘金,邹猛,薛龙. 基于月面表取采样触月压痕的月壤力学状态分析[J]. 吉林大学学报(工学版), 2021, 51(3): 1146-1152.
[14] 李雄飞,王婧,张小利,范铁虎. 基于SVM和窗口梯度的多焦距图像融合方法[J]. 吉林大学学报(工学版), 2020, 50(1): 227-236.
[15] 谷远利, 张源, 芮小平, 陆文琦, 李萌, 王硕. 基于免疫算法优化LSSVM的短时交通流预测[J]. 吉林大学学报(工学版), 2019, 49(6): 1852-1857.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
[1] 李寿涛, 李元春. 在未知环境下基于递阶模糊行为的移动机器人控制算法[J]. 吉林大学学报(工学版), 2005, 35(04): 391 -397 .
[2] 刘庆民,王龙山,陈向伟,李国发. 滚珠螺母的机器视觉检测[J]. 吉林大学学报(工学版), 2006, 36(04): 534 -538 .
[3] 李红英;施伟光;甘树才 .

稀土六方Z型铁氧体Ba3-xLaxCo2Fe24O41的合成及电磁性能与吸波特性

[J]. 吉林大学学报(工学版), 2006, 36(06): 856 -0860 .
[4] 杨树凯,宋传学,安晓娟,蔡章林 . 用虚拟样机方法分析悬架衬套弹性对
整车转向特性的影响
[J]. 吉林大学学报(工学版), 2007, 37(05): 994 -0999 .
[5] 冯金巧;杨兆升;张林;董升 . 一种自适应指数平滑动态预测模型[J]. 吉林大学学报(工学版), 2007, 37(06): 1284 -1287 .
[6] 车翔玖,刘大有,王钲旋 .

两张NURBS曲面间G1光滑过渡曲面的构造

[J]. 吉林大学学报(工学版), 2007, 37(04): 838 -841 .
[7] 刘寒冰,焦玉玲,,梁春雨,秦卫军 . 无网格法中形函数对计算精度的影响[J]. 吉林大学学报(工学版), 2007, 37(03): 715 -0720 .
[8] 张全发,李明哲,孙刚,葛欣 . 板材多点成形时柔性压边与刚性压边方式的比较[J]. 吉林大学学报(工学版), 2007, 37(01): 25 -30 .
[9] .

吉林大学学报(工学版)2007年第4期目录

[J]. 吉林大学学报(工学版), 2007, 37(04): 0 .
[10] 李月英,刘勇兵,陈华 . 凸轮材料的表面强化及其摩擦学特性
[J]. 吉林大学学报(工学版), 2007, 37(05): 1064 -1068 .