A defect detection method, device, apparatus, and storage medium
By combining methods of defect detection followed by stitching and stitching followed by defect detection, local images of the sample under test are processed, solving the problem of insufficient computer memory when detecting large objects and achieving efficient defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SEEV OPTOELECTRONICS TECHNOLOGY CO LTD
- Filing Date
- 2023-05-23
- Publication Date
- 2026-04-10
AI Technical Summary
Existing defect detection technologies struggle to improve detection efficiency while maintaining accuracy, especially when detecting large objects, where excessive computer memory requirements can lead to system crashes or low detection efficiency.
A combination of defect detection followed by stitching and stitching followed by defect detection is adopted. Local images of the sample to be tested are processed to generate the final defect detection result. Local images are acquired by controlling the camera movement with a preset step size, and defect detection is performed by combining the methods of defect detection followed by stitching and stitching followed by defect detection.
Without compromising detection accuracy, it reduces reliance on computer memory, improves defect detection efficiency, and avoids system crashes and missed detection of large defects.
Smart Images

Figure CN116559177B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer, and in particular, to a defect detection method, device, equipment and storage medium. BACKGROUND
[0002] Defect detection technology has been widely applied in many industrial production processes, for example, in the welding production process, it is often necessary to detect defects of sample workpieces. However, with the increase of camera resolution, the memory occupied by each local picture is also increasing, and when the detected object is large, it often needs to take hundreds of local pictures to splice a complete global picture. This increases the difficulty of ensuring the accuracy and efficiency of defect detection.
[0003] How to improve the efficiency of defect detection while ensuring the accuracy of defect detection, so as to speed up the rate of industrial production, is a problem to be solved at present. SUMMARY
[0004] The present application provides a defect detection method, device, equipment and storage medium, which can reduce the dependence on computer running memory without affecting the accuracy of defect detection, and improve the efficiency of defect detection.
[0005] According to one aspect of the present application, a defect detection method is provided, comprising:
[0006] Controlling camera motion based on a preset step length to take pictures of the surface of the sample to be tested to obtain at least two target local pictures;
[0007] Processing the at least two target local pictures in the manner of defect detection first and then splicing to generate a first defect detection result of the sample to be tested;
[0008] Processing the at least two target local pictures in the manner of splicing first and then defect detection to generate a second defect detection result of the sample to be tested;
[0009] Generating a final defect detection result of the sample to be tested according to the first defect detection result and the second defect detection result.
[0010] According to another aspect of the present application, a defect detection device is provided, comprising:
[0011] The acquisition module is configured to control camera motion based on a preset step length to take pictures of the surface of the sample to be tested to obtain at least two target local pictures;
[0012] The first generation module is configured to process the at least two target local pictures in the manner of defect detection first and then splicing to generate a first defect detection result of the sample to be tested;
[0013] a second generation module configured to generate a second defect detection result of the sample to be tested by processing the at least two target local images in a manner of defect detection after splicing;
[0014] a third generation module configured to generate a final defect detection result of the sample to be tested according to the first defect detection result and the second defect detection result.
[0015] According to another aspect of the present application, an electronic device is provided, which comprises:
[0016] at least one processor; and
[0017] a memory connected to the at least one processor in communication; wherein
[0018] the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the defect detection method according to any one of the embodiments of the present application.
[0019] According to another aspect of the present application, a computer readable storage medium is provided, which stores computer instructions for enabling a processor to perform the defect detection method according to any one of the embodiments of the present application.
[0020] The technical solution of the embodiments of the present application controls the camera motion based on a preset step length to capture the surface of the sample to be tested to obtain at least two target local images, processes the at least two target local images in a manner of defect detection after splicing to generate a first defect detection result of the sample to be tested, processes the at least two target local images in a manner of splicing after defect detection to generate a second defect detection result of the sample to be tested, and generates a final defect detection result of the sample to be tested according to the first defect detection result and the second defect detection result. By combining the two defect detection manners of defect detection after splicing and splicing after defect detection, the dependence on the computer running memory can be reduced without affecting the accuracy of defect detection, and the efficiency of defect detection can be improved.
[0021] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to make the technical solutions in the embodiments of the present application clearer, the accompanying drawings needed in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description only show some embodiments of the present application, and all other embodiments obtained by those of ordinary skill in the art without any creative effort based on the accompanying drawings should fall within the protection scope of the present application.
[0023] Figure 1A is a flowchart of a defect detection method provided by Embodiment One of the present application;
[0024] Figure 1B is a partitioning schematic diagram of a target classification region provided by Embodiment One of the present application;
[0025] Figure 1C is a schematic diagram of a structure region and a non-structure region provided by Embodiment One of the present application;
[0026] Figure 2A is a flowchart of a defect detection method provided by Embodiment Two of the present application;
[0027] Figure 2B is a flowchart of defect category determination provided by Embodiment Two of the present application;
[0028] Figure 3 is a structural block diagram of a defect detection device provided by Embodiment Three of the present application;
[0029] Figure 4 is a structural schematic diagram of an electronic device provided by Embodiment Four of the present application. DETAILED DESCRIPTION
[0030] In order to make the technical solutions in the embodiments of the present application clearer, the accompanying drawings needed in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description only show some embodiments of the present application, and all other embodiments obtained by those of ordinary skill in the art without any creative effort based on the accompanying drawings should fall within the protection scope of the present application.
[0031] It should be noted that the terms "first", "second", "target", "candidate", "alternative" and the like in the description, claims, and drawings of the application are used to distinguish like objects and are not necessarily used to describe a particular sequential or chronological order. It should be understood that the data thus used can be interchanged, where appropriate, so that the embodiments of the application described herein can be carried out in other than the order shown or described herein. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusions, for example, processes, methods, systems, products, or devices that include a series of steps or units are not necessarily limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0032] In the related art, the detected object is often spliced into a complete image before subsequent defect detection. However, with the increase of camera resolution, the memory occupied by each local picture also increases. When the detected object is large, it is necessary to shoot hundreds of local pictures to splice a complete picture, which is easy to cause the computer memory to be difficult to load and cause the system to crash. If the spliced picture is compressed, the details of the picture will be missing, resulting in missed detection of defects. In addition, the existing defect detection method can only detect defects, and further classification of defects requires manual labeling of defects, and then uses a deep learning method to realize classification. This method has a huge workload and is cumbersome, and the amount of calculation is huge.
[0033] In view of the problem that directly processing the spliced object global picture causes the computer memory to be difficult to load and causes the system to crash, the application provides a scheme of combining two defect detection methods for step-by-step processing for defect detection, and gives an implementable way for classifying defects. The specific implementation process will be described in detail in the subsequent embodiments.
[0034] Embodiment one
[0035] Figure 1A is a flowchart of a defect detection method provided by the embodiment one of the application; Figure 1B is a partitioning schematic diagram of a target classification area provided by the embodiment one of the application; Figure 1C is a schematic diagram of a structure area and a non-structure area provided by the embodiment one of the application. The embodiment can be applicable to the case of comprehensively and effectively detecting defects of a sample to be tested. The method can be executed by a defect detection device, which can be realized in the form of hardware and / or software. The defect detection device can be configured in an electronic device, such as a defect detection system, and executed by a processor of the defect detection system. As shown in the figure, the defect detection method comprises: Figure 1A
[0036] S101, control the camera to move based on a preset step size, and capture the surface of the sample under test to obtain at least two target local pictures.
[0037] The sample under test refers to a sample on which the target is detected for defects. The sample under test may be, for example, a silicon wafer or a waveguide wafer. The target local picture refers to a small local picture that can represent the situation of a local region on the surface of the sample under test. The global picture of the sample under test can be obtained by splicing at least two target local pictures of the sample under test.
[0038] Optionally, the camera can be controlled to move based on a preset shooting route based on a preset step size, and periodically capture the surface of the sample under test to collect pictures of different local regions of the sample under test, thereby obtaining at least two target local pictures. That is, each target local picture is a picture of a local region on the surface of the sample under test captured by the camera each time.
[0039] Optionally, after obtaining at least two target local pictures, each target local picture can be filtered based on a preset filtering processing technology (such as band-stop filtering processing) to highlight defects in the picture. For example, the band-stop filter used for band-stop filtering processing can be obtained by subtracting two low-pass filters with different passband sizes, where the low-pass filter may be, for example, a Gaussian filter.
[0040] S102, process the at least two target local pictures in a manner of detecting defects first and then splicing to generate a first defect detection result for the sample under test.
[0041] The defect detection manner of detecting defects first and then splicing is a kind of precision defect detection manner. The first defect detection result refers to a detection result generated after the sample under test is detected for defects in the manner of detecting defects first and then splicing. The first defect detection result can include distribution information of defects and category information of defects, or only include the distribution information of defects, which is not limited by the present application.
[0042] Optionally, the at least two target local pictures are processed in the manner of detecting defects first and then splicing to generate the first defect detection result for the sample under test, including: determining a first target defect region in each target local picture based on a preset screening rule according to the gray value of each pixel point in the target local picture; defect labeling is performed on each target local picture according to the first target defect region, and each target local picture after defect labeling is spliced to generate a first global picture of the sample under test; and the first defect detection result for the sample under test is generated according to the distribution information of the first target defect region in the first global picture.
[0043] The first target defect region refers to a defect region in the target local picture that meets a preset screening rule. The first global picture refers to a global picture of the sample to be tested generated based on a method of defect detection followed by splicing. The distribution information refers to information representing a position and orientation of the first target defect region in the first global picture.
[0044] Optionally, a pixel point set in the target local picture in which the gray value of each pixel point is greater than the preset gray threshold value can be determined according to the relationship between the gray value of each pixel point in the target local picture and the preset gray threshold value, and the region corresponding to the pixel point set is directly determined as the first target defect region in the target local picture. That is, the pixel point set in which the gray value of each pixel point in the local picture processed by the template is greater than the preset gray threshold value can be directly determined as the first target defect region in the target local picture.
[0045] For example, the maximum gray difference value of the pixels in the target local picture within the template can be calculated, and the difference value is set as the gray value of the template to filter the target local picture based on the template. The size of the template can be set to 3x3 or 5x5 pixel size. It should be noted that the above-mentioned template is not an additional addition, but a sub-region composed of a certain number of pixels on the target local picture, for example, a sub-region composed of 3x3 pixels. Based on this, the above-mentioned filtering processing is to calculate the gray difference value between each pixel point in the sub-region composed of 3x3 pixels, and then take the maximum gray difference value as the gray value in the sub-region. Similarly, the target local picture is traversed and calculated according to a certain preset path with the size of the sub-region as the boundary, so as to assign the target local picture with the corresponding gray value of each sub-region. Then, whether the sub-region is a defect region is determined based on the size relationship between the gray value of the sub-region and the threshold value. It should be noted that the defect region determined based on the above-mentioned method can be directly used as the final first target defect region, or the defect region determined based on the above-mentioned method can be further screened based on the size requirement described later in this embodiment, and the defect region meeting the size requirement is determined as the final first target defect region. The present application does not limit this.
[0046] Optionally, after the defect region is determined based on the comparison between the pixel gray value and the preset gray threshold, the defect region is further screened based on the preset size requirement of the defect region, to determine the final first target defect region. Specifically, the first target defect region in each target local picture is determined based on the preset screening rule according to the gray value of each pixel in the target local picture, including: determining the first candidate defect region in the target local picture according to the relationship between the gray value of each pixel in the target local picture and the preset gray threshold; and screening the first target defect region from the first candidate defect region according to the size relationship between the size of each first candidate defect region and the preset first size threshold.
[0047] The first size threshold can represent the lower limit of the size of the first candidate defect region, and the size range required by the first target defect region can be set as needed according to the actual detection situation, such as 3-400 pixels. The upper limit value (such as 400 pixels) of the size range can be determined as the first size threshold.
[0048] Optionally, a pixel set whose pixel gray value in the target local picture is greater than the preset gray threshold can be determined, and the region corresponding to the pixel set is preliminarily determined as the first candidate defect region in the target local picture. Further, the first candidate defect region whose size is less than the preset first size threshold is determined as the first target defect region according to the size relationship between the size of each first candidate defect region and the preset first size threshold.
[0049] It should be noted that if the size of the first candidate defect region is greater than the preset first size threshold, it is considered that the size of the defect is too large, and the defect is not labeled at this time. The defect with a size that is too large can be labeled based on the subsequent defect detection after splicing, so as to avoid occupying the computer memory and improve the defect detection efficiency.
[0050] Optionally, the first defect detection result can also include the defect category to which the first target defect region belongs. Correspondingly, determining the defect category to which the first target defect region belongs includes: determining the minimum circumscribed circle radius and the maximum inscribed circle radius corresponding to each first target defect region; determining the evaluation value corresponding to each first target defect region based on the preset evaluation calculation rule according to the minimum circumscribed circle radius and the maximum inscribed circle radius; and determining the defect category of each first target defect region according to the relationship between the evaluation value corresponding to each first target defect region and the preset evaluation threshold.
[0051] The defect category of the first target defect region may, for example, be a first-level defect category, such as a block defect or a linear defect. The preset evaluation threshold may, for example, be 20.
[0052] For example, the minimum circumscribed circle radius R of each first target defect region is determined out and the maximum inscribed circle radius R in Then, the evaluation value D of each first target defect region can be determined based on the formula D = R out R in .
[0053] Optionally, the size relationship between the evaluation value of each first target defect region and a preset evaluation threshold value can be determined. If the evaluation value is greater than the preset evaluation threshold value, it can be determined that the defect category of the first target defect region is a scratch or other linear defect. If the evaluation value is less than or equal to the preset evaluation threshold value, it can be determined that the defect category of the first target defect region is a block defect.
[0054] It should be noted that the defect classification method described above can be used to solve the problem of manually labeling defects in the early stage when deep learning is used for defect classification. This defect classification method can be used as an independent defect classification method or as a method to assist manual labeling of defects.
[0055] Optionally, determining the defect category of each first target defect region comprises: if the evaluation value of the first target defect region is less than or equal to the preset evaluation threshold value, determining that the first-level defect category of the first target defect region is a block defect; based on the preset size requirement, determining the first target defect region and a preset region around the first target defect region as a target classification region, and dividing the target classification region to determine a divided sub-region; and determining the second-level defect category of the first target defect region according to the gradient direction of the gray scale between each divided sub-region.
[0056] The first-level defect category can have a corresponding second-level defect category. Specifically, the second-level defect category of a linear defect can be, for example, a scratch. The second-level defect category of a block defect can be, for example, a bubble-type block defect or a stain-type block defect.
[0057] Optionally, after determining that the first-level defect category of the first target defect region is a block defect, a target classification region can be obtained by intercepting a region twice the length and width of the minimum circumscribed rectangle of the block defect in the local picture corresponding to the first target defect region, so as to determine the first target defect region and a preset region around the first target defect region as a target classification region.
[0058] Optionally, after the target classification region is determined, the target classification region can be evenly divided into four calculation regions, and each calculation region can be further evenly divided into four small regions; the average gray value of the small region close to the center of the target classification region and the small region close to the vertex of the target classification region is calculated respectively, and the gradient direction of the gray value is determined according to the size relationship between the average gray values of the two small regions; if the gradient direction is directed to the center of the defect, it can be determined that the second-level defect category of the first target defect region is the bubble type block defect, otherwise, it can be determined that the second-level defect category of the first target defect region is the stain type block defect.
[0059] For example, referring to Figure 1B , the target classification region can be evenly divided into calculation region 1, calculation region 2, calculation region 3 and calculation region 4, and each calculation region can be further evenly divided into four small regions, for example, calculation region 1 can be evenly divided into small region a, small region b, small region c and small region d. The gradient direction of the gray value can be determined by comparing the average gray value of small region a and small region d, for example, if the average gray value of small region a is less than the average gray value of small region d, the gradient direction can be determined to be directed to the center of the defect (i.e. the direction indicated by the arrow in the figure), at this time, it can be determined that the second-level defect category is the bubble type block defect, and if the gradient direction is away from the center of the defect, it can be determined that the second-level defect category is the stain type block defect.
[0060] S103, using the method of defect detection after splicing, processing at least two target local pictures to generate a second defect detection result of the sample to be tested.
[0061] The method of defect detection after splicing is a kind of rough defect detection method. The second defect detection result refers to the detection result generated by using the method of defect detection after splicing to detect the defects of the sample to be tested. The second defect detection result can include the distribution information of the defects and the category information of the defects, and can only include the distribution information of the defects, which is not limited by the present application.
[0062] Optionally, using the method of defect detection after splicing, processing at least two target local pictures to generate a second defect detection result of the sample to be tested, including: splicing the obtained at least two target local pictures to generate a second global picture of the sample to be tested, and compressing the second global picture based on a preset compression ratio to generate a compressed global picture; based on a preset edge detection algorithm, the edge of the compressed global picture is extracted, and the structure area and the non-structure area in the compressed global picture are determined according to the edge extraction result; the structure area and the non-structure area are detected respectively to generate a second defect detection result of the sample to be tested.
[0063] In the scene of etching a grating on the silicon wafer, the structure region can refer to the grating region on the silicon wafer after etching, and the non-structure region can refer to the region on the silicon wafer except the grating region.
[0064] Optionally, the edge extraction result can be obtained by performing edge extraction on the compressed global image based on a Sobel operator in a Sobel edge detection algorithm, and the structure region in the compressed global image can be determined according to the edge extraction result, and the region in the compressed global image except the structure region is determined as the non-structure region.
[0065] For example, referring to Figure 1C , the compressed global image can be composed of the structure region and the non-structure region, and since the edge of the structure region is easy to be identified as a defect, the present application first performs edge extraction on the compressed global image to determine the structure region in the compressed global image, and then performs defect detection on the structure region and the non-structure region respectively, so that the situation of mis-detecting the edge of the structure region as a defect can be effectively avoided.
[0066] Optionally, the defect detection is performed on the structure region and the non-structure region respectively to generate a second defect detection result of the to-be-tested sample, including: performing the defect detection on the structure region and the non-structure region respectively to determine a second candidate defect region in the compressed global image; screening a second target defect region from the second candidate defect region according to the size relationship between the size of each second candidate defect region and a second size threshold; and generating the second defect detection result of the to-be-tested sample according to the distribution information of the second target defect region in the compressed global image.
[0067] Optionally, the second size threshold can be determined according to the first size threshold and a preset compression ratio. For example, in the defect detection process of splicing after the first defect detection, the first size threshold is set to 400 pixels, and in the defect detection process of defect detection after splicing, the picture pixels are compressed by 100 times, and the second size threshold in the defect detection process of defect detection after splicing can be determined as 4 pixels.
[0068] Optionally, the second defect detection result can also include the defect category to which the second target defect region belongs, and correspondingly, the way of determining the defect category to which the second defect region belongs is the same as the way of determining the defect category to which the first defect region belongs, which will not be described here.
[0069] It should be noted that the method of defect detection before splicing can avoid the problem of system crash caused by the difficulty of computer memory to handle the global picture of the object spliced directly; the method of defect detection after splicing can avoid the situation of missing detection of large-size defects in the fine detection; and the combination of the two defect detection methods can reduce the dependence on computer running memory without affecting the accuracy of defect detection.
[0070] S104, generating a final defect detection result of the sample to be tested according to the first defect detection result and the second defect detection result.
[0071] The final defect detection result refers to a defect detection result generated after the first defect detection result and the second defect detection result are combined.
[0072] Optionally, the same defect information and different defect information determined in the first defect detection result and the second defect detection result can be combined according to a preset rule to generate the final defect detection result. For example, if the first defect detection result determines that the surface a region of the sample to be tested is a defect region and the b region is a non-defect region, and the second defect detection result determines that the a region and the b region are both defect regions, it can be determined that the final defect detection result is that the a region and the b region are both defect regions, or the inconsistent information of the two defect detection results can be sent to relevant personnel, and the final defect region determined by the relevant personnel is obtained to generate the final defect detection result.
[0073] The technical scheme of the embodiment of the application controls the camera movement based on a preset step, photographs the surface of the sample to be tested to obtain at least two target local pictures, processes the at least two target local pictures in a manner of defect detection first and then splicing to generate a first defect detection result of the sample to be tested, processes the at least two target local pictures in a manner of splicing first and then defect detection to generate a second defect detection result of the sample to be tested, and generates a final defect detection result of the sample to be tested according to the first defect detection result and the second defect detection result. By combining the two defect detection manners of defect detection first and then splicing and splicing first and then defect detection, the dependence on the computer running memory can be reduced without affecting the accuracy of defect detection, and the efficiency of defect detection can be improved.
[0074] Embodiment two
[0075] Figure 2A is a flowchart of a defect detection method provided by the embodiment two of the application; Figure 2B is a flowchart of defect category determination provided by the embodiment two of the application; the embodiment provides an optimal example of respectively performing fine inspection and coarse inspection on the article to be detected to generate a defect detection result on the basis of the above-mentioned embodiment.
[0076] As Figure 2A mentioned, the method comprises the following processes:
[0077] 1. Obtain an article local picture, and perform defect detection and identification on the local picture.
[0078] 2. Splice the identified local picture to obtain a global picture with defect identification.
[0079] Wherein, the above steps 1 and 2 are the fine inspection process, that is, the way of defect detection before splicing.
[0080] 3. The obtained local pictures are spliced to obtain a global picture, and the global picture is compressed.
[0081] 4. The compressed global picture is segmented to obtain a structure area and a non-structure area.
[0082] 5. The segmented areas are respectively subjected to defect detection and identification.
[0083] Wherein, the above steps 3-5 are the coarse inspection process, that is, the way of defect detection after splicing.
[0084] Optionally, in the coarse inspection and / or fine inspection process, after the target defect area is determined, the category of the defect area can be further classified in detail to determine the category of the target defect area.
[0085] For example, referring to Figure 2B , the process of determining the category of the target defect area can include:
[0086] 1. Based on the formula D = R out R in , the evaluation value (i.e., D value) corresponding to each first target defect area is determined. Wherein, R out , R in are the minimum circumscribed circle radius and the maximum inscribed circle radius of the defect, respectively.
[0087] 2. According to the size relationship between the D value and the preset evaluation threshold (i.e., 20), if D is greater than or equal to 20, it can be determined that the defect category is a scratch or other linear defect. If D is less than 20, it can be determined that the defect category is a block defect, and the gradient direction of the defect is further calculated, if the gradient direction points to the center of the defect, it can be determined that the defect category is a stain type block defect, if not, it can be determined that the defect category is a bubble type block defect.
[0088] The technical method of the present application can avoid the problem of system crash caused by the difficulty of computer memory to handle the spliced global picture of the object directly; at the same time, the coarse inspection scheme can avoid the situation of missing detection of large size defects in fine inspection. The combination of the two can reduce the dependence on computer running memory without affecting the accuracy of defect detection. In addition, the defect classification method is simple to operate, which can be used as an independent defect classification method, or as a method to assist manual defect labeling.
[0089] Example Three
[0090] Figure 3is a structural block diagram of a defect detection device provided by Embodiment Three of the present application; the defect detection device provided by the embodiment of the present application can be suitable for the case of comprehensively and effectively detecting defects of a sample to be measured, and can be realized in the form of hardware and / or software and configured in a device with a defect detection function, such as a defect detection system, and executed by a processor of the defect detection system. As shown in the figure, the device specifically includes: Figure 3
[0091] The acquisition module 301 is configured to control camera movement based on a preset step length, and capture the surface of the sample to be measured to obtain at least two target local pictures.
[0092] The first generation module 302 is configured to process the at least two target local pictures in a manner of defect detection first and then splicing to generate a first defect detection result of the sample to be measured.
[0093] The second generation module 303 is configured to process the at least two target local pictures in a manner of splicing first and then defect detection to generate a second defect detection result of the sample to be measured.
[0094] The third generation module 304 is configured to generate a final defect detection result of the sample to be measured according to the first defect detection result and the second defect detection result.
[0095] The technical scheme of the embodiment of the present application controls camera movement based on a preset step length, captures the surface of the sample to be measured to obtain at least two target local pictures, processes the at least two target local pictures in a manner of defect detection first and then splicing to generate a first defect detection result of the sample to be measured, processes the at least two target local pictures in a manner of splicing first and then defect detection to generate a second defect detection result of the sample to be measured, and generates a final defect detection result of the sample to be measured according to the first defect detection result and the second defect detection result. By combining the two defect detection manners of defect detection first and then splicing and splicing first and then defect detection, the dependence on computer running memory can be reduced without affecting the accuracy of defect detection, and the efficiency of defect detection can be improved.
[0096] Further, the first generation module 302 can include:
[0097] The first region determination unit is configured to determine a first target defect region in each target local picture based on a preset screening rule according to the gray value of each pixel point in each target local picture.
[0098] The first global map generation unit is configured to defect mark each target local picture according to the first target defect region, splice each target local picture after defect marking, and generate a first global map of the sample to be measured.
[0099] The first result generation unit is configured to generate a first defect detection result of the sample to be tested according to distribution information of the first target defect region in the first global image.
[0100] Further, the first region determination unit is specifically configured to:
[0101] determine the first candidate defect region in the target local image according to a relationship between a gray value of each pixel point in the target local image and a preset gray threshold value;
[0102] According to the size relationship between the size of each first candidate defect region and the first size threshold value, the first target defect region is selected from the first candidate defect region.
[0103] Further, the second generation module 303 can include:
[0104] The compressed image generation unit is configured to splice the at least two target local images to generate a second global image of the sample to be tested, and compress the second global image based on a preset compression ratio to generate a compressed global image.
[0105] The determination unit is configured to perform edge extraction on the compressed global image based on a preset edge detection algorithm, and determine a structure region and a non-structure region in the compressed global image according to an edge extraction result.
[0106] The second result generation unit is configured to perform defect detection on the structure region and the non-structure region respectively to generate a second defect detection result of the sample to be tested.
[0107] Further, the second result generation unit is specifically configured to:
[0108] perform defect detection on the structure region and the non-structure region respectively to determine a second candidate defect region in the compressed global image;
[0109] According to the size relationship between the size of each second candidate defect region and the second size threshold value, the second target defect region is selected from the second candidate defect region.
[0110] According to the distribution information of the second target defect region in the compressed global image, the second defect detection result of the sample to be tested is generated.
[0111] Further, the first defect detection result further includes a defect category to which the first target defect region belongs.
[0112] Correspondingly, the above device is further configured to:
[0113] determine a minimum circumscribed circle radius and a maximum inscribed circle radius corresponding to each first target defect region;
[0114] According to the minimum circumscribed circle radius and the maximum inscribed circle radius, an evaluation value corresponding to each first target defect region is determined based on a preset evaluation calculation rule;
[0115] According to a relationship between the evaluation value corresponding to each first target defect region and a preset evaluation threshold, a defect category of each first target defect region is determined.
[0116] Further, the above device is further used for:
[0117] If the evaluation value corresponding to the first target defect region is less than or equal to the preset evaluation threshold, the first level defect category of the first target defect region is determined as a block defect.
[0118] Based on a preset size requirement, the first target defect region and a preset region around the first target defect region are determined as a target classification region, and the target classification region is divided to determine a division sub-region.
[0119] According to a gradient direction of gray scales between each division sub-region, a second level defect category of the first target defect region is determined.
[0120] Embodiment four
[0121] Figure 4 is a structural schematic diagram of an electronic device provided by an embodiment four of the present application. Figure 4 A structural schematic diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.
[0122] As Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., communicatively connected to the at least one processor 11, where the memory stores a computer program executable by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0123] Various components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, a speaker, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.
[0124] The processor 11 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the defect detection method.
[0125] In some embodiments, the defect detection method can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the defect detection method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the defect detection method by any other appropriate means, such as by means of firmware.
[0126] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0127] Computer programs used to implement the processes of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program, when executed, can cause instructions defined in the flow charts and / or block diagrams to be implemented. The computer program can be executed entirely on a machine, partially on a machine, partially on a machine as a standalone software package and partially on a remote machine or entirely on a remote machine or server.
[0128] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0129] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0130] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0131] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.
[0132] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present disclosure. For example, the steps recited in the present disclosure can be executed in parallel, executed in sequence, or executed in a different order, as long as the desired results of the present disclosure are achieved, and the present disclosure is not limited herein.
[0133] The above detailed description does not limit the scope of the present disclosure. It is understood that various modifications, combinations, sub-combinations, and alternatives can be made to the detailed disclosure without departing from the spirit and principles of the present disclosure. Any modifications, equivalent substitutions, improvements, and the like that are made within the spirit and principles of the present disclosure are included in the scope of the present disclosure.
Claims
1. A defect detection method characterized by, include: The camera movement is controlled by a preset step size to capture images of the surface of the sample under test, thereby obtaining at least two local images of the target; wherein, the sample under test includes any one of silicon wafers and waveguide sheets; The method of first detecting defects and then stitching them together is adopted. At least two local images of the target are processed to generate the first defect detection result of the sample to be tested. The first defect detection result includes the distribution information of defects and the category information of the defects. A method of first stitching and then detecting defects is adopted, which processes at least two local images of the target to generate a second defect detection result of the sample to be tested; wherein, the second defect detection result includes the distribution information of defects and the category information of the defects; Based on the results of the first and second defect detections, the final defect detection results for the sample to be tested are generated. The method of first stitching and then detecting defects involves processing at least two local images of the target to generate a second defect detection result for the sample under test, including: At least two target local images are stitched together to generate a second global image of the sample to be tested. The second global image is then compressed based on a preset compression ratio to generate a compressed global image. Based on a preset edge detection algorithm, edge extraction is performed on the compressed global graph, and the structured and unstructured regions in the compressed global graph are determined according to the edge extraction results. Defect detection is performed on both the structured and unstructured regions to generate a second defect detection result for the sample under test.
2. The method of claim 1, wherein, A defect detection followed by stitching approach is used to process at least two local images of the target to generate the first defect detection result for the sample under test, including: Based on the grayscale values of each pixel in each target local image, and using preset filtering rules, the first target defect region in each target local image is determined. Based on the first target defect area, defects are marked on the local images of each target, and the local images of each target after defect marking are stitched together to generate the first global image of the sample to be tested. Based on the distribution information of the first target defect region in the first global map, the first defect detection result of the sample to be tested is generated.
3. The method of claim 2, wherein, Based on the grayscale values of each pixel in each target local image, and according to preset filtering rules, the first target defect region in each target local image is determined, including: Based on the relationship between the grayscale values of each pixel in the target local image and the preset grayscale threshold, the first candidate defect region in the target local image is determined; Based on the relationship between the size of each first candidate defect region and the preset first size threshold, the first target defect region is selected from the first candidate defect regions.
4. The method of claim 1, wherein, Defect detection is performed separately on the structured and unstructured regions to generate a second defect detection result for the sample under test, including: Defect detection is performed on both the structured and unstructured regions to determine the second candidate defect region in the compressed global map; Based on the relationship between the size of each second candidate defect region and the second size threshold, the second target defect region is selected from the second candidate defect regions. Based on the distribution information of the second target defect region in the compressed global map, the second defect detection result of the sample to be tested is generated.
5. The method of claim 2, wherein, in, The first defect detection result also includes the defect category to which the first target defect area belongs; Accordingly, the defect category to which the first target defect area belongs is determined, including: Determine the minimum circumcircle radius and the maximum incircle radius corresponding to each first target defect region; Based on the minimum circumcircle radius and the maximum incircle radius, and according to the preset evaluation calculation rules, the evaluation value corresponding to each first target defect area is determined; Based on the relationship between the evaluation value corresponding to each first target defect area and the preset evaluation threshold, the defect category of each first target defect area is determined.
6. The method of claim 5, wherein, Determine the defect category for each primary target defect area, including: If the evaluation value corresponding to the first target defect area is less than or equal to the preset evaluation threshold, then the first-level defect category of the first target defect area is determined to be a block defect. Based on the preset size requirements, the first target defect area and its surrounding preset area are determined as the target classification area, and the target classification area is divided into sub-regions. Based on the gradient direction of gray levels between the sub-regions, the second-level defect category of the first target defect region is determined.
7. A defect detection device, characterized in that, include: The acquisition module is used to control the camera movement based on a preset step size to take pictures of the surface of the sample under test in order to obtain at least two local images of the target; wherein, the sample under test includes any one of silicon wafer and waveguide sheet; The first generation module is used to process at least two target local images using a method of first detecting defects and then stitching them together to generate a first defect detection result for the sample to be tested; wherein, the first defect detection result includes the distribution information of defects and the category information to which the defects belong; The second generation module is used to process at least two target local images using a method of first stitching and then detecting defects to generate a second defect detection result for the sample to be tested; wherein, the second defect detection result includes the distribution information of defects and the category information to which the defects belong; The third generation module is used to generate the final defect detection result of the sample to be tested based on the first defect detection result and the second defect detection result. The second generation module includes: The compressed image generation unit is used to stitch together at least two acquired target local images to generate a second global image of the sample to be tested, and to compress the second global image based on a preset compression ratio to generate a compressed global image. The determination unit is used to extract edges from the compressed global graph based on a preset edge detection algorithm, and to determine the structured and unstructured regions in the compressed global graph based on the edge extraction results. The second result generation unit is used to perform defect detection on the structured region and the unstructured region respectively, and generate the second defect detection result of the sample to be tested.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to implement the defect detection method of any one of claims 1-6 when executed by the at least one processor.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the defect detection method according to any one of claims 1-6.
Citation Information
Patent Citations
Lithium battery separator detection method, electronic device, storage medium and system
CN109360186A
Method and system for detecting macroscopic mura defects on large-size liquid crystal panel
CN110175992A
Device and method for quickly detecting surface defect of glass cover plate of smart phone
CN110579485A
FPCA (Flexible Principal Component Analysis) flying shot detection method based on composite light source
CN113884497A
Method for inspecting defect
JP1995072096A