Please wait a minute...
工程设计学报  2022, Vol. 29 Issue (6): 784-792    DOI: 10.3785/j.issn.1006-754X.2022.00.078
整机和系统设计     
一种基于机器视觉的平面加工机床控制系统的设计
潘盛湖(),张小军,吕东
西南石油大学 机电工程学院,四川 成都 610500
Design of a control system of plane machining machine tool based on machine vision
Sheng-hu PAN(),Xiao-jun ZHANG,Dong Lü
School of Mechatronics Engineering, Southwest Petroleum University, Chengdu 610500, China
 全文: PDF(4038 KB)   HTML
摘要:

针对服装、包装等加工行业中须将人工测量的纸质图纸或模型样件的尺寸信息录入计算机并转换成电子加工图纸而导致的加工周期长、生产效率低的问题,提出了一种基于机器视觉的平面加工机床控制系统,以实现对纸质图纸或模型样件的快速检测。采用“ARM+DSP”方式搭建了主从式运动控制系统,设计了系统各部分功能模块。构建了“工控机+工业CCD (charge coupled device,电荷耦合器件)相机+光源控制”的视觉检测系统,结合FAWS(feature adaptive wavelet shrinkage, 自适应特征的小波收缩)算法和麻雀搜索算法提出一种改进的FAWS算法进行图像降噪,并采用Canny算法进行图像边缘检测,实现图像轮廓的准确提取。设计了图像轮廓提取、轮廓数据转换为加工数据、数据通信等处理程序,实现了基于机器视觉的快速检测以及在系统加工过程中的人机交互。最后,对系统进行了实验测试,对实际加工效果进行了评价。结果表明,采用所研制的平面加工机床控制系统不仅能显著提高生产效率,而且能减小图像轮廓的误差。其性能稳定可靠,具有一定的工程实用价值。

关键词: 平面加工机床视觉检测图像处理FAWS (feature adaptive wavelet shrinkage,自适应特征的小波收缩)算法麻雀搜索算法Canny算法    
Abstract:

In order to solve the problems of long processing cycle and low production efficiency caused by inputting the size information of manually measured paper drawings or model samples into the computer and converting it into electronic processing drawings in garment, packaging and other processing industries, a control system of plane machining machine tool based on machine vision was proposed to realize the rapid detection of paper drawings or model samples. The master-slave motion control system was built by using "ARM+DSP" mode, and the functional modules of each part of the system were designed. A visual detection system of "industrial computer+industrial CCD (charge coupled device) camera+light source control" was built. An improved FAWS (feature adaptive wavelet shrinkage) algorithm was proposed by combining the FAWS algorithm and the sparrow search algorithm to reduce image noise, and the Canny algorithm was used to complete achieve image edge detection so as to achieve the accurate extraction of image contour. The processing programs of image contour extraction, contour data conversion to processing data, data communication, etc. were designed to realize rapid detection based on machine vision and human-computer interaction in the system processing process. Finally, the system was tested and the actual machining effect was evaluated. The results showed that the proposed control system of plane machining machine tool could not only significantly improve the production efficiency, but also reduce the error of image contour. Its performance is stable and reliable, and has certain engineering practical value.

Key words: plane processing machine tool    visual detection    image processing    FAWS (feature adaptive wavelet shrinkage) algorithm    sparrow search algorithm    Canny algorithm
收稿日期: 2021-10-13 出版日期: 2023-01-06
CLC:  TP 274  
基金资助: 四川省教育厅自然科学重点项目(16ZA0070)
作者简介: 潘盛湖(1982—),男,侗族,贵州天柱人,讲师,硕士,从事机电一体化技术、石油机械智能化等研究,E-mail: psh2000psh@126.com,https://orcid.org/0000-0002-3147-9910
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
RSS
作者相关文章  
潘盛湖
张小军
吕东

引用本文:

潘盛湖,张小军,吕东. 一种基于机器视觉的平面加工机床控制系统的设计[J]. 工程设计学报, 2022, 29(6): 784-792.

Sheng-hu PAN,Xiao-jun ZHANG,Dong Lü. Design of a control system of plane machining machine tool based on machine vision[J]. Chinese Journal of Engineering Design, 2022, 29(6): 784-792.

链接本文:

https://www.zjujournals.com/gcsjxb/CN/10.3785/j.issn.1006-754X.2022.00.078        https://www.zjujournals.com/gcsjxb/CN/Y2022/V29/I6/784

图1  基于机器视觉的平面加工机床控制系统结构
图2  基于机器视觉的平面加工机床控制系统的功能模块
图3  运动控制模块主控单元的硬件连接
图4  RS232标准串口设备通信结构
图5  限位信号控制电路图
图6  电机控制接口的电路图
图7  改进FAWS算法的降噪效果
图8  改进FAWS算法的适应度值变化曲线
图9  不同p、q对应的适应度值
图10  高斯滤波和改进FAWS算法降噪效果对比
指令代表意义参数
IN初始化
SPr选择第r号刀笔r
PU抬刀至(x, y)位置坐标(x, y
PD下刀至(x, y)位置坐标(x, y
DI绝对方向
DR相对方向
表1  常用PLT指令
图11  基于机器视觉的平面加工机床控制系统的实验平台
图12  平面加工机床控制系统测试流程
测量组

原图轮廓

间距/mm

加工后轮廓间距/mm

绝对误差/

mm

相对误差/

%

154.0054.20+0.20+0.37
211.5011.65+0.15+1.30
394.0094.30+0.30+0.32
463.0062.90-0.10-0.16
526.0026.25+0.25+0.96
637.5037.55+0.05+0.13
768.0068.20+0.20+0.29
845.0044.70-0.30-0.67
917.0017.10+0.10+0.59
1038.0037.85-0.15-0.39
1142.5042.75+0.25+0.59
1274.0074.30+0.30+0.41
1359.0059.15+0.15+0.25
表2  加工前后图像轮廓间距及其误差
1 黄顺春,张书齐.中国制造业高质量发展评价指标体系研究综述[J].统计与决策,2021(2):5-9.
HUANG Shun-chun, ZHANG Shu-qi. Research review on the evaluation index system of high-quality development in China's manufacturing industry[J]. Statistics & Decision, 2021(2): 5-9.
2 孙斌,田植良.基于技术创新的装备制造业高质量发展综述[J].科技和产业,2020,20(5):75-79. doi:10.3969/j.issn.1671-1807.2020.05.013
SUN Bin, TIAN Zhi-liang. Summary of high quality development of equipment manufacturing based on technology innovation[J]. Science Technology and Industry, 2020, 20(5): 75-79.
doi: 10.3969/j.issn.1671-1807.2020.05.013
3 张洪国,黎文娟,邵立国.各国抢占智能制造高地[J].互联网经济,2017(Z1):52-57.
ZHANG Hong-guo, LI Wen-juan, SHAO Li-guo. Countries seize the highland of intelligent manufacturing[J]. Internet Economy, 2017(z1): 52-57.
4 周俊杰,余建波.基于机器视觉的加工刀具磨损量在线测量[J].上海交通大学学报,2021,55(6):741-749.
ZHOU Jun-jie, YU Jian-bo. Online measurement of machining tool wear based on machine vision[J]. Journal of Shanghai Jiaotong University, 2021, 55(6): 741-749.
5 董玲,杨洗陈,雷剑波.基于机器视觉的激光再制造机器人离线自动编程研究[J].中国激光,2013,40(10):114-121. doi:10.3788/cjl201340.1003006
DONG Ling, YANG Xi-chen, LEI Jian-bo. Off-line automatic programming research of laser remanufacturing robot based on machine vision[J]. Chinese Journal of Lasers, 2013, 40(10): 114-121.
doi: 10.3788/cjl201340.1003006
6 周晶.基于机器视觉的玻璃加工AOI系统的开发[J].机床与液压,2020,48(7):119-122. doi:10.3969/j.issn.1001-3881.2020.07.026
ZHOU Jing. Development of AOI system for glass processing based on machine vision[J]. Machine Tool & Hydraulics, 2020, 48(7): 119-122.
doi: 10.3969/j.issn.1001-3881.2020.07.026
7 WANG Xu-feng, KONG Xing-wei, ZHI Jian-hui, et al. Real-time drogue recognition and 3D locating for UAV autonomous aerial refueling based on monocular machine vision[J]. Chinese Journal of Aeronautics, 2015, 28(6): 1667-1675.
8 LI Yu, YU Feng-yuan, CAI Qian, et al. Design of target recognition system based on machine learning hardware accelerator[J]. Wireless Personal Communications, 2018, 102(2): 1557-1571.
9 ZHANG Zheng-yu. A flexible new technique for camera calibration[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2000, 22(11): 1330-1334.
10 顾梅花,苏彬彬,王苗苗,等.彩色图像灰度化算法综述[J].计算机应用研究,2019,36(5):1286-1292.
GU Mei-hua, SU Bin-bin, WANG Miao-miao, et al. Survey on decolorization methods[J]. Application Research of Computers, 2019, 36(5): 1286-1292.
11 李俊山,李旭辉.数字图像处理[M].北京:清华大学出版社,2007:20-35.
LI Jun-shan, LI Xu-hui. Digital image processing[M]. Beijing: Tsinghua University Press, 2007: 20-35.
12 GUPTA K K, GUPTA R. Feature adaptive wavelet shrinkage for image denoising[C]//International Conference on Signal Processing, Communications and Networking. IEEE, 2007: 81-85.
13 XUE Jian-kai, SHEN Bo. A novel swarm intelligence optimization approach: sparrow search algorithm[J]. Systems Science & Control Engineering, 2020, 8(1): 22-34.
14 李雅丽,王淑琴,陈倩茹,等.若干新型群智能优化算法的对比研究[J].计算机工程与应用,2020,56(22):1-12.
LI Ya-li, WANG Shu-qin, CHEN Qian-ru, et al. Comparative study of several new swarm intelligence optimization algorithms[J]. Computer Engineering and Applications, 2020, 56(22): 1-12.
15 江涛,李强,陈苏宇,等.基于Otsu和FMM方法的风洞试验图像修复[J].航空学报,2020,41(2):106-113.
JIANG Tao, LI Qiang, CHEN Su-yu, et al. Image inpainting of wind tunnel test based on Otsu method and FMM[J]. Acta Aeronautica et Astronautica Sinica, 2020, 41(2): 106-113.
16 李彦,赵其峰,闫河,等.Canny算子在PCBA目标边缘提取中的优化应用[J].光学精密工程,2020,28(9):2096-2102. doi:10.37188/OPE.20202809.2096
LI Yan, ZHAO Qi-feng, YAN He, et al. Optimized application of canny operator in PCBA target edge extraction[J]. Optics and Precision Engineering, 2020, 28(9): 2096-2102.
doi: 10.37188/OPE.20202809.2096
17 顾天奇,张雷,冀世军,等.封闭离散点的曲线拟合方法[J].吉林大学学报(工学版),2015,45(2):437-441. doi:10.13229/j.cnki.jdxbgxb201502015
GU Tian-qi, ZHANG Lei, JI Shi-jun, et al. Curve fitting method for closed discrete points[J]. Journal of Jilin University (Engineering and Technology Edition), 2015, 45(2): 437-441.
doi: 10.13229/j.cnki.jdxbgxb201502015
18 邓仕超,李伟明,龙芋宏,等.一种改进的二值图像边界跟踪与边界链码获取算法[J].激光与光电子学进展,2018,55(6):147-153. doi:10.3788/lop55.061007
DENG Shi-chao, LI Wei-ming, LONG Yu-hong, et al. An improved algorithm for boundary tracking and boundary chain code acquisition of binary image[J]. Laser & Optoelectronics Progress, 2018, 55(6): 147-153.
doi: 10.3788/lop55.061007
19 许丽萍,胡兵.一种JPG图像到PLT文件的转化方法[J].激光杂志,2005(6):49-50. doi:10.3969/j.issn.0253-2743.2005.06.020
XU Li-ping, HU Bing. A scheme on transforming the JPG file into the PLT one[J]. Laser Journal, 2005(6): 49-50.
doi: 10.3969/j.issn.0253-2743.2005.06.020
[1] 纪超,王亮,王孝敬,李小兵,曹雯. 基于MSSA-SVM的电缆隧道故障预警系统设计[J]. 工程设计学报, 2023, 30(1): 109-116.
[2] 乔景慧, 李岭. 基于机器视觉的电视机背板检测及自适应抓取研究[J]. 工程设计学报, 2019, 26(4): 452-460.
[3] 乔 峰,郑 堤,胡利永,魏玉艳. 基于机器视觉实时决策的智能投饵系统研究[J]. 工程设计学报, 2015, 22(6): 528-533.
[4] 李丽娟, 徐尚龙, 秦 杰. 基于图像处理技术的五金件表面缺陷检测研究[J]. 工程设计学报, 2011, 18(2): 134-138.