基于超分模型与改进Canny算法的零件测量系统

甄国涌, 赵继达, 储成群, 王子硕

集成电路与嵌入式系统 ›› 2024, Vol. 24 ›› Issue (7) : 59-64.

PDF(5208 KB)
PDF(5208 KB)
集成电路与嵌入式系统 ›› 2024, Vol. 24 ›› Issue (7) : 59-64. DOI: 10.20193/j.ices2097-4191.2024.07.010
研究论文

基于超分模型与改进Canny算法的零件测量系统

作者信息 +

Parts measurement system based on super-resolution model and improved Canny algorithm

Author information +
文章历史 +

摘要

针对工业测量零件尺寸中存在测量精度低、算法适应性差等问题,设计了基于超分模型与改进Canny算法的机器视觉零件测量系统。首先,对相机进行尺寸标定,得到像素距离与实际尺寸的比例关系;其次,引入并改进超分模型对输入图片进行预处理,得到边缘细节更加清晰的图像;接着,为了优化工业测量环境中光照条件差导致的边缘检测问题,结合Otsu算法与双阈值分割算法,利用局部阈值分割的方式改进Canny边缘滤波算法得到边缘图像;最后,对边缘图像进行圆拟合与直线拟合后,根据相机标定结果与超分模型参数标记零件尺寸结果。实验结果表明,本系统的测量精度可以达到0.001 mm,平均测量误差为0.007 4 mm,整体测量速度为6.44 s,能够满足高精度工业测量需求。

Abstract

In order to solve the problems of low measurement accuracy and poor algorithm adaptability in industrial measurement of part dimensions,a machine vision parts measurement system based on super-resolution model and improved Canny algorithm is designed and proposed.Firstly,the camera is calibrated to obtain the proportional relationship between the pixel distance and the actual size.Secondly,a super-resolution model is introduced and improved to pre-process the input image to obtain an image with clearer edge details.Thirdly,in order to solve the edge detection problem caused by poor lighting conditions in the industrial measurement environment,the Otsu algorithm and the double threshold segmentation algorithm are combined,and the Canny edge filtering algorithm is improved by using local threshold segmentation to obtain edge images.Finally,after simultaneously performing circle fitting and straight line fitting on the edge image,the part size results are marked based on the camera calibration results and super-resolution model parameters.The experiment results show that the measurement accuracy of this system can reach 0.001 mm,the average measurement error is 0.007 4 mm,and the overall measurement speed is 6.44 s,which can meet the needs of high-precision industrial measurement.

关键词

机器视觉 / 边缘检测 / 超分模型 / 自适应阈值 / 双阈值分割

Key words

machine vision / edge detection / super-resolution model / Otsu / double threshold segmentation

引用本文

导出引用
甄国涌, 赵继达, 储成群, . 基于超分模型与改进Canny算法的零件测量系统[J]. 集成电路与嵌入式系统. 2024, 24(7): 59-64 https://doi.org/10.20193/j.ices2097-4191.2024.07.010
ZHEN Guoyong, ZHAO Jida, CHU Chengqun, et al. Parts measurement system based on super-resolution model and improved Canny algorithm[J]. Integrated Circuits and Embedded Systems. 2024, 24(7): 59-64 https://doi.org/10.20193/j.ices2097-4191.2024.07.010
中图分类号: TG806 (技术测量方法)    TP391   

参考文献

[1]
张炳星, 高军伟, 王建冲, 等. 基于机器视觉的圆形垫圈尺寸测量系统设计[J]. 工具技术, 2023, 57(7):141-145.
ZHANG B X, GAO J W, WANG J CH, et al. Design of circular gasket size measurement system based on machine vision[J]. Tool Technology, 2023, 57(7):141-145 (in Chinese).
[2]
赵朝朝, 江明, 殷宗琨. 改进Canny算子下的工件尺寸测量[J]. 电子测量与仪器学报, 2022, 36(8):52-59.DOI:10.13382/j.jemi.B2205322.
ZHAO CH CH, JIANG M, YIN Z K. Improved workpiece size measurement under Canny operator[J]. Journal of Electronic Measurement and Instrumentation, 2022, 36(8):52-59.DOI:10.13382/j.jemi.B2205322 (in Chinese).
[3]
DONG C, LOY C C, HE K, et al. Image super-resolution using deep convolutional networks[J]. IEEE transactions on pattern analysis and machine intelligence, 2015, 38(2):295-307.
[4]
DONG C, LOY C C, TANG X. Accelerating the super-resolution convolutional neural network[C]// Computer Vision-ECCV 2016:14th European Conference, Amsterdam,The Netherlands, October 11-14,2016,Proceedings,Part II 14. Springer International Publishing, 2016:391-407.
[5]
LEDIG C, THEIS L, HUSZÁRF, et al. Photo-realistic single image super-resolution using a generative adversarial network[C]// Proceedings of the IEEE conference on computer vision and pattern recognition, 2017:4681-4690.
[6]
WANG X, YU K, WU S, et al. Esrgan:Enhanced super-resolution generative adversarial net-works[C]// Proceedings of the European conference on computer vision(ECCV) workshops, 2018.
[7]
WANG X, XIE L B, DONG C, et al. Real-esrgan:Training real-world blind super-resolution with pure synthetic data[C]// Proceedings of the IEEE/CVF international conference on computer vision, 2021:1905-1914.
[8]
RONNEBERGER O, FISCHER P, BROXT. U-net:Convolutional networks for biomedical image segmentation[C]// Medical Image Computing and Computer-Assisted Intervention-MICCAI 2015:18th International Conference,Munich,Germany, October 5-9,2015,Proceedings,Part III 18.Springer International Publishing, 2015:234-241.
[9]
MIYATO T, KATAOKA T, KOYAMA M, et al. Spectral normalization for generative adversarial networks[J]. arXiv preprint arXiv:1802.05957,2018.
[10]
HOWARD A G, ZHU M, CHEN B, et al. Mobilenets:Efficient convolutional neural networks for mobile vision applications[J]. arXiv preprint arXiv:1704.04861,2017.

基金

山西省重点研发计划项目(202102100401014)

编辑: 薛士然
PDF(5208 KB)

Accesses

Citation

Detail

段落导航
相关文章

/