






技术领域technical field
本申请涉及电路板检测技术领域,特别是涉及缺陷检测方法、缺陷检测装置及计算机可读存储介质。The present application relates to the technical field of circuit board detection, in particular to a defect detection method, a defect detection device and a computer-readable storage medium.
背景技术Background technique
印制电路板(Printed Circuit Board,PCB)是电子元气件电气连接的提供者。随着电子技术的发展,PCB布线密度不断提高,人工目检难度增大,误判率升高,且对检测者的健康损害更大,电检测程序编制更加烦琐,成本更高,并且无法检测某些类型的缺陷,因此,自动光学检测技术(Automated Optical Inspection,AOI)越来越多地应用于PCB制造中。Printed Circuit Board (PCB) is the provider of electrical connections for electronic components. With the development of electronic technology, the density of PCB wiring continues to increase, the difficulty of manual visual inspection increases, the rate of misjudgment increases, and the health damage to the inspector is greater. The electrical inspection program is more cumbersome, the cost is higher, and it cannot be detected. Certain types of defects, therefore, Automated Optical Inspection (AOI) is increasingly used in PCB manufacturing.
AOI检测系统会将测试的焊点与数据库中的合格的参数进行比较,以检查出电路板的缺陷,并通过显示器或自动标志把缺陷显示/标示出来。现有技术中,在AOI检测之后,需要对AOI检测的缺陷进行复检,然而,AOI检测所标示的是整个电路板的缺陷图像,图像精度低,不利于提高印制电路板的检测精度。The AOI inspection system will compare the tested solder joints with the qualified parameters in the database to check out the defects of the circuit board, and display/mark the defects through the display or automatic marking. In the prior art, after the AOI inspection, the defects detected by the AOI need to be re-inspected. However, the AOI inspection indicates the defect image of the entire circuit board, and the image accuracy is low, which is not conducive to improving the inspection accuracy of the printed circuit board.
发明内容Contents of the invention
本申请提供了一种缺陷检测方法、缺陷检测装置及计算机可读存储介质,以解决现有技术中检测精度低的技术问题。The present application provides a defect detection method, a defect detection device and a computer-readable storage medium to solve the technical problem of low detection accuracy in the prior art.
为解决上述问题,本申请提供一种缺陷检测方法,包括:获取待检测电路板的缺陷数据;采集所述待检测电路板的定位图像,并根据所述定位图像确定所述待检测电路板上基准的当前位置数据,其中所述定位图像包括所述基准的图像;基于所述缺陷数据和所述基准的当前位置数据,对所述待检测电路板的缺陷区域进行图像采集,以获取与所述缺陷数据对应的缺陷图像。In order to solve the above problems, the present application provides a defect detection method, including: acquiring defect data of the circuit board to be detected; collecting a positioning image of the circuit board to be detected, and determining The current position data of the reference, wherein the positioning image includes the image of the reference; based on the defect data and the current position data of the reference, image acquisition is performed on the defect area of the circuit board to be detected, so as to obtain the The defect image corresponding to the above defect data.
其中,所述采集所述待检测电路板的定位图像,并根据所述定位图像确定所述待检测电路板上基准的当前位置数据的步骤,包括:采集所述待检测电路板的定位图像;根据所述基准的图像特征,从所述定位图像中识别出所述基准的图像,并获取所述基准在所述定位图像上的相对位置数据;根据所述相对位置数据,获取所述基准的当前位置数据。Wherein, the step of collecting the positioning image of the circuit board to be detected, and determining the current position data of the reference on the circuit board to be detected according to the positioning image includes: collecting the positioning image of the circuit board to be detected; According to the image characteristics of the reference, identify the image of the reference from the positioning image, and obtain relative position data of the reference on the positioning image; obtain the relative position data of the reference according to the relative position data Current location data.
其中,所述缺陷检测装置上设置有用于拍摄所述定位图像的第一图像采集组件;所述根据所述相对位置数据,获取所述基准的当前位置数据的步骤,包括:获取所述第一图像采集组件的当前位置;根据所述相对位置数据,以及所述第一图像采集组件的当前位置,计算所述基准的当前位置数据。其中,所述缺陷数据包括待检测电路板图像上各个缺陷相对所述基准的第一位置数据,以及所述第一位置数据与所述待检测电路板的映射关系;所述基于所述缺陷数据和所述基准的当前位置数据对所述待检测电路板的缺陷区域进行图像采集的步骤,包括:根据所述第一位置数据与所述映射关系,计算所述待检测电路板上各个所述缺陷相对所述基准的第二位置数据;根据所述基准的当前位置数据及所述第二位置数据,获取各个缺陷的当前位置数据;基于所述各个缺陷的当前位置数据,对所述待检测电路板的缺陷区域进行图像采集。Wherein, the defect detection device is provided with a first image acquisition component for taking the positioning image; the step of acquiring the current position data of the reference according to the relative position data includes: acquiring the first The current position of the image acquisition component; according to the relative position data and the current position of the first image acquisition component, calculate the current position data of the reference. Wherein, the defect data includes the first position data of each defect on the image of the circuit board to be detected relative to the reference, and the mapping relationship between the first position data and the circuit board to be detected; The step of collecting the image of the defective area of the circuit board to be inspected with the current position data of the reference includes: calculating each of the defects on the circuit board to be inspected according to the first position data and the mapping relationship. The second position data of the defect relative to the reference; according to the current position data of the reference and the second position data, the current position data of each defect is obtained; based on the current position data of each defect, the to-be-detected Image acquisition of the defective area of the circuit board.
其中,所述基准为所述待检测电路板的角点。Wherein, the reference is a corner point of the circuit board to be detected.
其中,所述第一位置数据和所述第二位置数据所在的坐标系均以所述基准为原点。Wherein, the coordinate systems where the first position data and the second position data are located both take the reference as the origin.
其中,所述缺陷检测装置上设置有第二图像采集组件;所述基于所述各个缺陷的当前位置数据,对所述待检测电路板的缺陷区域进行采集的步骤,包括:基于所述各个缺陷的当前位置数据,计算第二图像采集组件移动至缺陷区域的运动轨迹;控制所述第二图像采集组件按照所述运动轨迹移动至所述缺陷区域并进行图像采集。Wherein, the defect detection device is provided with a second image acquisition component; the step of collecting the defect area of the circuit board to be detected based on the current position data of each defect includes: Calculate the motion trajectory of the second image acquisition component moving to the defect area; control the second image acquisition component to move to the defect area according to the motion trajectory and perform image acquisition.
其中,所述缺陷检测装置包括沿所述待检测电路板的传输方向上依次设置的位置传感器和挡板;所述采集所述待检测电路板的定位图像的步骤之前,还包括:获取所述位置传感器的触发信号,其中,所述位置传感器能够在当所述待检测电路板经过时产生所述触发信号;响应所述触发信号,控制所述挡板移动至预设位置以阻挡所述待检测电路板,从而校正所述待检测电路板的位置。Wherein, the defect detection device includes a position sensor and a baffle arranged in sequence along the conveying direction of the circuit board to be detected; before the step of collecting the positioning image of the circuit board to be detected, it also includes: acquiring the A trigger signal of a position sensor, wherein the position sensor can generate the trigger signal when the circuit board to be detected passes by; in response to the trigger signal, control the baffle to move to a preset position to block the circuit board to be detected Detecting the circuit board, thereby correcting the position of the circuit board to be detected.
其中,所述缺陷数据包括所述待检测电路板的上下板面的缺陷数据,所述缺陷检测装置包括图像采集模块,所述图像采集模块对应于所述待检测电路板的上下板面设置有多个图像采集组件;所述获取与所述缺陷数据对应的缺陷图像的步骤包括:通过所述多个图像采集组件分别获取所述待检测电路板的上板面的缺陷图像和下板面的缺陷图像。Wherein, the defect data includes the defect data of the upper and lower surfaces of the circuit board to be detected, and the defect detection device includes an image acquisition module, and the image acquisition module is provided with A plurality of image acquisition components; the step of acquiring defect images corresponding to the defect data includes: respectively acquiring defect images of the upper surface and lower surface of the circuit board to be inspected by the plurality of image acquisition components Defective image.
其中,所述缺陷检测装置上设置有第二图像采集组件;所述缺陷数据包括所述待检测电路板上若干缺陷的位置数据以及与所述位置数据对应的缺陷区域的图形数据;所述基于所述缺陷数据和所述基准的当前位置数据,对所述待检测电路板的缺陷区域进行图像采集的步骤,包括:根据所述图形数据,获取所述第二图像采集组件的变焦系数;基于所述变焦系数、所述若干缺陷的位置数据和所述基准的当前位置数据,控制所述第二图像采集组件对所述待检测电路板的缺陷区域进行图像采集。其中,所述缺陷检测装置包括用于传输所述待检测电路板的辊轮模块,所述基于所述缺陷数据和所述基准对所述待检测电路板的缺陷区域进行重新采集,以获取与所述缺陷数据对应的缺陷图像的步骤之前,所述缺陷检测方法还包括:当检测到所述待检测电路板达到所述辊轮模块的中间位置时,控制所述辊轮模块调整至固定状态,以固定所述待检测电路板。Wherein, the defect detection device is provided with a second image acquisition component; the defect data includes position data of several defects on the circuit board to be detected and graphic data of defect regions corresponding to the position data; The defect data and the current position data of the reference, the step of image acquisition of the defect area of the circuit board to be inspected includes: acquiring the zoom coefficient of the second image acquisition component according to the graphic data; based on The zoom coefficient, the position data of the plurality of defects and the current position data of the reference control the second image acquisition component to acquire images of the defect areas of the circuit board to be inspected. Wherein, the defect detection device includes a roller module for transporting the circuit board to be detected, and the defect area of the circuit board to be detected is re-collected based on the defect data and the reference, so as to obtain the Before the step of the defect image corresponding to the defect data, the defect detection method further includes: when it is detected that the circuit board to be detected reaches the middle position of the roller module, controlling the roller module to adjust to a fixed state , to fix the circuit board to be tested.
其中,所述缺陷检测装置上还设置有辊轮模块、第一位置传感器和第二位置传感器;所述第一位置传感器靠近所述辊轮模块的初始传输端设置,所述第二位置传感器靠近所述辊轮模块的中间传输段设置;所述基于所述缺陷数据和所述基准的当前位置数据,对所述待检测电路板的缺陷区域进行采集的步骤之前,还包括:响应于所述待检测电路板经过所述第一位置传感器的位置,触发所述第二位置传感器进入工作状态;检测是否在预设时间内接收到触发信号,其中,所述触发信号是所述第二位置传感器响应所述待检测电路板经过时产生的;若未检测到所述触发信号,则输出用于提示所述辊轮模块故障的报警信号。Wherein, the defect detection device is also provided with a roller module, a first position sensor and a second position sensor; the first position sensor is set close to the initial transmission end of the roller module, and the second position sensor is close to The intermediate transmission section of the roller module is set; before the step of collecting the defect area of the circuit board to be detected based on the defect data and the current position data of the reference, it also includes: responding to the The circuit board to be detected passes the position of the first position sensor, triggering the second position sensor to enter the working state; detecting whether a trigger signal is received within a preset time, wherein the trigger signal is the second position sensor Generated in response to the passage of the circuit board to be detected; if the trigger signal is not detected, an alarm signal for prompting failure of the roller module is output.
其中,所述缺陷数据为另一种缺陷检测设备对所述待检测电路板进行缺陷检测时得到的缺陷数据。Wherein, the defect data is defect data obtained when another defect detection device performs defect detection on the circuit board to be detected.
其中,所述另一种缺陷检测设备获取所述缺陷数据时所采集的电路板图像的清晰度小于所述缺陷图像的清晰度。Wherein, when the another defect detection device obtains the defect data, the resolution of the circuit board image collected is smaller than the resolution of the defect image.
其中,所述基于所述缺陷数据和所述基准的当前位置数据,对所述待检测电路板的缺陷区域进行图像采集,以获取与所述缺陷数据对应的缺陷图像的步骤之后,还包括:将所述缺陷图像输入经过预先训练的缺陷预测模型;获取所述缺陷预测模型输出的预测结果,并输出所述预测结果,其中,所述预测结果包括每个所述缺陷图像对应的缺陷是否为真实缺陷。Wherein, after the step of acquiring an image of the defect area of the circuit board to be inspected based on the defect data and the current position data of the reference to obtain a defect image corresponding to the defect data, it further includes: inputting the defect image into a pre-trained defect prediction model; obtaining a prediction result output by the defect prediction model, and outputting the prediction result, wherein the prediction result includes whether the defect corresponding to each defect image is real defect.
为解决上述问题,本申请提供一种缺陷检测装置,所述缺陷检测装置包括处理器以及与所述处理器连接的存储器,其中,所述存储器中存储有程序数据,所述处理器调取所述存储器存储的所述程序数据,以执行如上所述的缺陷检测方法。In order to solve the above problems, the present application provides a defect detection device, which includes a processor and a memory connected to the processor, wherein program data is stored in the memory, and the processor calls the The program data stored in the memory is used to execute the defect detection method as described above.
为解决上述问题,本申请提供一种计算机可读存储介质,存储有程序指令,所述程序指令被执行以实现如上所述的缺陷检测方法。In order to solve the above problems, the present application provides a computer-readable storage medium storing program instructions, and the program instructions are executed to implement the above-mentioned defect detection method.
本申请提出了缺陷检测方法、缺陷检测装置及计算机可读存储介质,该缺陷检测方法包括:获取待检测电路板的缺陷数据;采集所述待检测电路板的定位图像,并根据所述定位图像确定所述待检测电路板上基准的当前位置数据,其中所述定位图像包括所述基准的图像;基于所述缺陷数据和所述基准的当前位置数据,对所述待检测电路板的缺陷区域进行图像采集,以获取与所述缺陷数据对应的缺陷图像。通过本申请的方法,能够根据AOI检测时的检测数据重新采集待检测电路板的缺陷图像,以能够根据单个缺陷区域的图像进行复检,提高缺陷检测的精度。The present application proposes a defect detection method, a defect detection device, and a computer-readable storage medium. The defect detection method includes: obtaining defect data of a circuit board to be detected; collecting a positioning image of the circuit board to be detected, and according to the positioning image Determining the current position data of the reference on the circuit board to be inspected, wherein the positioning image includes the image of the reference; Image acquisition is performed to acquire defect images corresponding to the defect data. Through the method of the present application, the defect image of the circuit board to be inspected can be re-acquired according to the inspection data during AOI inspection, so that re-inspection can be performed based on the image of a single defect area, and the accuracy of defect detection can be improved.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。其中:In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort. in:
图1是本申请提供的缺陷检测方法的第一实施例的流程示意图;Fig. 1 is a schematic flow chart of the first embodiment of the defect detection method provided by the present application;
图2是本申请提供的缺陷检测方法的第二实施例的流程示意图;Fig. 2 is a schematic flow chart of the second embodiment of the defect detection method provided by the present application;
图3是本申请提供的缺陷检测方法的第三实施例的流程示意图;FIG. 3 is a schematic flow chart of a third embodiment of the defect detection method provided by the present application;
图4是本申请提供的缺陷检测装置的一实施例的结构示意图;FIG. 4 is a schematic structural view of an embodiment of a defect detection device provided by the present application;
图5是本申请提供的缺陷检测方法的第四实施例的流程示意图;FIG. 5 is a schematic flowchart of a fourth embodiment of the defect detection method provided by the present application;
图6是本申请提供的缺陷检测装置的一实施例的框架示意图;Fig. 6 is a schematic frame diagram of an embodiment of a defect detection device provided by the present application;
图7是本申请提供的计算机可读存储介质的一实施例的框架示意图。Fig. 7 is a schematic framework diagram of an embodiment of a computer-readable storage medium provided by the present application.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动情况下所获得的所有其他实施例,均属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
需要说明,若本发明实施例中有涉及方向性指示(诸如上、下、左、右、前、后……),则该方向性指示仅用于解释在某一特定姿态(如附图所示)下各部件之间的相对位置关系、运动情况等,如果该特定姿态发生改变时,则该方向性指示也相应地随之改变。It should be noted that if there is a directional indication (such as up, down, left, right, front, back...) in the embodiment of the present invention, the directional indication is only used to explain the position in a certain posture (as shown in the accompanying drawing). If the specific posture changes, the directional indication will also change accordingly.
另外,若本发明实施例中有涉及“第一”、“第二”等的描述,则该“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本发明要求的保护范围之内。In addition, if there are descriptions involving "first", "second" and so on in the embodiments of the present invention, the descriptions of "first", "second" and so on are only for descriptive purposes, and should not be interpreted as indicating or implying Its relative importance or implicitly indicates the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In addition, the technical solutions of the various embodiments can be combined with each other, but it must be based on the realization of those skilled in the art. When the combination of technical solutions is contradictory or cannot be realized, it should be considered that the combination of technical solutions does not exist , nor within the scope of protection required by the present invention.
本申请首先提出了一种缺陷检测方法,应用于一种缺陷检测装置,具体的,该缺陷检测装置用于对PCB电路板经过AOI检测系统检测出来的缺陷进行复检,缺陷检测装置包括但不局限于PCB板检查机、AOI检修机以及电路板检测设备等。This application first proposes a defect detection method, which is applied to a defect detection device. Specifically, the defect detection device is used to re-inspect the defects detected by the AOI detection system on the PCB circuit board. The defect detection device includes but not It is limited to PCB board inspection machine, AOI inspection machine and circuit board inspection equipment, etc.
其中,本申请的缺陷检测装置可以为由服务器和本地终端相互配合的系统。相应地,缺陷检测装置包括的各个部分,例如各个单元、子单元、模块、子模块可以全部设置于服务器中,也可以分别设置于服务器和本地终端中。在一些可能的实现方式中,本申请实施例的缺陷检测方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。Wherein, the defect detection device of the present application may be a system in which a server and a local terminal cooperate with each other. Correspondingly, various parts included in the defect detection device, such as various units, subunits, modules, and submodules, can all be set in the server, or can be set in the server and the local terminal respectively. In some possible implementation manners, the defect detection method in the embodiment of the present application may be implemented by calling a computer-readable instruction stored in a memory by a processor.
请参见图1,图1是本申请提供的缺陷检测方法的第一实施例的流程示意图。如图1所示,本实施例的缺陷检测方法包括以下步骤:Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of a first embodiment of a defect detection method provided by the present application. As shown in Figure 1, the defect detection method of the present embodiment includes the following steps:
步骤S11:获取待检测电路板的缺陷数据。Step S11: Obtain defect data of the circuit board to be inspected.
待检测电路板进入缺陷检测装置后,缺陷检测装置获取缺陷数据,缺陷数据至少包括待检测电路板上若干缺陷的坐标数据,缺陷数据为待检测电路板经过AOI检测系统进行光学检测后所获得的缺陷结果。After the circuit board to be inspected enters the defect detection device, the defect detection device obtains defect data. The defect data includes at least the coordinate data of several defects on the circuit board to be inspected. The defect data is obtained after the circuit board to be inspected is optically inspected by the AOI inspection system. defect results.
具体的,每个待检测电路板的缺陷数据的数量与该电路板的生产情况有关,一般而言,单个待检测电路板可以包括多个缺陷,以对应获取多个缺陷的坐标数据。其中,缺陷数据还可以包括待检测电路板上的缺陷位点的位置、将缺陷位置显示出来的框选区域以及相关的缺陷信息等数据信息。Specifically, the quantity of defect data of each circuit board to be inspected is related to the production status of the circuit board. Generally speaking, a single circuit board to be inspected may include multiple defects, so as to obtain coordinate data of multiple defects correspondingly. Wherein, the defect data may also include data information such as the position of the defect point on the circuit board to be inspected, the frame area for displaying the defect position, and related defect information.
步骤S12:采集待检测电路板的定位图像,并根据定位图像确定待检测电路板上基准的当前位置数据,其中定位图像包括基准的图像。Step S12: collecting a positioning image of the circuit board to be inspected, and determining current position data of the reference on the circuit board to be inspected according to the positioning image, wherein the positioning image includes an image of the reference.
缺陷检测装置包括图像采集模块,图像采集模块用于采集待检测电路板的定位图像,以通过待检测电路板的定位图像进行缺陷检测。在进行缺陷检测时,缺陷检测装置可以批量对电路板进行缺陷检测,在获取待检测电路板的缺陷数据之后,为了将AOI检测的缺陷数据与实际的电路板对应,电路板上可以设置有多个基准,基准用于标识电路板的原点位置,例如,基准可以为电路板的角点,基准也可以为其他便于缺陷检测装置识别的标识点,基准还可以通过设置点的形状、颜色、类型等进行识别,在此对基准不做具体限定。The defect detection device includes an image acquisition module, and the image acquisition module is used for collecting positioning images of the circuit board to be detected, so as to perform defect detection through the positioning images of the circuit board to be detected. When performing defect detection, the defect detection device can perform defect detection on circuit boards in batches. After obtaining the defect data of the circuit boards to be detected, in order to match the defect data detected by AOI with the actual circuit boards, multiple devices can be set on the circuit boards. A reference, the reference is used to identify the origin position of the circuit board, for example, the reference can be the corner point of the circuit board, the reference can also be other identification points that are convenient for the defect detection device to identify, the reference can also be set by the shape, color, type of the point etc., the benchmark is not specifically limited here.
缺陷检测装置通过图像采集模块采集待检测电路板的定位图像,定位图像至少包括基准的图像,并在定位图像中识别待检测电路板的基准,以确定待检测电路板上基准的当前位置数据。The defect detection device collects the positioning image of the circuit board to be inspected through the image acquisition module. The positioning image includes at least the image of the reference, and identifies the reference of the circuit board to be inspected in the positioning image to determine the current position data of the reference on the circuit board to be inspected.
步骤S13:基于缺陷数据和基准的当前位置数据,对待检测电路板的缺陷区域进行图像采集,以获取与缺陷数据对应的缺陷图像。Step S13: Based on the defect data and the current position data of the reference, image acquisition is performed on the defect area of the circuit board to be inspected to obtain a defect image corresponding to the defect data.
具体的,缺陷数据还可以包括AOI检测系统中图像的基准数据,在获取定位图像的基准的信息以及待检测电路板的缺陷数据后,可以将定位图像中的基准信息和AOI检测系统中图像的基准数据进行对应,以根据缺陷数据和基准获取待检测电路板的缺陷区域的相关信息,并对待检测电路板的缺陷区域进行重新采集,进而获得待检测电路板中与缺陷数据对应的缺陷图像。此时,缺陷图像的区域应至少包括待检测电路板上单个缺陷的缺陷区域。Specifically, the defect data may also include the reference data of the image in the AOI detection system. After obtaining the reference information of the positioning image and the defect data of the circuit board to be inspected, the reference information in the positioning image and the image in the AOI detection system can be combined. Corresponding to the reference data, to obtain relevant information of the defect area of the circuit board to be inspected according to the defect data and the reference, and re-collect the defect area of the circuit board to be inspected, and then obtain a defect image corresponding to the defect data in the circuit board to be inspected. At this time, the area of the defect image should at least include the defect area of a single defect on the circuit board to be inspected.
其中,根据定位图像的基准的相关信息,可以将检测数据中若干缺陷的坐标数据与待检测电路板对应,获得待检测电路板的缺陷区域。Wherein, according to the relevant information of the reference of the positioning image, the coordinate data of several defects in the inspection data can be corresponding to the circuit board to be inspected, and the defective area of the circuit board to be inspected can be obtained.
具体的,在一实施方式中,缺陷检测装置的图像采集模块可以设置有第一图像采集组件和第二图像采集组件,第一图像采集组件用于采集待检测电路板的定位图像,定位图像用于识别基准,因此第一图像采集组件的位置可以固定设置,其采集的定位图像至少包括待检测电路板的基准的图像,第一图像采集组件的采集区域包括但不局限于待检测电路板的边缘位置或者待检测电路板的全部区域。Specifically, in one embodiment, the image acquisition module of the defect detection device may be provided with a first image acquisition component and a second image acquisition component, the first image acquisition component is used to collect the positioning image of the circuit board to be inspected, and the positioning image is used to Therefore, the position of the first image acquisition component can be fixedly set, and the positioning image collected by it includes at least the image of the reference of the circuit board to be detected, and the acquisition area of the first image capture component includes but is not limited to the circuit board to be detected. Edge locations or the entire area of the board to be inspected.
第二图像采集组件用于重新采集待检测电路板的缺陷图像,为了提高缺陷图像中缺陷区域的清晰度,第二图像采集组件的清晰度可以大于第一图像采集组件的清晰度,以使得缺陷图像能够清晰的展现待检测电路板的缺陷情况。The second image acquisition component is used to reacquire the defect image of the circuit board to be detected. In order to improve the definition of the defect area in the defect image, the definition of the second image acquisition component can be greater than that of the first image acquisition component, so that the defect The image can clearly show the defects of the circuit board to be inspected.
在其他实施方式中,定位图像和缺陷图像也可以由同一图像采集组件采集,通过调整图像采集组件的位置或者变焦系数等参数切换采集模式,以对待检测电路板进行采集,获得定位图像和缺陷图像。In other embodiments, the positioning image and the defect image can also be collected by the same image acquisition component, and the acquisition mode can be switched by adjusting parameters such as the position of the image acquisition component or the zoom factor, so as to collect the circuit board to be inspected to obtain the positioning image and defect image .
在本申请实施例中,根据AOI检测时的检测数据重新采集待检测电路板的缺陷区域的缺陷图像,以能够根据单个缺陷的缺陷图像进行复检,提高缺陷检测的精度。In the embodiment of the present application, the defect image of the defect area of the circuit board to be inspected is re-acquired according to the inspection data during AOI inspection, so that re-inspection can be performed based on the defect image of a single defect, and the accuracy of defect inspection can be improved.
可选地,步骤S12还包括以下步骤:采集待检测电路板的定位图像;根据基准的图像特征,从定位图像中识别出基准的图像,并获取基准在定位图像上的相对位置数据;根据相对位置数据,获取基准的当前位置数据。Optionally, step S12 also includes the following steps: collecting the positioning image of the circuit board to be detected; identifying the image of the reference from the positioning image according to the image characteristics of the reference, and obtaining the relative position data of the reference on the positioning image; Position data, get the current position data of the datum.
具体的,待检测电路板设置的基准具有其特定的特征,可以通过对定位图像进行特征点识别,通过图像分割、图像识别、特征点识别等算法,从定位图像中识别出基准的图像,基准的图像为定位图像的一部分,基于基准的图像可以获取基准在定位图像上的相对位置数据。其中,基准在定位图像上的相对位置数据为基准相对于定位图像的二维的位置数据。Specifically, the reference set on the circuit board to be tested has its specific characteristics, and the image of the reference can be identified from the positioning image by performing feature point recognition on the positioning image, through image segmentation, image recognition, feature point recognition and other algorithms. The image is a part of the positioning image, and the reference-based image can obtain the relative position data of the reference on the positioning image. Wherein, the relative position data of the reference on the positioning image is the two-dimensional position data of the reference relative to the positioning image.
在获取基准在定位图像上的相对位置数据之后,基于缺陷检测装置的预设参数,进而可以获取基准的当前位置数据。其中,当前位置数据为基准相对于缺陷检测装置的三维的位置数据,以使得缺陷检测装置能够根据基准的当前位置数据获取待检测电路板上各个缺陷的当前位置数据。After obtaining the relative position data of the reference on the positioning image, based on the preset parameters of the defect detection device, the current position data of the reference can be obtained. Wherein, the current position data is the three-dimensional position data of the reference relative to the defect detection device, so that the defect detection device can obtain the current position data of each defect on the circuit board to be detected according to the current position data of the reference.
可选地,根据相对位置数据,获取基准的当前位置数据的步骤进一步还包括以下步骤:获取第一图像采集组件的当前位置;根据相对位置数据,以及第一图像采集组件的当前位置,计算基准的当前位置数据。Optionally, according to the relative position data, the step of obtaining the current position data of the benchmark further includes the following steps: acquiring the current position of the first image acquisition component; calculating the benchmark according to the relative position data and the current position of the first image capture component current location data for .
具体的,第一图像采集组件为缺陷检测装置上设置的用于拍摄定位图像的组件;第一图像采集组件的当前位置为缺陷检测装置中第一图像采集组件的三维坐标的位置数据,此时根据基准的相对位置数据以及第一图像采集组件的当前位置,可以计算出基准在缺陷检测装置中的当前位置数据。Specifically, the first image acquisition component is a component set on the defect detection device for taking positioning images; the current position of the first image acquisition component is the position data of the three-dimensional coordinates of the first image acquisition component in the defect detection device, at this time According to the relative position data of the benchmark and the current position of the first image acquisition component, the current position data of the benchmark in the defect detection device can be calculated.
在一种实施方式中,第一图像采集组件在缺陷检测装置的位置固定,则第一图像采集组件的当前位置为缺陷检测装置预设的位置数据,在另一种实施方式中,第一图像采集组件可移动设置于缺陷检测装置,此时,第一图像采集组件的当前位置为可变化的位置数据,在此对第一图像采集组件的位置不做具体限定。In one embodiment, the position of the first image acquisition component is fixed in the defect detection device, then the current position of the first image acquisition component is the preset position data of the defect detection device. In another embodiment, the first image The acquisition component can be moved and arranged on the defect detection device. At this time, the current position of the first image acquisition component is variable position data, and the position of the first image acquisition component is not specifically limited here.
可选地,缺陷数据包括待检测电路板图像上各个缺陷相对基准的第一位置数据,以及若干第一位置数据与待检测电路板的映射关系。请参见图2,图2是本申请提供的缺陷检测方法的第二实施例的流程示意图。Optionally, the defect data includes first position data of each defect on the image of the circuit board to be inspected relative to a reference, and a mapping relationship between several first position data and the circuit board to be inspected. Please refer to FIG. 2 , which is a schematic flowchart of a second embodiment of the defect detection method provided by the present application.
如图2所示,在本实施例中,步骤S13还包括以下步骤:As shown in Figure 2, in this embodiment, step S13 also includes the following steps:
步骤S21:根据第一位置数据与映射关系,计算待检测电路板上各个缺陷相对基准的第二位置数据。Step S21: According to the first position data and the mapping relationship, calculate the second position data of each defect on the circuit board to be detected relative to the reference.
具体的,在AOI检测系统对待检测电路板进行光学检测时,对待检测电路板进行图像采集,以根据电路板图像对缺陷进行光学检测。因此,在获取待检测电路板的缺陷数据时,缺陷数据包括了待检测电路板图像上各个缺陷相对基准的第一位置数据,以及若干第一位置数据与待检测电路板的映射关系。第一位置数据与待检测电路板的映射关系可以理解为将第一位置数据的二维坐标与待检测电路板的三维空间对应的映射关系。Specifically, when the AOI inspection system performs optical inspection on the circuit board to be inspected, it collects images of the circuit board to be inspected, so as to perform optical inspection on defects according to the image of the circuit board. Therefore, when obtaining the defect data of the circuit board to be inspected, the defect data includes the first position data of each defect on the image of the circuit board to be inspected relative to the reference, and the mapping relationship between several first position data and the circuit board to be inspected. The mapping relationship between the first position data and the circuit board to be inspected can be understood as a mapping relationship corresponding to the two-dimensional coordinates of the first position data and the three-dimensional space of the circuit board to be inspected.
根据待检测电路板图像上的第一位置数据以及若干第一位置数据与待检测电路板的映射关系,可以计算出待检测电路板上各个缺陷相对基准的第二位置数据。According to the first position data on the image of the circuit board to be inspected and the mapping relationship between the first position data and the circuit board to be inspected, the second position data of each defect on the circuit board to be inspected relative to the reference can be calculated.
步骤S22:根据基准的当前位置数据及第二位置数据,获取各个缺陷的当前位置数据。Step S22: Obtain the current position data of each defect according to the reference current position data and the second position data.
根据基准在缺陷检测装置的当前位置数据及第二位置数据,进而可以获取各个缺陷在缺陷检测装置的当前位置数据。According to the current position data of the reference in the defect detection device and the second position data, the current position data of each defect in the defect detection device can be obtained.
步骤S23:基于各个缺陷的当前位置数据,对待检测电路板的缺陷区域进行图像采集。Step S23: Based on the current position data of each defect, image acquisition is performed on the defect area of the circuit board to be inspected.
基于计算出的各个缺陷的当前位置数据,缺陷检测装置可以对待检测电路板的缺陷区域进行重新采集,以获取与缺陷数据对应的缺陷图像。Based on the calculated current position data of each defect, the defect detection device may re-acquire the defect area of the circuit board to be detected to obtain a defect image corresponding to the defect data.
因此,在本申请实施例中,根据定位图像的基准的当前位置数据,以及缺陷数据中各个缺陷相对基准的第一位置数据和映射关系,可以获取各个缺陷的当前位置数据,以对待检测电路板的缺陷区域进行重新采集,提高缺陷检测的精度。Therefore, in the embodiment of the present application, according to the current position data of the benchmark of the positioning image, and the first position data and the mapping relationship of each defect relative to the benchmark in the defect data, the current position data of each defect can be obtained for the circuit board to be inspected. The defect area is re-collected to improve the accuracy of defect detection.
可选地,基准为待检测电路板的角点。角点是图像边缘曲线上曲率极大值的点,一般位于待检测电路板的边缘部分,因此用于采集定位图像的第一图像采集组件可以固定设置于定位区域的某一位置并采集待检测电路板边界处的图像,以使得待检测电路板被输送到定位区域后第一图像采集组件采集定位图像。待检测电路板可以设置有多个角点,第一图像采集组件可以采集待检测电路板包括至少一个角点的定位图像,以根据角点的特征关系从定位图像中识别出至少一个基准的图像。Optionally, the reference is a corner point of the circuit board to be detected. The corner point is the point with the maximum curvature on the edge curve of the image, and is generally located at the edge of the circuit board to be detected. Therefore, the first image acquisition component used to collect the positioning image can be fixed at a certain position in the positioning area and collect the image to be detected. The image at the boundary of the circuit board, so that the first image acquisition component collects the positioning image after the circuit board to be inspected is transported to the positioning area. The circuit board to be detected can be provided with a plurality of corner points, and the first image acquisition component can collect a positioning image of the circuit board to be detected including at least one corner point, so as to identify at least one benchmark image from the positioning image according to the characteristic relationship of the corner points .
可选地,第一位置数据和第二位置数据所在的坐标系均以基准为原点。Optionally, the coordinate systems in which the first position data and the second position data are located both take the datum as the origin.
具体的,第一位置数据和第二位置数据所在的坐标系均以同一基准作为原点,缺陷数据可以包括待检测电路板图像上各个缺陷相对多个基准的位置数据,而第一位置数据为各个缺陷相对与定位图像所识别到的特征相同的基准的第一位置数据。Specifically, the coordinate systems where the first position data and the second position data are located both use the same reference as the origin, and the defect data may include position data of each defect on the image of the circuit board to be detected relative to multiple references, and the first position data is each First location data of the defect relative to the same reference as the feature identified in the locate image.
请参见图3,图3是本申请提供的缺陷检测方法的第三实施例的流程示意图。如图3所示,在本实施例中,缺陷检测装置上设置有第二图像采集组件;基于各个缺陷的当前位置数据,对待检测电路板的缺陷区域进行采集的步骤,包括:Please refer to FIG. 3 , which is a schematic flowchart of a third embodiment of the defect detection method provided by the present application. As shown in Figure 3, in this embodiment, the defect detection device is provided with a second image acquisition component; based on the current position data of each defect, the step of collecting the defect area of the circuit board to be detected includes:
步骤S31:基于各个缺陷的当前位置数据,计算第二图像采集组件移动至对应的缺陷区域的运动轨迹。Step S31: Based on the current position data of each defect, calculate the movement track of the second image acquisition component moving to the corresponding defect area.
具体的,由于待检测电路板存在若干缺陷,对应地存在若干缺陷区域,基于各个缺陷的当前位置数据可以计算第二图像采集组件分别移动至对应的缺陷区域的运动轨迹。Specifically, since there are several defects on the circuit board to be inspected, correspondingly there are several defect areas, based on the current position data of each defect, the movement trajectories of the second image acquisition components respectively moving to the corresponding defect areas can be calculated.
其中,由于图像采集模块如何移动并采集若干缺陷区域的方案可以根据若干缺陷区域的排列组合结果获得,因此根据若干缺陷区域的位置参数计算出的路径轨迹有多条,此时,可以选择多条路径轨迹中路径代价最小的一条轨迹作为规划路径,以控制图像采集模块沿规划路径运动,提高图像采集效率。Among them, since the scheme of how the image acquisition module moves and collects several defect areas can be obtained according to the arrangement and combination results of several defect areas, there are multiple path trajectories calculated according to the position parameters of several defect areas. At this time, multiple paths can be selected. A trajectory with the smallest path cost in the path trajectory is used as the planned path to control the movement of the image acquisition module along the planned path and improve image acquisition efficiency.
步骤S32:控制第二图像采集组件按照运动轨迹移动至缺陷区域并进行图像采集。Step S32: Controlling the second image acquisition component to move to the defect area according to the motion track and perform image acquisition.
具体的,第二图像采集组件用于根据步骤S22计算的各个缺陷的当前位置数据对待检测电路板重新进行图像采集,第二图像采集组件与缺陷检测装置可移动设置,即第二图像采集组件可以根据待检测电路板的具体位置发生相对移动。因此,可以根据各个缺陷的当前位置数据,计算第二图像采集组件移动至对应的缺陷区域的运动轨迹,并控制第二图像采集组件按照计算运动轨迹移动至缺陷区域。Specifically, the second image acquisition component is used to re-acquire the image of the circuit board to be inspected according to the current position data of each defect calculated in step S22. The second image acquisition component and the defect detection device can be moved, that is, the second image acquisition component can be Relative movement occurs according to the specific position of the circuit board to be inspected. Therefore, according to the current position data of each defect, the movement trajectory of the second image acquisition component moving to the corresponding defect area can be calculated, and the second image acquisition component can be controlled to move to the defect area according to the calculated movement trajectory.
在其他实施方式中,为了提高图像采集模块的效率,图像采集模块可以设置多个第二图像采集组件,将多个需要采集的区域位置分配至对应的第二图像采集组件,多个图像采集组件同时对待检测电路板进行重新采集,提高图像采集效率。In other embodiments, in order to improve the efficiency of the image acquisition module, the image acquisition module can be provided with a plurality of second image acquisition components, and a plurality of regional positions to be acquired are assigned to the corresponding second image acquisition components, and the plurality of image acquisition components At the same time, the circuit board to be detected is re-acquired to improve the image acquisition efficiency.
请参见图4,图4是本申请提供的缺陷检测装置的一实施例的结构示意图。如图4所示,缺陷检测装置还包括位置传感器、挡板120、定位区域110和检测区域210,位置传感器、挡板120沿待检测电路板的输送方向上依次设置。Please refer to FIG. 4 . FIG. 4 is a schematic structural diagram of an embodiment of a defect detection device provided by the present application. As shown in FIG. 4 , the defect detection device further includes a position sensor, a
其中,挡板120设置于缺陷检测装置的定位区域110,在待检测电路板进入缺陷检测装置的检测区域210之前,待检测电路板进入定位区域110,并通过挡板120调整待检测电路板的位置,以使得待检测电路板能够以预设姿态进入检测区域210。定位区域110还用于获取待检测电路板的定位图像。检测区域210设置于定位区域110沿输送方向的下游,用于对待检测电路板的缺陷区域进行检测。Wherein, the
在步骤S12之前,缺陷检测方法还可以包括以下步骤:获取位置传感器的触发信号,其中,位置传感器能够在当待检测电路板经过时产生触发信号;响应触发信号,控制挡板移动至预设位置以阻挡待检测电路板,从而校正待检测电路板的位置。Before step S12, the defect detection method may further include the following steps: acquiring a trigger signal of a position sensor, wherein the position sensor can generate a trigger signal when the circuit board to be detected passes by; responding to the trigger signal, controlling the baffle to move to a preset position To block the circuit board to be detected, thereby correcting the position of the circuit board to be detected.
由于位置传感器位于挡板120的上游,在待检测电路板经过位置传感器时,位置传感器能够在当待检测电路板经过时产生触发信号,响应于触发信号,缺陷检测装置控制挡板120移动到预设位置,以使得待检测电路板在移动到挡板120的位置时与挡板120发生干涉,挡板阻挡待检测电路板的传输进程,进而校正待检测电路板的位置。Because the position sensor is located at the upstream of the
在对待检测电路板调整为预设姿态时,对待检测电路板进行图像采集,以获取定位图像,此时,图像采集模块所拍摄的定位图像至少包括基准的图像。When the circuit board to be detected is adjusted to a preset attitude, image acquisition is performed on the circuit board to be detected to obtain a positioning image. At this time, the positioning image captured by the image acquisition module includes at least a reference image.
具体的,待检测电路板被放置于输送模块,输送模块将待检测电路板输送至定位区域110,定位区域110用于使缺陷检测装置采集待检测电路板的定位图像,定位区域110处设置有图像采集模块、挡板120,位置传感器用于获取待检测电路板的实时位置,沿输送模块的输送方向依次设置位置传感器、定位区域110、检测区域210,以使得待检测电路板在输送模块的作用下从初始位置被传送至定位区域110、检测区域210,以完成缺陷检测流程。Specifically, the circuit board to be detected is placed in the delivery module, and the delivery module transports the circuit board to be detected to the
挡板120可移动地设置于输送模块的定位区域110,在未触发状态下,挡板120收容于输送模块的输送面之下;响应于触发信号,挡板120移动到预设位置,以从收容状态切换到阻挡状态,并部分突出于输送模块的输送面,以阻挡待检测电路板的输送进程,待检测电路板与挡板120发生干涉,进而调整待检测电路板的位置,以使图像采集模块能够采集预设状态的待检测电路板的定位图像。The
因此,通过挡板120调整待检测电路板的位置,可以使待检测电路板能够以预设姿态进入检测区域210,以使缺陷检测装置获取的定位图像合规,保证定位图像包括基准的图像,提高基准的识别速率。Therefore, adjusting the position of the circuit board to be inspected by the
可选地,待检测电路板包括第一板面和第二板面,第一板面和第二板面背向设置并且具有上下关系,此处定义第一板面为上板面,第二板面为下板面。在其他描述方式中,第一板面可以为待检测电路板的正面、第二板面可以为待检测电路板的方面。Optionally, the circuit board to be detected includes a first board surface and a second board surface, and the first board surface and the second board surface are arranged facing away from each other and have a vertical relationship. Here, the first board surface is defined as the upper board surface, and the second board surface is defined as the upper board surface. The board surface is the lower board surface. In other description manners, the first board surface may be the front side of the circuit board to be inspected, and the second board surface may be the aspect of the circuit board to be inspected.
现有的缺陷检测装置在检测电路板的缺陷时,只能进行单面检测,因此需要将待检测电路板进行翻转,以对第一板面和第二板面进行缺陷检测。但是在翻转过程中,不仅增加了工序,而且人工或器械翻转都有可能对电路板造成损伤,降低电路板的良品率,增加生产成本并且降低生产效率。因此,本实施例的缺陷检测方法通过在待检测电路板的上下板面设置有多个图像采集组件,实现对待检测电路板的双面检测,进一步提高检测效率。Existing defect inspection devices can only detect defects on one side of a circuit board, so the circuit board to be inspected needs to be turned over to detect defects on the first board surface and the second board surface. However, in the flipping process, not only the process is increased, but also manual or mechanical flipping may cause damage to the circuit board, reduce the yield rate of the circuit board, increase production costs and reduce production efficiency. Therefore, in the defect detection method of this embodiment, a plurality of image acquisition components are arranged on the upper and lower surfaces of the circuit board to be detected, so as to realize double-sided detection of the circuit board to be detected, and further improve detection efficiency.
缺陷数据包括待检测电路板的上下板面的缺陷数据,图像采集模块对应于待检测电路板的上下板面设置有多个图像采集组件,步骤S13进一步可以包括:通过多个图像采集组件分别获取待检测电路板的上板面的缺陷图像和下板面的缺陷图像。The defect data includes the defect data of the upper and lower surfaces of the circuit board to be detected, and the image acquisition module is provided with a plurality of image acquisition components corresponding to the upper and lower surfaces of the circuit board to be detected, and step S13 may further include: acquiring The defect image of the upper board surface and the defect image of the lower board surface of the circuit board to be inspected.
具体的,图像采集模块可以设置有多个用于获取缺陷图像的图像采集组件,例如,在待检测电路板的上下板面各设置一个或者多个图像采集组件,或者,在待检测电路板的上板面设置两个图像采集组件,在待检测电路板的下板面设置两个图像采集组件,以提高缺陷图像的采集速率。Specifically, the image acquisition module can be provided with a plurality of image acquisition components for acquiring defect images, for example, one or more image acquisition components are respectively arranged on the upper and lower surfaces of the circuit board to be inspected, or, Two image acquisition components are arranged on the upper surface, and two image acquisition components are arranged on the lower surface of the circuit board to be tested, so as to improve the acquisition rate of defect images.
因此,通过在待检测电路板的上下板面设置多个图像采集组件可以实现待检测电路板上下板面的缺陷检测,并且上板面和下板面的缺陷检测可以同时进行,无需进行翻板操作,减少工序,提高检测速度。Therefore, by arranging multiple image acquisition components on the upper and lower surfaces of the circuit board to be inspected, the defect detection on the upper and lower surfaces of the circuit board to be inspected can be realized, and the defect detection on the upper and lower surfaces of the circuit board can be carried out simultaneously without flipping the board operation, reduce the process and improve the detection speed.
可选地,缺陷检测装置包括用于对待检测电路板重新进行图像采集的第二图像采集组件,缺陷数据包括与待检测电路板上若干缺陷的第一位置数据以及与第一位置数据对应的框选区域的图形数据。Optionally, the defect detection device includes a second image acquisition component for re-capturing images of the circuit board to be detected, and the defect data includes first position data of several defects on the circuit board to be detected and frames corresponding to the first position data Graphical data for the selected area.
步骤S13还包括以下步骤:根据图形数据,获取第二图像采集组件的变焦系数;基于变焦系数、若干缺陷的第一位置数据和基准的当前位置数据,对待检测电路板的缺陷区域进行图像采集,以获取缺陷数据的缺陷图像。Step S13 also includes the following steps: according to the graphic data, obtain the zoom coefficient of the second image acquisition component; based on the zoom coefficient, the first position data of several defects and the current position data of the reference, perform image acquisition on the defective area of the circuit board to be inspected, to obtain the defect image of the defect data.
具体的,框选区域为待检测电路板进行AOI检测时,AOI检测系统对应于缺陷而框选出的区域,框选区域的大小与待检测电路板的缺陷区域面积对应。Specifically, the framed area is the area selected by the AOI detection system corresponding to the defect when the AOI detection is performed on the circuit board to be inspected, and the size of the framed area corresponds to the defect area of the circuit board to be inspected.
获取缺陷数据中框选区域的的图形数据,根据的图形数据获取第二图像采集组件的变焦系数。具体的,在一实施方式中,缺陷检测装置中存储有多个预设的变焦系数,多个预设的变焦系数与框选区域的大小等级具有对应关系,当框选区域的大小在预设范围时,可以直接获取对应的变焦系数。在其他实施方式中,可以根据框选区域的区域大小、缺陷类型或者缺陷的具体特征参数等建立变焦系数的算式,以根据框选区域的大小计算出对应的变焦系数。The graphic data of the framed area in the defect data is acquired, and the zoom factor of the second image acquisition component is acquired according to the graphic data. Specifically, in one embodiment, a plurality of preset zoom coefficients are stored in the defect detection device, and the multiple preset zoom coefficients have a corresponding relationship with the size level of the frame selection area. When the size of the frame selection area is within the preset When the range is specified, the corresponding zoom factor can be obtained directly. In other implementation manners, a zoom coefficient formula can be established according to the area size of the framed area, defect type, or specific characteristic parameters of the defect, so as to calculate the corresponding zoom factor according to the size of the framed area.
在本申请实施例中,根据缺陷大小调整图像采集时的变焦系数,可以提高缺陷图像的清晰度,进而提高缺陷检测的准确度。In the embodiment of the present application, adjusting the zoom factor during image acquisition according to the size of the defect can improve the definition of the defect image, thereby improving the accuracy of defect detection.
可选地,缺陷检测装置包括辊轮模块,在图像采集模块采集待检测电路板的定位图像后,挡板120移动并收容至输送模块的输送面之下,待检测电路板通过输送模块被输送至辊轮模块,辊轮模块用于压持待检测电路板并将其输送至检测区域210。可以理解的,输送模块和辊轮模块并列设置,均用于输送待检测电路板,输送模块的输送面和辊轮模块的输送面重合,采集定位图像的步骤在输送模块上完成,重新采集待检测电路板的缺陷图像的步骤在辊轮模块完成。Optionally, the defect detection device includes a roller module. After the image acquisition module collects the positioning image of the circuit board to be detected, the
在步骤S13之前,缺陷检测方法还可以包括以下步骤:获取待检测电路板的实时位置;当待检测电路板达到辊轮模块的中间位置时,控制辊轮模块调整至固定状态,以固定待检测电路板的位置。Before step S13, the defect detection method may also include the following steps: obtaining the real-time position of the circuit board to be detected; when the circuit board to be detected reaches the middle position of the roller module, controlling the roller module to adjust to a fixed state to fix the circuit board to be detected position of the circuit board.
具体的,辊轮模块包括上辊轮组和下辊轮组,上辊轮组包括多个转动设置的上辊轮,下辊轮组包括多个转动设置的下辊轮,上辊轮组和下辊轮组的辊轮中心轴在同一水平面上,下辊轮通过气缸或者电机驱动而转动。其中,辊轮模块的中间位置为上辊轮组和下辊轮组的中间位置,当缺陷检测装置检测到待检测电路板位于上下辊轮之间时,缺陷检测装置控制辊轮模块,使得下辊轮在带动待检测电路板移动时上辊轮能够在电路板的上表面滚动,上下辊轮通过摩擦带动待检测电路板移动至检测区域210。Specifically, the roller module includes an upper roller set and a lower roller set, the upper roller set includes a plurality of rotating upper rollers, the lower roller set includes a plurality of rotating lower rollers, the upper roller set and The central axes of the rollers of the lower roller group are on the same horizontal plane, and the lower rollers are driven to rotate by air cylinders or motors. Wherein, the middle position of the roller module is the middle position of the upper roller group and the lower roller group. When the defect detection device detects that the circuit board to be detected is located between the upper and lower rollers, the defect detection device controls the roller module so that the lower When the rollers drive the circuit board to be detected to move, the upper roller can roll on the upper surface of the circuit board, and the upper and lower rollers drive the circuit board to be detected to move to the
当辊轮模块将待检测电路板移动到检测区域210时,缺陷检测装置调整上下辊轮之间的高度参数,以通过上下辊轮配合将待检测电路板压紧限位,待检测电路板固定于检测区域210内,以使检测区域210的第二图像采集组件对待检测电路板进行重新采集。When the roller module moves the circuit board to be detected to the
可选地,缺陷检测装置还包括传感器组件和辊轮模块,辊轮模块用于传输待检测电路板,传感器组件用于检测辊轮模块的输送状态。如图4所示,传感器组件包括第一位置传感器130和第二位置传感器220,第一位置传感器130和第二位置传感器220间隔设置,并且第一位置传感器130靠近辊轮模块的初始传输端设置,第二位置传感器220靠近辊轮模块的中间传输段设置。Optionally, the defect detection device further includes a sensor assembly and a roller module, the roller module is used to transport the circuit board to be inspected, and the sensor assembly is used to detect the conveying state of the roller module. As shown in Figure 4, the sensor assembly includes a
请参见图5,图5是本申请提供的缺陷检测方法的第四实施例的流程示意图。如图5所示,在步骤S13之前,本实施例的缺陷检测方法还可以包括以下步骤:Please refer to FIG. 5 , which is a schematic flowchart of a fourth embodiment of the defect detection method provided by the present application. As shown in Figure 5, before step S13, the defect detection method of this embodiment may further include the following steps:
步骤S41:响应于待检测电路板经过第一位置传感器130的位置,触发第二位置传感器220进入工作状态。Step S41 : triggering the
具体的,传感器组件可以设置于相邻的下辊轮或者下辊轮之间,传感器组件用于检测辊轮模块输送待检测电路板的状态是否正常。Specifically, the sensor assembly may be disposed between adjacent lower rollers or between the lower rollers, and the sensor assembly is used to detect whether the state of the roller module conveying the circuit board to be detected is normal.
如图3所示,在输送模块和辊轮模块的输送平面上,第一区域10为输送模块的输送区域,第二区域20为辊轮模块的输送区域,定位区域110设置于输送模块靠近辊轮模块一侧的区域,待检测电路板经过定位区域110并采集定位图像后,待检测电路板由输送模块的单辊轮进入辊轮模块的下辊轮。As shown in Figure 3, on the conveying plane of the conveying module and the roller module, the
传感器组件包括第一位置传感器130和第二位置传感器220,第一位置传感器130可以设置于定位区域110或者输送模块的末端,用于检测待检测电路板是否通过输送模块进入辊轮模块的输送范围;当待检测电路板经过第一位置传感器130的位置时,表示待检测电路板开始从输送模块移动到辊轮模块,并触发第二位置传感器220进入工作状态。The sensor assembly includes a
第二位置传感器220可以设置于第二区域20靠近输送模块的一侧,第一位置传感器130和第二位置传感器220间隔设置,每组传感器沿辊轮模块的输送方向的垂直方向上排列有多个传感器,当待检测电路板经过第一位置传感器130的位置时,触发第二位置传感器220,以使得第二位置传感器220持续获取待检测电路板的位置信息。The
步骤S42:检测是否在预设时间内接收到触发信号,其中,触发信号是第二位置传感器220响应待检测电路板经过时产生的。Step S42: Detect whether a trigger signal is received within a preset time, wherein the trigger signal is generated by the
触发第二位置传感器220后,若第二位置传感器220检测到待检测电路板经过第二位置传感器220,则发送触发信号至缺陷检测装置。因此缺陷检测装置可以通过判断预设时间内是否接收到第二位置传感器220的触发信号,判断辊轮模块是否正常输送待检测电路板,以使得待检测电路板能在预设时间内从第一位置传感器130的位置移动到第二位置传感器220。After the
若在预设时间内接收到第二位置传感器220的触发信号,则表示辊轮模块能够将待检测电路板移动至检测区域210,进入步骤S14;若在预设时间内没有接收到第二位置传感器220的触发信号,则进入步骤S43。If the trigger signal of the
步骤S43:输出用于提示辊轮模块故障的报警信号。Step S43: Outputting an alarm signal for prompting failure of the roller module.
在预设时间内没有接收到第二位置传感器220的触发信号时,表示辊轮模块输送待检测电路板的速度过慢或者出现卡机的情况,此时缺陷检测装置输出相应的报警信号。其中,在一实施方式中,报警信号可以输出至报警模块,以提醒工作人员对于报警位置进行排查;在另一实施方式中,报警信号还可以输出至辊轮模块,辊轮模块通过回退预设圈数的方式进行自复位,在自复位后若还出现不能在预设时间内接收到第二位置传感器220的触发信号的情况再进行报警处理。If the trigger signal of the
在本申请实施例中,间隔设置两组传感器,并通过获取待检测电路板经过第一位置传感器130和第二位置传感器220的位置时的时间差判断待检测电路板是否正确进入辊轮模块,以确定辊轮模块的输送状态是否正常,提高待检测电路板的传输精度。In the embodiment of the present application, two sets of sensors are arranged at intervals, and by obtaining the time difference when the circuit board to be detected passes the positions of the
可选地,缺陷数据为另一种缺陷检测设备对所述待检测电路板进行缺陷检测时得到的缺陷数据。具体的,另一种缺陷检测设备为上述实施方式中所提及的AOI检测系统。Optionally, the defect data is defect data obtained when another defect detection device performs defect detection on the circuit board to be detected. Specifically, another defect detection device is the AOI detection system mentioned in the above embodiment.
可选地,AOI检测系统在对待检测电路板进行光学检测时,需对待检测电路板进行图像采集,以获得对应的电路板图像。其中,电路板图像的清晰度小于本申请对待检测电路板进行重新采集所获得的缺陷图像的清晰度。本申请的缺陷检测装置通过获取清晰度更高的缺陷区域的缺陷图像,对AOI检测系统所确定的若干缺陷进行复检,提高缺陷检测的精度。Optionally, when the AOI inspection system performs optical inspection on the circuit board to be inspected, it needs to collect images of the circuit board to be inspected to obtain a corresponding image of the circuit board. Wherein, the clarity of the circuit board image is lower than that of the defect image obtained by re-acquisition of the circuit board to be inspected in this application. The defect detection device of the present application re-inspects several defects determined by the AOI detection system by acquiring defect images of defect areas with higher definition, thereby improving the accuracy of defect detection.
可选地,在步骤S13之后,缺陷检测方法还可以包括以下步骤:将缺陷图像输入经过预先训练的缺陷预测模型;获取缺陷预测模型输出的预测结果,并输出预测结果,其中,预测结果包括每个缺陷图像对应的缺陷是否为真实缺陷。Optionally, after step S13, the defect detection method may further include the following steps: input the defect image into a pre-trained defect prediction model; obtain the prediction result output by the defect prediction model, and output the prediction result, wherein the prediction result includes each Whether the defect corresponding to each defect image is a real defect.
具体的,缺陷检测装置可以设置有预先训练的缺陷检测模型,缺陷检测模型可以通过视觉相关算法对缺陷图像的缺陷特征进行识别,以判断该缺陷区域的缺陷是否为真实缺陷,并输出为预测结果。视觉相关算法可涉及视觉定位、SLAM、图像注册、背景分割、对象的关键点提取及跟踪或深度检测等。Specifically, the defect detection device can be equipped with a pre-trained defect detection model, and the defect detection model can identify the defect features of the defect image through a visual correlation algorithm to judge whether the defect in the defect area is a real defect, and output it as a prediction result . Vision-related algorithms can involve visual localization, SLAM, image registration, background segmentation, key point extraction and tracking of objects, or depth detection, etc.
在其他实施方式中,缺陷检测装置还可以输出相关的缺陷图像,以通过人工等方式对缺陷图像的缺陷结果进行重新判定。In other implementation manners, the defect detection device may also output related defect images, so as to re-determine the defect results of the defect images manually.
请参见图6,图6是本申请提供的缺陷检测装置的一实施例的框架示意图。该缺陷检测装置100包括处理器101以及与处理器101连接的存储器102,其中,存储器102中存储有程序数据,处理器101调取存储器102存储的程序数据,以执行上述的缺陷检测方法。Please refer to FIG. 6 . FIG. 6 is a schematic frame diagram of an embodiment of a defect detection device provided by the present application. The
可选地,在一实施例中,处理器101用于执行程序数据以实现如下方法:获取待检测电路板的缺陷数据;采集待检测电路板的定位图像,识别出定位图像上的基准;基于缺陷数据和基准对待检测电路板的缺陷区域进行重新采集,以获取与缺陷数据对应的缺陷图像。Optionally, in one embodiment, the
其中,处理器101还可以称为CPU(Central Processing Unit,中央处理单元)。处理器101可能是一种电子芯片,具有信号的处理能力。处理器101还可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。Wherein, the
存储器102可以为内存条、TF卡等,可以存储缺陷检测装置100中的全部信息,包括输入的原始数据、计算机程序、中间运行结果和最终运行结果都保存在存储器102中。它根据处理器101指定的位置存入和取出信息。有了存储器102,缺陷检测装置100才有记忆功能,才能保证正常工作。缺陷检测装置100的存储器102按用途可分为主存储器(内存)和辅助存储器(外存),也有分为外部存储器和内部存储器的分类方法。外存通常是磁性介质或光盘等,能长期保存信息。内存指主板上的存储部件,用来存放当前正在执行的数据和程序,但仅用于暂时存放程序和数据,关闭电源或断电,数据会丢失。The
请参见图7,图7是本申请提供的计算机可读存储介质的一实施例的框架示意图。该计算机可读存储介质200中存储有能够实现上述所有方法的程序指令211。Please refer to FIG. 7 . FIG. 7 is a schematic frame diagram of an embodiment of a computer-readable storage medium provided by the present application. The computer-
在本申请各个实施例中的各功能单元集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在计算机可读存储介质200中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机可读存储介质200在一个程序指令211中,包括若干指令用以使得一台计算机设备(可以是个人计算机,系统服务器,或者网络设备等)、电子设备(例如MP3、MP4等,也可以是手机、平板电脑、可穿戴设备等移动终端,也可以是台式电脑等)或者处理器(processor)以执行本申请各个实施方式方法的全部或部分步骤。If the integrated units of the functional units in various embodiments of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in the computer-
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可读存储介质200(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-readable storage media 200 (including but not limited to disk storage, CD-ROM, optical storage, etc.) with computer-usable program code embodied therein.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机可读存储介质200实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机可读存储介质200到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的程序指令211产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to flowcharts and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each process and/or block in the flowchart and/or block diagram, and a combination of processes and/or blocks in the flowchart and/or block diagram can be implemented by the computer-
这些计算机可读存储介质200也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储介质200中的程序指令211产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer-
这些计算机可读存储介质200也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的程序指令211提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer-
以上所述仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above is only the implementation of the application, and does not limit the patent scope of the application. Any equivalent structure or equivalent process conversion made by using the specification and drawings of the application, or directly or indirectly used in other related technologies fields, are all included in the scope of patent protection of this application in the same way.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211006082.1ACN115524347A (en) | 2022-08-22 | 2022-08-22 | Defect detection method, defect detection apparatus, and computer-readable storage medium |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211006082.1ACN115524347A (en) | 2022-08-22 | 2022-08-22 | Defect detection method, defect detection apparatus, and computer-readable storage medium |
| Publication Number | Publication Date |
|---|---|
| CN115524347Atrue CN115524347A (en) | 2022-12-27 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211006082.1APendingCN115524347A (en) | 2022-08-22 | 2022-08-22 | Defect detection method, defect detection apparatus, and computer-readable storage medium |
| Country | Link |
|---|---|
| CN (1) | CN115524347A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115908420A (en)* | 2023-01-10 | 2023-04-04 | 北京阿丘机器人科技有限公司 | Method, device and equipment for detecting defects of printed circuit board and storage medium |
| CN117347363A (en)* | 2023-12-01 | 2024-01-05 | 苏州元脑智能科技有限公司 | Quality detection device and server production system |
| CN117873007A (en)* | 2024-03-11 | 2024-04-12 | 成都秦川物联网科技股份有限公司 | Manufacturing flow management method, system, equipment and medium based on industrial Internet of things |
| CN119086556A (en)* | 2024-08-09 | 2024-12-06 | 武汉精立电子技术有限公司 | A re-judgment test method and system based on automated optical detection |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105427285A (en)* | 2015-11-05 | 2016-03-23 | 东莞市科隆威自动化设备有限公司 | A PCB dispensing method with automatic positioning and laser height measurement |
| CN207158105U (en)* | 2017-07-11 | 2018-03-30 | 深圳宜美智科技有限公司 | Drum-type transmitting device |
| CN110678003A (en)* | 2019-10-18 | 2020-01-10 | 深圳劲鑫科技有限公司 | PCB solder mask detection and repair integrated machine and process method |
| CN110763703A (en)* | 2018-07-27 | 2020-02-07 | 皓琪科技股份有限公司 | Projection type system for assisting printed circuit board in quick positioning, fixed-point amplification and observation |
| WO2021017725A1 (en)* | 2019-08-01 | 2021-02-04 | 北京迈格威科技有限公司 | Product defect detection method, device and system |
| CN113222913A (en)* | 2021-04-28 | 2021-08-06 | 南京南瑞继保电气有限公司 | Circuit board defect detection positioning method and device and storage medium |
| CN114612417A (en)* | 2022-03-08 | 2022-06-10 | 苏州赫芯科技有限公司 | Defect positioning equipment, defect positioning method and optical detection system for printed circuit board |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105427285A (en)* | 2015-11-05 | 2016-03-23 | 东莞市科隆威自动化设备有限公司 | A PCB dispensing method with automatic positioning and laser height measurement |
| CN207158105U (en)* | 2017-07-11 | 2018-03-30 | 深圳宜美智科技有限公司 | Drum-type transmitting device |
| CN110763703A (en)* | 2018-07-27 | 2020-02-07 | 皓琪科技股份有限公司 | Projection type system for assisting printed circuit board in quick positioning, fixed-point amplification and observation |
| WO2021017725A1 (en)* | 2019-08-01 | 2021-02-04 | 北京迈格威科技有限公司 | Product defect detection method, device and system |
| CN110678003A (en)* | 2019-10-18 | 2020-01-10 | 深圳劲鑫科技有限公司 | PCB solder mask detection and repair integrated machine and process method |
| CN113222913A (en)* | 2021-04-28 | 2021-08-06 | 南京南瑞继保电气有限公司 | Circuit board defect detection positioning method and device and storage medium |
| CN114612417A (en)* | 2022-03-08 | 2022-06-10 | 苏州赫芯科技有限公司 | Defect positioning equipment, defect positioning method and optical detection system for printed circuit board |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115908420A (en)* | 2023-01-10 | 2023-04-04 | 北京阿丘机器人科技有限公司 | Method, device and equipment for detecting defects of printed circuit board and storage medium |
| CN117347363A (en)* | 2023-12-01 | 2024-01-05 | 苏州元脑智能科技有限公司 | Quality detection device and server production system |
| CN117347363B (en)* | 2023-12-01 | 2024-03-01 | 苏州元脑智能科技有限公司 | Quality detection device and server production system |
| CN117873007A (en)* | 2024-03-11 | 2024-04-12 | 成都秦川物联网科技股份有限公司 | Manufacturing flow management method, system, equipment and medium based on industrial Internet of things |
| CN117873007B (en)* | 2024-03-11 | 2024-05-24 | 成都秦川物联网科技股份有限公司 | Manufacturing flow management method, system, equipment and medium based on industrial Internet of things |
| CN119086556A (en)* | 2024-08-09 | 2024-12-06 | 武汉精立电子技术有限公司 | A re-judgment test method and system based on automated optical detection |
| Publication | Publication Date | Title |
|---|---|---|
| CN115524347A (en) | Defect detection method, defect detection apparatus, and computer-readable storage medium | |
| CN107040725B (en) | Coordinate correction method of image acquisition device and image acquisition device | |
| CN108363508A (en) | A kind of Mobile phone touch control screen Mark positioning non-contact vision detection method | |
| CN103150557B (en) | A kind of operation of the display terminal based on machine vision responses match pick-up unit | |
| CN107705293A (en) | A kind of hardware dimension measurement method based on CCD area array cameras vision-based detections | |
| CN103983426B (en) | The detection of a kind of defect of optical fiber based on machine vision and sorting technique | |
| CN108564579A (en) | A kind of distress in concrete detection method and detection device based on temporal and spatial correlations | |
| CN113421242B (en) | Solder joint appearance quality inspection method, device and terminal based on deep learning | |
| CN112786509B (en) | Positioning system, positioning method and computing equipment | |
| CN113723841B (en) | On-line detection method for tool missing in assembled prefabricated part | |
| US11538148B2 (en) | Defect detection of a component in an assembly | |
| CN112637587B (en) | Dead pixel detection method and device | |
| CN117190866B (en) | Polarity discrimination and detection methods, devices and equipment for multiple stacked electronic components | |
| CN118607267B (en) | Digital twin construction method and system for plate production line | |
| CN117974629A (en) | Online defect detection method and device for copper-clad plate production line, storage medium and product | |
| CN103150558A (en) | Machine vision-based display terminal operation response matching detection method | |
| US20110304730A1 (en) | Pan, tilt, and zoom camera and method for aiming ptz camera | |
| KR20230009360A (en) | Systems and methods for 3D scanning of moving objects that are longer than the field of view | |
| CN115713491A (en) | Liquid crystal display panel defect detection method and device and electronic equipment | |
| CN108972556A (en) | Conducting wire grasping system and method on small and special electric machine production line under complex illumination environment | |
| CN103247548A (en) | Wafer defect detecting device and method | |
| CN116029987A (en) | A welding quality detection method, device and electronic equipment | |
| CN112837285B (en) | Edge detection method and device for panel image | |
| TWI828544B (en) | Interactive user feedback system to enhance inspection accuracy of automated visual inspection system | |
| CN118130503A (en) | Object defect detection method, system, storage medium and electronic device |
| 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 |