Education, Science, Technology, Innovation and Life
Open Access
Sign In

Method and Device for Effectively Utilizing OpenCV to Detect PCB Board Size

Download as PDF

DOI: 10.23977/jemm.2023.080206 | Downloads: 53 | Views: 627


Guihua Huang 1, Tingting Zhang 1, Changxiang Chen 2


1 Department of Computer Science, Guangdong University of Science and Technology, Dongguan, Guangdong, 523000, China
2 Institute of Biomedical Engineering, Peking University Shenzhen Graduate School, Shenzhen, Guangdong, 518000, China

Corresponding Author

Guihua Huang


In the process of PCB board production, it is necessary to accurately measure the contour dimensions of the PCB board and the dimensions of various types of wires, holes, or slots on the PCB board to avoid a large number of defective products flowing into the subsequent production process. In existing technology, the measurement of the dimensions of wires, holes, or slots on the PCB board mostly relies on manual work, which has the problems of low measurement efficiency and high measurement error rate, Unable to meet the efficient and high-quality production needs of PCB boards. This article proposes a method and device for effectively utilizing OpenCv to detect PCB board size. This device is based on an optical image measurement system, combined with the template matching method in OpenCv, and can automatically complete forming inspection and size measurement by scanning multiple PCB boards by one time.This device can complete measurement evaluation, report generation, and SPC data analysis for multiple PCB boards, achieving high automation and significantly improving measurement accuracy system.


Dimensional inspection; PCB board; Template matching; OpenCv


Guihua Huang, Tingting Zhang, Changxiang Chen, Method and Device for Effectively Utilizing OpenCV to Detect PCB Board Size. Journal of Engineering Mechanics and Machinery (2023) Vol. 8: 44-50. DOI:


[1] Xue Ping, Wang Yihui, Wang Hongmin. Size Detection Method of Embedded Ball Based on Aviation Bearing Image[J]. Mathematical Problems in Engineering. Volume 2021, Issue. 2021:1-5. 
[2] Tay Y. H. Khairuddin U. Development of a Single Camera Machine Vision System for Automatic 3D Size Detection [J]. IOP Conference Series: Materials Science and Engineering. Volume 1051, Issue 1. 2021:012002-. 
[3] Chen Jiaxu, Lu Yonghua, Tan Jie, Ye Zhibin, Zhu Huayu. Geometrical Size Detection on Key Contours of Safety Seat Base [J]. Journal of Physics: Conference Series. Volume 1739, Issue 1. 2021. PP 012042-. 
[4] Li Kui. Chen Man long. Detection of Surface Defects and Dimensions of Graphite Seal Ring Based on Machine Vision [J]. Seventh Symposium on Novel Photoelectronic Detection Technology And Applications. Volume 11763, Issue. 2021. 
[5] Huang Wenji. Research on Machine Vision Algorithms for Target Recognition and Localization [D]. Master's Thesis of Jinan University, 2017: 1-5. 
[6] Xie Guangwei, Zhong Zhaozhun, Zhong Shengkui, Zhang Yunshi, Shen Feng. Research on circular Mark point localization method on PCB board based on machine vision [J]. Computer Knowledge and Technology, 2013, 9(32): 7341-7342. 
[7] Brunelli R, Template Matching Techniques in Computer Vision: Theory and Practice [J]. Wiley, 2009:34-36. 
[8] Zhou Lisa. Research and Application of Visual Localization Technology Based on Template Matching [D]. Dalian: Master's Thesis from Dalian University of Technology, 2012:12-13. 
[9] Zhang W, Tong R, Dong J. Boosted Cascade of Scattered Rectangle Features for Object Detection [J]. Science in China, 2009, 52(2):236-243. 
[10] Tu Zimei, Wang Sujuan, Shen Zhiwei. Machine vision based printed circuit board detection and sorting system [J]. Modern electronic technology, 2022, 45(14):5-9. 
[11] Zhou Jiangxiu, Liu Ruishuo, Cheng Wenkai, Qi Jiale, Xiao Qikun, Mo Weiyuan, Zhang Zihao, Yu Xiubing, Wang Tiansheng, Lin Ke, Huang Guihua. A measuring instrument: 202222501217. 3[P]. 2023. 01. 06. 

All published work is licensed under a Creative Commons Attribution 4.0 International License.

Copyright © 2016 - 2031 Clausius Scientific Press Inc. All Rights Reserved.