[go: up one dir, main page]

CN114862817A - A method, system, device and medium for detecting defects in gold finger area of circuit board - Google Patents

A method, system, device and medium for detecting defects in gold finger area of circuit board Download PDF

Info

Publication number
CN114862817A
CN114862817A CN202210568397.9A CN202210568397A CN114862817A CN 114862817 A CN114862817 A CN 114862817A CN 202210568397 A CN202210568397 A CN 202210568397A CN 114862817 A CN114862817 A CN 114862817A
Authority
CN
China
Prior art keywords
image
area
circuit board
circuit
gold finger
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210568397.9A
Other languages
Chinese (zh)
Other versions
CN114862817B (en
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Shuzhilian Technology Co Ltd
Original Assignee
Chengdu Shuzhilian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Shuzhilian Technology Co Ltd filed Critical Chengdu Shuzhilian Technology Co Ltd
Priority to CN202210568397.9A priority Critical patent/CN114862817B/en
Publication of CN114862817A publication Critical patent/CN114862817A/en
Application granted granted Critical
Publication of CN114862817B publication Critical patent/CN114862817B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/956Inspecting patterns on the surface of objects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/956Inspecting patterns on the surface of objects
    • G01N2021/95638Inspecting patterns on the surface of objects for PCB's
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30141Printed circuit board [PCB]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Immunology (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Biophysics (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Engineering & Computer Science (AREA)
  • Pathology (AREA)
  • Biomedical Technology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

本发明公开了一种电路板金手指区域缺陷检测方法及系统及装置及介质,涉及电子元器件生产领域,在获得待测电路图像后,采用基于深度学习的目标检测框架定位待测电路中金手指图像区域,根据所述金手指图像区域在所述待测电路图像中的坐标对待测电路图像进行分割,获得金手指区域图像,再对所述金手指区域图像进行分析,即可获得印制电路板的缺陷检测结果,能够通过计算机自动检测出印制电路板金手指区域存在的缺陷,避免由人工目检对于特征较为相似的金手指区域进行检测所得到的检测结果不稳定不准确的问题,有较强的实用性。

Figure 202210568397

The invention discloses a method, system, device and medium for detecting defects in the gold finger area of a circuit board, and relates to the field of electronic component production. In the finger image area, the circuit image to be tested is divided according to the coordinates of the golden finger image area in the circuit image to be tested to obtain the image of the golden finger area, and then the image of the golden finger area is analyzed to obtain the printed circuit. The defect detection result of the circuit board can automatically detect the defects in the gold finger area of the printed circuit board through the computer, and avoid the unstable and inaccurate detection results obtained by manual visual inspection of the golden finger area with similar characteristics. , has strong practicability.

Figure 202210568397

Description

一种电路板金手指区域缺陷检测方法及系统及装置及介质A method, system, device and medium for detecting defects in gold finger area of circuit board

技术领域technical field

本发明涉及电子元器件生产领域,具体地,涉及一种电路板金手指区域缺陷检测方法及系统及装置及介质。The invention relates to the field of electronic component production, in particular to a method, system, device and medium for detecting defects in the gold finger area of a circuit board.

背景技术Background technique

随着电子行业蓬勃发展,电路设计愈加复杂化、细致化,印制电路板作为电子产品电路的主要载体,对其制造工艺的要求也越来越严格。印制电路板生产过程中涉及多道工艺,不同的制程都可能会造成印制电路板板面不同程度的缺损。金手指区域是印制电路板上由多个金黄色的导电触片组成的用于传输信号的区域,因其表面镀金而且导电触片排列如手指状,所以称为“金手指”。在印制电路板中,金手指作为对外连接网络的出口,是影响印制电路板质量的关键区域。目前对于印制电路板的检测工作,通常通过AOI自动光学检测机拍摄图片,再由人工目检对缺陷进行分类完成,但人工目检存在极大的主观性,尤其是对于特征较为相似的金手指区域的检测,人工长时间的工作下会很大程度上影响目检结果,导致检测结果不准确。With the vigorous development of the electronic industry, the circuit design has become more and more complicated and detailed. As the main carrier of electronic product circuits, printed circuit boards have more and more stringent requirements for their manufacturing processes. There are multiple processes involved in the production process of printed circuit boards, and different processes may cause different degrees of defects on the surface of printed circuit boards. The gold finger area is an area on the printed circuit board composed of multiple golden-yellow conductive contacts for signal transmission. Because the surface is gold-plated and the conductive contacts are arranged like fingers, it is called "gold finger". In the printed circuit board, the gold finger, as the outlet of the external connection network, is a key area that affects the quality of the printed circuit board. At present, for the inspection of printed circuit boards, pictures are usually taken by an AOI automatic optical inspection machine, and then the defects are classified by manual visual inspection. However, manual visual inspection has great subjectivity, especially for gold with similar characteristics In the detection of the finger area, the long-term manual work will greatly affect the visual inspection results, resulting in inaccurate detection results.

发明内容SUMMARY OF THE INVENTION

为了解决现有对印制电路板进行检测时对于特征较为相似的金手指区域的检测,人工长时间的工作下会很大程度上影响目检结果,导致得到的检测结果不稳定不准确的问题,本发明提供了一种金手指区域缺陷检测方法及系统及装置及介质,通过定位印制电路板上的金手指区域,再对定位后得到的图像关键区域进行分析,能够通过计算机自动检测出印制电路板金手指区域存在的缺陷。In order to solve the problem of the detection of gold finger regions with similar characteristics in the existing detection of printed circuit boards, the long-term manual work will greatly affect the visual inspection results, resulting in unstable and inaccurate detection results. The present invention provides a method, system, device and medium for detecting defects in the golden finger area. By locating the golden finger area on the printed circuit board, and then analyzing the key area of the image obtained after the positioning, it can be automatically detected by a computer. Defects in the gold finger area of the printed circuit board.

为了实现上述发明目的,本发明提供了一种电路板金手指区域缺陷检测方法,包括以下步骤:In order to achieve the above purpose of the invention, the present invention provides a method for detecting defects in the gold finger region of a circuit board, comprising the following steps:

获得待测电路图像;Obtain an image of the circuit to be tested;

识别所述待测电路图像,获得目标区域坐标,根据所述目标区域坐标对所述待测电路图像进行分割,获得金手指区域图像;Identifying the image of the circuit to be tested, obtaining the coordinates of the target area, and dividing the image of the circuit to be tested according to the coordinates of the target area to obtain an image of the golden finger area;

对所述金手指区域图像进行处理,获得图像数据;processing the image of the golden finger area to obtain image data;

分析所述图像数据,获得缺陷检测结果。The image data is analyzed to obtain defect detection results.

其中,本发明的原理为:获得待测电路图像后,计算机对所述待测电路图像进行识别,定位待测电路中金手指图像区域,获得所述金手指图像区域在所述待测电路图像中的坐标,根据所述坐标对待测电路图像进行分割,获得金手指区域图像,再通过一系列图像处理算法对所述金手指区域图像进行分析,获得图像数据,最后通过对所述图像数据进行分析,即可获得印制电路板的缺陷检测结果。The principle of the present invention is: after obtaining the image of the circuit to be tested, the computer recognizes the image of the circuit to be tested, locates the image area of the golden finger in the circuit to be tested, and obtains the image of the golden finger in the image of the circuit to be tested. According to the coordinates in the test circuit, the circuit image to be tested is divided according to the coordinates to obtain an image of the golden finger area, and then a series of image processing algorithms are used to analyze the image of the golden finger area to obtain image data. After analysis, the defect detection results of the printed circuit board can be obtained.

进一步的,为了准确定位电路中金手指区域,采用基于深度学习的目标检测框架实现目标区域坐标的获得,所述待测电路的目标区域坐标获得包括以下步骤:Further, in order to accurately locate the golden finger area in the circuit, a target detection framework based on deep learning is used to obtain the coordinates of the target area, and the obtaining of the coordinates of the target area of the circuit to be tested includes the following steps:

获得多个电路样本图,对所述电路样本图中金手指区域进行标注,获得第一训练集;Obtaining a plurality of circuit sample diagrams, marking the golden finger area in the circuit sample diagrams, and obtaining a first training set;

基于所述第一训练集训练第一目标检测框架,获得第一目标检测模型;Train a first target detection framework based on the first training set to obtain a first target detection model;

使用所述第一目标检测模型对所述待测电路图像进行识别,获得所述目标检测区域坐标。The first target detection model is used to identify the image of the circuit to be tested, and the coordinates of the target detection area are obtained.

进一步的,若所述金手指区域存在余铜缺陷,可能导致金手指区域使用时电路短路,从而导致印制电路板质量不达标,对于金手指区域余铜缺陷的识别,采用基于深度学习的目标检测框架实现,因此,所述对所述金手指区域图像进行处理前还包括以下步骤:Further, if there is a residual copper defect in the gold finger area, it may cause a short circuit in the gold finger area during use, resulting in substandard quality of the printed circuit board. For the identification of the residual copper defect in the gold finger area, the target based on deep learning is adopted. The detection framework is implemented, therefore, the following steps are further included before the processing of the golden finger area image:

获得多个电路缺陷样本图,对所述电路缺陷样本图中缺陷位置及类别进行标注,获得第二训练集;Obtaining a plurality of circuit defect sample maps, marking the defect positions and categories in the circuit defect sample maps, and obtaining a second training set;

基于所述第二训练集训练第二目标检测框架,获得第二目标检测模型;Train a second target detection framework based on the second training set to obtain a second target detection model;

所述对所述金手指区域图像进行处理,获得图像数据包括以下步骤:The processing of the golden finger area image to obtain image data includes the following steps:

使用所述第二目标检测模型对所述金手指区域图像进行识别,获得图像识别结果。The second target detection model is used to identify the golden finger region image to obtain an image identification result.

其中,由于需要手动对用于训练所述目标检测框架的样本集中的特征进行标注从而获得训练集,为提高所述目标检测框架训练后获得的目标检测模型识别的准确性,需要的样本量尽可能的多,从而导致工作量较大,为了减小工作量,采用结合FPN结构的Faster-RCNN目标检测框架,结合FPN结构的faster-RCNN目标检测框架适用于小样本量的深度学习问题,能够有效的减小前期处理样本集的工作量。Among them, since it is necessary to manually mark the features in the sample set used to train the target detection framework to obtain the training set, in order to improve the recognition accuracy of the target detection model obtained after the training of the target detection framework, the required number of samples is as small as possible. There are many possibilities, which leads to a large workload. In order to reduce the workload, the Faster-RCNN target detection framework combined with the FPN structure is used, and the faster-RCNN target detection framework combined with the FPN structure is suitable for deep learning problems with small sample sizes. Effectively reduce the workload of preprocessing sample sets.

进一步的,若所述金手指区域存在脏污缺陷,可能导致金手指区域使用时电路接触不良,从而导致印制电路板质量不达标,对于金手指区域脏污缺陷的识别时,所述对所述金手指区域图像进行处理包括以下步骤:Further, if there is a contamination defect in the golden finger area, it may lead to poor circuit contact when the golden finger area is used, resulting in substandard quality of the printed circuit board. When identifying the contamination defect in the golden finger area, the The processing of the gold finger area image includes the following steps:

为了便于计算机图像处理,对所述金手指区域图像进行二值化处理,获得二值化图像;In order to facilitate computer image processing, binarization is performed on the golden finger region image to obtain a binarized image;

为了滤掉图像中可能出现的噪声,提高图像处理的准确性,对所述二值化图像进行滤波处理获得第一图像;In order to filter out possible noise in the image and improve the accuracy of image processing, filtering the binarized image to obtain a first image;

二值化后的图像像素灰度值为255或0,金手指区域存在的脏污处的像素点经过二值化处理后会与正常线路图像处的像素点相区分,与印制电路板底材区域共同表现为黑色,正常线路部分则表现为白色,因此对金手指区域存在的脏污可以通过检测图像中连通区域的面积来实现,因此,检测所述第一图像中的连通区域;The pixel gray value of the binarized image is 255 or 0. After the binarization process, the dirty pixels in the golden finger area will be distinguished from the pixels in the normal circuit image, and will be different from the bottom of the printed circuit board. The material area is displayed in black together, and the normal circuit part is displayed in white, so the contamination in the gold finger area can be realized by detecting the area of the connected area in the image, so the connected area in the first image is detected;

计算所述第一图像中各连通区域的面积;calculating the area of each connected region in the first image;

所述分析所述图像数据,获得缺陷检测结果包括以下步骤:The analyzing the image data to obtain the defect detection result includes the following steps:

由于金手指区域可能存在脏污,脏污的存在会使正常部分区域面积减小,因此,判断所述连通区域面积的大小,若所述连通区域的面积小于标准值,则所述金手指区域图像存在缺陷。Since the golden finger area may be dirty, the presence of dirt will reduce the area of the normal part. Therefore, the size of the connected area is judged. If the area of the connected area is smaller than the standard value, then the golden finger area Image is defective.

其中,为了避免金手指区域图像中较小的脏污由于滤波处理被去除而导致漏检,所述滤波处理采用形态学开运算的方法实现,先对所述二值化图像进行腐蚀处理,再对膨胀处理后的图像进行膨胀处理,获得所述第一图像,所述形态学开运算能够消除图像外孤立的白色小点、毛刺和小桥,而使图像总的位置和形状不变。Among them, in order to avoid missing detection due to the removal of the small contamination in the image of the golden finger region due to the filtering process, the filtering process is implemented by the method of morphological opening operation, first performing corrosion processing on the binarized image, and then performing corrosion processing on the binary image. Dilation processing is performed on the dilated image to obtain the first image, and the morphological opening operation can eliminate isolated white dots, burrs and small bridges outside the image, and keep the overall position and shape of the image unchanged.

进一步的,若所述金手指区域存在金属氧化缺陷,可能会使印制电路板使用寿命降低,从而导致印制电路板质量不达标,对于金手指区域金属氧化缺陷的识别时,所述对所述金手指区域图像进行处理包括以下步骤:Further, if there are metal oxidation defects in the gold finger area, the service life of the printed circuit board may be reduced, resulting in substandard quality of the printed circuit board. When identifying metal oxidation defects in the gold finger area, the The processing of the gold finger area image includes the following steps:

为了便于计算机图像处理,对所述金手指区域图像进行灰度化处理,获得灰度图像;In order to facilitate computer image processing, grayscale processing is performed on the image of the golden finger region to obtain a grayscale image;

为了滤掉图像中可能出现的噪声,提高图像处理的准确性,对所述灰度图像进行滤波处理获得第二图像;In order to filter out possible noise in the image and improve the accuracy of image processing, filtering the grayscale image to obtain a second image;

由于印制电路板的检测多在工业生产环境下进行,获得图像时采用的工业光源较为稳定,当金手指存在金属氧化缺陷时,所述金手指区域图像的颜色比标准金手指区域颜色暗,而印制电路板底材颜色保持不变,因此氧化后图像的灰度平均值会降低,根据所述金手指区域图像灰度平均值即可判断印制电路板金手指区域是否存在氧化缺陷,因此,计算所述第二图像的灰度平均值,获得第二图像数据;Since the detection of printed circuit boards is mostly carried out in an industrial production environment, the industrial light source used to obtain images is relatively stable. When the gold finger has metal oxidation defects, the color of the image in the gold finger area is darker than that of the standard gold finger area. However, the color of the substrate of the printed circuit board remains unchanged, so the average grayscale value of the image after oxidation will decrease. According to the grayscale average value of the image in the gold finger area, it can be determined whether there is an oxidation defect in the gold finger area of the printed circuit board. Therefore, calculating the grayscale average value of the second image to obtain second image data;

所述分析所述图像数据,获得缺陷检测结果包括以下步骤:The analyzing the image data to obtain the defect detection result includes the following steps:

对比所述第二图像数据与标准图像灰度区间大小,若所述第二图像数据不在所述标准图像灰度区间内,则所述金手指区域图像存在缺陷。Comparing the size of the second image data with that of the standard image grayscale interval, if the second image data is not within the standard image grayscale interval, the golden finger area image is defective.

其中,金手指区域存在金属氧化缺陷时,原本金色区域变为暗金色,由于采集到的图像为RGB图像,对于RGB图像而言,金色和暗金色主要在图像R通道分量和G通道分量上存在差异,为了避免B通道分量对所述图像灰度平均值产生影响,可以通过对图像B通道分量进行补偿,使图像B通道分量保持固定,因此在蓝色灯光下对待测电路进行拍照,获得所述待测电路图像。Among them, when there is a metal oxidation defect in the gold finger area, the original golden area becomes dark gold. Since the collected image is an RGB image, for an RGB image, gold and dark gold mainly exist in the R channel component and G channel component of the image. In order to avoid the influence of the B channel component on the gray average value of the image, the B channel component of the image can be compensated to keep the B channel component of the image fixed. Therefore, the circuit to be tested is photographed under blue light to obtain the Describe the image of the circuit under test.

其中,由于采集到的图像为RGB图像,对于RGB图像而言,金色和暗金色主要在图像R通道分量和G通道分量上存在差异,为了避免B通道分量对所述图像灰度平均值产生影响,在计算图像灰度平均值时,可以排除图像B通道分量,所述对所述金手指区域图像进行灰度化处理包括以下步骤:Among them, since the collected images are RGB images, for RGB images, gold and dark gold are mainly different in the R channel component and G channel component of the image. In order to avoid the B channel component from affecting the average gray level of the image , when calculating the average gray level of the image, the B channel component of the image can be excluded, and the grayscale processing of the golden finger area image includes the following steps:

获得所述金手指区域图像像素的R分量和G分量;obtaining the R component and the G component of the image pixel of the golden finger area;

对所述R分量和G分量进行加权计算,获得像素灰度值;Weighted calculation is performed on the R component and the G component to obtain a pixel gray value;

根据所述像素灰度值生成灰度图像。A grayscale image is generated from the pixel grayscale values.

为了实现上述发明目的,本发明还提供了一种电路板金手指区域缺陷检测系统,所述系统包括:In order to achieve the above purpose of the invention, the present invention also provides a circuit board gold finger region defect detection system, the system includes:

图像获得单元,用于获得待测电路图像;an image obtaining unit, used to obtain an image of the circuit to be tested;

区域识别单元,用于识别所述待测电路图像,获得目标区域坐标,根据所述目标区域坐标对所述待测电路图像进行分割,获得金手指区域图像;an area identification unit, configured to identify the image of the circuit to be tested, obtain coordinates of the target area, and segment the image of the circuit to be tested according to the coordinates of the target area to obtain an image of the golden finger area;

处理单元,用于对所述金手指区域图像进行处理,获得图像数据;a processing unit, configured to process the image of the golden finger area to obtain image data;

分析单元,用于分析所述图像数据,获得缺陷检测结果;an analysis unit for analyzing the image data to obtain a defect detection result;

所述系统用于实现所述电路板金手指区域缺陷检测方法的步骤。The system is used for implementing the steps of the method for detecting defects in the gold finger region of the circuit board.

为了实现上述发明目的,本发明还提供了一种电路板金手指区域缺陷检测装置,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现所述电路板金手指区域缺陷检测方法的步骤。In order to achieve the above purpose of the invention, the present invention also provides a circuit board gold finger region defect detection device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, the processing When the computer executes the computer program, the computer implements the steps of the method for detecting defects in the gold finger region of the circuit board.

为了实现上述发明目的,本发明还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现所述电路板金手指区域缺陷检测方法的步骤。In order to achieve the above object of the invention, the present invention also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the defect detection of the gold finger region of the circuit board is realized steps of the method.

本发明提供的一个或多个技术方案,至少具有如下技术效果或优点:本发明通过定位印制电路板上的金手指区域,再对定位后得到的图像关键区域进行分析,能够通过计算机自动检测出印制电路板金手指区域存在的缺陷,避免由人工目检对于特征较为相似的金手指区域进行检测所得到的检测结果不稳定不准确的问题,有较强的实用性。One or more technical solutions provided by the present invention have at least the following technical effects or advantages: the present invention can automatically detect by computer by locating the golden finger area on the printed circuit board, and then analyzing the key area of the image obtained after the positioning The defects existing in the gold finger area of the printed circuit board are detected, and the problem of unstable and inaccurate detection results obtained by manual visual inspection of the gold finger area with similar characteristics is avoided, and it has strong practicability.

附图说明Description of drawings

此处所说明的附图用来提供对本发明实施例的进一步理解,构成本发明的一部分,并不构成对本发明实施例的限定;The accompanying drawings described herein are used to provide a further understanding of the embodiments of the present invention, and constitute a part of the present invention, but do not constitute a limitation to the embodiments of the present invention;

图1是本发明中金手指区域缺陷检测流程示意图;Fig. 1 is a schematic diagram of the defect detection process flow of the golden finger region in the present invention;

图2是本发明中金手指区域目标检测结果示意图;Fig. 2 is the schematic diagram of the target detection result of golden finger area in the present invention;

图3是本发明中金手指区域余铜缺陷检测结果示意图;3 is a schematic diagram of the detection result of the remaining copper defect in the gold finger region in the present invention;

图4是本发明中金手指区域缺陷检测系统示意图。FIG. 4 is a schematic diagram of a gold finger region defect detection system according to the present invention.

具体实施方式Detailed ways

为了能够更清楚地理解本发明的上述目的、特征和优点,下面结合附图和具体实施方式对本发明进行进一步的详细描述。需要说明的是,在相互不冲突的情况下,本发明的实施例及实施例中的特征可以相互组合。In order to understand the above objects, features and advantages of the present invention more clearly, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present invention and the features in the embodiments may be combined with each other under the condition that they do not conflict with each other.

在下面的描述中阐述了很多具体细节以便于充分理解本发明,但是,本发明还可以采用其他不同于在此描述范围内的其他方式来实施,因此,本发明的保护范围并不受下面公开的具体实施例的限制。Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can also be implemented in other ways that are different from the scope of this description. Therefore, the protection scope of the present invention is not subject to the following disclosure. The limitations of the specific embodiment.

实施例一Example 1

请参考图1,本发明提供了一种电路板金手指区域缺陷检测方法,包括以下步骤:Referring to FIG. 1, the present invention provides a method for detecting defects in the gold finger region of a circuit board, including the following steps:

获得待测电路图像;Obtain an image of the circuit to be tested;

识别所述待测电路图像,获得目标区域坐标,根据所述目标区域坐标对所述待测电路图像进行分割,获得金手指区域图像;Identifying the image of the circuit to be tested, obtaining the coordinates of the target area, and segmenting the image of the circuit to be tested according to the coordinates of the target area to obtain an image of the golden finger area;

对所述金手指区域图像进行处理,获得图像数据;processing the image of the golden finger area to obtain image data;

分析所述图像数据,获得缺陷检测结果。The image data is analyzed to obtain defect detection results.

在实施例一中,所述获得目标区域坐标通过基于深度学习的目标检测框架实现,所述待测电路的目标区域坐标获得包括以下步骤:In Embodiment 1, the obtaining of the coordinates of the target area is realized by a deep learning-based target detection framework, and the obtaining of the coordinates of the target area of the circuit under test includes the following steps:

获得多个电路样本图,对所述电路样本图中金手指区域进行标注,获得第一训练集;Obtaining a plurality of circuit sample diagrams, marking the golden finger area in the circuit sample diagrams, and obtaining a first training set;

基于所述第一训练集训练第一目标检测框架,获得第一目标检测模型;Train a first target detection framework based on the first training set to obtain a first target detection model;

使用所述第一目标检测模型对所述待测电路图像进行识别,获得所述目标检测区域坐标。The first target detection model is used to identify the image of the circuit to be tested, and the coordinates of the target detection area are obtained.

其中,所述目标检测框架可以是RCNN系列、YOLO系列和SSD系列框架,RCNN系列目标检测框架中包括RCNN、Fast-RCNN和Faster-RCNN框架,Faster-RCNN目标检测框架将目标检测所需要的四个步骤,即候选区域生成、特征提取、分类器分类和回归器回归四个步骤全都交给深度神经网络来做,并且所述四个步骤全部运行在GPU上,大大提高了操作效率,因此,本实施例优选Faster-RCNN目标检测框架,并结合FPN结构,能够有效的适用于小样本量的目标检测问题。Among them, the target detection framework can be RCNN series, YOLO series and SSD series framework, RCNN series target detection framework includes RCNN, Fast-RCNN and Faster-RCNN framework, Faster-RCNN target detection framework The four steps, namely candidate region generation, feature extraction, classifier classification and regressor regression, are all handed over to the deep neural network, and all the four steps are run on the GPU, which greatly improves the operation efficiency. Therefore, In this embodiment, the Faster-RCNN target detection framework is preferred, and combined with the FPN structure, it can be effectively applied to the target detection problem with a small sample size.

其中,所述对所述金手指区域图像进行处理,包括对图像进行灰度化处理、二值化处理、滤波处理等,其具体处理方式根据所述金手指区域图像可能存在的缺陷类型确定,本实施例在此不做限定。Wherein, the processing of the golden finger area image includes performing grayscale processing, binarization processing, filtering processing, etc. on the image, and the specific processing method is determined according to the type of defects that may exist in the golden finger area image, This embodiment is not limited herein.

实施例二Embodiment 2

请参考图1,本发明提供了一种电路板金手指区域缺陷检测方法,在实施例一的基础上,对于印制电路板金手指区域的余铜缺陷,所述对所述金手指区域图像进行处理前还包括以下步骤:Referring to FIG. 1 , the present invention provides a method for detecting defects in the gold finger area of a circuit board. On the basis of Embodiment 1, for the remaining copper defects in the gold finger area of the printed circuit board, the The following steps are also included before processing:

获得多个电路缺陷样本图,对所述电路缺陷样本图中缺陷位置及类别进行标注,获得第二训练集;Obtaining a plurality of circuit defect sample maps, marking the defect positions and categories in the circuit defect sample maps, and obtaining a second training set;

基于所述第二训练集训练第二目标检测框架,获得第二目标检测模型;Train a second target detection framework based on the second training set to obtain a second target detection model;

所述对所述金手指区域图像进行处理,获得图像数据包括以下步骤:The processing of the golden finger area image to obtain image data includes the following steps:

使用所述第二目标检测模型对所述金手指区域图像进行识别,获得图像识别结果,所述图像识别结果如图3所示。The second target detection model is used to identify the image of the golden finger area, and an image recognition result is obtained, and the image recognition result is shown in FIG. 3 .

其中,所述目标检测框架可以是RCNN系列、YOLO系列和SSD系列框架,RCNN系列目标检测框架中包括RCNN、Fast-RCNN和Faster-RCNN框架,Faster-RCNN目标检测框架将目标检测所需要的四个步骤,即候选区域生成、特征提取、分类器分类和回归器回归四个步骤全都交给深度神经网络来做,并且所述四个步骤全部运行在GPU上,大大提高了操作效率,因此,本实施例优选Faster-RCNN目标检测框架,并结合FPN结构,能够有效的适用于小样本量的目标检测问题。Among them, the target detection framework can be RCNN series, YOLO series and SSD series framework, RCNN series target detection framework includes RCNN, Fast-RCNN and Faster-RCNN framework, Faster-RCNN target detection framework The four steps, namely candidate region generation, feature extraction, classifier classification and regressor regression, are all handed over to the deep neural network, and all the four steps are run on the GPU, which greatly improves the operation efficiency. Therefore, In this embodiment, the Faster-RCNN target detection framework is preferred, and combined with the FPN structure, it can be effectively applied to the target detection problem with a small sample size.

实施例三Embodiment 3

请参考图1,本发明提供了一种电路板金手指区域缺陷检测方法,在实施例一的基础上,对于印制电路板金手指区域的脏污缺陷,所述对所述金手指区域图像进行处理包括以下步骤:Referring to FIG. 1 , the present invention provides a method for detecting defects in the gold finger area of a circuit board. On the basis of Embodiment 1, for the contamination defect in the gold finger area of the printed circuit board, the Processing includes the following steps:

对所述金手指区域图像进行二值化处理,获得二值化图像;Perform binarization processing on the golden finger area image to obtain a binarized image;

对所述二值化图像进行滤波处理获得第一图像;Filtering the binarized image to obtain a first image;

检测所述第一图像中的连通区域;detecting connected regions in the first image;

计算所述第一图像中各连通区域的面积;calculating the area of each connected region in the first image;

所述分析所述图像数据,获得缺陷检测结果包括以下步骤:The analyzing the image data to obtain the defect detection result includes the following steps:

判断所述连通区域面积的大小,若所述连通区域面积小于标准值,则所述金手指区域图像存在缺陷。The size of the area of the connected area is judged, and if the area of the connected area is smaller than a standard value, the image of the golden finger area is defective.

其中,所述连通区域面积标准值根据实际检测中待测电路设计布局确定,本实施例在此不做限定。Wherein, the standard value of the area of the connected region is determined according to the design layout of the circuit to be tested in the actual detection, which is not limited in this embodiment.

其中,所述二值化处理即寻找一个合适的灰度阈值,根据所述阈值将图像中所有像素灰度值设置为0或255,所述阈值选取方法有双峰法、P参数法、最大类间方差法等,由于所述待测电路图像通常在工业固定光源下进行采集,由所述待测电路图像分割后得到的所述金手指区域图像为灰度分布较有规律的图像,优选双峰法计算所述灰度阈值。The binarization process is to find a suitable grayscale threshold, and set the grayscale values of all pixels in the image to 0 or 255 according to the threshold. The threshold selection methods include bimodal method, P parameter method, maximum Inter-class variance method, etc., since the circuit image to be tested is usually collected under an industrial fixed light source, the image of the golden finger region obtained by segmenting the circuit image to be tested is an image with a more regular grayscale distribution, preferably The grayscale threshold is calculated by the bimodal method.

其中,所述连通区域的检测及连通区域面积的计算可以通过Two-Pass算法或Seed-Filling算法实现,本实施例在此不做限定。The detection of the connected region and the calculation of the area of the connected region may be implemented by the Two-Pass algorithm or the Seed-Filling algorithm, which is not limited in this embodiment.

其中,所述滤波处理方法有均值滤波、方框滤波、高斯滤波、形态学开运算和形态学闭运算等,形态学开运算通过对所述二值化图像进行腐蚀运算,再对经过腐蚀运算后的图像进行膨胀运算实现滤波处理,能够有效的去除图像中的小点、毛刺和小桥,而使图像总体形状不变,优选形态学开运算进行图像的滤波处理。Among them, the filtering processing methods include mean filtering, box filtering, Gaussian filtering, morphological opening operation and morphological closing operation, etc. The morphological opening operation performs an erosion operation on the binarized image, and then performs an erosion operation on the binarized image. After the image is subjected to expansion operation to realize filtering processing, it can effectively remove small points, burrs and small bridges in the image, and keep the overall shape of the image unchanged. The morphological opening operation is preferred for image filtering processing.

实施例四Embodiment 4

请参考图1,本发明提供了一种电路板金手指区域缺陷检测方法,在实施例一的基础上,对于印制电路板金手指区域的金属氧化缺陷,所述对所述金手指区域图像进行处理包括以下步骤:Referring to FIG. 1, the present invention provides a method for detecting defects in the gold finger area of a circuit board. On the basis of Embodiment 1, for metal oxidation defects in the gold finger area of the printed circuit board, the Processing includes the following steps:

对所述金手指区域图像进行灰度化处理,获得灰度图像;performing grayscale processing on the golden finger region image to obtain a grayscale image;

对所述灰度图像进行滤波处理获得第二图像;Filtering the grayscale image to obtain a second image;

计算所述第二图像的灰度平均值,获得第二图像数据;calculating the grayscale average value of the second image to obtain second image data;

所述分析所述图像数据,获得缺陷检测结果包括以下步骤:The analyzing the image data to obtain the defect detection result includes the following steps:

对比所述第二图像数据与标准图像灰度区间大小,若所述第二图像数据不在所述标准图像灰度区间内,则所述金手指区域图像存在缺陷。Comparing the size of the second image data with that of the standard image grayscale interval, if the second image data is not within the standard image grayscale interval, the golden finger area image is defective.

其中,所述标准图像灰度区间由实际检测时的具体需要确定,本实施例在此不做限定。Wherein, the standard image grayscale interval is determined by specific needs during actual detection, which is not limited in this embodiment.

其中,所述滤波处理方法有均值滤波、方框滤波、高斯滤波、形态学开运算和形态学闭运算等,形态学开运算通过对所述二值化图像进行腐蚀运算,再对经过腐蚀运算后的图像进行膨胀运算实现滤波处理,能够有效的去除图像中的小点、毛刺和小桥,而使图像总体形状不变,优选形态学开运算进行图像的滤波处理。Among them, the filtering processing methods include mean filtering, box filtering, Gaussian filtering, morphological opening operation and morphological closing operation, etc. The morphological opening operation performs an erosion operation on the binarized image, and then performs an erosion operation on the binarized image. After the image is subjected to expansion operation to realize filtering processing, it can effectively remove small points, burrs and small bridges in the image, and keep the overall shape of the image unchanged. The morphological opening operation is preferred for image filtering processing.

其中,所述灰度化处理有分量法、最大值法、加权平均法,加权平均法通过将彩色RGB图像的R、G、B三分量以不同的权重进行加权,计算得到各像素灰度值,优选加权平均法对所述金手指区域图像进行灰度化处理,所述权重根据实际图像的R、G、B三分量特征确定,本实施例在此不做限定。The grayscale processing includes component method, maximum value method, and weighted average method. The weighted average method calculates the gray value of each pixel by weighting the R, G, and B components of the color RGB image with different weights. , it is preferable to perform grayscale processing on the golden finger area image by a weighted average method, and the weight is determined according to the three-component features of R, G, and B of the actual image, which is not limited in this embodiment.

进一步的,由于金手指区域存在金属氧化缺陷时,原本金色区域变为暗金色,由于采集到的图像为RGB图像,对于RGB图像而言,金色和暗金色主要在图像R通道分量和G通道分量上存在差异,为了避免B通道分量对所述图像灰度平均值产生影响,可以通过对图像B通道分量进行补偿,因此在蓝色灯光下对待测电路进行拍照,获得所述待测电路图像。Further, due to the presence of metal oxidation defects in the gold finger area, the original golden area becomes dark gold. Since the captured image is an RGB image, for the RGB image, the gold and dark gold are mainly in the R channel component and the G channel component of the image. In order to avoid the influence of the B channel component on the average gray level of the image, the B channel component of the image can be compensated, so the circuit to be tested is photographed under blue light to obtain the image of the circuit to be tested.

进一步的,为了避免B通道分量对所述图像灰度平均值产生影响,还可以在对所述金手指区域图像进行灰度化处理时排除图像B通道分量,所述对所述金手指区域图像进行灰度化处理包括以下步骤:Further, in order to avoid the influence of the B channel component on the average grayscale value of the image, the B channel component of the image may also be excluded when performing grayscale processing on the golden finger area image. Grayscale processing includes the following steps:

获得所述金手指区域图像像素的R分量和G分量;obtaining the R component and the G component of the image pixel of the golden finger area;

对所述R分量和G分量进行加权计算,获得像素灰度值;Weighted calculation is performed on the R component and the G component to obtain a pixel gray value;

根据所述像素灰度值生成灰度图像。A grayscale image is generated from the pixel grayscale values.

实施例五Embodiment 5

本发明实施例五提供了一种电路板金手指区域缺陷检测装置,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现所述电路板金手指区域缺陷检测的步骤。Embodiment 5 of the present invention provides a circuit board gold finger region defect detection device, including a memory, a processor, and a computer program stored in the memory and running on the processor, the processor executing the The computer program realizes the steps of detecting the defects in the gold finger area of the circuit board.

实施例六Embodiment 6

本发明实施例六提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现所述电路板金手指区域缺陷检测方法的步骤。Embodiment 6 of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the steps of the method for detecting defects in a gold finger region of a circuit board.

其中,所述处理器可以是中央处理器(CPU,Central Processing Unit),还可以是其他通用处理器、数字信号处理器(digital signal processor)、专用集成电路(Application Specific Integrated Circuit)、现成可编程门阵列(Field programmablegate array)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor may be a central processing unit (CPU, Central Processing Unit), or other general-purpose processors, digital signal processors (digital signal processors), application specific integrated circuits (Application Specific Integrated Circuits), and off-the-shelf programmable processors. Field programmable gate array or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.

所述存储器可用于存储所述计算机程序和/或模块,所述处理器通过运行或执行存储在所述存储器内的数据,实现发明中电路板金手指区域缺陷检测装置的各种功能。所述存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等。此外,存储器可以包括高速随机存取存储器、还可以包括非易失性存储器,例如硬盘、内存、插接式硬盘,智能存储卡,安全数字卡,闪存卡、至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory can be used to store the computer program and/or module, and the processor implements various functions of the circuit board gold finger region defect detection device in the invention by running or executing the data stored in the memory. The memory may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.) and the like. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory such as hard disks, internal memory, plug-in hard disks, smart memory cards, secure digital cards, flash memory cards, at least one magnetic disk storage device, flash memory devices, or other volatile solid-state storage devices.

所述电路板金手指区域缺陷检测装置如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序可存储于计算机可读存介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码、对象代码形式、可执行文件或某些中间形式等。所述计算机可读取介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器、随机存储器、点载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减。If the circuit board gold finger area defect detection device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the methods of the above embodiments, and can also be stored in a computer-readable storage medium through a computer program. When the computer program is executed by a processor, the above method embodiments can be implemented. A step of. Wherein, the computer program includes computer program code, object code form, executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, dot carrier signal , telecommunication signals, and software distribution media. It should be noted that, the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.

本发明已对基本概念做了描述,显然,对于本领域技术人员来说,上述详细披露仅仅作为示例,而并不构成对本说明书的限定。虽然此处并没有明确说明,本领域技术人员可能会对本说明书进行各种修改、改进和修正。该类修改、改进和修正在本说明书中被建议,所以该类修改、改进、修正仍属于本说明书示范实施例的精神和范围。The basic concepts of the present invention have been described. Obviously, for those skilled in the art, the above detailed disclosure is merely an example, and does not constitute a limitation of the present specification. Although not explicitly described herein, various modifications, improvements, and corrections to this specification may occur to those skilled in the art. Such modifications, improvements, and corrections are suggested in this specification, so such modifications, improvements, and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.

同时,本说明书使用了特定词语来描述本说明书的实施例。如“一个实施例”、“一实施例”、和/或“一些实施例”意指与本说明书至少一个实施例相关的某一特征、结构或特点。因此,应强调并注意的是,本说明书中在不同位置两次或多次提及的“一实施例”或“一个实施例”或“一个替代性实施例”并不一定是指同一实施例。此外,本说明书的一个或多个实施例中的某些特征、结构或特点可以进行适当的组合。Meanwhile, the present specification uses specific words to describe the embodiments of the present specification. Such as "one embodiment," "an embodiment," and/or "some embodiments" means a certain feature, structure, or characteristic associated with at least one embodiment of this specification. Therefore, it should be emphasized and noted that two or more references to "an embodiment" or "one embodiment" or "an alternative embodiment" in various places in this specification are not necessarily referring to the same embodiment . Furthermore, certain features, structures or characteristics of the one or more embodiments of this specification may be combined as appropriate.

此外,本领域技术人员可以理解,本说明书的各方面可以通过若干具有可专利性的种类或情况进行说明和描述,包括任何新的和有用的工序、机器、产品或物质的组合,或对他们的任何新的和有用的改进。相应地,本说明书的各个方面可以完全由硬件执行、可以完全由软件(包括固件、常驻软件、微码等)执行、也可以由硬件和软件组合执行。以上硬件或软件均可被称为“数据块”、“模块”、“引擎”、“单元”、“组件”或“系统”。此外,本说明书的各方面可能表现为位于一个或多个计算机可读介质中的计算机产品,该产品包括计算机可读程序编码。Furthermore, those skilled in the art will appreciate that aspects of this specification may be illustrated and described in several patentable categories or situations, including any new and useful process, machine, product, or combination of matter, or combinations of them. of any new and useful improvements. Accordingly, various aspects of this specification may be performed entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or in a combination of hardware and software. The above hardware or software may be referred to as a "data block", "module", "engine", "unit", "component" or "system". Furthermore, aspects of this specification may be embodied as a computer product comprising computer readable program code embodied in one or more computer readable media.

计算机存储介质可能包含一个内含有计算机程序编码的传播数据信号,例如在基带上或作为载波的一部分。该传播信号可能有多种表现形式,包括电磁形式、光形式等,或合适的组合形式。计算机存储介质可以是除计算机可读存储介质之外的任何计算机可读介质,该介质可以通过连接至一个指令执行系统、装置或设备以实现通讯、传播或传输供使用的程序。位于计算机存储介质上的程序编码可以通过任何合适的介质进行传播,包括无线电、电缆、光纤电缆、RF、或类似介质,或任何上述介质的组合。A computer storage medium may contain a propagated data signal with the computer program code embodied therein, for example, on baseband or as part of a carrier wave. The propagating signal may take a variety of manifestations, including electromagnetic, optical, etc., or a suitable combination. Computer storage media can be any computer-readable media other than computer-readable storage media that can communicate, propagate, or transmit a program for use by coupling to an instruction execution system, apparatus, or device. Program code on a computer storage medium may be transmitted over any suitable medium, including radio, cable, fiber optic cable, RF, or the like, or a combination of any of the foregoing.

本说明书各部分操作所需的计算机程序编码可以用任意一种或多种程序语言编写,包括面向对象编程语言如Java、Scala、Smalltalk、Eiffel、JADE、Emerald、C++、C#、VB.NET、Python等,常规程序化编程语言如C语言、Visual Basic、Fortran 2003、Perl、COBOL 2002、PHP、ABAP,动态编程语言如Python、Ruby和Groovy,或其他编程语言等。该程序编码可以完全在用户计算机上运行、或作为独立的软件包在用户计算机上运行、或部分在用户计算机上运行部分在远程计算机运行、或完全在远程计算机或服务器上运行。在后种情况下,远程计算机可以通过任何网络形式与用户计算机连接,比如局域网(LAN)或广域网(WAN),或连接至外部计算机(例如通过因特网),或在云计算环境中,或作为服务使用如软件即服务(SaaS)。The computer program coding required for the operation of the various parts of this manual may be written in any one or more programming languages, including object-oriented programming languages such as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB.NET, Python etc., conventional procedural programming languages such as C language, Visual Basic, Fortran 2003, Perl, COBOL 2002, PHP, ABAP, dynamic programming languages such as Python, Ruby and Groovy, or other programming languages, etc. The program code may run entirely on the user's computer, or as a stand-alone software package on the user's computer, or partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter case, the remote computer can be connected to the user's computer through any network, such as a local area network (LAN) or wide area network (WAN), or to an external computer (eg, through the Internet), or in a cloud computing environment, or as a service Use eg software as a service (SaaS).

此外,除非权利要求中明确说明,本说明书所述处理元素和序列的顺序、数字字母的使用、或其他名称的使用,并非用于限定本说明书流程和方法的顺序。尽管上述披露中通过各种示例讨论了一些目前认为有用的发明实施例,但应当理解的是,该类细节仅起到说明的目的,附加的权利要求并不仅限于披露的实施例,相反,权利要求旨在覆盖所有符合本说明书实施例实质和范围的修正和等价组合。例如,虽然以上所描述的系统组件可以通过硬件设备实现,但是也可以只通过软件的解决方案得以实现,如在现有的服务器或移动设备上安装所描述的系统。Furthermore, unless explicitly stated in the claims, the order of processing elements and sequences described in this specification, the use of alphanumerics, or the use of other names is not intended to limit the order of the processes and methods of this specification. While the foregoing disclosure discusses by way of various examples some embodiments of the invention that are presently believed to be useful, it is to be understood that such details are for purposes of illustration only and that the appended claims are not limited to the disclosed embodiments, but rather The requirements are intended to cover all modifications and equivalent combinations falling within the spirit and scope of the embodiments of this specification. For example, although the system components described above may be implemented by hardware devices, they may also be implemented by software-only solutions, such as installing the described systems on existing servers or mobile devices.

同理,应当注意的是,为了简化本说明书披露的表述,从而帮助对一个或多个发明实施例的理解,前文对本说明书实施例的描述中,有时会将多种特征归并至一个实施例、附图或对其的描述中。但是,这种披露方法并不意味着本说明书对象所需要的特征比权利要求中提及的特征多。实际上,实施例的特征要少于上述披露的单个实施例的全部特征。Similarly, it should be noted that, in order to simplify the expressions disclosed in this specification and thus help the understanding of one or more embodiments of the invention, in the foregoing description of the embodiments of this specification, various features may sometimes be combined into one embodiment, in the drawings or descriptions thereof. However, this method of disclosure does not imply that the subject matter of the description requires more features than are recited in the claims. Indeed, there are fewer features of an embodiment than all of the features of a single embodiment disclosed above.

针对本说明书引用的每个专利、专利申请、专利申请公开物和其他材料,如文章、书籍、说明书、出版物、文档等,特此将其全部内容并入本说明书作为参考。与本说明书内容不一致或产生冲突的申请历史文件除外,对本说明书权利要求最广范围有限制的文件(当前或之后附加于本说明书中的)也除外。需要说明的是,如果本说明书附属材料中的描述、定义、和/或术语的使用与本说明书所述内容有不一致或冲突的地方,以本说明书的描述、定义和/或术语的使用为准。For each patent, patent application, patent application publication, and other material, such as article, book, specification, publication, document, etc., cited in this specification, the entire contents of which are hereby incorporated by reference into this specification are hereby incorporated by reference. Application history documents that are inconsistent with or conflict with the contents of this specification are excluded, as are documents (currently or hereafter appended to this specification) limiting the broadest scope of the claims of this specification. It should be noted that, if there is any inconsistency or conflict between the descriptions, definitions and/or use of terms in the accompanying materials of this specification and the contents of this specification, the descriptions, definitions and/or use of terms in this specification shall prevail .

尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。Although preferred embodiments of the present invention have been described, additional changes and modifications to these embodiments may occur to those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be construed to include the preferred embodiment and all changes and modifications that fall within the scope of the present invention.

显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。It will be apparent to those skilled in the art that various modifications and variations can be made in the present invention without departing from the spirit and scope of the invention. Thus, provided that these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims (12)

1.一种电路板金手指区域缺陷检测方法,其特征在于,包括以下步骤:1. a circuit board gold finger area defect detection method, is characterized in that, comprises the following steps: 获得待测电路图像;Obtain an image of the circuit to be tested; 识别所述待测电路图像,获得目标区域坐标,根据所述目标区域坐标对所述待测电路图像进行分割,获得金手指区域图像;Identifying the image of the circuit to be tested, obtaining the coordinates of the target area, and segmenting the image of the circuit to be tested according to the coordinates of the target area to obtain an image of the golden finger area; 对所述金手指区域图像进行处理,获得图像数据;processing the image of the golden finger area to obtain image data; 分析所述图像数据,获得缺陷检测结果。The image data is analyzed to obtain defect detection results. 2.根据权利要求1所述的一种电路板金手指区域缺陷检测方法,其特征在于,所述目标区域坐标采用以下步骤获得:2. The method for detecting defects in the gold finger region of a circuit board according to claim 1, wherein the coordinates of the target region are obtained by the following steps: 获得多个电路样本图,对所述电路样本图中金手指区域进行标注,获得第一训练集;Obtaining a plurality of circuit sample diagrams, marking the golden finger area in the circuit sample diagrams, and obtaining a first training set; 基于所述第一训练集训练第一目标检测框架,获得第一目标检测模型;Train a first target detection framework based on the first training set to obtain a first target detection model; 使用所述第一目标检测模型对所述待测电路图像进行识别,获得所述目标区域坐标。The first target detection model is used to identify the image of the circuit to be tested to obtain the coordinates of the target area. 3.根据权利要求1所述的一种电路板金手指区域缺陷检测方法,其特征在于,所述对所述金手指区域图像进行处理前还包括以下步骤:3. The method for detecting defects in the gold finger area of a circuit board according to claim 1, wherein before the processing of the image of the gold finger area, the method further comprises the following steps: 获得多个电路缺陷样本图,对所述电路缺陷样本图中缺陷位置及类别进行标注,获得第二训练集;Obtaining a plurality of circuit defect sample maps, marking the defect positions and categories in the circuit defect sample maps, and obtaining a second training set; 基于所述第二训练集训练第二目标检测框架,获得第二目标检测模型;Train a second target detection framework based on the second training set to obtain a second target detection model; 所述对所述金手指区域图像进行处理,获得图像数据包括以下步骤:The processing of the golden finger area image to obtain image data includes the following steps: 使用所述第二目标检测模型对所述金手指区域图像进行识别,获得图像识别结果。The second target detection model is used to identify the golden finger region image to obtain an image identification result. 4.根据权利要求1所述的一种电路板金手指区域缺陷检测方法,其特征在于,所述对所述金手指区域图像进行处理包括以下步骤:4 . The method for detecting defects in the gold finger region of a circuit board according to claim 1 , wherein the processing of the gold finger region image comprises the following steps: 5 . 对所述金手指区域图像进行二值化处理,获得二值化图像;Perform binarization processing on the golden finger area image to obtain a binarized image; 对所述二值化图像进行滤波处理获得第一图像;Filtering the binarized image to obtain a first image; 检测所述第一图像中的连通区域;detecting connected regions in the first image; 计算所述第一图像中各连通区域的面积;calculating the area of each connected region in the first image; 所述分析所述图像数据,获得缺陷检测结果包括以下步骤:The analyzing the image data to obtain the defect detection result includes the following steps: 判断所述连通区域面积的大小,若所述连通区域面积小于标准值,则所述金手指区域图像存在缺陷。The size of the area of the connected area is judged, and if the area of the connected area is smaller than a standard value, the image of the golden finger area is defective. 5.根据权利要求4所述的一种电路板金手指区域缺陷检测方法,其特征在于,所述滤波处理为对所述二值化图像进行形态学开运算。5 . The method for detecting a defect in a gold finger region of a circuit board according to claim 4 , wherein the filtering process is to perform a morphological opening operation on the binarized image. 6 . 6.根据权利要求1所述的一种电路板金手指区域缺陷检测方法,其特征在于,所述对所述金手指区域图像进行处理包括以下步骤:6. The method for detecting defects in the gold finger region of a circuit board according to claim 1, wherein the processing of the gold finger region image comprises the following steps: 对所述金手指区域图像进行灰度化处理,获得灰度图像;performing grayscale processing on the golden finger region image to obtain a grayscale image; 对所述灰度图像进行滤波处理获得第二图像;Filtering the grayscale image to obtain a second image; 计算所述第二图像的灰度平均值,获得第二图像数据;calculating the grayscale average value of the second image to obtain second image data; 所述分析所述图像数据,获得缺陷检测结果包括以下步骤:The analyzing the image data to obtain the defect detection result includes the following steps: 对比所述第二图像数据与标准图像灰度区间大小,若所述第二图像数据不在所述标准图像灰度区间内,则所述金手指区域图像存在缺陷。Comparing the size of the second image data with the grayscale interval of the standard image, if the second image data is not within the grayscale interval of the standard image, the image of the golden finger area is defective. 7.根据权利要求6所述的一种电路板金手指区域缺陷检测方法,其特征在于,在蓝色灯光下对待测电路进行拍照,获得所述待测电路图像。7 . The method for detecting defects in the gold finger region of a circuit board according to claim 6 , wherein the circuit to be tested is photographed under blue light to obtain an image of the circuit to be tested. 8 . 8.根据权利要求6所述的一种电路板金手指区域缺陷检测方法,其特征在于,所述金手指区域图像为RGB图,所述对所述金手指区域图像进行灰度化处理包括以下步骤:8 . The method for detecting defects in the gold finger region of a circuit board according to claim 6 , wherein the gold finger region image is an RGB image, and the grayscale processing for the gold finger region image comprises the following steps: 9 . step: 获得所述金手指区域图像像素的R分量和G分量;obtaining the R component and the G component of the image pixel of the golden finger area; 对所述R分量和G分量进行加权计算,获得像素灰度值;Weighted calculation is performed on the R component and the G component to obtain a pixel gray value; 根据所述像素灰度值生成灰度图像。A grayscale image is generated from the pixel grayscale values. 9.根据权利要求2或3所述的一种电路板金手指区域缺陷检测方法,其特征在于,所述目标检测框架为结合FPN结构的Faster-RCNN目标检测框架。9 . The method for detecting defects in the gold finger region of a circuit board according to claim 2 , wherein the target detection framework is a Faster-RCNN target detection framework combined with an FPN structure. 10 . 10.一种电路板金手指区域缺陷检测系统,其特征在于,所述系统包括:10. A circuit board gold finger region defect detection system, wherein the system comprises: 图像获得单元,用于获得待测电路图像;an image obtaining unit, used to obtain an image of the circuit to be tested; 区域识别单元,用于识别所述待测电路图像,获得目标区域坐标,根据所述目标区域坐标对所述待测电路图像进行分割,获得金手指区域图像;an area identification unit, configured to identify the image of the circuit to be tested, obtain the coordinates of the target area, and segment the image of the circuit to be tested according to the coordinates of the target area to obtain an image of the golden finger area; 处理单元,用于对所述金手指区域图像进行处理,获得图像数据;a processing unit, configured to process the image of the golden finger area to obtain image data; 分析单元,用于分析所述图像数据,获得缺陷检测结果。An analysis unit, configured to analyze the image data to obtain defect detection results. 11.一种电路板金手指区域缺陷检测装置,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1-8任意一个所述电路板金手指区域缺陷检测方法的步骤。11. A circuit board gold finger region defect detection device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer In the program, the steps of the method for detecting defects in the gold finger region of a circuit board according to any one of claims 1-8 are implemented. 12.一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-8任意一个所述电路板金手指区域缺陷检测方法的步骤。12. A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, characterized in that, when the computer program is executed by a processor, the circuit board golden finger according to any one of claims 1-8 is implemented Steps of an area defect detection method.
CN202210568397.9A 2022-05-24 2022-05-24 Method, system, device and medium for detecting defects of golden finger area of circuit board Active CN114862817B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210568397.9A CN114862817B (en) 2022-05-24 2022-05-24 Method, system, device and medium for detecting defects of golden finger area of circuit board

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210568397.9A CN114862817B (en) 2022-05-24 2022-05-24 Method, system, device and medium for detecting defects of golden finger area of circuit board

Publications (2)

Publication Number Publication Date
CN114862817A true CN114862817A (en) 2022-08-05
CN114862817B CN114862817B (en) 2025-07-22

Family

ID=82639583

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210568397.9A Active CN114862817B (en) 2022-05-24 2022-05-24 Method, system, device and medium for detecting defects of golden finger area of circuit board

Country Status (1)

Country Link
CN (1) CN114862817B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115063421A (en) * 2022-08-16 2022-09-16 成都数联云算科技有限公司 Pole piece region detection method, system and device, medium and defect detection method
CN115063618A (en) * 2022-08-17 2022-09-16 成都数之联科技股份有限公司 Defect positioning method, system, equipment and medium based on template matching
CN116664566A (en) * 2023-07-28 2023-08-29 成都数智创新精益科技有限公司 OLED panel screen printing quality control method, system and device and medium
CN117011252A (en) * 2023-07-24 2023-11-07 上海感图网络科技有限公司 Defect filtering method, device, equipment and storage medium based on gold surface
CN119131015A (en) * 2024-11-08 2024-12-13 苏州赫芯科技有限公司 Universal PCB gold finger defect detection method, system, equipment and medium
WO2025020295A1 (en) * 2023-07-27 2025-01-30 上海望友信息科技有限公司 Inspection method and device for gold finger design process in printed circuit board design
CN119942148A (en) * 2025-01-03 2025-05-06 山东安迪新型材料有限公司 A method and system for detecting the colorimetric value of naphthophenol AS-PH based on image recognition

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030058475A1 (en) * 2001-08-23 2003-03-27 Hofman Paul Michiel Conversion of color images to gray value images
CN104200431A (en) * 2014-08-21 2014-12-10 浙江宇视科技有限公司 Processing method and processing device of image graying
CN109035219A (en) * 2018-07-10 2018-12-18 华南理工大学 FICS golden finger defect detecting system and detection method based on BP neural network
CN113610776A (en) * 2021-07-16 2021-11-05 广州大学 Method and device for detecting defects of sandwich biscuits and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030058475A1 (en) * 2001-08-23 2003-03-27 Hofman Paul Michiel Conversion of color images to gray value images
CN104200431A (en) * 2014-08-21 2014-12-10 浙江宇视科技有限公司 Processing method and processing device of image graying
CN109035219A (en) * 2018-07-10 2018-12-18 华南理工大学 FICS golden finger defect detecting system and detection method based on BP neural network
CN113610776A (en) * 2021-07-16 2021-11-05 广州大学 Method and device for detecting defects of sandwich biscuits and storage medium

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115063421A (en) * 2022-08-16 2022-09-16 成都数联云算科技有限公司 Pole piece region detection method, system and device, medium and defect detection method
CN115063618A (en) * 2022-08-17 2022-09-16 成都数之联科技股份有限公司 Defect positioning method, system, equipment and medium based on template matching
CN115063618B (en) * 2022-08-17 2022-11-11 成都数之联科技股份有限公司 Defect positioning method, system, equipment and medium based on template matching
CN117011252A (en) * 2023-07-24 2023-11-07 上海感图网络科技有限公司 Defect filtering method, device, equipment and storage medium based on gold surface
WO2025020295A1 (en) * 2023-07-27 2025-01-30 上海望友信息科技有限公司 Inspection method and device for gold finger design process in printed circuit board design
CN116664566A (en) * 2023-07-28 2023-08-29 成都数智创新精益科技有限公司 OLED panel screen printing quality control method, system and device and medium
CN116664566B (en) * 2023-07-28 2023-09-26 成都数智创新精益科技有限公司 OLED panel screen printing quality control method, system and device and medium
CN119131015A (en) * 2024-11-08 2024-12-13 苏州赫芯科技有限公司 Universal PCB gold finger defect detection method, system, equipment and medium
CN119131015B (en) * 2024-11-08 2025-04-04 苏州赫芯科技有限公司 Generalized PCB golden finger defect detection method, system, equipment and medium
CN119942148A (en) * 2025-01-03 2025-05-06 山东安迪新型材料有限公司 A method and system for detecting the colorimetric value of naphthophenol AS-PH based on image recognition
CN119942148B (en) * 2025-01-03 2025-08-12 山东安迪新型材料有限公司 Image recognition-based method and system for detecting AS-PH chromaticity of chromatic phenol

Also Published As

Publication number Publication date
CN114862817B (en) 2025-07-22

Similar Documents

Publication Publication Date Title
CN114862817A (en) A method, system, device and medium for detecting defects in gold finger area of circuit board
CN111311542B (en) A product quality detection method and device
CN109816644B (en) An automatic detection system for bearing defects based on multi-angle light source images
CN113610774B (en) Glass scratch defect detection method, system, device and storage medium
CN115661160B (en) A panel defect detection method, system, device, and medium
TWI765442B (en) Method for defect level determination and computer readable storage medium thereof
CN114627113B (en) A printed circuit board defect detection method, system, device and medium
CN105139386A (en) Image processing method for quickly and automatically detecting soldered dot unsatisfied products of electric connectors
CN116542975B (en) Defect classification method, device, equipment and medium for glass panel
CN115170501A (en) Defect detection method, system, electronic device and storage medium
CN115063618A (en) Defect positioning method, system, equipment and medium based on template matching
CN116485779B (en) Adaptive wafer defect detection method, device, electronic equipment and storage medium
CN115880520A (en) Defect grade classification method and system based on template matching and defect segmentation
CN115272199A (en) A PCB carrier defect detection method, system, electronic device and medium
CN114266743B (en) FPC defect detection method, system and storage medium based on HSV and CNN
CN116152191A (en) Display crack defect detection method, device and equipment based on deep learning
CN114078109A (en) Image processing method, electronic device, and storage medium
CN115797314A (en) Part surface defect detection method, system, equipment and storage medium
CN113362288B (en) A gold finger scratch detection method, device and electronic equipment
CN118505708A (en) Product repairing system based on image reconstruction technology
CN115719326A (en) PCB defect detection method and device
CN113643245B (en) Method and device for measuring screen defects and computer readable storage medium
CN120807426A (en) Method and system for enhancing electron beam detection and identifying real defects
CN111932515B (en) Short circuit detection method and system for product residual defects and defect classification system
CN116703912B (en) Mini-host network port integrity visual detection method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant