Nothing Special   »   [go: up one dir, main page]

CN114441554B - Detection method - Google Patents

Detection method Download PDF

Info

Publication number
CN114441554B
CN114441554B CN202011229886.9A CN202011229886A CN114441554B CN 114441554 B CN114441554 B CN 114441554B CN 202011229886 A CN202011229886 A CN 202011229886A CN 114441554 B CN114441554 B CN 114441554B
Authority
CN
China
Prior art keywords
line
candidate
distance
broken line
objects
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.)
Active
Application number
CN202011229886.9A
Other languages
Chinese (zh)
Other versions
CN114441554A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202011229886.9A priority Critical patent/CN114441554B/en
Publication of CN114441554A publication Critical patent/CN114441554A/en
Application granted granted Critical
Publication of CN114441554B publication Critical patent/CN114441554B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • 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
    • 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/8854Grading and classifying of flaws
    • G01N2021/8861Determining coordinates of flaws
    • 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
    • G01N2021/95661Inspecting patterns on the surface of objects for PCB's for leads, e.g. position, curvature

Landscapes

  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The application provides a detection method, which comprises the following steps: performing binarization processing on the input image related to the printed circuit board; judging a plurality of contour lines belonging to black-white boundaries or image frames in the input image, and defining the contour lines as a plurality of line segment objects; screening each line segment object according to the perimeter threshold value and the times of passing through the image frame to obtain a plurality of candidate line breaking objects; and judging whether the broken line object belongs to a first group of broken lines or not according to the midpoint coordinates of the broken line ends of each candidate broken line object and the first set line distance. Thereby, a detection method capable of detecting a line disconnection position of a printed circuit board without using a standard template and without requiring a large amount of data is realized.

Description

检测方法Detection method

技术领域Technical field

本发明涉及一种检测方法,特别是指一种用于侦测印刷电路板的线路断线位置的检测方法。The present invention relates to a detection method, in particular to a detection method for detecting the line disconnection position of a printed circuit board.

背景技术Background technique

在印刷电路板的生产制造过程中已广泛采用机器视觉技术来检测半成品中是否存在瑕疵。现有的印刷电路板缺陷的检测方法主要采用以下两种技术:一种是需要完美无缺陷的标准样板比对电路,也就是需要事先准备电路布局(Layout)的数据文件进行比对参照;而另一种是在无法取得电路相关数据或是仅能通过现有电路板的影像获取信息的情况下,通过具有大量影像数据的影像数据库以机器学习的方式作判断。然而,是否存有其他更佳的检测方法便成为一个待解决的问题。Machine vision technology has been widely used in the manufacturing process of printed circuit boards to detect defects in semi-finished products. The existing printed circuit board defect detection methods mainly use the following two technologies: one requires a perfect and defect-free standard sample comparison circuit, which means that a circuit layout (Layout) data file needs to be prepared in advance for comparison and reference; and The other is to use machine learning to make judgments through an image database with a large amount of image data when circuit-related data cannot be obtained or information can only be obtained through images of existing circuit boards. However, whether there are other better detection methods has become a question to be resolved.

发明内容Contents of the invention

本发明的目的在于提供一种不需要使用标准样板来比对,且不需要大量数据的影像数据库的检测方法。The object of the present invention is to provide a detection method of an image database that does not require the use of standard templates for comparison and does not require a large amount of data.

于是,本发明提供一种检测方法,适用于检测系统并通过所述检测系统实施,所述检测方法包含步骤(A)~(D)。Therefore, the present invention provides a detection method, which is suitable for and implemented by a detection system. The detection method includes steps (A) to (D).

于步骤(A),将相关于印刷电路板的输入影像作二值化处理,所述输入影像具有影像边框。In step (A), the input image related to the printed circuit board is binarized, and the input image has an image frame.

于步骤(B),对二值化处理后的所述输入影像判断属于黑白交界或所述影像边框的多个轮廓线,并定义为对应的多个线段物件。In step (B), multiple contour lines belonging to the black and white boundary or the image frame are determined from the binarized input image and defined as corresponding line segment objects.

于步骤(C),对每一个所述线段物件根据周长阈值及通过所述影像边框的次数作筛选,而获得多个候选断线物件。In step (C), each line segment object is filtered according to a perimeter threshold and the number of times it passes through the image frame, and a plurality of candidate line segment objects are obtained.

于步骤(D),根据每一个所述候选断线物件的断线端的中点坐标,及第一设定线距作判断是否分类为属于断线的第一群组。In step (D), it is determined based on the midpoint coordinates of the disconnected end of each candidate disconnected object and the first set line distance whether it is classified as belonging to the first group of disconnected objects.

在一些实施态样中,其中,在步骤(C)中,当任一个所述线段物件所具有的周长大于或等于所述周长阈值,且所述线段物件通过所述影像边框的次数等于1时,所述线段物件被决定为其中一个所述候选断线物件。In some implementations, in step (C), when the perimeter of any of the line segment objects is greater than or equal to the perimeter threshold, and the number of times the line segment object passes through the image frame is equal to At 1, the line segment object is determined to be one of the candidate line break objects.

在一些实施态样中,其中,在步骤(D)中,每一个所述候选断线物件具有对应设计值的设计线宽,及在不同位置所量测的多个实际线宽,当其中一个所述实际线宽等于所述设计线宽乘以比例阈值时,在所述轮廓线上对应所述实际线宽的两个端点坐标的中心点的所在位置等于所述断线端的所述中点坐标,所述比例阈值大于零且小于1。In some implementations, in step (D), each of the candidate wire break objects has a design line width corresponding to the design value, and multiple actual line widths measured at different locations. When one of the When the actual line width is equal to the design line width multiplied by the proportion threshold, the position of the center point of the two endpoint coordinates corresponding to the actual line width on the contour line is equal to the midpoint of the broken end. coordinates, the scale threshold is greater than zero and less than 1.

在一些实施态样中,其中,在步骤(D)中,计算每一个所述候选断线物件的所述断线端的所述中点坐标与其余任一个所述候选断线物件的所述断线端的所述中点坐标的中点距离,当判断所述至少一个中点距离的其中最小者小于所述第一设定线距时,对应的两个所述候选断线物件被分类为所述第一群组的其中一对数据。In some implementations, in step (D), the midpoint coordinates of the disconnected end of each candidate disconnected object and the disconnection point of any other candidate disconnected object are calculated. The midpoint distance of the midpoint coordinates of the line end. When it is determined that the minimum of the at least one midpoint distance is less than the first set line distance, the corresponding two candidate line break objects are classified as Describe one pair of data in the first group.

在一些实施态样中,所述检测方法还包含步骤(E),根据未被分类为所述第一群组的所述候选断线物件的所述断线端的所述中点坐标的所述至少一个中点距离,及第二设定线距,判断未被分类为所述第一群组的所述候选断线物件是否被分类为属于第二群组,所述第二设定线距大于所述第一设定线距。In some implementations, the detection method further includes step (E), based on the midpoint coordinates of the broken ends of the candidate broken objects that are not classified into the first group. At least one midpoint distance, and a second set line distance, determine whether the candidate disconnected objects that are not classified as the first group are classified as belonging to the second group, the second set line distance greater than the first set line distance.

在一些实施态样中,其中,在步骤(A)中,所述影像边框是四边形。在步骤(E)中,当判断所述至少一个中点距离的其中任一者小于所述第二设定线距,且对应其中所述者的两个所述候选断线物件所分别通过的所述影像边框是所述四边形的不同边时,对应的两个所述候选断线物件被分类为所述第二群组的其中一对数据。In some implementations, in step (A), the image frame is a quadrilateral. In step (E), when it is determined that any one of the at least one midpoint distance is smaller than the second set line distance, and the two candidate line break objects corresponding to the said one pass respectively When the image frames are different sides of the quadrilateral, the corresponding two candidate disconnected objects are classified as one pair of data of the second group.

在一些实施态样中,其中,所述检测方法还包含步骤(F),判断未被分类为所述第一群组或所述第二群组的所述至少一个候选断线物件被分类为属于第三群组。In some implementations, the detection method further includes step (F) of determining that the at least one candidate disconnected object that is not classified as the first group or the second group is classified as Belongs to the third group.

在一些实施态样中,其中,在步骤(D)中,所述比例阈值等于85%,所述第一设定线距等于所述输入影像所对应的所述印刷电路板的制程的最小线距,所述第二设定线距等于所述输入影像所对应的所述印刷电路板的制程的所述最小线距乘以2倍。In some implementations, in step (D), the proportion threshold is equal to 85%, and the first set line distance is equal to the minimum line distance of the printed circuit board process corresponding to the input image. The second set line distance is equal to the minimum line distance of the printed circuit board manufacturing process corresponding to the input image multiplied by 2 times.

在一些实施态样中,其中,在步骤(D)中,当判断所述至少一个中点距离的其中最小者等于所述第一设定线距时,对应的两个所述候选断线物件被分类为所述第一群组的其中一对数据。In some implementations, in step (D), when it is determined that the minimum of the at least one midpoint distance is equal to the first set line distance, the corresponding two candidate line break objects One pair of data classified into the first group.

在另一些实施态样中,其中,在步骤(E)中,当判断所述至少一个中点距离的其中任一者等于所述第二设定线距,且对应其中所述者的两个所述候选断线物件所分别通过的所述影像边框是所述四边形的不同边时,对应的两个所述候选断线物件被分类为所述第二群组的其中一对数据。In other embodiments, in step (E), when it is determined that any one of the at least one midpoint distance is equal to the second set line distance, and two of the distances corresponding to the When the image frames passed by the candidate disconnected objects are different sides of the quadrilateral, the corresponding two candidate disconnected objects are classified as one pair of data in the second group.

本发明的有益效果在于:通过所述处理模块对所述印刷电路板的所述输入影像先作预处理及轮廓线的辨识,再根据所计算出的所述中点坐标的所述中点距离对所述候选断线物件作分类,而获得属于断线的所述第一群组,而能够实现一种不需要使用标准样板来比对,且不需要大量数据的影像数据库的检测方法。The beneficial effect of the present invention is that: the input image of the printed circuit board is first pre-processed and contour lines are identified through the processing module, and then the midpoint distance of the midpoint coordinates is calculated based on Classifying the candidate disconnected objects to obtain the first group belonging to disconnected objects can implement a detection method that does not require the use of standard templates for comparison and does not require a large amount of data in an image database.

附图说明Description of the drawings

图1是一个方块图,说明本发明检测方法所适用的一个检测系统;Figure 1 is a block diagram illustrating a detection system to which the detection method of the present invention is applicable;

图2是一个流程图,说明本发明检测方法的一个实施例;Figure 2 is a flow chart illustrating an embodiment of the detection method of the present invention;

图3是一个示意图,说明该实施例的一个输入影像的一种态样;Figure 3 is a schematic diagram illustrating an aspect of an input image in this embodiment;

图4是一个示意图,辅助图3说明该输入影像的一个局部放大图;及Figure 4 is a schematic diagram supplementing Figure 3 to illustrate a partial enlargement of the input image; and

图5是一个示意图,说明该实施例的该输入影像的另一种态样。FIG. 5 is a schematic diagram illustrating another aspect of the input image in this embodiment.

具体实施方式Detailed ways

下面结合附图及实施例对本发明进行详细说明:The present invention will be described in detail below in conjunction with the accompanying drawings and examples:

在本发明被详细描述的前,应当注意在以下的说明内容中,类似的元件是以相同的编号来表示。Before the present invention is described in detail, it should be noted that similar elements are represented by the same numbers in the following description.

参阅图1,本发明检测方法的一个实施例,适用于一个检测系统100,该检测系统100包含一个影像撷取模块1、一个处理模块3、及一个储存模块2。该影像撷取模块1例如是一个照相机或一个照相设备,并设置于一个印刷电路板的检测产线上,以用于撷取包含该印刷电路板的一个影像。该处理模块3例如是一个计算机系统的至少一个中央处理器,以用于实施已知或现有的影像辨识技术,并电连接该影像撷取模块1以控制该影像撷取模块1撷取该影像,且还电连接该储存模块2以储存该影像及该处理模块3所产生的各种数据。该储存模块2例如是一个磁盘或其他储存设备。Referring to Figure 1, an embodiment of the detection method of the present invention is applicable to a detection system 100. The detection system 100 includes an image capture module 1, a processing module 3, and a storage module 2. The image capture module 1 is, for example, a camera or a photographic equipment, and is disposed on a printed circuit board inspection production line for capturing an image including the printed circuit board. The processing module 3 is, for example, at least one central processor of a computer system for implementing known or existing image recognition technology, and is electrically connected to the image capture module 1 to control the image capture module 1 to capture the image. image, and is also electrically connected to the storage module 2 to store the image and various data generated by the processing module 3 . The storage module 2 is, for example, a disk or other storage device.

参阅图1与图2,该检测方法包含步骤S1~S13。Referring to Figures 1 and 2, the detection method includes steps S1 to S13.

于步骤S1,通过该处理模块3控制该影像撷取模块1撷取而获得包含该印刷电路板的该影像。接着,执行步骤S2。In step S1, the processing module 3 controls the image capturing module 1 to capture and obtain the image including the printed circuit board. Next, step S2 is executed.

于步骤S2,通过该处理模块3将该影像作为一个输入影像,并对该输入影像作二值化处理。举例来说,该输入影像是一个彩色影像,而二值化处理即是将该彩色影像转换为一个黑白影像,该黑白影像中的每一个像素(Pixel)所对应的数值是0或1。在本实施例中,该输入影像的尺寸是240像素*240像素,并具有一个影像边框,该影像边框例如是一个正方形。接着,执行步骤S3。而在其他的实施例中,该输入影像也可以是其他的尺寸大小。In step S2, the image is used as an input image through the processing module 3, and the input image is binarized. For example, the input image is a color image, and the binarization process is to convert the color image into a black and white image. The corresponding value of each pixel (Pixel) in the black and white image is 0 or 1. In this embodiment, the size of the input image is 240 pixels * 240 pixels, and has an image frame. The image frame is, for example, a square. Next, step S3 is executed. In other embodiments, the input image may also be of other sizes.

另外要特别补充说明的是:在其他的实施例中,该影像边框也可以是其他四边形,或其他形状。此外,在步骤S2中,该处理模块3也可以将该影像分割为多个该输入影像。再者,该等输入影像也可以事先储存于该储存模块2,而省略步骤S1及步骤S2。In addition, it should be noted that in other embodiments, the image frame can also be other quadrilaterals or other shapes. In addition, in step S2, the processing module 3 may also divide the image into multiple input images. Furthermore, the input images can also be stored in the storage module 2 in advance, and steps S1 and S2 are omitted.

于步骤S3,通过该处理模块3对二值化处理后的该输入影像判断属于黑白交界或属于该影像边框的多个轮廓线,并定义为对应的多个线段物件。再参阅图3,图3举例说明该输入影像的一种态样,其中,该六个线段物件41~46的轮廓所对应的即为该六个轮廓线。接着,执行步骤S4。In step S3, the processing module 3 determines multiple contour lines belonging to the black and white boundary or the frame of the image from the binarized input image, and defines them as corresponding line segment objects. Referring again to FIG. 3 , FIG. 3 illustrates an aspect of the input image, in which the outlines of the six line segment objects 41 to 46 correspond to the six outlines. Next, step S4 is executed.

于步骤S4,通过该处理模块3判断每一个该线段物件所具有的一个周长是否大于或等于一个周长阈值。当判断该周长小于该周长阈值时,执行步骤S5。而当判断该周长大于或等于该周长阈值时,执行步骤S6。在本实施例中,该周长阈值例如是该周长的10%,即240*4*10%=96。而在其他的实施例中,步骤S4也可以是判断该周长是否大于该周长阈值。In step S4, the processing module 3 determines whether a perimeter of each line segment object is greater than or equal to a perimeter threshold. When it is determined that the perimeter is smaller than the perimeter threshold, step S5 is executed. When it is determined that the perimeter is greater than or equal to the perimeter threshold, step S6 is executed. In this embodiment, the perimeter threshold is, for example, 10% of the perimeter, that is, 240*4*10%=96. In other embodiments, step S4 may also be to determine whether the perimeter is greater than the perimeter threshold.

于步骤S5,表示该线段物件太小,不被判断为该印刷电路板的一个导线线段,而可能是气泡、脏污、或杂点等等。再参阅图3,例如是该线段物件43。In step S5, it indicates that the line segment object is too small and is not judged to be a wire segment of the printed circuit board, but may be bubbles, dirt, or stray spots, etc. Referring again to FIG. 3 , for example, the line segment object 43 .

于步骤S6,通过该处理模块3判断每一个该线段物件通过该影像边框的次数是否等于1而作筛选,进而将对应次数等于1的该等线段物件分别作为多个候选断线物件。当判断不等于1时,执行步骤S7。而当判断等于1时,执行步骤S8。再参阅图3,多个线段物件41、42、45、46作为多个候选断线物件。In step S6, the processing module 3 determines whether the number of times each line segment object passes through the image frame is equal to 1 for filtering, and then the line segment objects corresponding to the number of times equal to 1 are used as multiple candidate line break objects. When it is determined that it is not equal to 1, step S7 is executed. When the judgment is equal to 1, step S8 is executed. Referring again to FIG. 3 , multiple line segment objects 41 , 42 , 45 , and 46 serve as multiple candidate line break objects.

于步骤S7,表示该线段物件太大或属于一种独立物件。再参阅图3,该线段物件44所对应的次数等于0,属于独立物件。In step S7, it indicates that the line segment object is too large or belongs to an independent object. Referring again to Figure 3, the degree corresponding to the line segment object 44 is equal to 0, and it is an independent object.

于步骤S8,再参阅图4,每一个该候选断线物件具有对应设计值的一个设计线宽,设计值即是在设计时的理论宽度。通过该处理模块3计算每一个该候选断线物件的多个实际线宽,即在不同位置所量测的多个实际线宽,如图4的三个距离463~465即为其中该三个实际线宽。当该处理模块3判断其中一个该实际线宽等于该设计线宽乘以一个比例阈值时,在该轮廓线上对应该实际线宽的两个端点坐标的中心点的所在位置等于该断线端的该中点坐标,该比例阈值大于零且小于1。举例来说,该比例阈值等于85%,该实际线宽(等于该距离465)等于该设计线宽的85%,则该两个端点坐标461与462(或451与452、或421与422、或411与412)的中心点的所在位置等于该线段物件46(或45、或42、或41)的该断线端的该中点坐标。该处理模块3还计算每一个该候选断线物件的该断线端的该中点坐标与其余任一个该候选断线物件的该断线端的该中点坐标的一个中点距离。接着,执行步骤S9。In step S8, referring again to FIG. 4, each candidate line break object has a design line width corresponding to the design value, and the design value is the theoretical width at design time. The processing module 3 calculates multiple actual line widths of each candidate disconnected object, that is, multiple actual line widths measured at different locations. The three distances 463 to 465 in Figure 4 are the three of them. Actual line width. When the processing module 3 determines that one of the actual line widths is equal to the design line width multiplied by a proportional threshold, the position of the center point of the two endpoint coordinates corresponding to the actual line width on the contour line is equal to the broken line end. The midpoint coordinate, the scale threshold is greater than zero and less than 1. For example, the proportion threshold is equal to 85%, and the actual line width (equal to the distance 465) is equal to 85% of the design line width, then the two endpoint coordinates 461 and 462 (or 451 and 452, or 421 and 422, The location of the center point of (or 411 and 412) is equal to the midpoint coordinate of the broken end of the line segment object 46 (or 45, or 42, or 41). The processing module 3 also calculates a midpoint distance between the midpoint coordinates of the disconnected end of each candidate disconnected object and the midpoint coordinates of the disconnected end of any other candidate disconnected object. Next, step S9 is executed.

于步骤S9,通过该处理模块3判断每一个该候选断线物件是否为一个第一群组。当该处理模块3针对每一个该候选断线物件判断与其余任一个该候选断线物件的该至少一个中点距离的其中最小者小于一个第一设定线距时,对应的两个该候选断线物件被分类为属于断线的该第一群组的其中一对数据,接着,执行步骤S10。相反地,未被分类为该第一群组的该候选断线物件则在步骤S11中被执行。在本实施例中,该第一设定线距等于该输入影像所对应的该印刷电路板的制程的一个最小线距,而在其他实施例中,也可以例如是该输入影像中该线段物件的该设计线距的最小值,但不以此为限。In step S9, the processing module 3 determines whether each of the candidate disconnected objects is a first group. When the processing module 3 determines for each candidate disconnected object that the smallest one of the at least one midpoint distance from any other candidate disconnected object is less than a first set line distance, the corresponding two candidates The disconnected object is classified as a pair of data belonging to the first group of disconnected objects, and then step S10 is performed. On the contrary, the candidate disconnected objects that are not classified into the first group are executed in step S11. In this embodiment, the first set line distance is equal to a minimum line distance of the printed circuit board manufacturing process corresponding to the input image. In other embodiments, it can also be, for example, the line segment object in the input image. The minimum value of the design line distance, but not limited to this.

于步骤S10,通过该处理模块3输出属于该第一群组的数据。该数据例如是一组或多组成对的两个该候选断线物件的该断线端的该中点坐标,或(及)该中点坐标所对应的该端点坐标。In step S10, the processing module 3 outputs data belonging to the first group. The data is, for example, the midpoint coordinates of the disconnected ends of one or more pairs of two candidate disconnected objects, or/and the endpoint coordinates corresponding to the midpoint coordinates.

于步骤S11,通过该处理模块3判断未被分类为该第一群组的该等候选断线物件是否为一个第二群组,该第二群组是一种表示可能存在断线的分类数据。当该处理模块3针对每一个该候选断线物件判断该至少一个中点距离的其中任一者小于一个第二设定线距,且对应其中该中点距离的两个该候选断线物件所分别通过的该影像边框是该四边形的不同边时,对应的两个该候选断线物件被分类为该第二群组的其中一对数据,接着,执行步骤S12。相反地,未被分类为该第二群组的候选断线物件则在步骤S13中被执行。在本实施例中,该第二设定线距等于该输入影像所对应的该印刷电路板的制程的该最小线距乘以2倍,但不以此为限。In step S11, the processing module 3 determines whether the candidate disconnected objects that are not classified as the first group are a second group. The second group is a kind of classification data indicating that there may be a disconnection. . When the processing module 3 determines for each candidate wire-break object that any one of the at least one midpoint distance is less than a second set line distance, and the two candidate wire-break objects corresponding to the midpoint distance are When the image frames passing through respectively are different sides of the quadrilateral, the corresponding two candidate disconnected objects are classified as one pair of data of the second group, and then step S12 is performed. On the contrary, candidate disconnected objects that are not classified into the second group are executed in step S13. In this embodiment, the second set line spacing is equal to twice the minimum line spacing of the printed circuit board manufacturing process corresponding to the input image, but is not limited to this.

于步骤S12,通过该处理模块3输出属于该第二群组的数据。该数据例如是一组或多组成对的两个该候选断线物件的该断线端的该中点坐标,或(及)该中点坐标所对应的该端点坐标。In step S12, the processing module 3 outputs data belonging to the second group. The data is, for example, the midpoint coordinates of the disconnected ends of one or more pairs of two candidate disconnected objects, or/and the endpoint coordinates corresponding to the midpoint coordinates.

于步骤S13,通过该处理模块3判断未被分类为该第二群组的该候选断线物件为一个第三群组,并输出属于该第三群组的数据。该数据例如是该至少一个候选断线物件的该至少一个断线端的该至少一个中点坐标,或(及)该至少一个中点坐标所对应的该端点坐标。In step S13, the processing module 3 determines that the candidate disconnected object that is not classified into the second group is a third group, and outputs data belonging to the third group. The data is, for example, the at least one midpoint coordinate of the at least one disconnected end of the at least one candidate disconnected object, or/and/or the endpoint coordinate corresponding to the at least one midpoint coordinate.

再参阅图5,图5示例性地说明该输入影像的一种态样,其中,定义六个中点坐标51~56分别对应六个候选断线物件A~F,并分别对应的该多个中点距离分别为A到B(等于B到A,且以下省略)=2.0、A到C=3.7、A到D=4.1、A到E=1.8、A到F=0.6、B到C=1.7、B到D=3.0、B到E=1.1、B到F=2.3、C到D=2.2、C到E=2.0、C到F=3.8、D到E=2.3、D到F=3.8、E到F=1.8,该中点距离的单位例如是该印刷电路板的制程的该最小线距。则候选断线物件A与F被成对的分类为该第一群组,候选断线物件B与E被成对的分类为该第二群组,候选断线物件C与D被分类为该第三群组。Referring again to FIG. 5 , FIG. 5 exemplarily illustrates an aspect of the input image, in which six midpoint coordinates 51 to 56 are defined to respectively correspond to six candidate disconnected objects A to F, and respectively correspond to the plurality of broken line objects A to F. The midpoint distances are respectively A to B (equal to B to A, and omitted below) = 2.0, A to C = 3.7, A to D = 4.1, A to E = 1.8, A to F = 0.6, B to C = 1.7 , B to D=3.0, B to E=1.1, B to F=2.3, C to D=2.2, C to E=2.0, C to F=3.8, D to E=2.3, D to F=3.8, E To F=1.8, the unit of the midpoint distance is, for example, the minimum line spacing of the printed circuit board manufacturing process. Then the candidate disconnection objects A and F are classified into the first group in pairs, the candidate disconnection objects B and E are classified into the second group in pairs, and the candidate disconnection objects C and D are classified into the second group. The third group.

另外要特别补充说明的是:在步骤S9与S11中,当该处理模块3针对每一个该候选断线物件判断与其余任一个该候选断线物件的该至少一个中点距离的其中最小者等于该第一设定线距时,对应的两个该候选断线物件可以依照预先设定的规则被分类为该第一群组(或该第二群组)。同样地,在步骤S11与S13中,当该处理模块3针对每一个该候选断线物件判断与其余任一个该候选断线物件的该至少一个中点距离的其中最小者等于该第二设定线距时,对应的两个该候选断线物件可以依照预先设定的规则被分类为该第二群组(或该第三群组)。In addition, it should be noted that in steps S9 and S11, when the processing module 3 determines for each candidate disconnected object that the minimum of the at least one midpoint distance from any other candidate disconnected object is equal to When the line distance is first set, the corresponding two candidate line break objects can be classified into the first group (or the second group) according to preset rules. Similarly, in steps S11 and S13, when the processing module 3 determines for each candidate disconnected object that the minimum of the at least one midpoint distance from any other candidate disconnected object is equal to the second setting When the line distance is determined, the corresponding two candidate broken objects can be classified into the second group (or the third group) according to preset rules.

综上所述,通过该处理模块3对该印刷电路板的该输入影像先作预处理及轮廓线的辨识,再根据所计算出的该中点坐标的该中点距离对该候选断线物件作分类,而获得属于断线的该第一群组、属于可能存在断线的该第二群组、及属于其余部分的该第三群组,而实现一种不需要使用标准样板来比对,且不需要大量数据的影像数据库的检测方法,所以确实能达成本发明的目的。In summary, the input image of the printed circuit board is pre-processed and contour lines are identified through the processing module 3, and then the candidate broken object is determined based on the calculated midpoint distance of the midpoint coordinates. Classification is performed to obtain the first group belonging to disconnections, the second group belonging to possible disconnections, and the third group belonging to the remaining parts, thereby achieving a comparison that does not require the use of standard templates. , and the detection method does not require a large amount of data in the image database, so the purpose of the present invention can indeed be achieved.

以上所述仅为本发明较佳实施例,然其并非用以限定本发明的范围,任何熟悉本项技术的人员,在不脱离本发明的精神和范围内,可在此基础上做进一步的改进和变化,因此本发明的保护范围当以本申请的权利要求书所界定的范围为准。The above descriptions are only preferred embodiments of the present invention, but they are not intended to limit the scope of the present invention. Anyone familiar with the art can make further improvements based on this without departing from the spirit and scope of the present invention. Improvements and changes, therefore the protection scope of the present invention shall be subject to the scope defined by the claims of this application.

Claims (8)

1. A method of detection suitable for use in and implemented by a detection system, the method comprising:
a: performing binarization processing on an input image related to the printed circuit board, wherein the input image is provided with an image frame;
b: for the binarized input image, judging a plurality of contour lines belonging to a black-white boundary or the image frame, and defining the contour lines as a plurality of corresponding line segment objects;
c: screening each line segment object according to a perimeter threshold value and the times of passing through the image frame to obtain a plurality of candidate line segment objects; and
D: judging whether each candidate broken line object is classified as belonging to a first group of broken lines according to the midpoint coordinates of the broken line ends of each candidate broken line object and a first set line distance, judging whether each candidate broken line object has a designed line width corresponding to a designed value and a plurality of actual line widths measured at different positions, when one of the actual line widths is equal to the designed line width multiplied by a proportion threshold value, the position of a central point of two end coordinates corresponding to the actual line width on the contour line is equal to the midpoint coordinates of the broken line ends, the proportion threshold value is larger than zero and smaller than 1, calculating the midpoint distances between the midpoint coordinates of the broken line ends of each candidate broken line object and the midpoint coordinates of the broken line ends of any one of the candidate broken line objects, and when the smallest one of the at least one midpoint distances is judged to be smaller than the first set line distance, the corresponding two candidate broken line objects are classified as one pair of the first set line distances, and the corresponding data of the first set line distances of the first set image plates are equal to the minimum image distance of the first set image plates.
2. The detecting method according to claim 1, wherein in step C, when any one of the line segment objects has a perimeter greater than or equal to the perimeter threshold and the number of times the line segment object passes through the image frame is equal to 1, the line segment object is determined as one of the candidate line segment objects.
3. The detecting method according to claim 2, further comprising a step E of determining whether the candidate broken line object not classified as the first group is classified as belonging to a second group based on the at least one midpoint distance of the midpoint coordinates of the broken line end of the candidate broken line object not classified as the first group and a second set line distance, the second set line distance being larger than the first set line distance.
4. The detecting method as claimed in claim 3, wherein in the step A, the image frame is a quadrangle, and in the step E, when it is determined that any one of the at least one midpoint distance is smaller than the second set line distance and the image frames through which the two candidate broken line objects corresponding to the midpoint distance respectively pass are different sides of the quadrangle, the corresponding two candidate broken line objects are classified into one pair of data of the second group.
5. The method of claim 4, further comprising step F of determining that at least one candidate broken line object that is not classified as either the first group or the second group is classified as belonging to a third group.
6. The inspection method of claim 5, wherein in step D, the ratio threshold is equal to 85%, and the second set line spacing is equal to 2 times the minimum line spacing of the printed circuit board process corresponding to the input image.
7. The method of claim 6, wherein in step D, when it is determined that the smallest one of the at least one midpoint distance is equal to the first set line distance, the corresponding two candidate broken line objects are classified as one pair of data of the first group.
8. The detecting method as claimed in claim 6, wherein in the step E, when it is determined that any one of the at least one midpoint distance is equal to the second set line distance and the image frames through which the two candidate broken line objects corresponding to the midpoint distance respectively pass are different sides of the quadrangle, the corresponding two candidate broken line objects are classified as one pair of data of the second group.
CN202011229886.9A 2020-11-06 2020-11-06 Detection method Active CN114441554B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011229886.9A CN114441554B (en) 2020-11-06 2020-11-06 Detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011229886.9A CN114441554B (en) 2020-11-06 2020-11-06 Detection method

Publications (2)

Publication Number Publication Date
CN114441554A CN114441554A (en) 2022-05-06
CN114441554B true CN114441554B (en) 2023-09-29

Family

ID=81360730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011229886.9A Active CN114441554B (en) 2020-11-06 2020-11-06 Detection method

Country Status (1)

Country Link
CN (1) CN114441554B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0271377A (en) * 1988-09-07 1990-03-09 Hitachi Ltd Method and device for checking pattern
JPH02162205A (en) * 1988-12-16 1990-06-21 Fujitsu Ltd pattern inspection equipment
TW541422B (en) * 2000-09-05 2003-07-11 Atg Test Systems Gmbh Method and apparatus for the testing of circuit boards
KR20090042155A (en) * 2007-10-24 2009-04-29 아주하이텍(주) Manufacturing method of flexible printed circuit board and inspection method thereof
CN101915570A (en) * 2010-07-20 2010-12-15 同济大学 A method for automatic extraction and classification of ground motion measurement image line segments based on vanishing points
KR20110112605A (en) * 2010-04-07 2011-10-13 (주) 대하전선 Defect Detection Method of FPC Products
CN103033521A (en) * 2012-12-13 2013-04-10 京东方科技集团股份有限公司 Wiring detection method and wiring detection system
CN103500459A (en) * 2013-09-24 2014-01-08 华南理工大学 Printed circuit board defect detecting method based on regularization parameters
KR20150025777A (en) * 2013-08-30 2015-03-11 (주)넥스틴 method of segmentation of die image for semiconductor device examination
CN108311409A (en) * 2017-12-26 2018-07-24 江苏仲博敬陈信息科技有限公司 A kind of printed circuit board (PCB) detecting system based on artificial intelligence image recognition
TW202107073A (en) * 2019-08-09 2021-02-16 大陸商蘇州康代智能科技股份有限公司 System and method for pcb inspection based on false defect detection

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110021005B (en) * 2018-01-05 2022-03-15 财团法人工业技术研究院 Method and device for screening defects of circuit board and computer readable recording medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0271377A (en) * 1988-09-07 1990-03-09 Hitachi Ltd Method and device for checking pattern
JPH02162205A (en) * 1988-12-16 1990-06-21 Fujitsu Ltd pattern inspection equipment
TW541422B (en) * 2000-09-05 2003-07-11 Atg Test Systems Gmbh Method and apparatus for the testing of circuit boards
KR20090042155A (en) * 2007-10-24 2009-04-29 아주하이텍(주) Manufacturing method of flexible printed circuit board and inspection method thereof
KR20110112605A (en) * 2010-04-07 2011-10-13 (주) 대하전선 Defect Detection Method of FPC Products
CN101915570A (en) * 2010-07-20 2010-12-15 同济大学 A method for automatic extraction and classification of ground motion measurement image line segments based on vanishing points
CN103033521A (en) * 2012-12-13 2013-04-10 京东方科技集团股份有限公司 Wiring detection method and wiring detection system
KR20150025777A (en) * 2013-08-30 2015-03-11 (주)넥스틴 method of segmentation of die image for semiconductor device examination
CN103500459A (en) * 2013-09-24 2014-01-08 华南理工大学 Printed circuit board defect detecting method based on regularization parameters
CN108311409A (en) * 2017-12-26 2018-07-24 江苏仲博敬陈信息科技有限公司 A kind of printed circuit board (PCB) detecting system based on artificial intelligence image recognition
TW202107073A (en) * 2019-08-09 2021-02-16 大陸商蘇州康代智能科技股份有限公司 System and method for pcb inspection based on false defect detection

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HRIPCB:a challenging dataset for PCB defects detection and classification;weibo huang etal;the journal of engineering(第13期);303-309 *
PCB图像线宽线距缺陷检测算法研究;蔡茂蓉;;微计算机信息(第25期);1-3 *
基于机器视觉的PCB裸板缺陷检测方法研究;陈亮;中国优秀硕士学位论文全文数据库 信息科技辑(第7期);138-1971 *

Also Published As

Publication number Publication date
CN114441554A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
JP5699788B2 (en) Screen area detection method and system
CN106960208B (en) Method and system for automatically segmenting and identifying instrument liquid crystal number
WO2021168733A1 (en) Defect detection method and apparatus for defect image, and computer-readable storage medium
CN103345755A (en) Chessboard angular point sub-pixel extraction method based on Harris operator
TW202318338A (en) Detection method
CN115239727B (en) PCB surface defect detection method
TWI669519B (en) Board defect filtering method and device thereof and computer-readabel recording medium
CN108918093B (en) Optical filter mirror surface defect detection method and device and terminal equipment
CN111223078B (en) Method for determining flaw level and storage medium
JP2011198872A (en) Identification method of data point distribution area on coordinate plane and identification program thereof
CN112419260A (en) PCB character area defect detection method
CN111259891B (en) Method, device, equipment and medium for identifying identity card in natural scene
CN112669272B (en) AOI rapid detection method and rapid detection system
CN115078365A (en) Soft package printing quality defect detection method
CN110135288B (en) Method and device for quickly checking electronic certificate
CN114441554B (en) Detection method
CN105069773B (en) The auto-adaptable image edge detection computational methods being combined based on mask with canny
TWI765402B (en) Detection method
JP5067677B2 (en) Defect detection method, defect detection apparatus, and program
TWI837934B (en) Inspection system, training data generation apparatus, training data generation method, and program
CN115205288B (en) Industrial defect detection method and device
CN117871416A (en) Grain coordinate sorting method and system
CN115131539B (en) Aluminum template automatic identification and classification system based on machine vision
CN116993654B (en) Camera module defect detection method, device, equipment, storage medium and product
CN116402771A (en) Defect detection method and device and model training method and device

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