A wafer defect detection method and system based on color difference model

Through the detection method based on the color difference shadow model, the pixel value difference and root mean square error are calculated using sliding matching and covariance calculation, which solves the problems of low detection efficiency and high error detection rate in the prior art, and achieves efficient and accurate wafer defect detection.

CN114463314BActive Publication Date: 2025-04-25PAN ROU (XIAMEN) IND INTELLIGENCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210126904.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-11
Publication Date
2025-04-25
Estimated Expiration
2042-02-11

AI Technical Summary

Technical Problem

In the prior art, wafer defect detection has low detection efficiency and high error detection rate, making it difficult to meet the semiconductor industry's demand for efficient detection.

Method used

Using a detection method based on the color difference shadow model, the wafer image is acquired and segmented into images of each die, and the best matching position is determined using sliding matching and covariance calculation, the pixel value difference is calculated and the root mean square error is calculated to determine whether the die has defects.

Benefits of technology

The efficiency of wafer defect detection is improved, the error detection rate is reduced, and the defects of the wafer to be detected can be detected more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114463314B_ABST
    Figure CN114463314B_ABST
Patent Text Reader

Abstract

The present invention relates to a wafer defect detection method and system based on a color difference model, which obtains a wafer image corresponding to a wafer to be detected, and segments the wafer image according to the position of the grain. For each grain image, the grain image is slidably matched with a template image, the covariance corresponding to each matching position is calculated, and the matching position with the smallest covariance is used as the best matching position, the pixel value difference of all corresponding pixel points of the grain image and the template image at the best matching position is calculated, the root mean square error is calculated according to all pixel value differences, and the grain corresponding to the grain image is determined according to the root mean square error to determine whether there is a defect in the grain, and then it can be determined whether all the grains included in the wafer to be detected are defective, so as to determine whether there is a defect in the wafer to be detected, and whether the grain image is defective is determined by matching with the template image, which can improve the detection efficiency while reducing the false detection rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wafer defect detection, and in particular to a wafer defect detection method and system based on a color difference model. Background Art

[0002] The semiconductor industry is an industry that the country strongly supports. Wafer defect detection is an important part of the chip production process, and its detection efficiency directly affects the chip production cycle. At present, traditional machine vision is usually used for feature extraction to detect wafer defects, but this detection method has low detection efficiency and high false detection rate.

[0003] Based on this, there is an urgent need for a detection method and system with high detection efficiency and low false detection rate. Summary of the invention

[0004] The purpose of the present invention is to provide a wafer defect detection method and system based on a color difference model, which can improve the detection efficiency while reducing the false detection rate.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] A wafer defect detection method based on a color difference model, the detection method comprising:

[0007] Acquire a wafer image corresponding to the wafer to be inspected, and segment the wafer image according to the position of the grains to obtain a grain image corresponding to each grain included in the wafer to be inspected;

[0008] For each of the grain images, sliding matching is performed between the grain image and the template image, the covariance corresponding to each matching position is calculated, and the matching position with the smallest covariance is taken as the best matching position;

[0009] Calculating pixel value differences of all corresponding pixel points of the grain image and the template image at the best matching position;

[0010] A root mean square error is calculated according to all the pixel value differences, and whether a grain corresponding to the grain image has a defect is determined according to the root mean square error.

[0011] A wafer defect detection system based on a color difference model, the detection system comprising:

[0012] An acquisition module is used to acquire a wafer image corresponding to the wafer to be inspected, and segment the wafer image according to the position of the grains to obtain a grain image corresponding to each grain included in the wafer to be inspected;

[0013] A matching module, for slidingly matching each of the grain images with a template image, calculating the covariance corresponding to each matching position, and taking the matching position with the smallest covariance as the best matching position;

[0014] A pixel value difference calculation module, used for calculating the pixel value differences of all corresponding pixel points of the grain image and the template image at the best matching position;

[0015] The defect detection module is used to calculate a root mean square error according to all the pixel value differences, and determine whether a grain corresponding to the grain image has a defect according to the root mean square error.

[0016] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0017] The present invention provides a wafer defect detection method and system based on a color difference model, first obtaining a wafer image corresponding to a wafer to be detected, and segmenting the wafer image according to the position of the grains to obtain a grain image corresponding to each grain included in the wafer to be detected. Then, for each grain image, the grain image is slidingly matched with the template image, the covariance corresponding to each matching position is calculated, and the matching position with the smallest covariance is used as the best matching position, and the pixel value difference of all corresponding pixel points of the grain image and the template image at the best matching position is calculated, and the root mean square error is calculated based on all pixel value differences, and the root mean square error is determined based on the root mean square error to determine whether the grain corresponding to the grain image is defective, and then it can be determined whether all the grains included in the wafer to be detected are defective, so as to determine whether the wafer to be detected is defective, and whether the grain image is defective is determined by matching with the template image, which can improve the detection efficiency while reducing the false detection rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 A flow chart of the detection method provided in Example 1 of the present invention;

[0020] Figure 2 A detailed flow chart of the detection method provided in Example 1 of the present invention;

[0021] Figure 3 This is a system block diagram of the detection system provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] The purpose of the present invention is to provide a wafer defect detection method and system based on a color difference model, which can improve the detection efficiency while reducing the false detection rate.

[0024] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0025] Embodiment 1:

[0026] This embodiment is used to provide a wafer defect detection method based on a color difference model. Figure 1 and Figure 2 As shown, the detection method comprises:

[0027] S1: Acquire a wafer image corresponding to a wafer to be inspected, and segment the wafer image according to the position of the grains to obtain a grain image corresponding to each grain included in the wafer to be inspected;

[0028] S2: for each of the grain images, slidingly matching the grain image with the template image, calculating the covariance corresponding to each matching position, and taking the matching position with the smallest covariance as the best matching position;

[0029] In S2, sliding matching of the grain image with the template image may include: sliding matching of the grain image with the template image in the order from left to right and from top to bottom, and determining a matching position each time a pixel is slid. Specifically, sliding matching refers to moving the position of the grain image in the order from left to right and from top to bottom, so that the pixels at different positions of the grain image match the pixels of the first row and first column of the template image, until all the pixels of the grain image have been matched with the pixels of the first row and first column of the template image, and then the sliding matching process ends to determine multiple matching positions. It should be noted that the order from left to right and from top to bottom refers to moving the rows in the order from top to bottom, matching a single row in the order from left to right, specifically matching the first row from left to right first, moving to the second row after completion, and then matching the second row in the order from left to right, and so on, until the matching ends.

[0030] After determining multiple matching positions, the covariance corresponding to each matching position is calculated. The process of calculating the covariance specifically includes:

[0031] (1) At each matching position, a plurality of sets of matching pixel pairs are randomly selected; the pixel pairs include a pixel in the grain image and a pixel in the template image having the same position coordinates at the matching position;

[0032] For example, if the grain image takes a pixel point with a position coordinate of (10, 200), then the template image also takes a pixel point with a position coordinate of (10, 200), and these two pixel points constitute a pixel point pair. There can be 10 sets of matching pixel point pairs.

[0033] (2) Calculate the covariance corresponding to the matching position based on the pixel values ​​of all pixel pairs.

[0034] The formula for calculating covariance is as follows:

[0035] Cov(X,Y)=E(XY)-E(X)*E(Y);

[0036] Among them, Cov(X, Y) is the covariance; E is the expectation; E(X) is the expectation of the set X; E(Y) is the expectation of the set Y; X is the set of pixel values ​​of the pixel points belonging to the grain image in all pixel pairs; Y is the set of pixel values ​​of the pixel points belonging to the template image in all pixel pairs.

[0037] After calculating the covariance corresponding to each matching position, the matching position with the smallest covariance is selected as the best matching position w * ,h * .

[0038] The best matching position w * ,h * =argmin w,h Cov(X w,h , Y w,h )

[0039] Among them, Cov(X w,h , Y w,h ) refers to the covariance corresponding to the matching position w, h, and the matching position w, h refers to the position when the pixel point of the wth row and the hth column of the grain image matches the pixel point of the 1st row and the 1st column of the template image.

[0040] This embodiment adopts the method of sliding matching plus random point selection to calculate the covariance, which can not only greatly reduce the amount of calculation, but also solve the problem that the template image and the grain image cannot be calculated if the sizes do not match. Regardless of whether the sizes of the template image and the grain image match, the covariance corresponding to each matching position can be calculated, thereby improving applicability.

[0041] S3: Calculating pixel value differences of all corresponding pixel points of the grain image and the template image at the best matching position;

[0042] For example, if the matching position 2,1 is the best matching position, the pixel point of the 2nd row and 1st column of the grain image is overlapped with the pixel point of the 1st row and 1st column of the template image. At this best matching position, the difference between the pixel values ​​of all corresponding pixel points (i.e., the overlapping pixel points) in the grain image and the template image is calculated to obtain a set of data ΔP 0,0 , ΔP 0,1 , ... ΔP w1,h1 .

[0043] The pixel value difference calculation formula is as follows:

[0044]

[0045] Among them, ΔP i,j is the pixel value difference of the corresponding pixel points in the i-th row and j-th column in the overlap area, and the overlap area is the overlapped part when the grain image and the template image are matched at the best matching position; is the pixel value of the pixel point in the i-th row and j-th column in the overlapped area of ​​the grain image; is the pixel value of the pixel point in the i-th row and j-th column in the overlapping area of ​​the template image; i belongs to [0, w1-1], j belongs to [1, h1-1]; w1 is the total number of rows in the overlapping area; h1 is the total number of columns in the overlapping area.

[0046] S4: calculating a root mean square error according to all the pixel value differences, and determining whether a grain corresponding to the grain image has a defect according to the root mean square error.

[0047] The formula for calculating the root mean square error is as follows:

[0048]

[0049] Among them, MSE is the root mean square error; is the average value of all pixel value differences.

[0050] In S4, determining whether the grain corresponding to the grain image has defects according to the root mean square error may include: determining whether the root mean square error is greater than a preset threshold; if so, the grain corresponding to the grain image has defects; otherwise, the grain corresponding to the grain image is normal, and the preset threshold is adjusted by humans based on experience. Using the root mean square error to evaluate the similarity of two images can effectively reduce the probability of false detection caused by different illumination in the detection scene.

[0051] This embodiment utilizes the above method to divide the wafer image of the wafer to be inspected into multiple grain images, slidingly matches each grain image with the template image, determines the best matching position, and judges whether the grain image is defective based on the root mean square error at the best matching position, thereby determining whether the wafer to be inspected has defects. This can more accurately detect the defects of the wafer to be inspected and can improve the detection efficiency.

[0052] Before S2, the detection method of this embodiment further includes generating a template image. As an optional implementation, the step of generating a template image may include:

[0053] (1) obtaining multiple sets of candidate atlases, each set of candidate atlases including two defect-free images, where the defect-free images are images corresponding to defect-free grains;

[0054] An even number of defect-free grains are manually intercepted from a batch of wafers, and the defect-free grains are photographed to obtain defect-free images corresponding to each defect-free grain. The defect-free images are grouped in pairs to obtain multiple sets of candidate atlases. If the number of defect-free images is too small, the amount of information extracted is insufficient. If the number of defect-free images is too large, the amount of calculation will be greatly increased. Therefore, in this embodiment, 8 defect-free images can be obtained, and the 8 defect-free images are randomly divided into 4 groups to obtain 4 sets of candidate atlases.

[0055] (2) for each set of candidate atlases, a pixel value distribution map corresponding to the candidate atlases is drawn according to the pixel values ​​of the two defect-free images included in the candidate atlases;

[0056] The two defect-free images may be grayed out first, and then the pixel value distribution of the two defect-free images may be determined using the pixel value as a feature in a two-dimensional space to draw a pixel value distribution map.

[0057] Specifically, the two defect-free images included in the alternative atlas are respectively recorded as the first image and the second image, and the size of the first image is greater than or equal to the size of the second image. For each first pixel in the first image, determine the second pixel corresponding to the first pixel in the second image, and the position coordinates of the first pixel in the first image and the position coordinates of the second pixel in the second image are the same. Use the pixel value of the first pixel as the horizontal coordinate and the pixel value of the second pixel corresponding to the first pixel as the vertical coordinate to determine the distribution points, and all the distribution points constitute a pixel value distribution map. That is, at the same position (x, y) of the two defect-free images, take the pixel value of the current position (x, y) respectively. is the pixel value of the pixel at position (x, y) in the first image, is the pixel value of the pixel at position (x, y) in the second image. In a plane rectangular coordinate system, the pixel values ​​of the first image are used as the horizontal coordinate and the pixel values ​​of the second image are used as the vertical coordinate. The pixel value distribution map of the alternative atlas can be obtained.

[0058] (3) Use Gaussian distribution to fit the pixel value distribution map and obtain the maximum likelihood function;

[0059] The maximum likelihood function L(μ,σ) is as follows:

[0060] L(μ,σ)=f μ,σ (X 0,0 )f μ,σ (X 0,1 )f μ,σ (X 0,2 )......f μ,σ (X h2-1,w2-1 );

[0061] Among them, f μ,σ (X h2-1,w2-1 ) is the Gaussian distribution function at the position coordinate (h2-1, w2-1); w2 is the width of the first image, and h2 is the height of the first image. For the second image, if there is no second pixel corresponding to the first pixel, the pixel value of the second pixel is directly set to be equal to the pixel value of the first pixel.

[0062] Gaussian distribution function

[0063] Among them, X represents the matrix composed of the pixel values ​​of the two images at the same position coordinate (x, y) f μ,σ (X) represents the probability that X is sampled; D represents the dimension. In this embodiment, X is two-dimensional, then D=2; μ is the mean matrix, which is a matrix with 2 rows and 1 column; σ is the covariance matrix, which is a matrix with 2 rows and 2 columns.

[0064] (4) With the goal of maximizing the maximum likelihood function, the maximum likelihood estimation method is used to solve the objective function and obtain the optimal mean matrix and optimal covariance matrix corresponding to the candidate atlas;

[0065] The objective function is:

[0066] μ * , σ * = argmax μ,σ L(μ,σ);

[0067] The optimal mean matrix can be calculated

[0068] Optimal covariance matrix

[0069] Wherein, n is the number of pixels in the first image.

[0070] The two-dimensional Gaussian distribution model can reduce the accumulation of position deviation errors caused by the unequal sizes of the two defect-free images, and the Gaussian distribution model can theoretically sample any point, which meets the technical requirements. The maximum likelihood estimation method is used to predict the Gaussian optimal distribution function, which can best find the parameters that fit the Gaussian distribution of the pixel values ​​of the two images.

[0071] (5) determining the optimal Gaussian distribution function according to the optimal mean matrix and the optimal covariance matrix corresponding to all candidate atlases;

[0072] Specifically, the average value of the optimal mean matrices corresponding to all alternative atlases is taken as the actual mean matrix, and the average value of the optimal covariance matrices corresponding to all alternative atlases is taken as the actual covariance matrix. The Gaussian distribution function is determined according to the actual mean matrix and the actual covariance matrix. That is, the actual mean matrix and the actual covariance matrix are substituted into the expression of the Gaussian distribution function to determine the optimal Gaussian distribution function.

[0073] (6) Generate a template image based on the optimal Gaussian distribution function.

[0074] Specifically, a reference image is obtained. The reference image is an image corresponding to a defect-free grain. A defect-free grain can be manually intercepted from a batch of wafers and photographed to obtain a reference image. The pixel value of the reference image is used as input, and the pixel value of each pixel point in the template image is calculated according to the optimal Gaussian distribution function to generate a template image. Let the pixel value of the template image be Q i,j , the pixel value of the reference image is R i,j , X=[Q i,j ,R i,j ] T Substituting into the above optimal Gaussian distribution function, 0<=i<=h3-1, 0<=j<=w3-1, h3 represents the height of the reference image, w3 represents the width of the reference image, and R i,j If the value is known, the pixel value Q at position (i, j) in the template image can be calculated. i,j , traverse all i and j to generate the template image.

[0075] This embodiment uses an algorithm to perform fusion calculation on the template image, and fuses multiple defect-free images into one template image, which can effectively extract useful information from the multiple defect-free images and avoid affecting the detection of the entire batch of wafers.

[0076] The detection method provided in this embodiment first randomly intercepts multiple defect-free grains from a batch of wafers, converts the defect-free image corresponding to each defect-free grain into a grayscale image and randomly divides it into multiple groups of candidate atlases, each group of candidate atlases includes two defect-free images. Draw the pixel value distribution map of each group of candidate atlases in two-dimensional space, use Gaussian distribution to fit the two-dimensional distribution, and use maximum likelihood estimation to obtain the optimal Gaussian distribution mean and standard deviation to generate the final template image. After obtaining the template image, the new wafer image is segmented, and each grain is slid and matched with the template respectively. Each sliding randomly samples 10 points in the image area, calculates the covariance of the pixel value, finds the position with the smallest covariance, and uses it as the matching object. Then, the difference of each pixel point is calculated point by point to obtain the pixel difference distribution histogram, and calculates its root mean square error. If the error is greater than a certain threshold, the grain is judged as a defect, thereby improving the detection efficiency of wafer defects and reducing the false detection rate.

[0077] Embodiment 2:

[0078] This embodiment is used to provide a wafer defect detection system based on a color difference model. Figure 3 As shown, the detection system comprises:

[0079] An acquisition module M1 is used to acquire a wafer image corresponding to the wafer to be inspected, and segment the wafer image according to the position of the grains to obtain a grain image corresponding to each grain included in the wafer to be inspected;

[0080] A matching module M2 is used for performing sliding matching between each of the grain images and the template image, calculating the covariance corresponding to each matching position, and taking the matching position with the smallest covariance as the best matching position;

[0081] A pixel value difference calculation module M3 is used to calculate the pixel value differences of all corresponding pixel points of the grain image and the template image at the best matching position;

[0082] The defect detection module M4 is used to calculate a root mean square error according to all the pixel value differences, and determine whether a grain corresponding to the grain image has a defect according to the root mean square error.

[0083] The detection system proposed in this embodiment uses two-dimensional Gaussian distribution to fit pixels, adopts maximum likelihood estimation to find the best, and reversely generates templates to achieve template fusion, and then calculates the covariance to find the optimal matching point, and combines the image difference algorithm with the mean square error to achieve wafer defect recognition. With the support of this method, the wafer detection process can be realized more efficiently.

[0084] Each embodiment in this specification focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0085] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A wafer defect detection method based on a color difference model, characterized in that: The detection method comprises: Acquire a wafer image corresponding to the wafer to be inspected, and segment the wafer image according to the position of the grains to obtain a grain image corresponding to each grain included in the wafer to be inspected; For each of the grain images, sliding matching is performed between the grain image and the template image, the covariance corresponding to each matching position is calculated, and the matching position with the smallest covariance is taken as the best matching position; Calculating pixel value differences of all corresponding pixel points of the grain image and the template image at the best matching position; Calculating a root mean square error according to all the pixel value differences, and determining whether a grain corresponding to the grain image has a defect according to the root mean square error; Before performing sliding matching between the grain image and the template image, the detection method further includes generating a template image, specifically including: Acquire multiple sets of candidate atlases; each set of the candidate atlases includes two defect-free images; the defect-free images are images corresponding to defect-free grains; For each group of the candidate atlases, drawing a pixel value distribution map corresponding to the candidate atlases according to the pixel values ​​of the two defect-free images included in the candidate atlases; Fitting the pixel value distribution map using Gaussian distribution to obtain a maximum likelihood function; Taking the maximum likelihood function as the goal, the objective function is solved by using the maximum likelihood estimation method to obtain the optimal mean matrix and the optimal covariance matrix corresponding to the candidate atlas; Determine an optimal Gaussian distribution function according to the optimal mean matrix and the optimal covariance matrix corresponding to all the candidate atlases; A template image is generated according to the optimal Gaussian distribution function.

2. The detection method according to claim 1, characterized in that: Drawing the pixel value distribution map corresponding to the candidate atlas according to the pixel values ​​of the two defect-free images included in the candidate atlas specifically includes: The two defect-free images included in the candidate atlas are respectively recorded as a first image and a second image; the size of the first image is greater than or equal to the size of the second image; For each first pixel in the first image, determining a second pixel corresponding to the first pixel in the second image; the position coordinates of the first pixel in the first image and the position coordinates of the second pixel in the second image are the same; The distribution points are determined by taking the pixel value of the first pixel point as the horizontal coordinate and the pixel value of the second pixel point corresponding to the first pixel point as the vertical coordinate; all the distribution points constitute a pixel value distribution map.

3. The detection method according to claim 1, characterized in that: Determining the optimal Gaussian distribution function according to the optimal mean matrix and the optimal covariance matrix corresponding to all the candidate atlases specifically includes: The average value of the optimal mean matrices corresponding to all the candidate atlases is taken as the actual mean matrix, the average value of the optimal covariance matrices corresponding to all the candidate atlases is taken as the actual covariance matrix, and the optimal Gaussian distribution function is determined according to the actual mean matrix and the actual covariance matrix.

4. The detection method according to claim 1, characterized in that: Generating a template image according to the optimal Gaussian distribution function specifically includes: Acquire a reference image; the reference image is an image corresponding to a non-defective grain; The pixel values ​​of the reference image are used as input, and the pixel values ​​of the pixel points at various positions in the template image are calculated according to the optimal Gaussian distribution function to generate a template image.

5. The detection method according to claim 1, characterized in that: The sliding matching of the grain image with the template image specifically includes: The grain image is slidably matched with the template image in the order from left to right and from top to bottom, and a matching position is determined each time a pixel is slid.

6. The detection method according to claim 5, characterized in that: The calculating of the covariance corresponding to each matching position specifically includes: At each matching position, a plurality of sets of matching pixel pairs are randomly selected; the pixel pairs include a pixel in the grain image and a pixel in the template image having the same position coordinates at the matching position; The covariance corresponding to the matching position is calculated according to the pixel values ​​of all the pixel pairs.

7. The detection method according to claim 6, characterized in that: The step of calculating the covariance corresponding to the matching position according to the pixel values ​​of all the pixel pairs specifically includes: Cov(X,Y)=E(XY)-E(X)*E(Y); Wherein, Cov(X, Y) is the covariance; E is the expectation; X is the set of pixel values ​​of the pixel points belonging to the grain image in all the pixel pairs; Y is the set of pixel values ​​of the pixel points belonging to the template image in all the pixel pairs.

8. The detection method according to claim 1, characterized in that: Determining whether a grain corresponding to the grain image has a defect according to the root mean square error specifically includes: Determine whether the root mean square error is greater than a preset threshold; If so, the grain corresponding to the grain image has defects.

9. A wafer defect detection system based on a color difference model, characterized in that: The detection system comprises: An acquisition module is used to acquire a wafer image corresponding to the wafer to be inspected, and segment the wafer image according to the position of the grains to obtain a grain image corresponding to each grain included in the wafer to be inspected; A matching module, for slidingly matching each of the grain images with a template image, calculating the covariance corresponding to each matching position, and taking the matching position with the smallest covariance as the best matching position; A pixel value difference calculation module, used for calculating the pixel value differences of all corresponding pixel points of the grain image and the template image at the best matching position; A defect detection module, used for calculating a root mean square error according to all the pixel value differences, and determining whether a grain corresponding to the grain image has a defect according to the root mean square error; Before sliding matching the grain image with the template image, the detection system further includes generating a template image, specifically including: Acquire multiple sets of candidate atlases; each set of the candidate atlases includes two defect-free images; the defect-free images are images corresponding to defect-free grains; For each group of the candidate atlases, drawing a pixel value distribution map corresponding to the candidate atlases according to the pixel values ​​of the two defect-free images included in the candidate atlases; Fitting the pixel value distribution map using Gaussian distribution to obtain a maximum likelihood function; Taking the maximum likelihood function as the goal, the objective function is solved by using the maximum likelihood estimation method to obtain the optimal mean matrix and the optimal covariance matrix corresponding to the candidate atlas; Determine an optimal Gaussian distribution function according to the optimal mean matrix and the optimal covariance matrix corresponding to all the candidate atlases; A template image is generated according to the optimal Gaussian distribution function.

Citation Information

Patent Citations

  • Defect detection method and device, computer equipment and storage medium

    CN112750116A

  • Method and system for fast on-line electro-opticaldetection of wafer defects

    KR1020040065610A