[go: up one dir, main page]

CN115829900A - Detection method, detection system, device and storage medium - Google Patents

Detection method, detection system, device and storage medium Download PDF

Info

Publication number
CN115829900A
CN115829900A CN202111085266.7A CN202111085266A CN115829900A CN 115829900 A CN115829900 A CN 115829900A CN 202111085266 A CN202111085266 A CN 202111085266A CN 115829900 A CN115829900 A CN 115829900A
Authority
CN
China
Prior art keywords
threshold
image
point
points
pixel
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.)
Pending
Application number
CN202111085266.7A
Other languages
Chinese (zh)
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.)
Shenzhen Zhongke Feice Technology Co Ltd
Original Assignee
Shenzhen Zhongke Feice Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Zhongke Feice Technology Co Ltd filed Critical Shenzhen Zhongke Feice Technology Co Ltd
Priority to CN202111085266.7A priority Critical patent/CN115829900A/en
Publication of CN115829900A publication Critical patent/CN115829900A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

A detection method, a detection system, a device and a storage medium, wherein the method comprises the following steps: acquiring an image to be processed with a plurality of pixel points; performing first identification processing on an image to be processed, and acquiring pixel points meeting a first threshold condition in the image to be processed as initial abnormal points; acquiring an abnormal point according to the initial abnormal point; selecting one or more pixel points adjacent to the abnormal point as peripheral pixel points; performing second identification processing on the peripheral pixel points, and taking the peripheral pixel points meeting a second threshold condition as defective pixel points, wherein the second threshold condition comprises a first threshold condition; and under the condition that the peripheral pixel points have the defective pixel points, judging that the abnormal points are defective points, and under the condition that the peripheral pixel points do not have the defective pixel points, judging that the abnormal points are noise points. And recognizing the peripheral pixel points by utilizing a second threshold condition, so that the peripheral pixel points can be detected under the condition that the difference between the peripheral pixel points and the normal pixel points is smaller, and thus, noise points and defect points are distinguished.

Description

检测方法及检测系统、设备和存储介质Detection method, detection system, equipment and storage medium

技术领域technical field

本发明实施例涉及光学检测技术领域,尤其涉及一种检测方法及检测系统、设备和存储介质。The embodiments of the present invention relate to the technical field of optical detection, and in particular to a detection method, a detection system, a device, and a storage medium.

背景技术Background technique

随着技术的不断发展,精密加工被用到越来越多的领域,同时,对于加工精度也有越来越高的要求。为了满足加工精度的需求,提高产品的合格率,需要对产品进行在线检测(例如,通过进行缺陷检测,以判断产品中是否存在缺陷,并检测缺陷的位置和尺寸),以确保满足产品制造的相关指标要求。With the continuous development of technology, precision machining is used in more and more fields, and at the same time, there are higher and higher requirements for machining accuracy. In order to meet the requirements of processing accuracy and improve the pass rate of products, it is necessary to carry out online inspection of products (for example, by performing defect detection to determine whether there are defects in the product, and to detect the position and size of defects), so as to ensure that the product manufacturing requirements are met. Relevant index requirements.

在现有的检测方法中,光学检测是利用光与待测物相互作用实现检测的方法的总称。光学检测不与待测物接触,具有检测速度快、无附加污染等的特点,可实现在线检测,因此,光学检测在产品制造的质量监控领域中受到广泛运用。Among existing detection methods, optical detection is a general term for methods that utilize light to interact with analytes to achieve detection. Optical detection is not in contact with the object to be tested, has the characteristics of fast detection speed, no additional pollution, etc., and can realize online detection. Therefore, optical detection is widely used in the field of quality control of product manufacturing.

但是,目前检测结果的准确性仍有待提高。However, the accuracy of the current detection results still needs to be improved.

发明内容Contents of the invention

本发明实施例解决的问题是提供一种光检测方法及检测系统、设备和存储介质,提高检测结果的准确性。The problem to be solved by the embodiments of the present invention is to provide a light detection method, detection system, equipment and storage medium to improve the accuracy of detection results.

为解决上述问题,本发明实施例提供一种检测方法,包括:获取待处理图像,所述待处理图像具有多个像素点;对所述待处理图像进行第一识别处理,获取所述待处理图像中满足第一阈值条件的像素点作为初始异常点;根据所述初始异常点获取异常点;选取一个或多个与所述异常点相邻的像素点作为周边像素点;对所述周边像素点进行第二识别处理,将满足第二阈值条件的周边像素点作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件;在所述周边像素点中存在缺陷像素点的情况下,判定所述异常点为缺陷点,在所述周边像素点中不存在缺陷像素点的情况下,判定所述异常点为噪点。In order to solve the above problems, an embodiment of the present invention provides a detection method, including: acquiring an image to be processed, the image to be processed has a plurality of pixels; performing a first recognition process on the image to be processed, and acquiring the image to be processed Pixels satisfying the first threshold condition in the image are used as initial abnormal points; obtaining abnormal points according to the initial abnormal points; selecting one or more pixel points adjacent to the abnormal points as surrounding pixel points; for the surrounding pixels The second identification process is performed on the point, and the surrounding pixels satisfying the second threshold condition are regarded as defective pixels, and the second threshold condition includes the first threshold condition; in the case that there are defective pixels in the surrounding pixels , determining that the abnormal point is a defect point, and determining that the abnormal point is a noise point when there is no defective pixel point among the surrounding pixel points.

相应的,本发明实施例还提供一种检测系统,包括:图像获取模块,用于获取待处理图像,所述待处理图像具有多个像素点;第一识别模块,用于对所述待处理图像进行第一识别处理,获取所述待处理图像中满足第一阈值条件的像素点作为初始异常点;异常点获取模块,用于根据所述初始异常点获取异常点;像素点选取模块,用于选取一个或多个与所述异常点相邻的像素点作为周边像素点;第二识别模块,用于对所述周边像素点进行第二识别处理,将满足第二阈值条件的周边像素点作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件;判断模块,用于在所述周边像素点中存在缺陷像素点的情况下,判定所述异常点为缺陷点,在所述周边像素点中不存在缺陷像素点的情况下,判定所述异常点为噪点。Correspondingly, an embodiment of the present invention also provides a detection system, including: an image acquisition module, configured to acquire an image to be processed, the image to be processed has a plurality of pixels; a first identification module, configured to identify the image to be processed The first recognition process is performed on the image, and the pixels satisfying the first threshold condition in the image to be processed are obtained as initial abnormal points; the abnormal point acquisition module is used to obtain abnormal points according to the initial abnormal points; the pixel point selection module uses Selecting one or more pixel points adjacent to the abnormal point as surrounding pixel points; the second identification module is used to perform a second identification process on the surrounding pixel points, and the surrounding pixel points satisfying the second threshold condition As a defective pixel, the second threshold condition includes the first threshold condition; a judging module, configured to determine that the abnormal point is a defective pixel when there is a defective pixel in the surrounding pixels, and in the If there is no defective pixel among the surrounding pixels, it is determined that the abnormal point is a noise point.

相应地,本发明实施例还提供一种设备,包括至少一个存储器和至少一个处理器,所述存储器存储有一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现本发明实施例所述的检测方法。Correspondingly, an embodiment of the present invention also provides a device, including at least one memory and at least one processor, the memory stores one or more computer instructions, wherein the one or more computer instructions are executed by the processor Execute to realize the detection method described in the embodiment of the present invention.

相应地,本发明实施例还提供一种存储介质,所述存储介质存储有一条或多条计算机指令,所述一条或多条计算机指令用于实现本发明实施例所述的检测方法。Correspondingly, the embodiment of the present invention also provides a storage medium, the storage medium stores one or more computer instructions, and the one or more computer instructions are used to implement the detection method described in the embodiment of the present invention.

与现有技术相比,本发明实施例的技术方案具有以下优点:Compared with the prior art, the technical solutions of the embodiments of the present invention have the following advantages:

本发明实施例提供的检测方法中,对待处理图像进行第一识别处理,获取所述待处理图像中满足第一阈值条件的像素点作为初始异常点后,根据所述初始异常点获取异常点,选取一个或多个与所述异常点相邻的像素点作为周边像素点,并对所述周边像素点进行第二识别处理,将满足第二阈值条件的周边像素点作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件;其中,与噪点相邻的像素点均为正常的像素点,而与真实缺陷相邻的像素点通常也是缺陷像素点,因此,在检测过程中,当出现异常点后,利用第二阈值条件将周边像素点再次进行识别,所述第二阈值条件包含所述第一阈值条件,也即所述第一阈值条件对应的集合包含于所述第二阈值条件对应的集合中,这使得在周边像素点与正常像素点的差异较小的情况下,仍能被检出,从而能够在异常点周围检测出更多的缺陷像素点,相应能够更好地区分噪点和缺陷点,以精确判断所述异常点是否为真实的缺陷点,便于剔除噪点并保留缺陷点,相应降低了出现误检和漏检的概率,进而提高了检测结果的准确性。In the detection method provided by the embodiment of the present invention, the first recognition process is performed on the image to be processed, and after obtaining the pixel points satisfying the first threshold condition in the image to be processed as the initial abnormal point, the abnormal point is obtained according to the initial abnormal point, Selecting one or more pixels adjacent to the abnormal point as surrounding pixels, and performing a second identification process on the surrounding pixels, using surrounding pixels that meet the second threshold condition as defective pixels, the The second threshold condition includes the first threshold condition; wherein, the pixels adjacent to the noise point are normal pixels, and the pixels adjacent to the real defect are usually defective pixels, therefore, in the detection process, When an abnormal point appears, use the second threshold condition to identify the surrounding pixel points again. The second threshold condition includes the first threshold condition, that is, the set corresponding to the first threshold condition is included in the second threshold condition. In the set corresponding to the threshold condition, this makes it possible to detect when the difference between the surrounding pixels and the normal pixels is small, so that more defective pixels can be detected around the abnormal points, and the corresponding can be better. Distinguish between noise points and defect points to accurately judge whether the abnormal points are real defect points, so as to remove noise points and retain defect points, correspondingly reduce the probability of false detection and missed detection, and improve the accuracy of detection results.

本发明实施例提供的检测系统中设置了异常点获取模块、像素点选取模块、第二识别模块和判断模块,在第一识别模块对待处理图像进行第一识别处理,获取所述待处理图像中满足第一阈值条件的像素点作为初始异常点后,异常点获取模块根据所述初始异常点获取异常点,像素点选取模块用于选取一个或多个与所述异常点相邻的像素点作为周边像素点,并利用第二识别模块对所述周边像素点进行第二识别处理,将满足第二阈值条件的周边像素点作为缺陷像素点,且所述第二阈值条件包含所述第一阈值条件,判断模块根据第二识别模块的结果判断所述异常点是否为缺陷或噪点;其中,与噪点相邻的像素点均为正常的像素点,而与真实缺陷相邻的像素点通常也是缺陷像素点,因此,在检测过程中,当出现异常点后,利用第二阈值条件将周边像素点再次进行识别,所述第二阈值条件包含所述第一阈值条件,也即所述第一阈值条件对应的集合包含于所述第二阈值条件对应的集合中,这使得在周边像素点与正常像素点的差异较小的情况下,仍能被检出,从而能够在异常点周围检测出更多的缺陷像素点,相应能够更好地区分噪点和缺陷点,以精确判断所述异常点是否为真实的缺陷点,便于剔除噪点并保留缺陷点,相应降低了出现误检和漏检的概率,进而提高了检测结果的准确性。In the detection system provided by the embodiment of the present invention, an abnormal point acquisition module, a pixel point selection module, a second identification module and a judgment module are set, and the first identification module performs the first identification processing on the image to be processed, and obtains the image to be processed After the pixel point meeting the first threshold condition is used as the initial abnormal point, the abnormal point acquisition module obtains the abnormal point according to the initial abnormal point, and the pixel point selection module is used to select one or more pixel points adjacent to the abnormal point as Surrounding pixels, and use the second identification module to perform a second identification process on the surrounding pixels, and use the surrounding pixels that meet the second threshold condition as defective pixels, and the second threshold condition includes the first threshold condition, the judging module judges whether the abnormal point is a defect or a noise point according to the result of the second identification module; wherein, the pixels adjacent to the noise point are all normal pixels, and the pixels adjacent to the real defect are usually also defects Therefore, in the detection process, when an abnormal point appears, the surrounding pixels are identified again by using the second threshold condition, and the second threshold condition includes the first threshold condition, that is, the first threshold The set corresponding to the condition is included in the set corresponding to the second threshold condition, which allows the surrounding pixels to be detected when the difference between the surrounding pixels and the normal pixels is small, so that more abnormal points can be detected around the abnormal point. More defect pixels can better distinguish noise points and defect points, so as to accurately judge whether the abnormal points are real defect points, which is convenient for removing noise points and retaining defect points, and correspondingly reduces the probability of false detection and missed detection , thereby improving the accuracy of the detection results.

附图说明Description of drawings

图1是本发明检测方法一实施例的流程图;Fig. 1 is the flowchart of an embodiment of detection method of the present invention;

图2是图1中步骤S1一实施例中待处理图像的局部示意图;Fig. 2 is a partial schematic diagram of an image to be processed in an embodiment of step S1 in Fig. 1;

图3是图2中任一单元图像的一实施例的放大图;Fig. 3 is an enlarged view of an embodiment of any unit image in Fig. 2;

图4是图1中步骤S2一实施例的示意图;Fig. 4 is a schematic diagram of an embodiment of step S2 in Fig. 1;

图5是图4中待测图像一实施例的示意图;Fig. 5 is a schematic diagram of an embodiment of the image to be tested in Fig. 4;

图6是图1中步骤S4一实施例的示意图;Fig. 6 is a schematic diagram of an embodiment of step S4 in Fig. 1;

图7是图1中步骤S5一实施例的示意图;Fig. 7 is a schematic diagram of an embodiment of step S5 in Fig. 1;

图8是本发明检测系统一实施例的功能框图;Fig. 8 is a functional block diagram of an embodiment of the detection system of the present invention;

图9为本发明一实施例所提供的设备的硬件结构图。FIG. 9 is a hardware structural diagram of a device provided by an embodiment of the present invention.

具体实施方式Detailed ways

由背景技术可知,目前检测结果的准确性仍有待提高。It can be seen from the background technology that the accuracy of the current detection results still needs to be improved.

经研究发现,在实际的检测过程中,小缺陷和噪点检出的像素尺寸较小(例如,通常为一个像素点),这导致区分小缺陷和噪点的难度较大,如果都把两者都剔除掉,则会漏掉一个真实的缺陷,从而导致漏检,而如果把两者均保留,则会增加一个误检。After research, it is found that in the actual detection process, the pixel size of small defects and noise detection is small (for example, usually one pixel), which makes it difficult to distinguish small defects and noise points. If both Eliminating it will miss a real defect, resulting in a missed detection, while keeping both will add a false detection.

为了解决所述技术问题,本发明实施例提供一种检测方法,包括:获取待处理图像,所述待处理图像具有多个像素点;对所述待处理图像进行第一识别处理,获取所述待处理图像中满足第一阈值条件的像素点作为初始异常点;根据所述初始异常点获取异常点;选取一个或多个与所述异常点相邻的像素点作为周边像素点;对所述周边像素点进行第二识别处理,将满足第二阈值条件的周边像素点作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件;在所述周边像素点中存在缺陷像素点的情况下,判定所述异常点为缺陷点,在所述周边像素点中不存在缺陷像素点的情况下,判定所述异常点为噪点。In order to solve the technical problem, an embodiment of the present invention provides a detection method, including: acquiring an image to be processed, the image to be processed has a plurality of pixels; performing a first recognition process on the image to be processed, acquiring the The pixel points satisfying the first threshold condition in the image to be processed are used as initial abnormal points; the abnormal points are obtained according to the initial abnormal points; one or more pixel points adjacent to the abnormal points are selected as surrounding pixel points; The surrounding pixels are subjected to the second identification process, and the surrounding pixels satisfying the second threshold condition are regarded as defective pixels, and the second threshold condition includes the first threshold condition; among the surrounding pixels, there are defective pixels In some cases, it is determined that the abnormal point is a defect point, and in the case that there is no defective pixel point in the surrounding pixel points, it is determined that the abnormal point is a noise point.

与噪点相邻的像素点均为正常的像素点,而与真实缺陷相邻的像素点通常也是缺陷像素点,因此,在检测过程中,当出现异常点后,利用第二阈值条件将周边像素点再次进行识别,所述第二阈值条件包含所述第一阈值条件,也即所述第一阈值条件对应的集合包含于所述第二阈值条件对应的集合中,这使得在周边像素点与正常像素点的差异较小的情况下,仍能被检出,从而能够在异常点周围检测出更多的缺陷像素点,相应能够更好地区分噪点和缺陷点,以精确判断所述异常点是否为真实的缺陷点,便于剔除噪点并保留缺陷点,相应降低了出现误检和漏检的概率,进而提高了检测结果的准确性。The pixels adjacent to the noise point are normal pixels, and the pixels adjacent to the real defect are usually defective pixels. Therefore, in the detection process, when an abnormal point appears, the surrounding pixels are divided by the second threshold condition The point is identified again, the second threshold condition includes the first threshold condition, that is, the set corresponding to the first threshold condition is included in the set corresponding to the second threshold condition, which makes the surrounding pixel points and When the difference between normal pixels is small, they can still be detected, so that more defective pixels can be detected around the abnormal points, and correspondingly, noise points and defective points can be better distinguished to accurately judge the abnormal points Whether it is a real defect point is convenient for removing noise points and retaining defect points, correspondingly reducing the probability of false detection and missed detection, thereby improving the accuracy of detection results.

参考图1,示出了本发明检测方法一实施例的流程图。Referring to FIG. 1 , a flow chart of an embodiment of the detection method of the present invention is shown.

本实施例中,所述检测方法包括以下基本步骤:In this embodiment, the detection method includes the following basic steps:

步骤S1:获取待处理图像,所述待处理图像具有多个像素点;Step S1: Acquiring an image to be processed, the image to be processed has a plurality of pixels;

步骤S2:对所述待处理图像进行第一识别处理,获取所述待处理图像中满足第一阈值条件的像素点作为初始异常点;Step S2: performing a first recognition process on the image to be processed, and acquiring pixels satisfying a first threshold condition in the image to be processed as initial abnormal points;

步骤S3:根据所述初始异常点获取异常点;Step S3: obtaining abnormal points according to the initial abnormal points;

步骤S4:选取一个或多个与所述异常点相邻的像素点作为周边像素点;Step S4: selecting one or more pixel points adjacent to the abnormal point as surrounding pixel points;

步骤S5:对所述周边像素点进行第二识别处理,将满足第二阈值条件的周边像素点作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件;在所述周边像素点中存在缺陷像素点的情况下,判定所述异常点为缺陷点,在所述周边像素点中不存在缺陷像素点的情况下,判定所述异常点为噪点。Step S5: Perform a second identification process on the surrounding pixels, and use the surrounding pixels that meet the second threshold condition as defective pixels, and the second threshold condition includes the first threshold condition; If there is a defective pixel in the surrounding pixels, it is determined that the abnormal point is a defective point, and in the case that there is no defective pixel in the surrounding pixels, it is determined that the abnormal point is a noise point.

为使本发明的上述目的、特征和优点能够更为明显易懂,下面结合附图对本发明的具体实施例做详细的说明。In order to make the above objects, features and advantages of the present invention more comprehensible, specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

结合参考图2和图3,图2是待处理图像一实施例的局部示意图,图3是图2中任一单元图像一实施例的放大图,执行步骤S1,获取待处理图像100,所述待处理图像100具有多个像素点110(如图2所示)。2 and FIG. 3 in combination, FIG. 2 is a partial schematic diagram of an embodiment of an image to be processed, and FIG. 3 is an enlarged view of an embodiment of any unit image in FIG. The image 100 to be processed has a plurality of pixels 110 (as shown in FIG. 2 ).

所述待处理图像100为需要进行检测的图像。作为一种示例,所述待处理图像100为需要进行缺陷检测的图像。The image to be processed 100 is an image that needs to be detected. As an example, the image to be processed 100 is an image that requires defect detection.

本实施例中,所述待处理图像100是通过对待测物进行拍摄获得的图像。具体地,获取所述待处理图像100的步骤包括:提供成像系统和待测物;利用所述成像系统,拍摄获取所述待测物的图像,作为待处理图像100。In this embodiment, the image to be processed 100 is an image obtained by photographing the object to be tested. Specifically, the step of acquiring the image to be processed 100 includes: providing an imaging system and an object to be tested; using the imaging system, taking an image of the object to be tested as the image to be processed 100 .

本实施例中,所述待测物包括多个重复的单元结构,因此,所述待处理图像100包括多个相同的单元图像150。其中,所述待处理图像100为所述多个单元结构的图像,所述单元图像150为任一单元结构的图像。In this embodiment, the object under test includes a plurality of repeated unit structures, therefore, the image to be processed 100 includes a plurality of identical unit images 150 . Wherein, the image to be processed 100 is an image of the plurality of unit structures, and the unit image 150 is an image of any unit structure.

需要说明的是,根据所述待测物中多个重复的单元结构的排列情况,所述单元图像呈周期性排列。如图2所示,作为一种示例,仅示出了九个单元图像150。具体地,所述九个单元图像150呈3*3的阵列排布。可以理解的是,所述单元图像150的数量不仅限于九个。It should be noted that, according to the arrangement of multiple repeated unit structures in the object under test, the unit images are arranged periodically. As shown in FIG. 2, as an example, only nine unit images 150 are shown. Specifically, the nine unit images 150 are arranged in a 3*3 array. It can be understood that the number of the unit images 150 is not limited to nine.

本实施例中,所述待测物为晶圆(wafer),晶圆通常包含有多个重复的晶粒(die)。相应的,所述待处理图像100为晶圆图像,每个单元图像150可以包括一个晶粒或多个晶粒的图像。In this embodiment, the object under test is a wafer, and a wafer usually includes a plurality of repeated dies. Correspondingly, the image to be processed 100 is a wafer image, and each unit image 150 may include images of one die or multiple dies.

在其他实施例中,所述待测物还可以是玻璃面板等其他类型的产品。可以理解的是,玻璃面板也可以具有多个重复的单元结构。例如,每个单元结构可以用于形成电子产品显示屏。In other embodiments, the object under test may also be other types of products such as glass panels. It can be understood that the glass panel can also have multiple repeating unit structures. For example, each cell structure can be used to form a display screen of an electronic product.

还需要说明的是,图像的最小单位是像素(pixel),因此,所述待处理图像100具有多个像素点110。具体地,所述多个像素点110构成像素阵列。It should also be noted that the smallest unit of an image is a pixel (pixel), therefore, the image 100 to be processed has a plurality of pixel points 110 . Specifically, the plurality of pixel points 110 constitute a pixel array.

本实施例中,后续对所述待处理图像100进行检测时,相应对各个所述单元图像150进行检测。In this embodiment, when the image to be processed 100 is subsequently detected, each of the unit images 150 is correspondingly detected.

结合参考图4和图5,图4是图1中步骤S2一实施例的示意图,图5是图4中待测图像一实施例的示意图,执行步骤S2,对所述待处理图像100进行第一识别处理,获取所述待处理图像100中满足第一阈值条件的像素点110作为初始异常点200(如图4所示)。4 and FIG. 5 in combination, FIG. 4 is a schematic diagram of an embodiment of step S2 in FIG. 1, and FIG. 5 is a schematic diagram of an embodiment of the image to be tested in FIG. In an identification process, pixel points 110 satisfying the first threshold condition in the image to be processed 100 are obtained as initial abnormal points 200 (as shown in FIG. 4 ).

后续根据所述初始异常点200获取异常点。Subsequently, the abnormal points are acquired according to the initial abnormal points 200 .

相应的,所述第一识别处理用于为后续进行第二识别处理做准备。Correspondingly, the first identification process is used to prepare for the subsequent second identification process.

此处,第一阈值条件指的是:符合预设条件的像素点110的集合。Here, the first threshold condition refers to: a set of pixel points 110 meeting the preset condition.

相应的,所述第一阈值条件作为判断像素点110是否为初始异常点200的判断标准,也就是说,在像素点110符合第一阈值条件的情况下,则像素点110为初始异常点200。Correspondingly, the first threshold condition is used as a criterion for judging whether the pixel point 110 is the initial abnormal point 200, that is, if the pixel point 110 meets the first threshold value condition, then the pixel point 110 is the initial abnormal point 200 .

作为一种示例,所述第一阈值条件用于判断所述像素点110的强度表征值是否异常。As an example, the first threshold condition is used to determine whether the intensity characteristic value of the pixel point 110 is abnormal.

本实施例中,所述强度表征值与灰度值或信噪比正相关。具体地,所述强度表征值包括灰度值或形成待处理图像100的像素点110的光强值或亮度值。In this embodiment, the intensity characteristic value is positively correlated with the gray value or the signal-to-noise ratio. Specifically, the intensity characteristic value includes a grayscale value or a light intensity value or a brightness value of the pixel point 110 forming the image 100 to be processed.

本实施例中,以所述强度表征值为灰度值作为示例进行描述。In this embodiment, the intensity characteristic value is described by taking the gray value as an example.

本实施例中,对所述待处理图像100进行第一识别处理的步骤包括:获取参考图像;对所述参考图像与所述待处理图像100进行匹配处理,使所述待处理图像与所述参考图像匹配区域的像素点一一对应;将所述参考图像与所述待处理图像100进行比较,获取所述参考图像与所述待处理图像100中相对应像素点的强度表征值之间的第一差异值;比较所述第一差异值与第一阈值,获取所述第一差异值大于第一阈值的待处理图像的像素点作为第一差异点;利用所述第一差异点获取初始异常点200。In this embodiment, the step of performing the first recognition process on the image to be processed 100 includes: acquiring a reference image; performing matching processing on the reference image and the image to be processed 100, so that the image to be processed is matched with the One-to-one correspondence between the pixels in the reference image matching area; compare the reference image with the image to be processed 100, and obtain the intensity characteristic value between the reference image and the corresponding pixel in the image to be processed 100 The first difference value; compare the first difference value with the first threshold value, and obtain the pixel points of the image to be processed whose first difference value is greater than the first threshold value as the first difference point; use the first difference point to obtain the initial 200 outliers.

所述参考图像作为对待处理图像100进行识别处理时的比较基准,通过比较所述待处理图像100和参考图像中相对应像素点的强度表征值之间的第一差异值,从而判断待测图像151中是否存在初始异常点200。The reference image is used as a comparison reference when performing recognition processing on the image to be processed 100, and the image to be tested is judged by comparing the first difference value between the intensity characteristic values of corresponding pixels in the image to be processed 100 and the reference image. Whether there is an initial outlier point 200 in 151.

本实施例中,所述第一阈值条件至少包括:所述第一差异值大于第一阈值,因此,获取所述第一差异值大于第一阈值的待处理图像的像素点作为第一差异点。In this embodiment, the first threshold condition at least includes: the first difference value is greater than the first threshold, therefore, acquire the pixels of the image to be processed whose first difference value is greater than the first threshold as the first difference point .

本实施例中,对所述待处理图像100进行第一识别处理的步骤中,对各个所述单元图像150进行所述第一识别处理,获取各个单元图像150的初始异常点200,且将当前待测的所述单元图像150作为待测图像151,将所述待测图像151周围的多个所述单元图像作为参考图像152。In this embodiment, in the step of performing the first identification process on the image to be processed 100, the first identification process is performed on each of the unit images 150, the initial abnormal point 200 of each unit image 150 is obtained, and the current The unit image 150 to be tested is used as an image to be tested 151 , and multiple unit images around the image to be tested 151 are used as reference images 152 .

相应的,对所述参考图像152与所述待测图像151进行匹配处理,并在匹配处理后,将所述参考图像152与所述待测图像151进行比较,获取所述参考图像152与所述待测图像151中相对应像素点的强度表征值之间的第一差异值。Correspondingly, a matching process is performed on the reference image 152 and the image to be tested 151, and after the matching process, the reference image 152 is compared with the image to be tested 151, and the reference image 152 and the image to be tested are obtained. The first difference value between the intensity characteristic values of corresponding pixel points in the image-to-be-tested 151.

此处,所述待测图像151与所述参考图像152中相对应像素点指的是:所述待测图像151与所述参考图像152中相同位置处的像素点。Here, the corresponding pixel points in the image-to-be-test 151 and the reference image 152 refer to: the pixel points at the same position in the image-to-be-test 151 and the reference image 152 .

所述参考图像152作为对所述待测图像151进行识别处理时的比较基准,通过比较所述待测图像151和参考图像152中相对应像素点的强度表征值之间的差异,从而判断待测图像151中是否存在异常点200。The reference image 152 is used as a reference for comparison when performing recognition processing on the image to be tested 151, and by comparing the difference between the intensity characteristic values of corresponding pixels in the image to be tested 151 and the reference image 152, it is judged that Check whether there is an abnormal point 200 in the image 151.

所述参考图像152和待测图像151位于同一张待处理图像100中,也就是说,所述参考图像152和待测图像151来自于相同的待测物,从而避免因不同待测物之间平均强度表征值差异大的问题而对检测结果的准确性产生不良影响,相应有利于提高检测结果的准确性。The reference image 152 and the image to be tested 151 are located in the same image to be processed 100, that is to say, the reference image 152 and the image to be tested 151 come from the same object to be tested, thereby avoiding differences between different objects to be tested. The problem of large differences in the average intensity characterization value will have a negative impact on the accuracy of the detection results, which is conducive to improving the accuracy of the detection results.

具体地,与所述待测图像151紧邻的多个所述单元图像作为参考图像152。如图4所示,作为一种示例,所述参考图像152的数量为8个,所述参考图像152和待测图像151呈3*3的阵列排布。Specifically, a plurality of unit images adjacent to the image-to-be-tested 151 serve as reference images 152 . As shown in FIG. 4 , as an example, the number of the reference images 152 is 8, and the reference images 152 and the images to be tested 151 are arranged in a 3*3 array.

在其他实施例中,也可以选用标准图像作为参考图像。相应的,通过基于标准图像的匹配方式,使所述待处理图像与所述参考图像匹配区域的像素点一一对应。In other embodiments, a standard image may also be selected as the reference image. Correspondingly, by using a standard image-based matching method, the pixels in the matching area of the image to be processed and the reference image are in one-to-one correspondence.

标准图像是对一个与待测物一致的参考物进行拍摄获得的图像。可以理解的是,标准图像与待处理图像并非位于同一图像上。其中,标准图像可以包括CAD图或无缺陷的测量图像。The standard image is an image obtained by shooting a reference object that is consistent with the object to be measured. It can be understood that the standard image and the image to be processed are not located on the same image. Wherein, the standard image may include a CAD drawing or a defect-free measurement image.

当采用标准图像作为参考图像时,对所述参考图像与所述待处理图像进行匹配处理的方法包括匹配区域获取步骤,所述匹配区域获取步骤包括:获取待处理图像中与参考图像匹配度最高或大于预设值的区域,得到匹配区域,所述参考图像的各像素点与所述匹配区域的各像素点具有一一对应的关系。When a standard image is used as a reference image, the method for matching the reference image with the image to be processed includes a step of obtaining a matching area, and the step of obtaining a matching area includes: obtaining the highest matching degree between the image to be processed and the reference image or an area larger than a preset value to obtain a matching area, and each pixel point of the reference image has a one-to-one correspondence relationship with each pixel point of the matching area.

具体的,匹配度最高指的是:所述匹配区域的各像素点与所述参考图像的各像素点之间的强度表征值的方差、标准差或绝对值最小;匹配度大于预设值指的是:所述匹配区域的各像素点与所述参考图像的各像素点之间的强度表征值的方差、标准差或绝对值小于预设值。Specifically, the highest matching degree refers to: the variance, standard deviation or absolute value of the intensity characteristic value between each pixel point of the matching area and each pixel point of the reference image is the smallest; the matching degree is greater than the preset value means It is: the variance, standard deviation or absolute value of the intensity characteristic value between each pixel point of the matching area and each pixel point of the reference image is smaller than a preset value.

其中,所述匹配区域的像素点与所述参考图像的对应像素点的强度表征值之差为像素差,强度表征值的方差指的是:所述像素差的平方和。Wherein, the difference between the intensity characteristic value of the pixel in the matching area and the corresponding pixel in the reference image is a pixel difference, and the variance of the intensity characteristic value refers to: the sum of the squares of the pixel difference.

本实施例中,所述待处理图像包括多个相同的单元图像,所述参考图像为一个单元图像的标准图像,因此,对所述参考图像与所述待处理图像进行匹配处理,使所述待处理图像与所述参考图像匹配区域的像素点一一对应的步骤还包括:重复所述匹配区域获取步骤,在所述待处理图像中获取多个匹配区域,所述匹配区域的个数与所述单元图像的个数相同。In this embodiment, the image to be processed includes a plurality of identical unit images, and the reference image is a standard image of a unit image. Therefore, matching processing is performed on the reference image and the image to be processed so that the The step of one-to-one correspondence between the image to be processed and the pixel points of the matching area of the reference image further includes: repeating the step of obtaining the matching area, obtaining a plurality of matching areas in the image to be processed, the number of the matching areas is the same as The number of the unit images is the same.

以采用无缺陷的测量图像来作为标准图像为例,通过选取与所述待测物相同的参考物,所述参考物也具有多个单元结构,获取所述参考物的图像,并在所述参考物的图像上选取合格的单元结构图像,作为标准图像(也即参考图像)。例如,先选取一个合格的晶圆的图像,在选取的晶圆的图像上选取部分合格的晶粒图像,作为参考图像。Taking a non-defective measurement image as an example as a standard image, by selecting the same reference object as the object to be tested, the reference object also has a plurality of unit structures, acquiring the image of the reference object, and A qualified unit structure image is selected from the image of the reference object as a standard image (that is, a reference image). For example, an image of a qualified wafer is selected first, and part of the images of qualified grains are selected on the image of the selected wafer as a reference image.

相应的,若选用标准图像作为参考图像,则在进行识别处理时,把每个单元图像与参考图像进行比较。Correspondingly, if a standard image is selected as the reference image, each unit image is compared with the reference image when the recognition process is performed.

本实施例中,利用所述第一差异点获取初始异常点200的步骤包括:获取第一差异点的个数,得到第一差异数量,在所述第一差异数量大于或等于预设数量的情况下,判定当前检测的像素点为初始异常点200。In this embodiment, the step of using the first difference point to obtain the initial abnormal point 200 includes: obtaining the number of the first difference point to obtain the first difference number, and when the first difference number is greater than or equal to the preset number In this case, it is determined that the currently detected pixel point is the initial abnormal point 200 .

相应的,所述第一阈值条件还包括:所述第一差异数量大于或等于预设数量。Correspondingly, the first threshold condition further includes: the first difference quantity is greater than or equal to a preset quantity.

需要说明的是,在第一差异数量大于或等于预设数量的情况下,判定当前检测的像素点为初始异常点200,此处的预设数量的最小值为一个,最大值为所述待测图像151相对应的参考图像152的总数量,预设数量可以根据实际需求进行设定。It should be noted that, when the first difference number is greater than or equal to the preset number, it is determined that the currently detected pixel point is the initial abnormal point 200, where the minimum value of the preset number is one, and the maximum value is The total number of reference images 152 corresponding to the measured image 151, the preset number can be set according to actual needs.

还需要说明的是,在其他实施例中,也可以直接将所述第一差异点作为初始异常点200。It should also be noted that, in other embodiments, the first difference point may also be directly used as the initial abnormal point 200 .

将所述待测图像151与所述参考图像152进行比较时,将所述待测图像151的像素点110的灰度值,与参考图像152的对应像素点的灰度值比较,从而获取所述待测图像151与所述参考图像152相对应像素点的灰度之间的第一差异值。When comparing the image to be tested 151 with the reference image 152, the grayscale value of the pixel 110 of the image to be tested 151 is compared with the grayscale value of the corresponding pixel of the reference image 152, thereby obtaining the The first difference value between the gray levels of corresponding pixels of the image-to-be-tested 151 and the reference image 152 .

此处,所述灰度之间的第一差异值指的是:所述待测图像151与所述参考图像152相对应像素点的灰度差值的绝对值。Here, the first difference value between the gray levels refers to the absolute value of the difference between the gray levels of the pixels corresponding to the image-to-be-tested 151 and the reference image 152 .

本实施例中,所述第一阈值与所述待处理图像100的清晰度正相关。图像的清晰度越高,则轮廓边缘灰度变化越明显,层次感越强,因此,为了能够将异常点200筛选出来,所述第一阈值的值相应更大。In this embodiment, the first threshold is positively correlated with the definition of the image 100 to be processed. The higher the definition of the image, the more obvious the grayscale change of the contour edge, and the stronger the sense of hierarchy. Therefore, in order to filter out the abnormal points 200, the value of the first threshold is correspondingly larger.

具体地,图像的清晰度与灰度梯度相关,因此,通过所述灰度梯度,获取第一阈值。Specifically, the sharpness of the image is related to the grayscale gradient, therefore, the first threshold is obtained through the grayscale gradient.

需要说明的是,后续对所述周边像素点进行第二识别处理,判断所述周边像素点是否满足第二阈值条件,将满足所述第二阈值条件的周边像素点作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件,因此,第二阈值条件与第一阈值条件具有相关性。It should be noted that, subsequently, the second identification process is performed on the surrounding pixels to determine whether the surrounding pixels meet the second threshold condition, and the surrounding pixels satisfying the second threshold condition are regarded as defective pixels, and the The second threshold condition includes the first threshold condition, therefore, the second threshold condition is correlated with the first threshold condition.

因此,获取所述第一阈值和/或获取所述第二阈值的步骤包括初始阈值获取处理,所述初始阈值获取处理包括:获取所述待处理图像100中各个像素点110的灰度梯度;获取所述待处理图像100的灰度梯度的平均值,将所述灰度梯度的平均值作为初始阈值。Therefore, the step of obtaining the first threshold and/or obtaining the second threshold includes an initial threshold obtaining process, and the initial threshold obtaining process includes: obtaining the gray gradient of each pixel point 110 in the image to be processed 100; The average value of the grayscale gradient of the image to be processed 100 is acquired, and the average value of the grayscale gradient is used as an initial threshold.

本实施例中,所述检测方法还包括:基于所述初始阈值增加预设偏移量。需要说明的是,此处的预设偏移量可以为零,也可以不为零。In this embodiment, the detection method further includes: adding a preset offset based on the initial threshold. It should be noted that the preset offset here may or may not be zero.

本实施例中,基于所述初始阈值增加预设偏移量,用于获得所述第一阈值和/或第二阈值。In this embodiment, a preset offset is added based on the initial threshold to obtain the first threshold and/or the second threshold.

本实施例中,可以先根据初始阈值获得第一阈值,并利用第一阈值获得第二阈值,也可以先根据初始阈值获得第二阈值,并利用第二阈值获得第一阈值,还可以根据初始阈值,获得第一阈值和第二阈值。In this embodiment, the first threshold can be obtained first according to the initial threshold, and the second threshold can be obtained by using the first threshold, or the second threshold can be obtained first according to the initial threshold, and the first threshold can be obtained by using the second threshold. Threshold, get the first threshold and the second threshold.

具体地,获取所述第一阈值的步骤还包括:将所述初始阈值作为第一阈值;获取所述第二阈值的步骤相应包括:使所述第一阈值与第一比例因子相乘,获得所述第二阈值;或者,获取所述第二阈值的步骤还包括:将所述初始阈值作为第二阈值;获取所述第一阈值的步骤相应包括:使所述第二阈值与第二比例因子相乘,获得所述第一阈值;或者,获取所述第一阈值和获取所述第二阈值的步骤均包括初始阈值获取处理,所述第一阈值对应的预设偏移量与所述第二阈值对应的预设偏移量不相同。Specifically, the step of obtaining the first threshold further includes: using the initial threshold as the first threshold; the step of obtaining the second threshold correspondingly includes: multiplying the first threshold by a first scaling factor to obtain the second threshold; or, the step of obtaining the second threshold further includes: using the initial threshold as the second threshold; the step of obtaining the first threshold correspondingly includes: making the second threshold and the second ratio multiplied by factors to obtain the first threshold; or, the steps of obtaining the first threshold and obtaining the second threshold both include an initial threshold obtaining process, and the preset offset corresponding to the first threshold is the same as the The preset offsets corresponding to the second thresholds are different.

可以理解的是,在获取所述第一阈值的步骤还包括将所述初始阈值作为第一阈值的情况下,所述第一阈值对应的预设偏移量相应为零。It can be understood that, when the step of obtaining the first threshold further includes using the initial threshold as the first threshold, the preset offset corresponding to the first threshold is correspondingly zero.

同理,在获取所述第二阈值的步骤还包括将所述初始阈值作为第二阈值的情况下,所述第二阈值对应的预设偏移量相应为零。Similarly, if the step of obtaining the second threshold further includes using the initial threshold as the second threshold, the preset offset corresponding to the second threshold is correspondingly zero.

本实施例中,基于所述初始阈值增加预设偏移量,获得所述第一阈值。In this embodiment, the first threshold is obtained by adding a preset offset based on the initial threshold.

需要说明的是,任一像素点110在X方向和Y方向均具有相对应的灰度梯度,因此,作为一种示例,所述像素点的灰度梯度的关系式包括:It should be noted that any pixel point 110 has a corresponding grayscale gradient in the X direction and Y direction, therefore, as an example, the relational expression of the grayscale gradient of the pixel point includes:

Figure BDA0003265315710000101
Figure BDA0003265315710000101

其中,M(x,y)表示所述像素点110的灰度梯度,gx表示所述像素点110在X方向上的梯度,gy表示所述像素点110在Y方向上的梯度,所述X方向为像素阵列的行方向,所述Y方向为像素阵列的列方向。Wherein, M(x, y) represents the gray gradient of the pixel point 110, gx represents the gradient of the pixel point 110 in the X direction, gy represents the gradient of the pixel point 110 in the Y direction, and the X The direction is the row direction of the pixel array, and the Y direction is the column direction of the pixel array.

还需要说明的是,基于所述初始阈值增加预设偏移量,获得所述第一阈值的步骤中,所述预设偏移量不宜过小,也不宜过大。如果所述预设偏移量过小,则在进行第一识别处理时,容易导致误检率变高,也即容易将正常的像素点110归为初始异常点200,从而导致初始异常点200的数量过多,进而增加后续根据所述初始异常点获取异常点、以及第二识别处理的数据处理量;如果所述预设偏移量过大,则容易增大漏检的概率。为此,本实施例中,所述预设偏移量为3至5。It should also be noted that, in the step of obtaining the first threshold by adding a preset offset based on the initial threshold, the preset offset should not be too small or too large. If the preset offset is too small, it is easy to cause the false detection rate to become high when performing the first identification process, that is, it is easy to classify the normal pixel point 110 as the initial abnormal point 200, resulting in the initial abnormal point 200 If the number is too large, the amount of subsequent data processing for obtaining abnormal points according to the initial abnormal points and the second identification process will be increased; if the preset offset is too large, the probability of missed detection will easily increase. Therefore, in this embodiment, the preset offset is 3-5.

此外,图5中仅示意了一个像素点110为初始异常点200,但初始异常点200不仅限于一个像素点。例如,在其他实施例中,在第一识别处理后,获得多个初始异常点,且存在多个初始异常点相连的情况。In addition, only one pixel point 110 is shown as the initial abnormal point 200 in FIG. 5 , but the initial abnormal point 200 is not limited to one pixel point. For example, in other embodiments, after the first identification process, multiple initial abnormal points are obtained, and there is a situation that multiple initial abnormal points are connected.

继续参考图5,执行步骤S3,根据所述初始异常点200获取异常点250。Continuing to refer to FIG. 5 , step S3 is executed to obtain the abnormal point 250 according to the initial abnormal point 200 .

后续通过对异常点250进一步的识别,以判断所述异常点250是否为缺陷点或噪点。Subsequently, by further identifying the abnormal point 250, it is judged whether the abnormal point 250 is a defect point or a noise point.

本实施例中,根据所述初始异常点200获取异常点250包括:对所述待处理图像100中的初始异常点200进行连通域判断,获取连通域(Connected Component),同一连通域中的每个初始异常点200均具有相邻的初始异常点200,且连通域内与连通域外的初始异常点200相互分离;在所述连通域内的初始异常点200个数大于或等于预设数量的情况下,所述连通域内的初始异常点200作为缺陷点,在所述连通域内的初始异常点200个数小于预设数量的情况下,所述连通域作为所述异常点250。In this embodiment, obtaining the abnormal point 250 according to the initial abnormal point 200 includes: performing connected domain judgment on the initial abnormal point 200 in the image 100 to be processed, obtaining a connected component (Connected Component), and each connected component in the same connected domain Each initial outlier point 200 has adjacent initial outlier points 200, and the initial outlier points 200 in the connected domain and outside the connected domain are separated from each other; in the case where the number of initial outlier points 200 in the connected domain is greater than or equal to the preset number , the initial outlier points 200 in the connected domain are used as defect points, and when the number of initial outlier points 200 in the connected domain is less than a preset number, the connected domain is used as the outlier points 250 .

多个符合特定条件且相连的像素点110构成的集合,称为一个连通域。具体到本实施例中,所述特定条件即为满足第一阈值条件。A collection of multiple connected pixel points 110 meeting certain conditions is called a connected domain. Specifically in this embodiment, the specific condition is to meet the first threshold condition.

后续采用第二识别处理的方式,对异常点250进行复检,因此,通过先进行连通域判断,从而确定后续是否需要进行第二识别处理。The outlier point 250 is rechecked in the second identification process. Therefore, it is determined whether the second identification process needs to be performed by first performing connected domain judgment.

具体地,在难以确定所述初始异常点200的类型是缺陷点还是异常点250的情况下,先进行连通域判断,从而在所述连通域内的初始异常点200个数大于或等于预设数量的情况下,即可确定所述初始异常点200为缺陷点,则后续无需再选取周边像素点并进行第二识别处理,从而能够选择性地在所述连通域内的初始异常点200个数小于预设数量的情况下,对所述异常点250进行复检,从而在提高检测结果的准确性的同时,提高检测效率。Specifically, in the case where it is difficult to determine whether the type of the initial outlier 200 is a defect point or an outlier 250, the connected domain is judged first, so that the number of initial outlier points 200 in the connected domain is greater than or equal to the preset number In the case of , it can be determined that the initial abnormal point 200 is a defect point, and then there is no need to select surrounding pixel points and perform the second identification process, so that the number of initial abnormal points 200 in the connected domain can be selectively less than In the case of a preset number, the abnormal points 250 are re-inspected, thereby improving the detection efficiency while improving the accuracy of the detection results.

本实施例中,所述连通域判断包括四连通域判断或八连通域判断。其中,四连通域判断指的是:判断任一初始异常点200周围是否具有4个相邻的初始异常点200;八连通域判断指的是:判断任一初始异常点200周围是否具有8个相邻的初始异常点200。In this embodiment, the determination of connected domains includes determination of four connected domains or determination of eight connected domains. Among them, the four-connected domain judgment refers to: judging whether there are 4 adjacent initial abnormal points 200 around any initial abnormal point 200; the eight-connected domain judgment refers to: judging whether there are 8 adjacent initial abnormal points 200 Adjacent initial outliers 200.

在所述连通域内的初始异常点200个数大于或等于预设数量的情况下,所述连通域内的初始异常点200作为缺陷点,在所述连通域内的初始异常点200个数小于预设数量的情况下,所述连通域作为所述异常点250,而噪点的像素尺寸通常较小,因此,如果所述预设数量过大,则在连通域判断时,容易把缺陷点误判为异常点250,从而进行不必要的后续操作。因此,本实施例中,所述预设数量为1个至5个。When the number of 200 initial abnormal points in the connected domain is greater than or equal to the preset number, the initial abnormal points 200 in the connected domain are used as defect points, and the number of 200 initial abnormal points in the connected domain is less than the preset number In the case of a large number, the connected domain is used as the abnormal point 250, and the pixel size of the noise point is usually small. Therefore, if the preset number is too large, it is easy to misjudge the defective point as the abnormal point when judging the connected domain. Abnormal point 250, so unnecessary follow-up operations are performed. Therefore, in this embodiment, the preset number is 1 to 5.

如图5所示,作为一种示例,所述预设数量为一个。相应的,在所述初始异常点200为孤立的一个像素点110的情况下,将所述初始异常点200作为所述异常点250,否则将所述初始异常点200作为缺陷点。噪点的像素尺寸通常较小,通常为一个像素点,因此,通过将预设数量设置为一个,有利于精确获得所述异常点250,减小后续操作的运算量。As shown in FIG. 5 , as an example, the preset number is one. Correspondingly, if the initial outlier point 200 is an isolated pixel point 110, the initial outlier point 200 is taken as the outlier point 250; otherwise, the initial outlier point 200 is taken as a defect point. The pixel size of the noise point is generally small, usually one pixel point, therefore, by setting the preset number to one, it is beneficial to accurately obtain the abnormal point 250 and reduce the computation load of subsequent operations.

需要说明的是,在所述连通域内的初始异常点个数小于预设数量的情况下,将所述连通域作为所述异常点,指的是将所述连通域内的所有初始异常点作为一个异常点。It should be noted that, when the number of initial outliers in the connected domain is less than the preset number, using the connected domain as the outlier refers to taking all the initial outliers in the connected domain as a Outlier.

在其他实施例中,根据所述初始异常点获取异常点包括:获取与所述初始异常点相邻的像素点作为临近点,所述临近点的数量为一个或多个;判断每个临近点是否为初始异常点,且在各临近点均不是初始异常点的情况下,将所述初始异常点作为异常点。In other embodiments, obtaining the abnormal point according to the initial abnormal point includes: obtaining pixel points adjacent to the initial abnormal point as adjacent points, and the number of the adjacent points is one or more; judging each adjacent point Whether it is an initial outlier point, and if none of the adjacent points is an initial outlier point, use the initial outlier point as an outlier point.

具体地,所述临近点的数量可以是四个或八个。在所述临近点的数量为四个的情况下,所述初始异常点与所述临近点呈十字形布局或X型布局,在所述临近点的数量为八个的情况下,所述初始异常点与所述临近点呈3*3阵列布局。Specifically, the number of the adjacent points may be four or eight. When the number of the adjacent points is four, the initial abnormal point and the adjacent points are in a cross-shaped layout or an X-shaped layout; when the number of the adjacent points is eight, the initial abnormal point The abnormal points and the adjacent points are arranged in a 3*3 array.

结合参考图6,图6是图1中步骤S4一实施例的示意图,执行步骤S4,选取一个或多个与所述异常点250相邻的像素点110作为周边像素点300。Referring to FIG. 6, FIG. 6 is a schematic diagram of an embodiment of step S4 in FIG.

后续对所述周边像素点300进行第二识别处理,从而实现对异常点250的复检。Subsequently, the second identification process is performed on the surrounding pixel points 300, so as to realize the re-examination of the abnormal point 250.

噪点(noise)的像素尺寸通常较小(例如,一个噪点的像素尺寸为一个像素点),这导致区分缺陷和噪点的难度较大。但是,与噪点相邻的像素点均为正常的像素点,与真实缺陷相邻的像素点通常也是缺陷像素点,因此,在检测过程中,当出现异常点250后,利用第二阈值条件将所述周边像素点300再次进行识别,所述第二阈值条件包含所述第一阈值条件,也即所述第一阈值条件对应的集合包含于所述第二阈值条件对应的集合中,这使得在周边像素点300与正常像素点的差异较小的情况下,仍能被检出,从而能够在异常点250周围检测出更多的缺陷像素点,相应能够更好地区分噪点和缺陷点,以精确判断所述异常点250是否为真实的缺陷点,便于剔除噪点并保留缺陷点,相应降低了出现误检和漏检的概率,进而提高了检测结果的准确性。The pixel size of noise (noise) is usually small (for example, the pixel size of one noise is one pixel), which makes it difficult to distinguish defects from noise. However, the pixels adjacent to the noise point are all normal pixels, and the pixels adjacent to the real defect are usually also defective pixels. Therefore, in the detection process, when abnormal points 250 appear, the second threshold condition is used to The surrounding pixel points 300 are identified again, the second threshold condition includes the first threshold condition, that is, the set corresponding to the first threshold condition is included in the set corresponding to the second threshold condition, which makes In the case where the difference between the surrounding pixel 300 and the normal pixel is small, it can still be detected, so that more defective pixels can be detected around the abnormal point 250, and correspondingly, noise points and defective points can be better distinguished. By accurately judging whether the abnormal point 250 is a real defect point, it is convenient to eliminate noise points and retain the defect points, correspondingly reducing the probability of false detection and missed detection, thereby improving the accuracy of detection results.

其中,缺陷点表示形成待处理图像100的待测物中真实缺陷所对应的像素点110,噪点也称噪声,噪点主要是指待处理图像100中不该出现的外来像素,通常由检测设备本身的异常产生,例如探测器中的电子干扰产生。Among them, the defect point represents the pixel point 110 corresponding to the real defect in the object under test forming the image 100 to be processed, and the noise point is also called noise. Anomalies, such as electronic disturbances in detectors, occur.

本实施例中,通过选取与所述异常点250紧邻的像素点110作为周边像素点300,使所述周边像素点300的检测结果与异常点250的相关性更高,从而提高后续第二识别处理的检测结果的准确性。In this embodiment, by selecting the pixel point 110 next to the abnormal point 250 as the surrounding pixel point 300, the correlation between the detection result of the surrounding pixel point 300 and the abnormal point 250 is higher, thereby improving the subsequent second identification. Accuracy of processed test results.

本实施例中,选取一个或多个与所述异常点250相邻的像素点110作为周边像素点300的步骤中,选择与所述异常点250的边缘和/或顶角相邻的像素点110作为周边像素点300。具体的,所述周边像素点300的数量为8个,且所述周边像素点300与所述异常点250构成3*3的像素阵列。也就是说,所述异常点250为所述3*3像素阵列中的中心像素点,所述周边像素点300为与所述异常点250紧邻的像素点110。In this embodiment, in the step of selecting one or more pixel points 110 adjacent to the abnormal point 250 as the surrounding pixel points 300, select the pixel points adjacent to the edge and/or vertex corner of the abnormal point 250 110 as surrounding pixel 300. Specifically, the number of the surrounding pixel points 300 is 8, and the surrounding pixel points 300 and the abnormal point 250 form a 3*3 pixel array. That is to say, the abnormal point 250 is the central pixel point in the 3*3 pixel array, and the surrounding pixel point 300 is the pixel point 110 next to the abnormal point 250 .

所述异常点250为所述3*3像素阵列中的中心像素点,因此,通过选取8个周边像素点300,有利于提高第二识别处理的结果准确性。The abnormal point 250 is the central pixel point in the 3*3 pixel array, therefore, by selecting 8 surrounding pixel points 300, it is beneficial to improve the result accuracy of the second recognition process.

在其他实施例中,所述周边像素点的数量为4个,且所述周边像素点与所述异常点呈十字形布局或X型布局。In other embodiments, the number of surrounding pixel points is four, and the surrounding pixel points and the abnormal point are in a cross-shaped layout or an X-shaped layout.

需要说明的是,根据所述初始异常点200获取异常点250的过程中,在所述连通域内的初始异常点200个数小于预设数量的情况下,所述连通域作为所述异常点250。其中,当所述预设数量为多个时,将所述连通域作为所述异常点250指的是:将所述连通域内的所有初始异常点200作为一个异常点250。选择与所述异常点250的边缘和/或顶角相邻的像素点110作为周边像素点300,则所述异常点250的周边像素点300个数可以大于8个,例如,当异常点250包括两个初始异常点200时,周边像素点300的个数为10个或6个。It should be noted that, in the process of obtaining outliers 250 according to the initial outliers 200, if the number of initial outliers 200 in the connected domain is less than the preset number, the connected domain is used as the outlier 250 . Wherein, when the preset number is multiple, using the connected domain as the outlier point 250 refers to: taking all initial outlier points 200 in the connected domain as one outlier point 250 . Select the pixel point 110 adjacent to the edge and/or vertex of the abnormal point 250 as the surrounding pixel point 300, then the number of surrounding pixel points 300 of the abnormal point 250 can be greater than 8, for example, when the abnormal point 250 When two initial abnormal points 200 are included, the number of surrounding pixel points 300 is 10 or 6.

还需要说明的是,在其他实施例中,当通过获取与初始异常点相邻的像素点作为临近点,来获取异常点时,选取一个或多个与所述异常点相邻的像素点作为周边像素点包括:将所述初始异常点的临近点作为所述初始异常点的所述周边像素点。It should also be noted that, in other embodiments, when the abnormal point is obtained by obtaining the pixel points adjacent to the initial abnormal point as adjacent points, one or more pixel points adjacent to the abnormal point are selected as The surrounding pixel points include: the neighboring pixel points of the initial abnormal point as the surrounding pixel points.

结合参考图7,图7是图1中步骤S5一实施例的示意图,图7(a)表示在所述周边像素点300中存在缺陷像素点的情况下的示意图,图7(b)表示在所述周边像素点300中不存在缺陷像素点的情况下的示意图,执行步骤S4,对所述周边像素点300进行第二识别处理,将满足第二阈值条件的周边像素点300作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件;在所述周边像素点300中存在缺陷像素点的情况下,判定所述异常点200为缺陷点,在所述周边像素点300中不存在缺陷像素点的情况下,判定所述异常点200为噪点。Referring to FIG. 7 in conjunction with FIG. 7, FIG. 7 is a schematic diagram of an embodiment of step S5 in FIG. A schematic diagram of the case where there are no defective pixels in the surrounding pixels 300, step S4 is executed, the second identification process is performed on the surrounding pixels 300, and the surrounding pixels 300 satisfying the second threshold condition are regarded as defective pixels , the second threshold condition includes the first threshold condition; if there is a defective pixel in the surrounding pixel 300, it is determined that the abnormal point 200 is a defective point, and there is no defective pixel in the surrounding pixel 300 If there are defective pixels, it is determined that the abnormal point 200 is a noise point.

此处,第二阈值条件指的是:符合预设条件的周边像素点300的集合。Here, the second threshold condition refers to: a set of surrounding pixel points 300 meeting the preset condition.

所述第二阈值条件作为判断周边像素点300是否为缺陷像素点的判断标准,也就是说,在周边像素点300符合所述第二阈值条件的情况下,所述周边像素点300作为缺陷像素点。The second threshold condition is used as a criterion for judging whether the surrounding pixel 300 is a defective pixel, that is, if the surrounding pixel 300 meets the second threshold condition, the surrounding pixel 300 is regarded as a defective pixel point.

本实施例中,所述第二阈值条件包含所述第一阈值条件,也即所述第一阈值条件对应的集合包含于所述第二阈值条件对应的集合中,从而使得第二识别处理检测出的与正常像素点之间具有差异的像素点数量变多。In this embodiment, the second threshold condition includes the first threshold condition, that is, the set corresponding to the first threshold condition is included in the set corresponding to the second threshold condition, so that the second identification process detects The number of pixels that are different from normal pixels is increased.

如果所述异常点200为缺陷点,则位于所述异常点200周围的周边像素点300与正常的像素点110之间通常也是具有差异的,但差异较小,而噪点周围的像素点均为正常的像素点,因此,利用第二阈值条件进行第二识别处理,如果所述异常点200为缺陷点,则如图7(a)所示,在第二识别处理后,还能够在所述异常点200周围再检出一个或多个缺陷像素点,例如,图7(a)示出了在所述异常点200周围的两个周边像素点300被检出为缺陷像素点的情况,而如果所述异常点200为噪点,则如图7(b)所示,在第二识别处理后,所述异常点200周围未能再检测出缺陷像素点,从而对所述异常点200的真实类型进行区分,即区分噪点和缺陷点,以便后续将噪点剔除,并保留缺陷点。If the abnormal point 200 is a defect point, there is usually a difference between the surrounding pixel points 300 around the abnormal point 200 and the normal pixel points 110, but the difference is small, and the pixels around the noise point are all Normal pixels, therefore, use the second threshold condition to carry out the second identification process, if the abnormal point 200 is a defect point, as shown in Figure 7 (a), after the second identification process, it can also be in the One or more defective pixel points are detected around the abnormal point 200. For example, FIG. If the abnormal point 200 is a noise point, as shown in FIG. 7(b), after the second identification process, no defective pixel points can be detected around the abnormal point 200, so that the true value of the abnormal point 200 Types are distinguished, that is, noise points and defect points are distinguished, so that the noise points can be removed later and the defect points can be retained.

本实施例中,采用与第一识别处理相同的方式,并改变阈值条件,进行第二识别处理。In this embodiment, the second identification process is performed in the same way as the first identification process, and the threshold condition is changed.

本实施例中,对所述周边像素点300进行第二识别处理的步骤包括:获取参考图像;对所述参考图像与所述待处理图像100进行匹配处理,使所述待处理图像与所述参考图像匹配区域的像素点一一对应;将所述周边像素点300与所述参考图像中相对应像素点进行比较,获取所述周边像素点300与所述参考图像中相对应像素点的强度表征值之间的第二差异值;比较所述第二差异值与第二阈值,获取所述第二差异值大于第二阈值的周边像素点300作为第二差异点;利用所述第二差异点获取缺陷像素点。In this embodiment, the step of performing the second recognition processing on the surrounding pixel points 300 includes: acquiring a reference image; performing matching processing on the reference image and the image to be processed 100, so that the image to be processed is matched with the One-to-one correspondence between the pixels in the matching area of the reference image; comparing the surrounding pixels 300 with the corresponding pixels in the reference image, and obtaining the intensity of the surrounding pixels 300 and the corresponding pixels in the reference image A second difference value between the characteristic values; comparing the second difference value with a second threshold value, and obtaining the surrounding pixel points 300 whose second difference value is greater than the second threshold value as a second difference point; using the second difference value Points to get defective pixels.

相应的,本实施例中,所述第二阈值条件至少包括:所述第二差异值大于第二阈值,其中,所述第二阈值小于所述第一阈值。Correspondingly, in this embodiment, the second threshold condition at least includes: the second difference value is greater than a second threshold, wherein the second threshold is smaller than the first threshold.

本实施例中,在进行第一识别处理时,获取所述参考图像与所述待处理图像100中相对应像素点的强度表征值之间的第一差异值,并比较所述第一差异值与第一阈值,获取所述第一差异值大于第一阈值的待处理图像的像素点作为第一差异点,在进行第二识别处理时,获取所述周边像素点300与所述参考图像中相对应像素点的强度表征值之间的第二差异值,并比较所述第二差异值与第二阈值,获取所述第二差异值大于第二阈值的周边像素点300作为第二差异点,因此,通过使所述第二阈值小于所述第一阈值,从而使得所述第二阈值条件包含所述第一阈值条件。In this embodiment, when performing the first identification process, the first difference value between the intensity characteristic value of the corresponding pixel point in the reference image and the image to be processed 100 is obtained, and the first difference value is compared and the first threshold, obtain the pixel points of the image to be processed whose first difference value is greater than the first threshold as the first difference point, and obtain the difference between the surrounding pixel points 300 and the reference image when performing the second identification process. A second difference value between the intensity characteristic values of corresponding pixels, and comparing the second difference value with a second threshold value, and acquiring the surrounding pixel points 300 whose second difference value is greater than the second threshold value as the second difference point , therefore, by making the second threshold smaller than the first threshold, the second threshold condition includes the first threshold condition.

具体地,利用所述第二差异点获取缺陷像素点的步骤包括:获取所述第二差异点的个数,得到第二差异数量,在所述第二差异数量大于或等于预设数量的情况下,判定当前检测的周边像素点300为缺陷像素点。Specifically, the step of using the second difference points to obtain defective pixels includes: obtaining the number of the second difference points to obtain a second difference number, and when the second difference number is greater than or equal to the preset number Next, it is determined that the currently detected peripheral pixel point 300 is a defective pixel point.

相应的,所述第二阈值条件还包括:所述第二差异数量大于或等于预设数量。Correspondingly, the second threshold condition further includes: the second difference quantity is greater than or equal to a preset quantity.

其中,在所述第二差异数量大于或等于预设数量的情况下,判定当前检测的周边像素点300为缺陷像素点,此处的预设数量的最小值为一个,最大值为当前待测的周边像素点300相对应的参考图像152的总数量,预设数量可以根据实际需求进行设定。Wherein, in the case where the second difference number is greater than or equal to the preset number, it is determined that the currently detected peripheral pixel point 300 is a defective pixel point, where the minimum value of the preset number is one, and the maximum value is one currently to be tested. The total number of reference images 152 corresponding to the surrounding pixel points 300, the preset number can be set according to actual needs.

需要说明的是,在其他实施例中,也可以直接将第二差异点作为缺陷像素点。It should be noted that, in other embodiments, the second difference point may also be directly used as a defective pixel point.

还需要说明的是,第二识别处理时的待测图像151即为所述异常点200所在的单元图像150。It should also be noted that the image to be tested 151 in the second recognition process is the unit image 150 where the abnormal point 200 is located.

本实施例中,所述第二阈值与所述待处理图像100的清晰度正相关。In this embodiment, the second threshold is positively correlated with the definition of the image 100 to be processed.

本实施例中,获取所述第一阈值和获取所述第二阈值的步骤均包括初始阈值获取步骤,所述第一阈值对应的预设偏移量与所述第二阈值对应的预设偏移量不相同。In this embodiment, the steps of obtaining the first threshold and obtaining the second threshold both include the step of obtaining an initial threshold, and the preset offset corresponding to the first threshold is equal to the preset offset corresponding to the second threshold. The displacement is not the same.

在所述第二阈值小于所述第一阈值的情况下,获得所述第二阈值后,所述第二阈值与所述第一阈值的比值不宜过小,也不宜过大。如果所述第二阈值与所述第一阈值的比值过小,则容易导致所述第二阈值过小,则在进行第二识别处理时,容易导致误检率变高,也就是说,容易将正常的周边像素点300归为缺陷像素点,从而容易误将异常点200归为缺陷点;如果所述第二阈值与所述第一阈值的比值过大,则容易增大漏检的概率,从而容易误将异常点200归为噪点。为此,本实施例中,所述第二阈值为所述第一阈值的60%至80%。When the second threshold is smaller than the first threshold, after the second threshold is obtained, the ratio of the second threshold to the first threshold should not be too small, nor should it be too large. If the ratio of the second threshold to the first threshold is too small, it is easy to cause the second threshold to be too small, and when the second identification process is performed, it is easy to cause the false detection rate to become high, that is to say, it is easy to Classify the normal surrounding pixels 300 as defective pixels, so that it is easy to mistakenly classify the abnormal points 200 as defective points; if the ratio of the second threshold to the first threshold is too large, it is easy to increase the probability of missed detection , so it is easy to misclassify the abnormal point 200 as a noise point. Therefore, in this embodiment, the second threshold is 60% to 80% of the first threshold.

需要说明的是,在其他实施例中,还可以采用其他方式进行第一识别处理和第二识别处理。It should be noted that, in other embodiments, the first identification process and the second identification process may also be performed in other manners.

具体地,在另一些实施例中,在所述待处理图像为暗场图像的情况下,对所述待处理图像进行第一识别处理的步骤包括:将所述待处理图像的像素点与第一阈值进行比较,获取使强度表征值大于所述第一阈值的所述像素点作为初始异常点;所述第一阈值条件包括:所述像素点的强度表征值大于所述第一阈值。Specifically, in some other embodiments, when the image to be processed is a dark field image, the step of performing the first recognition process on the image to be processed includes: combining the pixels of the image to be processed with the first A threshold value is compared, and the pixel point whose intensity characteristic value is greater than the first threshold value is acquired as an initial abnormal point; the first threshold value condition includes: the intensity characteristic value of the pixel point is greater than the first threshold value.

相应的,对所述周边像素点进行第二识别处理的步骤包括:将所述周边像素点与第二阈值进行比较,获取使强度表征值大于所述第二阈值的所述周边像素点作为缺陷像素点;所述第二阈值条件包括:所述周边像素点的强度表征值大于所述第二阈值;其中,所述第二阈值小于所述第一阈值。Correspondingly, the step of performing the second identification process on the surrounding pixels includes: comparing the surrounding pixels with a second threshold, and obtaining the surrounding pixels whose intensity characteristic value is greater than the second threshold as defects A pixel point; the second threshold condition includes: the intensity characteristic value of the surrounding pixel point is greater than the second threshold; wherein, the second threshold is smaller than the first threshold.

暗场图像是通过暗场检测(darkfield inspection)的方式获得的图像。在暗场图像中,背景的灰度小于待测物表面的缺陷图像的灰度。The dark field image is an image obtained by means of dark field inspection. In the dark field image, the grayscale of the background is smaller than the grayscale of the defect image on the surface of the object to be tested.

在光学检测中,按照收集信号光的来源可包括明场检测(brightfieldinspection)和暗场检测。其中,暗场检测是通过探测待测物表面的散射光强度,来实现对待测物表面进行检测的方法。In optical inspection, according to the source of collected signal light, bright field inspection (brightfield inspection) and dark field inspection can be included. Among them, dark field detection is a method of detecting the surface of the object to be measured by detecting the intensity of scattered light on the surface of the object to be measured.

在其他实施例中,在所述待处理图像为明场图像的情况下,对所述待处理图像进行第一识别处理的步骤包括:将所述待处理图像的各个像素点与第一阈值进行比较,获取使强度表征值小于所述第一阈值的所述像素点作为初始异常点;所述第一阈值条件包括:所述像素点的强度表征值小于所述第一阈值。In other embodiments, when the image to be processed is a bright field image, the step of performing the first identification process on the image to be processed includes: performing a first threshold value on each pixel of the image to be processed In comparison, acquiring the pixel whose intensity characteristic value is less than the first threshold is taken as an initial abnormal point; the first threshold condition includes: the intensity characteristic value of the pixel is less than the first threshold.

相应的,对所述周边像素点进行第二识别处理的步骤包括:将所述周边像素点与第二阈值进行比较,获取使强度表征值小于所述第二阈值的所述周边像素点作为缺陷像素点;所述第二阈值条件包括:所述周边像素点的强度表征值小于所述第二阈值;其中,所述第二阈值大于所述第一阈值。Correspondingly, the step of performing the second identification process on the surrounding pixels includes: comparing the surrounding pixels with a second threshold, and acquiring the surrounding pixels whose intensity characteristic value is smaller than the second threshold as defects A pixel point; the second threshold condition includes: the intensity characteristic value of the surrounding pixel point is smaller than the second threshold; wherein, the second threshold is greater than the first threshold.

在第一识别处理时,获取使强度表征值大于所述第一阈值的所述像素点作为初始异常点,在第二识别处理时,获取使强度表征值大于所述第二阈值的所述周边像素点作为缺陷像素点,因此,通过使所述第二阈值小于所述第一阈值,从而使所述第二阈值条件包含所述第一阈值条件。During the first identification process, acquire the pixel points whose intensity characteristic value is greater than the first threshold value as the initial abnormal point; during the second identification process, acquire the surrounding area whose intensity characteristic value is greater than the second threshold value A pixel is a defective pixel, therefore, by making the second threshold smaller than the first threshold, the second threshold condition includes the first threshold condition.

明场图像是通过明场检测(brightfield inspection)的方式获得的图像。在明场图像中,背景的灰度大于待测物表面的缺陷图像的灰度。The bright field image is an image obtained by means of bright field inspection. In the bright field image, the grayscale of the background is greater than the grayscale of the defect image on the surface of the object to be tested.

其中,明场检测是通过探测待测物表面的反射光强度,来实现对待测物表面进行检测的方法。Among them, bright field detection is a method of detecting the surface of the object to be measured by detecting the intensity of reflected light on the surface of the object to be measured.

还需要说明的是,如果直接利用第二阈值条件进行第一识别处理,则容易导致误检率过高(例如,将具有一定强度表征值差异、但强度表征值差异处于可接受范围内的像素点归为缺陷点),因此,本实施例中,先利用第一阈值条件进行第一识别处理,获取初始异常点,并根据所述初始异常点获取异常点,以排除正常的像素点110或者强度表征值差异处于可接受范围内的像素点110或者确定为缺陷点的像素点110,使得异常点250的数量不会过多,再利用第二阈值条件对周边像素点300进行第二识别处理,以实现对异常点250的复检,从而在减少第二识别处理的数据处理量的情况下,更精准地筛选出真实的缺陷点。It should also be noted that if the second threshold condition is directly used for the first recognition process, it will easily lead to a high false detection rate (for example, the pixel with a certain intensity characteristic value difference, but the intensity characteristic value difference is within an acceptable range points are classified as defective points), therefore, in this embodiment, the first recognition process is first performed using the first threshold condition to obtain initial abnormal points, and obtain abnormal points according to the initial abnormal points to exclude normal pixel points 110 or The pixel points 110 whose intensity characteristic value difference is within the acceptable range or the pixel points 110 determined to be defective points, so that the number of abnormal points 250 will not be too many, and then use the second threshold value condition to perform the second identification process on the surrounding pixel points 300 , so as to realize the re-inspection of the abnormal point 250, so that the real defect point can be screened out more accurately while reducing the data processing amount of the second identification process.

相应的,本发明实施例还提供一种检测系统。参考图8,示出了本发明检测系统一实施例的功能框图。Correspondingly, the embodiment of the present invention also provides a detection system. Referring to FIG. 8 , it shows a functional block diagram of an embodiment of the detection system of the present invention.

结合参考图2至图7,所述检测系统包括:图像获取模块10,用于获取待处理图像100,所述待处理图像100具有多个像素点110;第一识别模块20,用于对所述待处理图像100进行第一识别处理,获取所述待处理图像中满足第一阈值条件的像素点110作为初始异常点200;异常点获取模块70,用于根据所述初始异常点200获取异常点250;像素点选取模块30,用于选取一个或多个与所述异常点200相邻的像素点110作为周边像素点300;第二识别模块40,用于对所述周边像素点300进行第二识别处理,将满足所述第二阈值条件的周边像素点300作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件;判断模块50,用于在所述周边像素点300中存在缺陷像素点的情况下,判定所述异常点200为缺陷点,在所述周边像素点300中不存在缺陷像素点的情况下,判定所述异常点200为噪点。With reference to FIGS. 2 to 7, the detection system includes: an image acquisition module 10, configured to acquire an image to be processed 100, the image to be processed 100 having a plurality of pixels 110; a first recognition module 20, configured to identify the The image to be processed 100 is subjected to the first identification process, and the pixel point 110 satisfying the first threshold condition in the image to be processed is obtained as the initial abnormal point 200; the abnormal point obtaining module 70 is used to obtain the abnormal point according to the initial abnormal point 200 Point 250; pixel point selection module 30, used to select one or more pixel points 110 adjacent to the abnormal point 200 as surrounding pixel points 300; second identification module 40, used to perform on the surrounding pixel points 300 The second identification process is to use the surrounding pixel points 300 satisfying the second threshold condition as defective pixel points, and the second threshold condition includes the first threshold condition; the judging module 50 is used to identify the surrounding pixel points 300 If there is a defective pixel point in the surrounding pixel point 300, it is determined that the abnormal point 200 is a defect point, and if there is no defective pixel point in the surrounding pixel point 300, it is determined that the abnormal point 200 is a noise point.

与噪点相邻的像素点均为正常的像素点,而与真实缺陷相邻的像素点通常也是缺陷像素点,因此,在检测过程中,当出现异常点后,利用第二阈值条件将所述周边像素点再次进行识别,所述第二阈值条件包含所述第一阈值条件,也即所述第一阈值条件对应的集合包含于所述第二阈值条件对应的集合中,这使得在周边像素点与正常像素点的差异较小的情况下,仍能被检出,从而能够在异常点周围检测出更多的缺陷像素点,相应能够更好地区分噪点和缺陷点,以精确判断所述异常点是否为真实的缺陷点,便于剔除噪点并保留缺陷点,相应降低了出现误检和漏检的概率,进而提高了检测结果的准确性。The pixels adjacent to the noise point are all normal pixels, and the pixels adjacent to the real defect are usually defective pixels. Therefore, in the detection process, when an abnormal point appears, the second threshold condition is used to convert the The surrounding pixels are identified again, the second threshold condition includes the first threshold condition, that is, the set corresponding to the first threshold condition is included in the set corresponding to the second threshold condition, which makes the surrounding pixels When the difference between normal pixels and normal pixels is small, it can still be detected, so that more defective pixels can be detected around abnormal points, and correspondingly, noise points and defective points can be better distinguished, so as to accurately judge the Whether the abnormal point is a real defect point is convenient for removing noise points and retaining defect points, correspondingly reducing the probability of false detection and missed detection, thereby improving the accuracy of detection results.

所述图像获取模块10用于获取待处理图像100,所述待处理图像100为需要进行检测的图像。作为一种示例,所述待处理图像100为需要进行缺陷检测的图像。The image acquisition module 10 is used to acquire an image to be processed 100, and the image to be processed 100 is an image to be detected. As an example, the image to be processed 100 is an image that requires defect detection.

本实施例中,所述待处理图像100是通过对待测物进行拍摄获得的图像。In this embodiment, the image to be processed 100 is an image obtained by photographing the object to be tested.

具体地,所述图像获取模块10包括成像系统,所述成像系统用于拍摄获取所述待测物的图像,作为待处理图像100。Specifically, the image acquisition module 10 includes an imaging system, and the imaging system is used to capture and acquire an image of the object under test as an image to be processed 100 .

所述待测物包括多个重复的单元结构,因此,所述待处理图像100包括多个相同的单元图像150。其中,所述待处理图像100为所述多个单元结构的图像,所述单元图像150为任一单元结构的图像。The object under test includes a plurality of repeated unit structures, therefore, the image to be processed 100 includes a plurality of identical unit images 150 . Wherein, the image to be processed 100 is an image of the plurality of unit structures, and the unit image 150 is an image of any unit structure.

需要说明的是,根据所述待测物中多个重复的单元结构的排列情况,所述单元图像呈周期性排列。It should be noted that, according to the arrangement of multiple repeated unit structures in the object under test, the unit images are arranged periodically.

如图2所示,作为一种示例,仅示出了九个单元图像150。具体地,所述九个单元图像150呈3*3的阵列排布。可以理解的是,所述单元图像150的数量不仅限于九个。As shown in FIG. 2, as an example, only nine unit images 150 are shown. Specifically, the nine unit images 150 are arranged in a 3*3 array. It can be understood that the number of the unit images 150 is not limited to nine.

相应的,所述检测系统的检测对象为所述待处理图像100中的各个单元图像150。Correspondingly, the detection object of the detection system is each unit image 150 in the image to be processed 100 .

本实施例中,所述待测物为晶圆(wafer),晶圆通常包含有多个重复的晶粒(die)。相应的,所述待处理图像100为晶圆图像,每个单元图像150可以包括一个晶粒或多个晶粒的图像。In this embodiment, the object under test is a wafer, and a wafer usually includes a plurality of repeated dies. Correspondingly, the image to be processed 100 is a wafer image, and each unit image 150 may include images of one die or multiple dies.

在其他实施例中,所述待测物还可以是玻璃面板等其他类型的产品。可以理解的是,玻璃面板也可以具有多个重复的单元结构。例如,每个单元结构可以用于形成电子产品显示屏。In other embodiments, the object under test may also be other types of products such as glass panels. It can be understood that the glass panel can also have multiple repeating unit structures. For example, each cell structure can be used to form a display screen of an electronic product.

还需要说明的是,图像的最小单位是像素(pixel),因此,所述待处理图像100具有多个像素点110。具体地,所述多个像素点110构成像素阵列。It should also be noted that the smallest unit of an image is a pixel (pixel), therefore, the image 100 to be processed has a plurality of pixel points 110 . Specifically, the plurality of pixel points 110 constitute a pixel array.

第一识别模块20用于对所述待处理图像100进行第一识别处理,以获得初始异常点200,从而为后续获取异常点做准备。The first identification module 20 is configured to perform a first identification process on the image to be processed 100 to obtain an initial abnormal point 200, so as to prepare for subsequent acquisition of abnormal points.

具体地,所述第一识别模块20利用第一阈值条件对所述待处理图像100进行第一识别处理。此处,第一阈值条件指的是:符合预设条件的像素点110的集合。所述第一阈值条件作为判断像素点110是否为初始异常点200的判断标准,也就是说,在像素点110符合第一阈值条件的情况下,则像素点110为初始异常点200。Specifically, the first recognition module 20 uses a first threshold condition to perform a first recognition process on the image to be processed 100 . Here, the first threshold condition refers to: a set of pixel points 110 meeting the preset condition. The first threshold condition is used as a criterion for judging whether the pixel point 110 is the initial abnormal point 200 , that is, if the pixel point 110 meets the first threshold value condition, the pixel point 110 is the initial abnormal point 200 .

作为一种示例,所述第一阈值条件用于判断所述像素点110的强度表征值是否异常。As an example, the first threshold condition is used to determine whether the intensity characteristic value of the pixel point 110 is abnormal.

本实施例中,所述强度表征值与灰度值或信噪比正相关。具体地,所述强度表征值包括灰度值或形成待处理图像100的像素点110的光强值或亮度值。In this embodiment, the intensity characteristic value is positively correlated with the gray value or the signal-to-noise ratio. Specifically, the intensity characteristic value includes a grayscale value or a light intensity value or a brightness value of the pixel point 110 forming the image 100 to be processed.

本实施例中,以所述强度表征值为灰度值作为示例进行描述。In this embodiment, the intensity characteristic value is described by taking the gray value as an example.

本实施例中,所述第一识别模块20包括:第一阈值设置单元,用于设置第一阈值条件;第一图像选取单元,用于获取待处理图像100;第二图像选取单元,用于获取参考图像;第一匹配单元,用于对所述参考图像与所述待处理图像100进行匹配处理,使所述待处理图像与所述参考图像匹配区域的像素点一一对应;第一比较单元,用于将所述参考图像与所述待处理图像100进行比较,获取所述参考图像与所述待处理图像100中相对应像素点的强度表征值之间的第一差异值;第二比较单元,用于比较所述第一差异值与第一阈值,获取所述第一差异值大于第一阈值的待处理图像的像素点作为第一差异点;第一异常点获取单元,用于利用所述第一差异点获取初始异常点200。In this embodiment, the first identification module 20 includes: a first threshold setting unit, configured to set a first threshold condition; a first image selection unit, configured to obtain an image to be processed 100; a second image selection unit, configured to Acquiring a reference image; a first matching unit, configured to perform matching processing on the reference image and the image to be processed 100, so that the pixels of the image to be processed and the matching area of the reference image correspond one-to-one; the first comparison A unit, configured to compare the reference image with the image to be processed 100, and obtain a first difference value between intensity representation values of corresponding pixels in the reference image and the image to be processed 100; second A comparison unit, configured to compare the first difference value with a first threshold, and acquire pixels of the image to be processed whose first difference value is greater than the first threshold as a first difference point; a first abnormal point acquisition unit, configured to The initial outlier point 200 is obtained by using the first difference point.

所述参考图像作为对待处理图像100中的像素点110进行识别处理时的比较基准,通过比较所述待处理图像100和参考图像中相对应像素点的强度表征值之间的第一差异值,从而判断待测图像151中是否存在初始异常点200。The reference image is used as a reference for comparison when performing recognition processing on the pixel points 110 in the image to be processed 100, by comparing the first difference value between the intensity characteristic values of the corresponding pixel points in the image to be processed 100 and the reference image, Therefore, it is determined whether there is an initial abnormal point 200 in the image to be tested 151 .

本实施例中,所述第一阈值条件至少包括:所述第一差异值大于第一阈值,因此,获取所述第一差异值大于第一阈值的待处理图像的像素点作为第一差异点。In this embodiment, the first threshold condition at least includes: the first difference value is greater than the first threshold, therefore, acquire the pixels of the image to be processed whose first difference value is greater than the first threshold as the first difference point .

本实施例中,所述第一识别模块20用于对各个所述单元图像150进行所述第一识别处理,获取各个单元图像150的初始异常点200,且将前待测的所述单元图像150作为待测图像151,将所述待测图像151周围的多个所述单元图像作为参考图像152。In this embodiment, the first recognition module 20 is used to perform the first recognition process on each of the unit images 150, acquire the initial abnormal point 200 of each unit image 150, and compare the unit images to be tested 150 is used as an image to be tested 151 , and a plurality of unit images around the image to be tested 151 are used as reference images 152 .

相应的,所述第一匹配单元,用于对所述参考图像152与所述待测图像151进行匹配处理;所述第一比较单元,用于将所述参考图像152与所述待测图像151进行比较,获取所述参考图像152与所述待测图像151中相对应像素点的强度表征值之间的第一差异值。Correspondingly, the first matching unit is configured to perform matching processing on the reference image 152 and the image-to-be-tested 151; the first comparison unit is configured to match the reference image 152 to the image-to-be-tested 151 to compare and obtain a first difference value between the intensity characteristic values of corresponding pixels in the reference image 152 and the image-to-be-tested 151 .

此处,所述待测图像151与所述参考图像152中相对应像素点指的是:所述待测图像151与所述参考图像152中相同位置处的像素点。Here, the corresponding pixel points in the image-to-be-test 151 and the reference image 152 refer to: the pixel points at the same position in the image-to-be-test 151 and the reference image 152 .

所述参考图像152作为对所述待测图像151进行识别处理时的比较基准,通过比较所述待测图像151和参考图像152中相对应像素点的强度表征值之间的差异,从而判断待测图像151中是否存在异常点200。The reference image 152 is used as a reference for comparison when performing recognition processing on the image to be tested 151, and by comparing the difference between the intensity characteristic values of corresponding pixels in the image to be tested 151 and the reference image 152, it is judged that Check whether there is an abnormal point 200 in the image 151.

所述参考图像152和待测图像151位于同一待处理图像100中,也就是说,所述参考图像152和待测图像151来自于相同的待测物,从而避免因不同待测物之间平均强度表征值差异大的问题,而对检测结果的准确性产生不良影响,相应有利于提高检测结果的准确性。The reference image 152 and the image to be tested 151 are located in the same image to be processed 100, that is, the reference image 152 and the image to be tested 151 are from the same object to be tested, thereby avoiding the average The problem of large differences in intensity characterization values will have a negative impact on the accuracy of the test results, and it will be beneficial to improve the accuracy of the test results.

具体地,与所述待测图像151紧邻的多个所述单元图像作为参考图像152。如图4所示,作为一种示例,所述参考图像152的数量为8个,所述参考图像152和待测图像151呈3*3的阵列排布。Specifically, a plurality of unit images adjacent to the image-to-be-tested 151 serve as reference images 152 . As shown in FIG. 4 , as an example, the number of the reference images 152 is 8, and the reference images 152 and the images to be tested 151 are arranged in a 3*3 array.

在其他实施例中,第二图像选取单元也可以选用标准图像作为参考图像。相应的,所述第一匹配单元通过基于标准图像的匹配方式,使所述待处理图像与所述参考图像匹配区域的像素点一一对应。In other embodiments, the second image selection unit may also select a standard image as the reference image. Correspondingly, the first matching unit makes a one-to-one correspondence between the image to be processed and the pixels in the matching area of the reference image by means of matching based on a standard image.

标准图像是对一个与待测物一致的参考物进行拍摄获得的图像。可以理解的是,标准图像与待处理图像并非位于同一图像上。其中,标准图像可以包括CAD图或无缺陷的测量图像。The standard image is an image obtained by shooting a reference object that is consistent with the object to be measured. It can be understood that the standard image and the image to be processed are not located on the same image. Wherein, the standard image may include a CAD drawing or a defect-free measurement image.

当采用标准图像作为参考图像时,所述第一匹配单元用于进行匹配区域获取步骤。具体地,所述第一匹配单元用于获取待处理图像中与参考图像匹配度最高或大于预设值的区域,得到匹配区域,所述参考图像的各像素点与所述匹配区域的像素点具有一一对应的关系。When a standard image is used as a reference image, the first matching unit is configured to perform a step of acquiring a matching area. Specifically, the first matching unit is used to obtain the area in the image to be processed that has the highest matching degree with the reference image or greater than a preset value to obtain the matching area, and each pixel point of the reference image and the pixel point of the matching area have a one-to-one relationship.

具体的,匹配度最高指的是:所述匹配区域的各像素点与所述参考图像的各像素点之间的强度表征值的方差、标准差或绝对值最小;匹配度大于预设值指的是:所述匹配区域的各像素点与所述参考图像的各像素点之间的强度表征值的方差、标准差或绝对值小于预设值。其中,所述匹配区域的像素点与所述参考图像的对应像素点的强度表征值之差为像素差,强度表征值的方差指的是:所述像素差的平方和。Specifically, the highest matching degree refers to: the variance, standard deviation or absolute value of the intensity characteristic value between each pixel point of the matching area and each pixel point of the reference image is the smallest; the matching degree is greater than the preset value means It is: the variance, standard deviation or absolute value of the intensity characteristic value between each pixel point of the matching area and each pixel point of the reference image is smaller than a preset value. Wherein, the difference between the intensity characteristic value of the pixel in the matching area and the corresponding pixel in the reference image is a pixel difference, and the variance of the intensity characteristic value refers to: the sum of the squares of the pixel difference.

本实施例中,所述待处理图像包括多个相同的单元图像,所述参考图像为一个单元图像的标准图像,因此,所述第一匹配单元用于重复所述匹配区域获取步骤,在所述待处理图像中获取多个匹配区域,所述匹配区域的个数与所述单元图像的个数相同。In this embodiment, the image to be processed includes a plurality of identical unit images, and the reference image is a standard image of a unit image, therefore, the first matching unit is used to repeat the step of obtaining the matching area, and in the Acquiring multiple matching regions from the image to be processed, the number of the matching regions is the same as the number of the unit images.

例如,选取与所述待测物相同的参考物,所述参考物也具有多个单元结构,所述第二图像选取单元获取所述参考物的图像,并在所述参考物的图像上选取合格的单元结构图像,作为参考图像。例如,先选取一个合格的晶圆的图像,在选取的晶圆的图像上选取部分合格的晶粒图像,作为参考图像。For example, selecting the same reference object as the object to be tested, the reference object also has a plurality of unit structures, the second image selection unit acquires the image of the reference object, and selects the reference object on the image of the reference object Qualified cell structure image, as a reference image. For example, an image of a qualified wafer is selected first, and part of the images of qualified grains are selected on the image of the selected wafer as a reference image.

相应的,若选用标准图像作为参考图像,则所述第一比较单元用于将每个单元图像与参考图像进行比较。Correspondingly, if a standard image is selected as the reference image, the first comparison unit is used to compare each unit image with the reference image.

本实施例中,所述第一异常点获取单元包括:第一差异数量获取子单元,用于获取第一差异点的个数,得到第一差异数量;第一筛选子单元,用于在所述第一差异数量大于或等于预设数量的情况下,判定当前检测的像素点为初始异常点200。In this embodiment, the first abnormal point acquisition unit includes: a first difference quantity acquisition subunit, configured to acquire the number of the first difference points, to obtain the first difference quantity; a first screening subunit, configured to When the first difference amount is greater than or equal to the preset amount, it is determined that the currently detected pixel point is the initial abnormal point 200.

相应的,所述第一阈值条件还包括:所述第一差异数量大于或等于预设数量。Correspondingly, the first threshold condition further includes: the first difference quantity is greater than or equal to a preset quantity.

需要说明的是,此处的预设数量的最小值为一个,最大值为所述待测图像151相对应的参考图像152的总数量,预设数量可以根据实际需求进行设定。It should be noted that the minimum value of the preset number here is one, and the maximum value is the total number of reference images 152 corresponding to the image-to-be-tested 151 , and the preset number can be set according to actual needs.

还需要说明的是,在其他实施例中,所述第一异常点获取单元也可以直接将所述第一差异点作为初始异常点。It should also be noted that, in other embodiments, the first abnormal point obtaining unit may also directly use the first difference point as an initial abnormal point.

所述第一比较单元比较所述待测图像151与所述参考图像152时,将所述待测图像151的像素点110的灰度值,与参考图像152的对应像素点的灰度值比较,从而获取所述待测图像151与所述参考图像152相对应像素点的灰度之间的第一差异值。When the first comparing unit compares the image-to-be-tested 151 with the reference image 152, it compares the grayscale value of the pixel 110 of the image-to-be-tested 151 with the grayscale value of the corresponding pixel of the reference image 152 , so as to obtain the first difference value between the gray levels of corresponding pixels in the image-to-be-test 151 and the reference image 152 .

此处,所述灰度之间的第一差异值指的是:所述待测图像151与所述参考图像152相对应像素点的灰度差值的绝对值。Here, the first difference value between the gray levels refers to the absolute value of the difference between the gray levels of the pixels corresponding to the image-to-be-tested 151 and the reference image 152 .

本实施例中,所述第一阈值与所述待处理图像100的清晰度正相关。图像的清晰度越高,则轮廓边缘灰度变化越明显,层次感越强,因此,为了能够将异常点200筛选出来,所述第一阈值的值相应更大。In this embodiment, the first threshold is positively correlated with the definition of the image 100 to be processed. The higher the definition of the image, the more obvious the grayscale change of the contour edge, and the stronger the sense of hierarchy. Therefore, in order to filter out the abnormal points 200, the value of the first threshold is correspondingly larger.

具体地,图像的清晰度与灰度梯度相关,因此,所述第一阈值设置单元通过所述灰度梯度,获取第一阈值。Specifically, the sharpness of the image is related to the grayscale gradient, therefore, the first threshold setting unit acquires the first threshold through the grayscale gradient.

需要说明的是,后续对所述周边像素点进行第二识别处理,判断所述周边像素点是否满足第二阈值条件,将满足所述第二阈值条件的周边像素点作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件,因此,第二阈值条件与第一阈值条件具有相关性。It should be noted that, subsequently, the second identification process is performed on the surrounding pixels to determine whether the surrounding pixels meet the second threshold condition, and the surrounding pixels satisfying the second threshold condition are regarded as defective pixels, and the The second threshold condition includes the first threshold condition, therefore, the second threshold condition is correlated with the first threshold condition.

本实施例中,通过初始阈值,来获得第一阈值和第二阈值。In this embodiment, the first threshold and the second threshold are obtained through the initial threshold.

因此,所述检测系统还包括:初始阈值获取模块60,用于获取初始阈值。Therefore, the detection system further includes: an initial threshold acquisition module 60, configured to acquire an initial threshold.

本实施例中,所述初始阈值获取模块60包括:第一梯度获取单元,用于获取所述待处理图像100中各个像素点110的灰度梯度;第二梯度获取单元,用于获取所述待处理图像100的灰度梯度的平均值,将所述灰度梯度的平均值作为初始阈值。In this embodiment, the initial threshold acquisition module 60 includes: a first gradient acquisition unit, configured to acquire the gray gradient of each pixel point 110 in the image to be processed 100; a second gradient acquisition unit, configured to acquire the The average value of the gray gradient of the image 100 to be processed is used as the initial threshold.

本实施例中,所述第一阈值设置单元用于基于所述初始阈值增加预设偏移量,获得所述第一阈值。在另一些实施例中,也可以为:所述第一阈值设置单元用于将所述初始阈值作为第一阈值。在其他实施例中,也可以为:所述第一阈值设置单元用于使第二阈值与第二比例因子相乘,获得所述第一阈值。In this embodiment, the first threshold setting unit is configured to increase a preset offset based on the initial threshold to obtain the first threshold. In some other embodiments, it may also be: the first threshold setting unit is configured to use the initial threshold as the first threshold. In other embodiments, it may also be that: the first threshold setting unit is configured to multiply the second threshold by a second scaling factor to obtain the first threshold.

需要说明的是,任一像素点110在X方向和Y方向均具有相对应的灰度梯度,因此,作为一种示例,所述像素点的灰度梯度的关系式包括:It should be noted that any pixel point 110 has a corresponding grayscale gradient in the X direction and Y direction, therefore, as an example, the relational expression of the grayscale gradient of the pixel point includes:

Figure BDA0003265315710000231
Figure BDA0003265315710000231

其中,M(x,y)表示所述像素点110的灰度梯度,gx表示所述像素点110在X方向上的梯度,gy表示所述像素点110在Y方向上的梯度,所述X方向为像素阵列的行方向,所述Y方向为像素阵列的列方向。Wherein, M(x, y) represents the gray gradient of the pixel point 110, gx represents the gradient of the pixel point 110 in the X direction, gy represents the gradient of the pixel point 110 in the Y direction, and the X The direction is the row direction of the pixel array, and the Y direction is the column direction of the pixel array.

还需要说明的是,所述第一阈值对应的预设偏移量不宜过小,也不宜过大。如果所述预设偏移量过小,则在进行第一识别处理时,容易导致误检率变高,也即容易将正常的像素点110归为初始异常点200,从而导致初始异常点200的数量过多,进而增加后续根据所述初始异常点获取异常点、以及第二识别处理的数据处理量;如果所述预设偏移量过大,则容易增大漏检的概率。为此,本实施例中,所述预设偏移量为3至5。It should also be noted that the preset offset corresponding to the first threshold should not be too small, nor should it be too large. If the preset offset is too small, it is easy to cause the false detection rate to become high when performing the first identification process, that is, it is easy to classify the normal pixel point 110 as the initial abnormal point 200, resulting in the initial abnormal point 200 If the number is too large, the amount of subsequent data processing for obtaining abnormal points according to the initial abnormal points and the second identification process will be increased; if the preset offset is too large, the probability of missed detection will easily increase. Therefore, in this embodiment, the preset offset is 3-5.

此外,图5中仅示意了一个像素点110为初始异常点200,但初始异常点200不仅限于一个像素点。例如,在其他实施例中,在第一识别处理后,获得多个初始异常点,且存在多个初始异常点相连的情况。In addition, only one pixel point 110 is shown as the initial abnormal point 200 in FIG. 5 , but the initial abnormal point 200 is not limited to one pixel point. For example, in other embodiments, after the first identification process, multiple initial abnormal points are obtained, and there is a situation that multiple initial abnormal points are connected.

异常点获取模块70用于根据所述初始异常点200获取异常点250。The abnormal point obtaining module 70 is used for obtaining the abnormal point 250 according to the initial abnormal point 200 .

后续通过对异常点250进一步的识别,以判断所述异常点250是否为缺陷点或噪点。Subsequently, by further identifying the abnormal point 250, it is judged whether the abnormal point 250 is a defect point or a noise point.

本实施例中,所述异常点获取模块70包括:连通域判断单元,用于对所述待处理图像100中的初始异常点200进行连通域判断,获取连通域(Connected Component),同一连通域中的每个初始异常点200均具有相邻的初始异常点200,且连通域内与连通域外的初始异常点200相互分离;第三筛选子单元,用于在所述连通域内的初始异常点200个数大于或等于预设数量的情况下,判定所述连通域内的初始异常点200作为缺陷点,在所述连通域内的初始异常点200个数小于预设数量的情况下,判定所述连通域作为所述异常点250。In this embodiment, the abnormal point acquisition module 70 includes: a connected domain judgment unit, configured to perform connected domain judgment on the initial abnormal point 200 in the image to be processed 100, and obtain a connected component (Connected Component), the same connected domain Each initial outlier point 200 in has adjacent initial outlier points 200, and the initial outlier points 200 in the connected domain and outside the connected domain are separated from each other; the third screening subunit is used for the initial outlier points 200 in the connected domain When the number is greater than or equal to the preset number, determine the initial abnormal point 200 in the connected domain as a defect point; domain as the outlier 250.

多个符合特定条件且相连的像素点110构成的集合,称为一个连通域。具体到本实施例中,所述特定条件即为满足第一阈值条件。A collection of multiple connected pixel points 110 meeting certain conditions is called a connected domain. Specifically in this embodiment, the specific condition is to meet the first threshold condition.

后续采用第二识别处理的方式,对异常点250进行复检,因此,通过先进行连通域判断,从而确定后续是否需要进行第二识别处理。The outlier point 250 is rechecked in the second identification process. Therefore, it is determined whether the second identification process needs to be performed by first performing connected domain judgment.

具体地,在难以确定所述初始异常点200的类型是缺陷点还是异常点250的情况下,先进行连通域判断,从而在所述连通域内的初始异常点200个数大于或等于预设数量的情况下,既可确定所述初始异常点200为缺陷点,则后续无需再选取周边像素点并进行第二识别处理,从而能够选择性地在所述连通域内的初始异常点200个数小于预设数量的情况下,对所述异常点250进行复检,从而在提高检测结果的准确性的同时,提高检测效率。Specifically, in the case where it is difficult to determine whether the type of the initial outlier 200 is a defect point or an outlier 250, the connected domain is judged first, so that the number of initial outlier points 200 in the connected domain is greater than or equal to the preset number In the case of , it can be determined that the initial abnormal point 200 is a defect point, and then there is no need to select surrounding pixels and perform the second identification process, so that the number of initial abnormal points 200 in the connected domain can be selectively less than In the case of a preset number, the abnormal points 250 are re-inspected, thereby improving the detection efficiency while improving the accuracy of the detection results.

本实施例中,所述连通域判断包括四连通域判断或八连通域判断。其中,四连通域判断指的是:判断任一初始异常点200周围是否具有4个相邻的初始异常点200;八连通域判断指的是:判断任一初始异常点200周围是否具有8个相邻的初始异常点200。In this embodiment, the determination of connected domains includes determination of four connected domains or determination of eight connected domains. Among them, the four-connected domain judgment refers to: judging whether there are 4 adjacent initial abnormal points 200 around any initial abnormal point 200; the eight-connected domain judgment refers to: judging whether there are 8 adjacent initial abnormal points 200 Adjacent initial outliers 200.

在所述连通域内的初始异常点200个数大于或等于预设数量的情况下,所述连通域内的初始异常点200作为缺陷点,在所述连通域内的初始异常点200个数小于预设数量的情况下,所述连通域作为所述异常点250,而噪点的像素尺寸通常较小,因此,如果所述预设数量过大,则在连通域判断时,容易把缺陷点误判为异常点250,从而进行不必要的后续操作。因此,本实施例中,所述预设数量为1个至5个。When the number of 200 initial abnormal points in the connected domain is greater than or equal to the preset number, the initial abnormal points 200 in the connected domain are used as defect points, and the number of 200 initial abnormal points in the connected domain is less than the preset number In the case of a large number, the connected domain is used as the abnormal point 250, and the pixel size of the noise point is usually small. Therefore, if the preset number is too large, it is easy to misjudge the defective point as the abnormal point when judging the connected domain. Abnormal point 250, so unnecessary follow-up operations are performed. Therefore, in this embodiment, the preset number is 1 to 5.

如图5所示,作为一种示例,所述预设数量为一个。相应的,在所述初始异常点200为孤立的一个像素点110的情况下,将所述初始异常点200作为所述异常点250,否则将所述初始异常点200作为缺陷点。噪点的像素尺寸通常较小,通常为一个像素点,因此,通过将预设数量设置为一个,有利于精确获得所述异常点250,减小后续操作的运算量。As shown in FIG. 5 , as an example, the preset number is one. Correspondingly, if the initial outlier point 200 is an isolated pixel point 110, the initial outlier point 200 is taken as the outlier point 250; otherwise, the initial outlier point 200 is taken as a defect point. The pixel size of the noise point is generally small, usually one pixel point, therefore, by setting the preset number to one, it is beneficial to accurately obtain the abnormal point 250 and reduce the computation load of subsequent operations.

需要说明的是,在所述连通域内的初始异常点个数小于预设数量的情况下,判定所述连通域作为所述异常点,指的是将所述连通域内的所有初始异常点作为一个异常点。It should be noted that, when the number of initial outliers in the connected domain is less than the preset number, determining the connected domain as the outlier refers to taking all the initial outliers in the connected domain as one Outlier.

在其他实施例中,所述异常点获取模块则包括:临近点获取子单元,用于获取与所述初始异常点相邻的像素点作为临近点,所述临近点的数量为一个或多个;第四筛选子单元,用于判断每个临近点是否为初始异常点,且在各临近点均不是初始异常点的情况下,将所述初始异常点作为异常点。In other embodiments, the abnormal point acquisition module includes: an adjacent point acquisition subunit, configured to acquire pixel points adjacent to the initial abnormal point as adjacent points, and the number of the adjacent points is one or more ; The fourth screening subunit is used to judge whether each adjacent point is an initial abnormal point, and if none of the adjacent points is an initial abnormal point, take the initial abnormal point as an abnormal point.

具体地,所述临近点的数量可以是四个或八个。在所述临近点的数量为四个的情况下,所述初始异常点与所述临近点呈十字形布局或X型布局,在所述临近点的数量为八个的情况下,所述初始异常点与所述临近点呈3*3阵列布局。Specifically, the number of the adjacent points may be four or eight. When the number of the adjacent points is four, the initial abnormal point and the adjacent points are in a cross-shaped layout or an X-shaped layout; when the number of the adjacent points is eight, the initial abnormal point The abnormal points and the adjacent points are arranged in a 3*3 array.

像素点选取模块30用于选取一个或多个与所述异常点250相邻的像素点110作为周边像素点300。The pixel point selection module 30 is used to select one or more pixel points 110 adjacent to the abnormal point 250 as surrounding pixel points 300 .

第二识别模块40对所述周边像素点300进行第二识别处理,从而实现对异常点200的复检。The second identification module 40 performs a second identification process on the surrounding pixel points 300 , so as to realize the re-examination of the abnormal points 200 .

噪点的像素尺寸通常较小(例如,一个噪点的像素尺寸为一个像素点),这导致区分缺陷和噪点的难度较大。但是,与噪点相邻的像素点均为正常的像素点,与真实缺陷相邻的像素点通常也是缺陷像素点,因此,在检测过程中,当出现异常点250后,利用第二阈值条件将所述周边像素点300再次进行识别,所述第二阈值条件包含所述第一阈值条件,也即所述第一阈值条件对应的集合包含于所述第二阈值条件对应的集合中,这使得在周边像素点300与正常像素点的差异较小的情况下,仍能被检出,从而能够在异常点250周围检测出更多的缺陷像素点,相应能够更好地区分噪点和缺陷点,以精确判断所述异常点250是否为真实的缺陷点,便于剔除噪点并保留缺陷点,相应降低了出现误检和漏检的概率,进而提高了检测结果的准确性。The pixel size of noise is usually small (for example, the pixel size of one noise is one pixel), which makes it difficult to distinguish defects from noise. However, the pixels adjacent to the noise point are all normal pixels, and the pixels adjacent to the real defect are usually also defective pixels. Therefore, in the detection process, when abnormal points 250 appear, the second threshold condition is used to The surrounding pixel points 300 are identified again, the second threshold condition includes the first threshold condition, that is, the set corresponding to the first threshold condition is included in the set corresponding to the second threshold condition, which makes In the case where the difference between the surrounding pixel 300 and the normal pixel is small, it can still be detected, so that more defective pixels can be detected around the abnormal point 250, and correspondingly, noise points and defective points can be better distinguished. By accurately judging whether the abnormal point 250 is a real defect point, it is convenient to eliminate noise points and retain the defect points, correspondingly reducing the probability of false detection and missed detection, thereby improving the accuracy of detection results.

本实施例中,通过选取与为与所述异常点250紧邻的像素点110作为周边像素点300,使所述周边像素点300的检测结果与异常点250的相关性更高,从而提高后续第二识别处理的检测结果的准确性。In this embodiment, by selecting the pixel point 110 close to the abnormal point 250 as the surrounding pixel point 300, the correlation between the detection result of the surrounding pixel point 300 and the abnormal point 250 is higher, thereby improving the subsequent 2. The accuracy of the detection results of the identification process.

本实施例中,所述像素点选取模块30用于选择与所述异常点250的边缘和/或顶角相邻的像素点110作为周边像素点300。具体的,所述周边像素点300的数量为8个,且所述周边像素点300与所述异常点250构成3*3的像素阵列。也就是说,所述异常点250为所述3*3像素阵列中的中心像素点,所述周边像素点300为与所述异常点250紧邻的像素点110。所述异常点250为所述3*3像素阵列中的中心像素点,因此,通过选取8个周边像素点300,有利于提高第二识别处理的结果准确性。In this embodiment, the pixel point selection module 30 is used to select the pixel points 110 adjacent to the edge and/or vertex corner of the abnormal point 250 as surrounding pixel points 300 . Specifically, the number of the surrounding pixel points 300 is 8, and the surrounding pixel points 300 and the abnormal point 250 form a 3*3 pixel array. That is to say, the abnormal point 250 is the central pixel point in the 3*3 pixel array, and the surrounding pixel point 300 is the pixel point 110 next to the abnormal point 250 . The abnormal point 250 is the central pixel point in the 3*3 pixel array, therefore, by selecting 8 surrounding pixel points 300, it is beneficial to improve the result accuracy of the second recognition process.

在其他实施例中,所述周边像素点的数量为4个,且所述周边像素点与所述异常点呈十字形布局或X型布局。In other embodiments, the number of surrounding pixel points is four, and the surrounding pixel points and the abnormal point are in a cross-shaped layout or an X-shaped layout.

需要说明的是,在所述异常点获取模块70的第三筛选子单元中,在所述连通域内的初始异常点200个数小于预设数量的情况下,判定所述连通域作为所述异常点250。其中,当所述预设数量为多个时,判定所述连通域作为所述异常点250指的是:将所述连通域内的所有初始异常点200作为一个异常点250。相应的,所述像素点选取模块30用于选择与所述异常点250的边缘和/或顶角相邻的像素点110作为周边像素点300,则所述异常点250的周边像素点300个数可以大于8个,例如,当异常点250包括两个初始异常点200时,周边像素点300的个数为10个或6个。It should be noted that, in the third screening subunit of the abnormal point acquisition module 70, when the number of initial abnormal points in the connected domain is less than 200, the connected domain is determined as the abnormal point. 250 points. Wherein, when the preset number is multiple, determining the connected domain as the outlier point 250 refers to: taking all initial outlier points 200 in the connected domain as one outlier point 250 . Correspondingly, the pixel point selection module 30 is used to select the pixel points 110 adjacent to the edge and/or vertex corner of the abnormal point 250 as the surrounding pixel points 300, and the surrounding pixel points of the abnormal point 250 are 300 The number may be greater than 8, for example, when the outlier 250 includes two initial outliers 200, the number of surrounding pixels 300 is 10 or 6.

还需要说明的是,在其他实施例中,当通过获取与初始异常点相邻的像素点作为临近点,来获取异常点时,则所述像素点选取模块用于将所述初始异常点的临近点作为所述初始异常点的所述周边像素点。It should also be noted that, in other embodiments, when the abnormal point is obtained by obtaining pixels adjacent to the initial abnormal point as adjacent points, the pixel point selection module is used to use the initial abnormal point Adjacent points are used as the surrounding pixel points of the initial abnormal point.

第二识别模块40用于对所述周边像素点300进行第二识别处理,将满足第二阈值条件的周边像素点300作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件;判断模块50,用于在所述周边像素点300中存在缺陷像素点的情况下,判定所述异常点200为缺陷点,在所述周边像素点300中不存在缺陷像素点的情况下,判定所述异常点200为噪点。The second identification module 40 is configured to perform a second identification process on the surrounding pixels 300, and use the surrounding pixels 300 satisfying a second threshold condition as defective pixels, the second threshold condition including the first threshold condition; The judging module 50 is configured to determine that the abnormal point 200 is a defective point when there is a defective pixel point in the surrounding pixel point 300, and determine that the abnormal point 200 is a defective point when there is no defective pixel point in the surrounding pixel point 300. The abnormal points 200 are noise points.

此处,第二阈值条件指的是:符合预设条件的周边像素点300的集合。Here, the second threshold condition refers to: a set of surrounding pixel points 300 meeting the preset condition.

所述第二阈值条件作为判断周边像素点300是否为缺陷像素点的判断标准,也就是说,在周边像素点300符合所述第二阈值条件情况下,所述周边像素点300作为缺陷像素点。The second threshold condition is used as a criterion for judging whether the surrounding pixel point 300 is a defective pixel point, that is, if the surrounding pixel point 300 meets the second threshold value condition, the surrounding pixel point 300 is regarded as a defective pixel point .

本实施例中,所述第二阈值条件包含所述第一阈值条件,也即所述第一阈值条件对应的集合包含于所述第二阈值条件对应的集合中,从而使得第二识别处理检测出的与正常像素点之间具有差异的像素点数量变多。In this embodiment, the second threshold condition includes the first threshold condition, that is, the set corresponding to the first threshold condition is included in the set corresponding to the second threshold condition, so that the second identification process detects The number of pixels that are different from normal pixels is increased.

如果所述异常点200为缺陷点,则位于所述异常点200周围的周边像素点300与正常的像素点110之间通常也是具有差异的,但差异较小,而噪点周围的像素点均为正常的像素点,因此,利用第二阈值条件进行第二识别处理,如果所述异常点200为缺陷点,则如图7(a)所示,在第二识别处理后,还能够在所述异常点200周围再检出一个或多个缺陷像素点,例如,图7(a)示出了在所述异常点200周围的两个周边像素点300被检出为缺陷像素点的情况,而如果所述异常点200为噪点,则如图7(b)所示,在第二识别处理后,所述异常点200周围未能再检测出缺陷像素点,从而对所述异常点200的真实类型进行区分,即区分噪点和缺陷点,以便后续将噪点剔除,并保留缺陷点。If the abnormal point 200 is a defect point, there is usually a difference between the surrounding pixel points 300 around the abnormal point 200 and the normal pixel points 110, but the difference is small, and the pixels around the noise point are all Normal pixels, therefore, use the second threshold condition to carry out the second identification process, if the abnormal point 200 is a defect point, as shown in Figure 7 (a), after the second identification process, it can also be in the One or more defective pixel points are detected around the abnormal point 200. For example, FIG. If the abnormal point 200 is a noise point, as shown in FIG. 7(b), after the second identification process, no defective pixel points can be detected around the abnormal point 200, so that the true value of the abnormal point 200 Types are distinguished, that is, noise points and defect points are distinguished, so that the noise points can be removed later and the defect points can be retained.

本实施例中,所述第二识别模块40包括:第二阈值设置单元,用于设置第二阈值;第三图像选取单元,用于获取参考图像;第二匹配单元,用于对所述参考图像与所述待处理图像100进行匹配处理,使所述待处理图像与所述参考图像匹配区域的像素点一一对应;第三比较单元,用于将所述周边像素点300与所述参考图像中相对应像素点进行比较,获取所述周边像素点300与所述参考图像152中相对应像素点的强度表征值之间的第二差异值;第四比较单元,用于比较所述第二差异值与第二阈值,获取所述第二差异值大于第二阈值的周边像素点300作为第二差异点;第二异常点获取单元,用于利用所述第二差异点获取缺陷像素点。In this embodiment, the second identification module 40 includes: a second threshold setting unit for setting a second threshold; a third image selection unit for acquiring a reference image; a second matching unit for matching the reference The image is matched with the image to be processed 100, so that the pixels in the matching area of the image to be processed and the reference image are in one-to-one correspondence; the third comparison unit is used to compare the surrounding pixels 300 with the reference Comparing corresponding pixel points in the image to obtain a second difference value between the intensity representation values of the surrounding pixel point 300 and the corresponding pixel point in the reference image 152; the fourth comparison unit is used to compare the first Two difference values and a second threshold value, acquiring peripheral pixel points 300 whose second difference values are greater than the second threshold value as second difference points; a second abnormal point acquisition unit, configured to use the second difference points to obtain defective pixel points .

相应的,本实施例中,所述第二阈值条件至少包括:所述第二差异值大于第二阈值,其中,所述第二阈值小于所述第一阈值。Correspondingly, in this embodiment, the second threshold condition at least includes: the second difference value is greater than a second threshold, wherein the second threshold is smaller than the first threshold.

本实施例中,通过使所述第二阈值小于所述第一阈值,从而使得所述第二阈值条件包含所述第一阈值条件。In this embodiment, by making the second threshold smaller than the first threshold, the second threshold condition includes the first threshold condition.

具体地,所述第二异常点获取单元包括:第二差异数量获取子单元,用于获取所述第二差异点的个数,得到第二差异数量,第二筛选子单元,用于在所述第二差异数量大于或等于预设数量的情况下,判定当前检测的周边像素点300为缺陷像素点。Specifically, the second abnormal point acquisition unit includes: a second difference number acquisition subunit, configured to acquire the number of the second difference points to obtain a second difference number, and a second screening subunit, used to obtain the second difference number in the In the case where the second difference quantity is greater than or equal to the preset quantity, it is determined that the currently detected surrounding pixel point 300 is a defective pixel point.

相应的,所述第二阈值条件还包括:所述第二差异数量大于或等于预设数量。Correspondingly, the second threshold condition further includes: the second difference quantity is greater than or equal to a preset quantity.

此处的预设数量的最小值为一个,最大值为当前待测的周边像素点300相对应的参考图像152的总数量,预设数量可以根据实际需求进行设定。Here, the minimum value of the preset number is one, and the maximum value is the total number of reference images 152 corresponding to the current surrounding pixel point 300 to be measured. The preset number can be set according to actual needs.

需要说明的是,在其他实施例中,所述第二异常点获取单元也可以直接将第二差异点作为缺陷像素点。It should be noted that, in other embodiments, the second abnormal point obtaining unit may also directly use the second difference point as a defective pixel point.

还需要说明的是,第二识别模块40所识别的待测图像151即为所述异常点200所在的单元图像150。It should also be noted that the image to be tested 151 recognized by the second recognition module 40 is the unit image 150 where the abnormal point 200 is located.

本实施例中,所述第二阈值与所述待处理图像100的清晰度正相关。In this embodiment, the second threshold is positively correlated with the definition of the image 100 to be processed.

本实施例中,所述第一阈值设置单元用于基于所述初始阈值增加预设偏移量,获得所述第一阈值,所述第二阈值设置单元用于基于所述初始阈值增加预设偏移量,获得所述第二阈值,所述第一阈值对应的预设偏移量与所述第二阈值对应的预设偏移量不相同。In this embodiment, the first threshold setting unit is configured to increase a preset offset based on the initial threshold to obtain the first threshold, and the second threshold setting unit is configured to increase a preset offset based on the initial threshold The offset is to obtain the second threshold, and the preset offset corresponding to the first threshold is different from the preset offset corresponding to the second threshold.

具体地,所述第二阈值小于所述第一阈值,从而使所述第二阈值条件包含所述第一阈值条件。Specifically, the second threshold is smaller than the first threshold, so that the second threshold condition includes the first threshold condition.

在另一些实施例中,也可以为:在所述第一阈值设置单元用于将所述初始阈值作为第一阈值的情况下,所述第二阈值设置单元用于使所述第一阈值与第一比例因子相乘,获得所述第二阈值。在其他实施例中,也可以为:在所述第一阈值设置单元用于使第二阈值与第二比例因子相乘,以获得所述第一阈值的情况下,所述第二阈值设置单元用于将所述初始阈值作为第二阈值。In other embodiments, it may also be: when the first threshold setting unit is used to set the initial threshold as the first threshold, the second threshold setting unit is used to set the first threshold and The first scaling factor is multiplied to obtain the second threshold. In other embodiments, it may also be: when the first threshold setting unit is used to multiply the second threshold by a second scaling factor to obtain the first threshold, the second threshold setting unit Used to use the initial threshold as the second threshold.

需要说明的是,在所述第二阈值小于所述第一阈值的情况下,所述第二阈值与所述第一阈值的比值不宜过小,也不宜过大。如果所述第二阈值与所述第一阈值的比值过小,则容易导致所述第二阈值过小,则在进行第二识别处理时,容易导致误检率变高,也就是说,容易将正常的周边像素点300归为缺陷像素点,从而容易误将异常点200归为缺陷点;如果所述第二阈值与所述第一阈值的比值过大,则容易增大漏检的概率,从而容易误将异常点200归为噪点。为此,本实施例中,所述第二阈值为所述第一阈值的60%至80%。It should be noted that, when the second threshold is smaller than the first threshold, the ratio of the second threshold to the first threshold should not be too small, nor should it be too large. If the ratio of the second threshold to the first threshold is too small, it is easy to cause the second threshold to be too small, and when the second identification process is performed, it is easy to cause the false detection rate to become high, that is to say, it is easy to Classify the normal surrounding pixels 300 as defective pixels, so that it is easy to mistakenly classify the abnormal points 200 as defective points; if the ratio of the second threshold to the first threshold is too large, it is easy to increase the probability of missed detection , so it is easy to misclassify the abnormal point 200 as a noise point. Therefore, in this embodiment, the second threshold is 60% to 80% of the first threshold.

所述判断模块50基于所述第二识别模块40的检测结果进行判断。具体地,在所述周边像素点300中存在缺陷像素点的情况下,判定所述异常点200为缺陷点,在所述周边像素点300中不存在缺陷像素点的情况下,判定所述异常点200为噪点。The judgment module 50 makes a judgment based on the detection result of the second recognition module 40 . Specifically, if there is a defective pixel in the surrounding pixels 300, it is determined that the abnormal point 200 is a defective point; when there is no defective pixel in the surrounding pixels 300, it is determined that the abnormal Point 200 is noise.

需要说明的是,在其他实施例中,在所述第一识别模块中,采用第三异常点获取单元代替第一比较单元、第二比较单元和第一异常点获取单元;在所述第二识别模块中,采用第四异常点获取单元代替第三比较单元、第四比较单元和第二异常点获取单元。It should be noted that, in other embodiments, in the first identification module, the third outlier acquisition unit is used instead of the first comparison unit, the second comparison unit and the first outlier acquisition unit; In the identification module, the fourth abnormal point acquisition unit is used to replace the third comparison unit, the fourth comparison unit and the second abnormal point acquisition unit.

例如,在所述待处理图像为暗场图像的情况下,在所述第一识别模块中,所述第三异常点获取单元,用于将所述待处理图像的像素点与第一阈值进行比较,获取使强度表征值大于所述第一阈值的所述像素点作为初始异常点;所述第一阈值条件包括:所述像素点的强度表征值大于所述第一阈值。For example, in the case that the image to be processed is a dark field image, in the first identification module, the third outlier acquisition unit is configured to compare the pixels of the image to be processed with the first threshold In comparison, the pixel point whose intensity characteristic value is greater than the first threshold is acquired as an initial abnormal point; the first threshold condition includes: the intensity characteristic value of the pixel point is greater than the first threshold.

相应的,在所述第二识别模块中,所述第四异常点获取单元,用于将所述周边像素点与第二阈值进行比较,获取使强度表征值大于所述第二阈值的所述周边像素点作为缺陷像素点;所述第二阈值条件包括:所述周边像素点的强度表征值大于所述第二阈值;其中,所述第二阈值小于所述第一阈值。Correspondingly, in the second identification module, the fourth outlier acquisition unit is configured to compare the surrounding pixel points with a second threshold, and acquire the outlier whose intensity characteristic value is greater than the second threshold. The surrounding pixels are regarded as defective pixels; the second threshold condition includes: the intensity characteristic value of the surrounding pixels is greater than the second threshold; wherein the second threshold is smaller than the first threshold.

或者,在所述待处理图像为明场图像的情况下,在所述第一识别模块中,所述第三异常点获取单元,用于将所述待处理图像的各个像素点与第一阈值进行比较,获取使强度表征值小于所述第一阈值的所述像素点作为初始异常点;所述第一阈值条件包括:所述像素点的强度表征值小于所述第一阈值。Alternatively, when the image to be processed is a bright field image, in the first identification module, the third outlier acquisition unit is configured to compare each pixel of the image to be processed with the first threshold For comparison, the pixel points whose intensity characteristic value is smaller than the first threshold are acquired as initial abnormal points; the first threshold condition includes: the intensity characteristic value of the pixel point is smaller than the first threshold.

相应的,在所述第二识别模块中,所述第四异常点获取单元,用于将所述周边像素点与第二阈值进行比较,获取使强度表征值小于所述第二阈值的所述周边像素点作为缺陷像素点;所述第二阈值条件包括:所述周边像素点的强度表征值小于所述第二阈值;其中,所述第二阈值大于所述第一阈值。Correspondingly, in the second identification module, the fourth outlier acquisition unit is configured to compare the surrounding pixel points with a second threshold, and acquire the outlier whose intensity characteristic value is smaller than the second threshold. The surrounding pixels are regarded as defective pixels; the second threshold condition includes: the intensity characteristic value of the surrounding pixels is smaller than the second threshold; wherein the second threshold is greater than the first threshold.

在第一识别处理时,获取使强度表征值大于所述第一阈值的所述像素点作为初始异常点,在第二识别处理时,获取使强度表征值大于所述第二阈值的所述周边像素点作为缺陷像素点,因此,通过使所述第二阈值小于所述第一阈值,从而使所述第二阈值条件包含所述第一阈值条件。During the first identification process, acquire the pixel points whose intensity characteristic value is greater than the first threshold value as the initial abnormal point; during the second identification process, acquire the surrounding area whose intensity characteristic value is greater than the second threshold value A pixel is a defective pixel, therefore, by making the second threshold smaller than the first threshold, the second threshold condition includes the first threshold condition.

需要说明的是,如果所述检测系统中仅设置第一识别模块20,且第一识别模块20直接利用第二阈值条件进行第一识别处理,则容易导致误检率过高(例如,将具有一定强度表征值差异、但强度表征值差异处于可接受范围内的像素点归为缺陷点),因此,本实施例中,在检测系统中还设置了异常点获取模块70、像素点选取模块30、第二识别模块40和判断模块50,先利用第一阈值条件进行第一识别处理,获取初始异常点200,并根据所述初始异常点200获取异常点250,以排除正常的像素点110或者强度表征值差异处于可接受范围内的像素点110或者确定为缺陷点的像素点110,使得异常点250的数量不会过多,再利用第二阈值条件对周边像素点300进行第二识别处理,以实现对异常点250的复检,从而在减少第二识别处理的数据处理量的情况下,更精准地筛选出真实的缺陷点。It should be noted that if only the first identification module 20 is set in the detection system, and the first identification module 20 directly uses the second threshold condition to perform the first identification process, it will easily lead to a high false detection rate (for example, there will be A certain intensity characteristic value difference, but the pixel point whose intensity characteristic value difference is within an acceptable range is classified as a defect point), therefore, in this embodiment, an abnormal point acquisition module 70 and a pixel point selection module 30 are also set in the detection system , the second identification module 40 and the judgment module 50, first use the first threshold condition to perform the first identification process, obtain the initial abnormal point 200, and obtain the abnormal point 250 according to the initial abnormal point 200, to exclude normal pixel points 110 or The pixel points 110 whose intensity characteristic value difference is within the acceptable range or the pixel points 110 determined to be defective points, so that the number of abnormal points 250 will not be too many, and then use the second threshold value condition to perform the second identification process on the surrounding pixel points 300 , so as to realize the re-inspection of the abnormal point 250, so that the real defect point can be screened out more accurately while reducing the data processing amount of the second identification process.

本发明实施例还提供一种设备,该设备可以通过装载程序形式的上述检测方法,以实现本发明实施例提供的检测方法。An embodiment of the present invention also provides a device, which can realize the detection method provided by the embodiment of the present invention by loading the above detection method in the form of a program.

参考图7,示出了本发明一实施例所提供的设备的硬件结构图。本实施例所述设备包括:至少一个处理器01、至少一个通信接口02、至少一个存储器03和至少一个通信总线04。Referring to FIG. 7 , it shows a hardware structural diagram of a device provided by an embodiment of the present invention. The device described in this embodiment includes: at least one processor 01 , at least one communication interface 02 , at least one memory 03 and at least one communication bus 04 .

本实施例中,所述处理器01、通信接口02、存储器03和通信总线04的数量均为至少一个,且所述处理器01、通信接口02以及存储器03通过所述通信总线04完成相互间的通信。In this embodiment, the number of the processor 01, the communication interface 02, the memory 03, and the communication bus 04 is at least one, and the processor 01, the communication interface 02, and the memory 03 complete the mutual communication through the communication bus 04. Communication.

所述通信接口02可以为用于进行网络通信的通信模块的接口,例如为GSM模块的接口。The communication interface 02 may be an interface of a communication module for network communication, for example, an interface of a GSM module.

所述处理器01可能是中央处理器CPU,或者是特定集成电路ASIC(ApplicationSpecific Integrated Circuit),或者是被配置成实施本实施例所述检测方法的一个或多个集成电路。The processor 01 may be a central processing unit CPU, or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the detection method described in this embodiment.

所述存储器03可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 03 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

其中,所述存储器03存储有一条或多条计算机指令,所述一条或多条计算机指令被所述处理器01执行以实现前述实施例提供的检测方法。Wherein, the memory 03 stores one or more computer instructions, and the one or more computer instructions are executed by the processor 01 to implement the detection method provided by the foregoing embodiments.

需要说明的是,上述的实现终端设备还可以包括与本发明实施例公开内容可能并不是必需的其他器件(未示出);鉴于这些其他器件对于理解本发明实施例公开内容可能并不是必需,本发明实施例对此不进行逐一介绍。It should be noted that the above-mentioned implementation terminal device may also include other devices (not shown) that may not be necessary for the disclosure of the embodiments of the present invention; in view of the fact that these other devices may not be necessary for understanding the disclosure of the embodiments of the present invention, This embodiment of the present invention does not introduce them one by one.

本发明实施例还提供一种存储介质,所述存储介质存储有一条或多条计算机指令,所述一条或多条计算机指令用于实现前述实施例提供的检测方法。An embodiment of the present invention also provides a storage medium, the storage medium stores one or more computer instructions, and the one or more computer instructions are used to implement the detection method provided by the foregoing embodiments.

本实施例的检测方法中,对待处理图像进行第一识别处理,获取所述待处理图像中满足第一阈值条件的像素点作为初始异常点后,根据所述初始异常点获取异常点,选取一个或多个与所述异常点相邻的像素点作为周边像素点,并对所述周边像素点进行第二识别处理,将满足第二阈值条件的周边像素点作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件;其中,与噪点相邻的像素点均为正常的像素点,而与真实缺陷相邻的像素点通常也是缺陷像素点,因此,在检测过程中,当出现异常点后,利用第二阈值条件将所述周边像素点再次进行识别,所述第二阈值条件包含所述第一阈值条件,也即所述第一阈值条件对应的集合包含于所述第二阈值条件对应的集合中,这使得在周边像素点与正常像素点的差异较小的情况下,仍能被检出,从而能够在异常点周围检测出更多的缺陷像素点,相应能够更好地区分噪点和缺陷点,以精确判断所述异常点是否为真实的缺陷点,便于剔除噪点并保留缺陷点,相应降低了出现误检和漏检的概率,进而提高了检测结果的准确性。In the detection method of this embodiment, the first recognition process is performed on the image to be processed, and after obtaining the pixel points satisfying the first threshold condition in the image to be processed as the initial abnormal point, the abnormal point is obtained according to the initial abnormal point, and an abnormal point is selected. or a plurality of pixels adjacent to the abnormal point are regarded as surrounding pixels, and the surrounding pixels are subjected to the second identification process, and the surrounding pixels satisfying the second threshold condition are regarded as defective pixels, and the second The threshold condition includes the first threshold condition; wherein, the pixels adjacent to the noise point are normal pixels, and the pixels adjacent to the real defect are usually defective pixels, therefore, in the detection process, when a After the abnormal point, use the second threshold condition to identify the surrounding pixel points again. The second threshold condition includes the first threshold condition, that is, the set corresponding to the first threshold condition is included in the second threshold condition. In the set corresponding to the threshold condition, this makes it possible to detect when the difference between the surrounding pixels and the normal pixels is small, so that more defective pixels can be detected around the abnormal points, and the corresponding can be better. Distinguish between noise points and defect points to accurately judge whether the abnormal points are real defect points, so as to remove noise points and retain defect points, correspondingly reduce the probability of false detection and missed detection, and improve the accuracy of detection results.

上述本发明的实施方式是本发明的元件和特征的组合。除非另外提及,否则所述元件或特征可被视为选择性的。各个元件或特征可在不与其它元件或特征组合的情况下实践。另外,本发明的实施方式可通过组合部分元件和/或特征来构造。本发明的实施方式中所描述的操作顺序可重新排列。任一实施方式的一些构造可被包括在另一实施方式中,并且可用另一实施方式的对应构造代替。对于本领域技术人员而言明显的是,所附权利要求中彼此没有明确引用关系的权利要求可组合成本发明的实施方式,或者可在提交本申请之后的修改中作为新的权利要求包括。The embodiments of the present invention described above are combinations of elements and features of the present invention. The elements or features may be considered optional unless mentioned otherwise. Each element or feature may be practiced without being combined with other elements or features. In addition, the embodiments of the present invention may be configured by combining some elements and/or features. The order of operations described in the embodiments of the present invention may be rearranged. Some constructions of any one embodiment may be included in another embodiment, and may be replaced with corresponding constructions of another embodiment. It is obvious to those skilled in the art that claims that have no explicit citation relationship with each other among the appended claims may be combined in the embodiments of the present invention or may be included as new claims in amendments after filing the present application.

本发明的实施方式可通过例如硬件、固件、软件或其组合的各种手段来实现。在硬件配置方式中,根据本发明示例性实施方式的方法可通过一个或更多个专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理器件(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、处理器、控制器、微控制器、微处理器等来实现。Embodiments of the present invention can be realized by various means such as hardware, firmware, software, or a combination thereof. In the hardware configuration mode, the method according to the exemplary embodiment of the present invention can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices ( PLD), field programmable gate array (FPGA), processor, controller, microcontroller, microprocessor, etc. to achieve.

在固件或软件配置方式中,本发明的实施方式可以模块、过程、功能等形式实现。软件代码可存储在存储器单元中并由处理器执行。存储器单元位于处理器的内部或外部,并可经由各种己知手段向处理器发送数据以及从处理器接收数据。In a firmware or software configuration, the embodiments of the present invention can be implemented in the form of modules, procedures, functions, and the like. The software codes may be stored in memory units and executed by processors. The memory unit is located inside or outside the processor, and can transmit data to and receive data from the processor via various known means.

对所公开的实施例的上述说明,使本领域技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其他实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention will not be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

虽然本发明披露如上,但本发明并非限定于此。任何本领域技术人员,在不脱离本发明的精神和范围内,均可作各种更动与修改,因此本发明的保护范围应当以权利要求所限定的范围为准。Although the present invention is disclosed above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, so the protection scope of the present invention should be based on the scope defined in the claims.

Claims (17)

1.一种检测方法,其特征在于,包括:1. A detection method, characterized in that, comprising: 获取待处理图像,所述待处理图像具有多个像素点;Acquiring an image to be processed, the image to be processed has a plurality of pixels; 对所述待处理图像进行第一识别处理,获取所述待处理图像中满足第一阈值条件的像素点作为初始异常点;performing a first recognition process on the image to be processed, and acquiring pixels satisfying a first threshold condition in the image to be processed as initial abnormal points; 根据所述初始异常点获取异常点;Obtaining abnormal points according to the initial abnormal points; 选取一个或多个与所述异常点相邻的像素点作为周边像素点;Selecting one or more pixel points adjacent to the abnormal point as surrounding pixel points; 对所述周边像素点进行第二识别处理,将满足第二阈值条件的周边像素点作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件;Performing a second identification process on the surrounding pixels, using surrounding pixels that meet a second threshold condition as defective pixels, the second threshold condition including the first threshold condition; 在所述周边像素点中存在缺陷像素点的情况下,判定所述异常点为缺陷点,在所述周边像素点中不存在缺陷像素点的情况下,判定所述异常点为噪点。If there is a defective pixel in the surrounding pixels, it is determined that the abnormal point is a defective point, and in the case that there is no defective pixel in the surrounding pixels, it is determined that the abnormal point is a noise point. 2.如权利要求1所述的检测方法,其特征在于,所述对所述待处理图像进行第一识别处理包括:获取参考图像;对所述参考图像与所述待处理图像进行匹配处理,使所述待处理图像与所述参考图像匹配区域的像素点一一对应;将所述参考图像与所述待处理图像进行比较,获取所述参考图像与所述待处理图像中相对应像素点的强度表征值之间的第一差异值;比较所述第一差异值与第一阈值,获取所述第一差异值大于第一阈值的待处理图像的像素点作为第一差异点;利用所述第一差异点获取初始异常点;所述第一阈值条件至少包括:所述第一差异值大于第一阈值;2. The detection method according to claim 1, wherein said performing the first identification process on the image to be processed comprises: acquiring a reference image; performing matching processing on the reference image and the image to be processed, Making the pixel points in the matching area of the image to be processed and the image to be processed correspond one-to-one; comparing the reference image with the image to be processed, and obtaining corresponding pixels in the reference image and the image to be processed The first difference value between the intensity characteristic values; compare the first difference value with the first threshold value, obtain the pixel point of the image to be processed whose first difference value is greater than the first threshold value as the first difference point; use the The first difference point obtains an initial abnormal point; the first threshold condition at least includes: the first difference value is greater than a first threshold; 所述对所述周边像素点进行第二识别处理包括:获取参考图像;对所述参考图像与所述待处理图像进行匹配处理,使所述待处理图像与所述参考图像匹配区域的像素点一一对应;将所述周边像素点与所述参考图像中相对应像素点进行比较,获取所述周边像素点与所述参考图像中相对应像素点的强度表征值之间的第二差异值;比较所述第二差异值与第二阈值,获取所述第二差异值大于第二阈值的周边像素点作为第二差异点;利用所述第二差异点获取缺陷像素点;所述第二阈值条件至少包括:所述第二差异值大于第二阈值,其中,所述第二阈值小于所述第一阈值;The second identification process on the surrounding pixels includes: acquiring a reference image; performing matching processing on the reference image and the image to be processed, so that the image to be processed and the reference image match the pixel points of the region One-to-one correspondence; comparing the surrounding pixels with the corresponding pixels in the reference image, and acquiring a second difference value between the intensity representation values of the surrounding pixels and the corresponding pixels in the reference image ; Comparing the second difference value with a second threshold value, acquiring the surrounding pixel points whose second difference value is greater than the second threshold value as the second difference point; using the second difference point to obtain a defective pixel point; the second difference point The threshold condition at least includes: the second difference value is greater than a second threshold, wherein the second threshold is smaller than the first threshold; 所述强度表征值与灰度值或信噪比正相关。The intensity characteristic value is positively correlated with the gray value or the signal-to-noise ratio. 3.如权利要求1所述的检测方法,其特征在于,所述待处理图像为暗场图像;3. The detection method according to claim 1, wherein the image to be processed is a dark field image; 所述对所述待处理图像进行第一识别处理包括:将所述待处理图像的像素点与第一阈值进行比较,获取使强度表征值大于所述第一阈值的所述像素点作为初始异常点;所述第一阈值条件包括:所述像素点的强度表征值大于所述第一阈值;The first identification process on the image to be processed includes: comparing the pixels of the image to be processed with a first threshold, and acquiring the pixel whose intensity characteristic value is greater than the first threshold as an initial abnormality point; the first threshold condition includes: the intensity characteristic value of the pixel point is greater than the first threshold; 所述对所述周边像素点进行第二识别处理包括:将所述周边像素点与第二阈值进行比较,获取使强度表征值大于所述第二阈值的所述周边像素点作为缺陷像素点;所述第二阈值条件包括:所述周边像素点的强度表征值大于所述第二阈值;其中,所述第二阈值小于所述第一阈值;The second identification process on the surrounding pixels includes: comparing the surrounding pixels with a second threshold, and obtaining the surrounding pixels whose intensity characteristic value is greater than the second threshold as defective pixels; The second threshold condition includes: the intensity characteristic value of the surrounding pixel points is greater than the second threshold; wherein the second threshold is smaller than the first threshold; 所述强度表征值与灰度值或信噪比正相关。The intensity characteristic value is positively correlated with the gray value or the signal-to-noise ratio. 4.如权利要求1所述的检测方法,其特征在于,所述待处理图像为明场图像;4. The detection method according to claim 1, wherein the image to be processed is a bright field image; 所述对所述待处理图像进行第一识别处理包括:将所述待处理图像的像素点与第一阈值进行比较,获取使强度表征值小于所述第一阈值的所述像素点作为初始异常点;所述第一阈值条件包括:所述像素点的强度表征值小于所述第一阈值;The first identification process on the image to be processed includes: comparing the pixels of the image to be processed with a first threshold, and acquiring the pixel whose intensity characteristic value is smaller than the first threshold as an initial abnormality point; the first threshold condition includes: the intensity characteristic value of the pixel point is less than the first threshold; 所述对所述周边像素点进行第二识别处理包括:将所述周边像素点与第二阈值进行比较,获取使强度表征值小于所述第二阈值的所述周边像素点作为缺陷像素点;所述第二阈值条件包括:所述周边像素点的强度表征值小于所述第二阈值;其中,所述第二阈值大于所述第一阈值;The second identification process on the surrounding pixels includes: comparing the surrounding pixels with a second threshold, and obtaining the surrounding pixels whose intensity characteristic value is smaller than the second threshold as defective pixels; The second threshold condition includes: the intensity characteristic value of the surrounding pixel points is less than the second threshold; wherein the second threshold is greater than the first threshold; 所述强度表征值与灰度值或信噪比正相关。The intensity characteristic value is positively correlated with the gray value or the signal-to-noise ratio. 5.如权利要求2所述的检测方法,其特征在于,所述待处理图像包括多个相同的单元图像;5. The detection method according to claim 2, wherein the image to be processed comprises a plurality of identical unit images; 对各个所述单元图像进行所述第一识别处理,获取各个单元图像的初始异常点,将当前待测的所述单元图像作为待测图像,将所述待测图像周围的多个所述单元图像作为参考图像;performing the first recognition process on each of the unit images, acquiring the initial abnormal points of each unit image, using the unit image currently to be tested as the image to be tested, and taking a plurality of the units around the image to be tested image as a reference image; 所述利用所述第一差异点获取初始异常点包括:获取所述第一差异点的个数,得到第一差异数量,在所述第一差异数量大于或等于预设数量的情况下,判定当前检测的像素点为初始异常点;所述第一阈值条件还包括:所述第一差异数量大于或等于预设数量;The acquiring initial abnormal points by using the first difference points includes: acquiring the number of the first difference points to obtain a first difference number, and when the first difference number is greater than or equal to a preset number, determine The currently detected pixel point is an initial abnormal point; the first threshold condition further includes: the first difference number is greater than or equal to a preset number; 所述利用所述第二差异点获取缺陷像素点包括:获取所述第二差异点的个数,得到第二差异数量,在所述第二差异数量大于或等于预设数量的情况下,判定当前检测的周边像素点为缺陷像素点;所述第二阈值条件还包括:所述第二差异数量大于或等于预设数量。The acquiring defective pixel points by using the second difference points includes: acquiring the number of the second difference points to obtain a second difference number, and when the second difference number is greater than or equal to a preset number, determine The currently detected surrounding pixels are defective pixels; the second threshold condition further includes: the second difference amount is greater than or equal to a preset number. 6.如权利要求2~4中任一项权利要求所述的检测方法,其特征在于,所述第一阈值和所述第二阈值与所述待处理图像的清晰度正相关。6. The detection method according to any one of claims 2-4, wherein the first threshold and the second threshold are positively correlated with the definition of the image to be processed. 7.如权利要求6所述的检测方法,其特征在于,获取所述第一阈值和/或获取所述第二阈值包括初始阈值获取处理,所述初始阈值获取处理包括:获取所述待处理图像中各个像素点的灰度梯度;获取所述待处理图像的灰度梯度的平均值,将所述灰度梯度的平均值作为初始阈值;7. The detection method according to claim 6, wherein acquiring the first threshold and/or acquiring the second threshold comprises an initial threshold acquisition process, and the initial threshold acquisition process comprises: acquiring the pending threshold The grayscale gradient of each pixel in the image; obtaining the average value of the grayscale gradient of the image to be processed, and using the average value of the grayscale gradient as an initial threshold; 所述检测方法还包括:基于所述初始阈值增加预设偏移量。The detection method further includes: adding a preset offset based on the initial threshold. 8.如权利要求7所述的检测方法,其特征在于,获取所述第一阈值还包括:将所述初始阈值作为第一阈值;8. The detection method according to claim 7, wherein obtaining the first threshold further comprises: using the initial threshold as the first threshold; 获取所述第二阈值包括:使所述第一阈值与第一比例因子相乘,获得所述第二阈值;Obtaining the second threshold includes: multiplying the first threshold by a first scaling factor to obtain the second threshold; 或者,or, 获取所述第二阈值还包括:将所述初始阈值作为第二阈值;Acquiring the second threshold further includes: using the initial threshold as the second threshold; 获取所述第一阈值包括:使所述第二阈值与第二比例因子相乘,获得所述第一阈值;Obtaining the first threshold includes: multiplying the second threshold by a second scaling factor to obtain the first threshold; 或者,or, 获取所述第一阈值和获取所述第二阈值均包括初始阈值获取处理,所述第一阈值对应的预设偏移量与所述第二阈值对应的预设偏移量不相同。Both acquiring the first threshold and acquiring the second threshold include initial threshold acquisition processing, and the preset offset corresponding to the first threshold is different from the preset offset corresponding to the second threshold. 9.如权利要求7所述的检测方法,其特征在于,基于所述初始阈值增加预设偏移量,获得所述第一阈值;所述第二阈值小于所述第一阈值;9. The detection method according to claim 7, wherein the first threshold is obtained by increasing a preset offset based on the initial threshold; the second threshold is smaller than the first threshold; 所述第一阈值对应的预设偏移量为3至5;所述第二阈值为所述第一阈值的60%至80%。The preset offset corresponding to the first threshold is 3 to 5; the second threshold is 60% to 80% of the first threshold. 10.如权利要求7所述的检测方法,其特征在于,所述像素点的灰度梯度的关系式包括:10. detection method as claimed in claim 7 is characterized in that, the relational expression of the gray scale gradient of described pixel comprises:
Figure FDA0003265315700000041
Figure FDA0003265315700000041
其中,M(x,y)表示所述像素点的灰度梯度,gx表示所述像素点在X方向上的梯度,gy表示所述像素点在Y方向上的梯度,所述X方向为像素阵列的行方向,所述Y方向为像素阵列的列方向。Among them, M(x, y) represents the gray gradient of the pixel, gx represents the gradient of the pixel in the X direction, gy represents the gradient of the pixel in the Y direction, and the X direction is the pixel The row direction of the array, and the Y direction is the column direction of the pixel array.
11.如权利要求1所述的检测方法,其特征在于,根据所述初始异常点获取异常点包括:对所述待处理图像中的初始异常点进行连通域判断,获取连通域,同一连通域中的每个初始异常点均具有相邻的初始异常点,且连通域内与连通域外的初始异常点相互分离;11. The detection method according to claim 1, wherein obtaining the abnormal points according to the initial abnormal points comprises: judging the connected domains of the initial abnormal points in the image to be processed, obtaining the connected domains, and the same connected domains Each initial outlier point in has adjacent initial outlier points, and the initial outlier points in the connected domain and outside the connected domain are separated from each other; 在所述连通域内的初始异常点个数大于或等于预设数量的情况下,所述连通域内的初始异常点作为缺陷点,在所述连通域内的初始异常点个数小于预设数量的情况下,所述连通域作为所述异常点;When the number of initial abnormal points in the connected domain is greater than or equal to the preset number, the initial abnormal points in the connected domain are used as defect points, and in the case where the number of initial abnormal points in the connected domain is less than the preset number Next, the connected domain is used as the outlier point; 或者,or, 根据所述初始异常点获取异常点包括:获取与所述初始异常点相邻的像素点作为临近点,所述临近点的数量为一个或多个;Obtaining an abnormal point according to the initial abnormal point includes: acquiring pixel points adjacent to the initial abnormal point as adjacent points, and the number of the adjacent points is one or more; 判断每个临近点是否为初始异常点,且在各临近点均不是初始异常点的情况下,将所述初始异常点作为异常点。It is judged whether each adjacent point is an initial outlier point, and if none of the adjacent points is an initial outlier point, the initial outlier point is taken as an outlier point. 12.如权利要求11所述的检测方法,其特征在于,所述预设数量为1个至5个。12. The detection method according to claim 11, wherein the preset number is 1 to 5. 13.如权利要求1所述的检测方法,其特征在于,所述周边像素点的数量为8个,且所述周边像素点与所述异常点构成3*3的像素阵列;13. The detection method according to claim 1, wherein the number of the surrounding pixel points is 8, and the surrounding pixel points and the abnormal point form a 3*3 pixel array; 或者,所述周边像素点的数量为4个,且所述周边像素点与所述异常点呈十字形布局或X型布局。Alternatively, the number of surrounding pixels is four, and the surrounding pixels and the abnormal point are in a cross-shaped layout or an X-shaped layout. 14.如权利要求1所述的检测方法,其特征在于,所述获取待处理图像包括:提供成像系统和待测物;利用所述成像系统,拍摄获取所述待测物的图像,作为待处理图像。14. The detection method according to claim 1, wherein the acquiring the image to be processed comprises: providing an imaging system and the object to be tested; using the imaging system to capture an image of the object to be tested as the Process images. 15.一种检测系统,其特征在于,包括:15. A detection system, characterized in that it comprises: 图像获取模块,用于获取待处理图像,所述待处理图像具有多个像素点;An image acquisition module, configured to acquire an image to be processed, the image to be processed has a plurality of pixels; 第一识别模块,用于对所述待处理图像进行第一识别处理,获取所述待处理图像中满足第一阈值条件的像素点作为初始异常点;The first recognition module is configured to perform a first recognition process on the image to be processed, and acquire pixels satisfying a first threshold condition in the image to be processed as initial abnormal points; 异常点获取模块,用于根据所述初始异常点获取异常点;An abnormal point obtaining module, configured to obtain an abnormal point according to the initial abnormal point; 像素点选取模块,用于选取一个或多个与所述异常点相邻的像素点作为周边像素点;A pixel selection module, configured to select one or more pixels adjacent to the abnormal point as surrounding pixels; 第二识别模块,用于对所述周边像素点进行第二识别处理,将满足第二阈值条件的周边像素点作为缺陷像素点,所述第二阈值条件包含所述第一阈值条件;The second identification module is configured to perform a second identification process on the peripheral pixels, and use peripheral pixels satisfying a second threshold condition as defective pixels, where the second threshold condition includes the first threshold condition; 判断模块,用于在所述周边像素点中存在缺陷像素点的情况下,判定所述异常点为缺陷点,在所述周边像素点中不存在缺陷像素点的情况下,判定所述异常点为噪点。A judging module, configured to determine that the abnormal point is a defective point when there is a defective pixel point among the surrounding pixels, and determine the abnormal point when there is no defective pixel point among the surrounding pixel points for noise. 16.一种设备,其特征在于,包括至少一个存储器和至少一个处理器,所述存储器存储有一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行以实现如权利要求1至14任一项所述的检测方法。16. A device comprising at least one memory and at least one processor, the memory storing one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement The detection method according to any one of claims 1 to 14. 17.一种存储介质,其特征在于,所述存储介质存储有一条或多条计算机指令,所述一条或多条计算机指令用于实现如权利要求1至14任一项所述的检测方法。17. A storage medium, characterized in that the storage medium stores one or more computer instructions, and the one or more computer instructions are used to implement the detection method according to any one of claims 1 to 14.
CN202111085266.7A 2021-09-16 2021-09-16 Detection method, detection system, device and storage medium Pending CN115829900A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111085266.7A CN115829900A (en) 2021-09-16 2021-09-16 Detection method, detection system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111085266.7A CN115829900A (en) 2021-09-16 2021-09-16 Detection method, detection system, device and storage medium

Publications (1)

Publication Number Publication Date
CN115829900A true CN115829900A (en) 2023-03-21

Family

ID=85514984

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111085266.7A Pending CN115829900A (en) 2021-09-16 2021-09-16 Detection method, detection system, device and storage medium

Country Status (1)

Country Link
CN (1) CN115829900A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119359569A (en) * 2024-12-24 2025-01-24 江苏慕藤光精密光学仪器有限公司 Image fusion method and device and related equipment
CN121280442A (en) * 2025-12-09 2026-01-06 合肥晶合集成电路股份有限公司 Defect detection method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4628531A (en) * 1983-02-28 1986-12-09 Hitachi, Ltd. Pattern checking apparatus
US20060193507A1 (en) * 2005-02-28 2006-08-31 Negevtech Ltd. Method and apparatus for detecting defects in wafers
US20080100844A1 (en) * 2006-10-31 2008-05-01 Negevtech, Ltd. Defect detection through image comparison using relative measures
US20150043804A1 (en) * 2013-08-08 2015-02-12 Kla-Tencor Corporation Adaptive Local Threshold and Color Filtering
CN109074644A (en) * 2016-03-17 2018-12-21 科磊股份有限公司 For using system, method and the computer program product of local auto-adaptive threshold value identification manufacture component defect
US20190066284A1 (en) * 2017-08-24 2019-02-28 Kla-Tencor Corporation Defect detection on transparent or translucent wafers

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4628531A (en) * 1983-02-28 1986-12-09 Hitachi, Ltd. Pattern checking apparatus
US20060193507A1 (en) * 2005-02-28 2006-08-31 Negevtech Ltd. Method and apparatus for detecting defects in wafers
US20080100844A1 (en) * 2006-10-31 2008-05-01 Negevtech, Ltd. Defect detection through image comparison using relative measures
US20150043804A1 (en) * 2013-08-08 2015-02-12 Kla-Tencor Corporation Adaptive Local Threshold and Color Filtering
CN109074644A (en) * 2016-03-17 2018-12-21 科磊股份有限公司 For using system, method and the computer program product of local auto-adaptive threshold value identification manufacture component defect
US20190066284A1 (en) * 2017-08-24 2019-02-28 Kla-Tencor Corporation Defect detection on transparent or translucent wafers

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119359569A (en) * 2024-12-24 2025-01-24 江苏慕藤光精密光学仪器有限公司 Image fusion method and device and related equipment
CN121280442A (en) * 2025-12-09 2026-01-06 合肥晶合集成电路股份有限公司 Defect detection method and system

Similar Documents

Publication Publication Date Title
TWI603074B (en) Optical film defect detection method and system thereof
JP4095860B2 (en) Defect inspection method and apparatus
US8750596B2 (en) System and method for identifying defects in a material
KR20160119170A (en) Defect detection and classification based on attributes determined from a standard reference image
WO2014107522A1 (en) Detecting defects on a wafer
CN115170501A (en) Defect detection method, system, electronic device and storage medium
CN109462999B (en) Balancing a Learning-Based Visual Inspection Method by Data and a Visual Inspection Device Using the Same
CN115953373B (en) Glass defect detection method, device, electronic equipment and storage medium
CN111369492B (en) Display screen detection method, detection device and detection system
CN114486916A (en) Defect detection method of mobile phone glass cover based on machine vision
CN112014407A (en) Method for detecting surface defects of integrated circuit wafer
CN112150460A (en) Detection method, detection system, device, and medium
CN112669272B (en) AOI rapid detection method and rapid detection system
CN118501177A (en) Appearance defect detection method and system for formed foil
TW201512649A (en) Method of chip detects inspecting, system therefor, and computer program product thereof
CN114387249A (en) Detection method and detection device, equipment and storage medium
CN115829900A (en) Detection method, detection system, device and storage medium
CN116337869A (en) A machine vision-based inspection system for double-sided circuit board production
CN119131006A (en) A ceramic defect intelligent detection method, system, device and storage medium based on deep learning
WO2025139960A1 (en) Image detection method and apparatus, electronic device, and storage medium
CN115115637A (en) Cloth defect detection method based on image pyramid thought
CN116363136B (en) An online screening method and system for automatic production of motor vehicle parts
KR102107362B1 (en) Method for inspecting defects of substrates
US12272042B2 (en) Detection of defects using a computationally efficient segmentation approach
Kong et al. Detection of water-stains defects in TFT-LCD based on machine vision

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