Continuous Motion Thread Size Detection with Adaptive Machine Vision
BAO Neng-sheng1,2,FANG Hai-tao1
1. Department of Mechanical and Electronic Engineering, Shantou University, Shantou, Guangdong 515063, China
2. Key Laboratory of Intelligent Manufacturing(Shantou University), Ministry of Education,Shantou, Guangdong 515063, China
摘要针对螺纹零件尺寸检测效率低、工作强度大、检测精度不高的问题,提出了一种连续运动螺纹尺寸自适应机器视觉的检测方法。首先设计了一套在线图像采集装置用于采集运动螺纹零件的图像;其次使用NCC(normalized cross correlation)归一化匹配算法,完成对螺纹零件的识别及追踪,在此基础上设计了自适应的ROI(region of interest)裁剪区域;然后通过Canny算法提取边缘轮廓,利用最小二乘法直线拟合技术对螺纹轮廓进行直线拟合,生成螺纹中径线,完成对螺纹中径的测量;最后在使用Harris角点检测算法提取多螺纹轮廓波峰与波谷的基础上,提出了利用螺纹中径线与各角点之间的距离来完成对角点的细化。实验表明,所提方法在螺纹尺寸检测方面具有可行性和有效性。
Abstract:Because of the problem of low efficiency, high working intensity and low detection accuracy of threaded parts, the adaptive machine vision detection method of continuous motion thread size is proposed.Firstly, an online image acquisition device is designed to collect moving thread parts images.Secondly, NCC (normalized cross correlation) normalization matching algorithm is used to identify and track the threaded parts.On this basis, an adaptive ROI (region of interest) clipping region is designed; then the edge contour is extracted by Canny algorithm.The least squares straight line fitting technique is used to fit the thread profile straight line, the thread diameter line is generated, and the measurement of the thread diameter is completed.Finally, based on the Harris corner detection algorithm is used for multi-thread contour peak and trough extraction, it is proposed to use the distance between the thread diameter line and each corner point to complete the refinement of the diagonal point.Experiments show that the proposed method is feasible and effective in thread size detection.
[1]邢雪亮,甘文波,蒋朝根. 基于机器视觉的航空铆钉尺寸检测技术[J]. 计量学报, 2020, 41(5): 518-523.
Xing X L, Gan W B, Jiang C G. Technology of Size Detection of Air Rivets Based on Machine Vision[J]. Acta Metrologica Sinica,2020, 41(5): 518-523.
[2]卜晨, 万鹏. 基于机器视觉的螺纹参数检测[J]. 工业仪表与自动化装置, 2011,(3): 83-85.
Bu C, Wan P. Thread parameters detection based on machine vision[J]. Industrial Instrumentation & Automation, 2011,(3): 83-85.
[3]梁学军, 洪迈生, 贾文焕. 螺纹紧固件的自动检测技术[J]. 计量技术, 2000,(2): 14-17.
[4]雷吉平, 颜树华, 沈少伟. 螺纹参数CCD视觉检测系统的研究[J]. 制造技术与机床, 2010,(4): 96-99.
Lei J P, Yan S H,Shen S W. Research on Measuring System of Thread Parameters by CCD Vision[J]. Manufacturing Technology & Machine Tool, 2010,(4): 96-99.
[5]刘祥锋. 基于机器视觉技术的零件尺寸检测系统的研究[D]. 哈尔滨: 哈尔滨工业大学, 2005.
[6]万鑫, 万文. 基于机器视觉的螺纹参数检测系统设计[J]. 南昌航空大学学报(自然科学版), 2016, 30(3): 97-102.
Wan X, Wan W. Thread Parameter Detection Based on Machine Vision[J]. Journal of Nanchang Hangkong University(Natural Sciences), 2016, 30(3): 97-102.
[7]Horaud R, Charras J P. Automatic Inspection and Orientation of External Screws[C]// AGARD Conference Proceedings. 1980: 125-141.
[8]Kiuchi T. Image processing algorithm detecting partly hidden screw holes[M]. New York: IFS Publ Ltd, Springer-Verlag,1986: 503-512.
[9]Singh A P, Julka N. Screw Classification using Machine Vision[J]. International Journal of Electronics & Communication Technology, 2011, 2(1): 31-33.
[10]刘云清, 佟首峰, 刘鹏, 等. 螺纹综合尺寸非接触光电测试系统[J]. 化工自动化及仪表, 2005,32(2): 61-63.
Liu Y Q, Tong S F, Liu P, et al. Non-contact Fine Photoelectronic Measuring System for Screw Thread[J]. Control and Instruments in Chemical Industry, 2005,32(2): 61-63.
[11]Post D. Development in moire interferometry[J]. Op Eng, 1980, 21(3): 458-465.
[12]Cao Z L, Liu S Y, Rning J. Omni-directional Vision Localization Based on Particle Filter[C]//Image and Graphics 2007 Fourth International Conference. Chengdu, China, 2007: 478-483.
[13]Zhou S H, Chellappa R, Moghaddam B. Visual Tracking and Recognition Using Appearance-Adaptive Models in Particle Filters[J].IEEE Transactions on Image Processing, 2004,13(11):1491-1506.
[14]石韵昭,倪军,李宁钏, 等. 基于机器视觉的双工位载带检测系统研究[J]. 计量学报, 2019, 40(2): 196-200.
Shi Y Z, Ni J, Li N C, et al. Research on Duplex Carrier Detection System Based on Machine Vision[J]. Acta Metrologica Sinica, 2019, 40(2): 196-200.
[15]Gandhi T, Trivedi M M. Vehicle Surround Capture: Survey of Techniques and a Novel Omni-Video-Based Approach for Dynamic Panoramic Surround Maps[J]. IEEE Transactions on Intelligent Transportation Systems, 2006, 7(3): 293-308.
[16]汪海洋, 潘德炉, 夏德深. 二维Otsu自适应阈值选取算法的快速实现[J]. 自动化学报, 2007,33(9): 968-971.
Wang H Y, Pan D L, Xia D S. A Fast Algorithm for Two-dimensional Otsu Adaptive Threshold Algorithm[J]. Acta Automatica Sinica, 2007,33(9): 968-971.
[17]Sarvaiya J N, Patnaik S, Bombaywala S. Image registration by template matching using normalized cross-correlation[C]// In Advances in Computing, Control & Telecommunication Technologies, 2009. ACT09. International Conference on.Bangalore, India, 2009: 819-822.
[18]马浩淼, 吴海, 王德发, 等. 面积归一法测定萜烯试剂纯度[J]. 计量学报, 2018, 39(5): 736-740.
Ma H M, Wu H, Wang D F, et al. Purity Analysis of Some Terpenes by Peak Area Normalization Method[J]. Acta Metrologica Sinica, 2018, 39(5): 736-740.
[19]张立峰, 朱枫. 电容层析成像混联归一化模型研究[J]. 计量学报, 2018,39(5):675-678.
Zhang L F, Zhu F. Research on Hybrid Normalization Model of Electrical Capacitance Tomography[J]. Acta Metrologica Sinica, 2018, 39(5): 675-678.
[20]Canny J. A computational approach to edge detection[J]. IEEE-PAMI, 1986, 8(6): 679-698.
[21]Nadernejad E, Sharifzadeh S, Hassanpour H. Edge detection techniques: evaluations and comparisons[J]. Applied Mathematical Sciences, 2008, 2(31): 1507-1520.
[22]孙波. 数字图像角点检测算法的研究[D]. 合肥: 合肥工业大学, 2013.