Abstract:In order to solve the defects of the material counting method in the production process, an improved template matching algorithm is studied for material quantity detection, and the improved template matching algorithm (TMA) is optimized based on the dual template search method and the position constraint coefficient r. The process of finding the best matching image, obtaining the optimal solution, and then performing image stitching to complete the material count. Through experimental comparison with traditional TMA and Gaussian pyramid transformation (GPT) optimization, it proves that compared with the other two algorithms, the time to process each sample image is shortened from 0.013s, 0.011s to 0.008s, and the counting accuracy is improved from 77.32%, 84.94% to more than 97.36% respectively. The stitching accuracy is also better than the other two algorithms, and the experimental results verify the effectiveness of the algorithm.
韩硕,陈晓荣,张彩霞,郭蓉蓉,王晓龙. 基于改进模板匹配算法的物料计数方法研究[J]. 计量学报, 2022, 43(7): 863-868.
HAN Shuo,CHEN Xiao-rong,ZHANG Cai-xia,GUO Rong-rong,WANG Xiao-long. Research on Material Counting Method Based on Improved Template Matching Algorithm. Acta Metrologica Sinica, 2022, 43(7): 863-868.
[1]姚莹, 蔡锦达, 刘倩. 基于机器视觉的平板式数粒机检测方法 [J]. 光学仪器, 2018, 40 (4): 9-14.
Yao Y, Cai J D, Liu Q. Detection Method of Tablet Counting Machine Based on Machine Vision [J]. Optical Instruments, 2018, 40 (4): 9-14.
[2]Lowe D. Distinctive Image Features from Scale-Invariant Keypoints [J]. International Journal of Computer Vision, 2004, 60 (2): 91-110.
[3]Brown M, Lowe D. Automatic Panoramic Image Stitching Using Invariant Features [J]. International Journal of Computer Vision, 2007, 74: 59-73.
[4]张见双, 张红民, 罗永涛, 等. 一种改进的Harris角点检测的图像配准方法 [J]. 激光与红外, 2017, 47 (2): 230-233.
Zhang J S, Zhang H M, Luo Y T, et al. An Improved Harris Corner Detection Image Registration Method [J]. Laser and Infrared, 2017, 47 (2): 230-233.
[5]Hu J W. Fast Image Matching Algorithm Based on Pixel Gray Value[C]//FMSMT 2017. Paris, 2017.
[6]Gong M G, Wu Y, Cai Q, et al. Discrete Particle Swarm Optimization for High-order Graph Matching [J]. Information Sciences, 2016, 328: 158-171.
[7]Zhang X Q, Wang T, Wang J X, et al. Pyramid Channelbased Feature Attention Network for Image De-hazing [J]. Computer Vision and Image Understanding, 2020: 197-198.
[8]Hamid H, Ahmed F, Ahmad J. Robust Image Hashing Scheme Using Laplacian Pyramids [J]. Computers & Electrical Engineering, 2020, 84: 106648.
[9]Lyu W, Zhou Z, Chen L, et al. A Survey on Image and Video Stitching [J]. Virtual Reality & Intelligent Hardware, 2019, 1 (1): 55-83.
[10]Gonzalez R C, Woods R E. 数字图像处理 (英文版)[M]. 北京: 电子工业出版社, 2010.
[11]Alessandro B, Massimo B, Massimiliano G, et al. Exploiting Multi-Level Parallelism for Stitching Very Large Microscopy Images [J]. Frontiers in Neuroinformatics, 2019, 13: 235-246.
[12]Wang L Y, Shen Y, Liu H D, et al. An Accurate and Efficient Multi-category Edge Detection Method [J]. Cognitive Systems Research, 2019, 58: 160-172.
[13]邢雪亮, 甘文波, 蒋朝根. 基于机器视觉的航空铆钉尺寸检测技术 [J]. 计量学报, 2020, 41 (5): 518-523.
Xing X L, Gan W B, Jiang C G. Aeronautical Rivet Size Detection Technology Based on Machine Vision [J]. Acta Metrologica Sinica, 2020, 41 (5): 518-523.
[14]Steger C, 等. 机器视觉算法与应用(双语版)[M]. 杨少荣, 等译. 北京: 清华大学出版社, 2019.
[15]Wang Y L, Liu W, Li F, et al. A Fast Template Matching Method Based on Improved Ring Projection Transformation and Local Dynamic Time Warping [J]. Optik, 2020, 216: 164954.
[16]Lai J X, Lei L, Deng K Y, et al. Fast and Robust Template Matching with Majority Neighbour Similarity and Annulus Projection Transformation [J]. Pattern Recognition, 2020, 98: 107029.
[17]Xiang T Z, Xia G S, Bai X, et al. Image Stitching by Line-guided Local Warping with Global Similarity Constraint [J]. Pattern Recognition, 2018, 83: 481-497.
[18]Wang Z B, Cui Z J, Zhu Y. Multi-modal Medical Image Fusion by Laplacian Pyramid and Adaptive Sparse Representation [J]. Comput Biol Med, 2020, 123: 103823.
[19]Shen D H, Zareapoor M, Yang J. Multimodal Image Fusion Based on Point-wise Mutual Information [J]. Image and Vision Computing, 2020,105: 104047.
[20]包能胜, 方海涛. 连续运动螺纹尺寸自适应机器视觉检测 [J]. 计量学报, 2020, 41 (9): 1062-1069.
Bao N S, Fang H T. Continuous Motion Thread Size Detection with Adaptive Machine Vision [J]. Acta Metrologica Sinica, 2020, 41 (9): 1062-1069.
[21]杨璐. 一种基于人体轮廓特征的教室人数统计算法 [J]. 计量学报, 2021, 42 (2): 178-183.
Yang L. An Algorithm for Counting People in Classroom Based on Human Contour Features [J]. Acta Metrologica Sinica, 2021, 42 (2): 178-183.
[22]薛震,于莲芝,胡婵娟. 基于图像序列的运动目标检测识别关键技术研究[J]. 计量学报, 2020, 41(12): 1475-1481.
Xue Z, Yu L Z, Hu C J. Research on Key Techniques of Moving Target Detection and Recognition Based on Image Sequence[J]. Acta Metrologica Sinica, 2020, 41(12): 1475-1481.
[23]王一丁. 工业图像处理[M]. 西安: 西安电子科技大学出版社, 2018.
[24]万国挺, 王俊平, 李锦, 等. 图像拼接质量评价方法 [J]. 通信学报, 2013, 34 (8): 76-81.
Wan G T, Wang J P, Li J, et al. Image Mosaic Quality Evaluation Method [J]. Journal of Communications, 2013, 34 (8): 76-81.