A defect recognition method based on improved optical flow detection

By improving the optical flow detection method, using the Harris operator and the Hungarian algorithm to extract feature points, establishing the optical flow equation and solving the movement speed, the problem of insufficient accuracy of sparse optical flow detection under multiple backgrounds or complex patterns has been solved, and the wafer performance has been significantly improved. Signal-to-noise ratio and robustness of defect detection.

CN117152214BActive Publication Date: 2024-09-13HARBIN INST OF TECH

Patent Information

Application Number
CN202311102953.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2024-09-13
Estimated Expiration
2043-08-30

AI Technical Summary

Technical Problem

Existing sparse optical flow detection methods are difficult to effectively detect wafer defects under multiple backgrounds or high pattern complexity, resulting in insufficient detection accuracy and signal-to-noise ratio.

Method used

An improved optical flow detection method is used to extract feature points through the Harris operator, the Hungarian algorithm is used to match feature points, and the optical flow equation is established. The least squares method is used to solve the movement speed. The golden picture template is abandoned, and the image to be detected is used as a template. Combined with Inverse pyramid downsampling improves signal-to-noise ratio.

Benefits of technology

It significantly increases the optical flow amplitude in the defect area, improves the signal-to-noise ratio of wafer defect detection, and has higher robustness. Compared with traditional methods, it has an advantage of more than 10:1 in signal-to-noise ratio.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117152214B
    Figure CN117152214B
Patent Text Reader

Abstract

A defect recognition method based on improved optical flow detection, which relates to a defect recognition method. The present invention aims to solve the problem that although the method of using sparse optical flow to detect defects can reduce the time complexity of defect detection, it is only used for a single background or a situation with low pattern complexity. The steps of the present invention include step 1, extracting a sparse matrix of feature points in two frames of images; step 2, estimating motion by matching feature points; step 3, establishing a stream equation; step 4, solving the motion speed by the least squares method. The present invention belongs to the field of image processing technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a defect recognition method and belongs to the technical field of image processing. Background Art

[0002] Optical flow detection can actually be regarded as a motion detection method, which can be used to detect the pixel movement direction and displacement distance between two adjacent frames in the video. In principle, it can reduce the impact of lateral errors on the accuracy of wafer defect detection. The existing optical flow defect detection method generally adopts the sparse Lucas optical flow method, and uses the golden image as a template image to perform optical flow calculation on the image to be detected; although the defect detection method using sparse optical flow detection can reduce the time complexity of defect detection, its application scenarios are more likely to be single backgrounds or low pattern complexity. Summary of the invention

[0003] The present invention aims to solve the problem that although the method of detecting defects using sparse optical flow can reduce the time complexity of defect detection, it is only used for a single background or low pattern complexity. A defect recognition method based on improved optical flow detection is proposed.

[0004] The technical solution adopted by the present invention to solve the above-mentioned problem is: the steps of the present invention include:

[0005] Step 1, extracting the sparse matrix of feature points in two frames of images;

[0006] Step 2: Estimate motion using feature point matching;

[0007] Step 3: Establish the streamer equation;

[0008] Step 4: Solve the motion speed by the least square method.

[0009] Furthermore, in step 1, the feature points in two adjacent frames of images are extracted by the Harris operator, wherein the acquisition process of the corner point detection algorithm is as follows:

[0010] Step 101, calculate the pixel gradient of each position in the wafer image to be inspected, the formula is:

[0011]

[0012] Step 102: Calculate the Harris matrix based on the pixel gradient at each position:

[0013]

[0014] The Harris function represents the distribution of the grayscale gradient of the image in the selected window, where w(x,y) represents the weight function. The corresponding function of the corner point at each position is calculated based on the Harris matrix of each position calculated previously:

[0015] R = detM-k(traceM) 2 ,

[0016] Among them, detM represents the determinant of the two-dimensional matrix M, traceM represents the trace of the two-dimensional matrix M, k is an empirical value, representing the Harris coefficient;

[0017] Step 103, find the local maximum response value through non-maximum suppression to determine the corner point position. In the feature corner point detection of the image, the entire image is used as a zero matrix, the corner point position is recorded as 1, and the non-corner point position is recorded as 0, and a sparse matrix is ​​obtained:

[0018] Furthermore, in step 2, the feature points are matched to obtain matching point pairs (x, y) and (x+dx, y+dy), where (x, y) is the corresponding point in the reference frame, and (x+dx, y+dy) is the corresponding point in the current frame. The Hungarian algorithm is used to find the minimum weight perfect matching candidate match. For the undirected graph G=(V, E), the initial match is set to M. First, the augmenting path is defined: the augmenting path is an alternating path, and the end point and starting point of this alternating path are both unsaturated points of M.

[0019] Furthermore, the steps of the Hungarian algorithm include:

[0020] Step a: Initialize the matching M to an empty set; set the matching status of all nodes to unmatched; then start from an unmatched node u and find an augmenting path p;

[0021] Step b: The augmented path is defined as a path starting from a previously unmatched node u, which alternately visits unmatched edges and matched edges in the path, and this path will connect to another unmatched node v at the end;

[0022] Step c: If an augmented path p is found, the edges on the path are inverted, that is, the unmatched edges are converted to matched edges, and the matched edges are converted to unmatched edges; this will result in a larger match M′, which is replaced by M′;

[0023] Step d: Repeat steps b and c until no augmenting path can be found. At this point, the maximum match has been obtained.

[0024] Furthermore, in step 3, according to the grayscale constant assumption, the brightness of the object surface will not change significantly in two adjacent frames, and the optical flow equation can be obtained:

[0025] I(x,y,t)=I(x+dx,y+dy,t+dt),

[0026] This equation indicates that at time t and t+dt, the pixel grayscale values ​​I(x,y,t) and I(x+dx,y+dy,t+dt) at the positions (x,y) and (x+dx,y+dy) in the current frame and the reference frame are the same, which corresponds to the grayscale constant assumption; due to the small displacement assumption stipulated earlier, that is, dx and dy are small displacements, the above optical flow equation can be Taylor expanded in the x and y directions, and then the second-order and higher terms of the Taylor expansion will be deleted for the convenience of subsequent calculations, and the following equation is obtained:

[0027]

[0028] The above formula simplifies to:

[0029]

[0030] Assuming that u and v represent the motion components in the x and y directions respectively, they are calculated by the following formula:

[0031]

[0032]

[0033] Then the streamer equation is simplified to:

[0034] I x u+I y v+I t =0,

[0035] Among them I x ,I y ,I t are the gradient differences of the corresponding pixels in the current frame and the reference frame, namely:

[0036]

[0037] The least squares method is used to find an approximate solution to the above equation.

[0038] Furthermore, in step 4, for multiple point pairs, all motion equations are written in matrix form:

[0039]

[0040] Among them, A is a matrix of size 2N×2, N is the number of point pairs, b is a vector of size 2N×1, and the least squares method calculates the movement speed through the following formula:

[0041]

[0042] Where u and v are the components of the optical flow in the x and y directions.

[0043] The beneficial effects of the present invention are as follows: the present invention abandons the commonly used method of using the wafer golden image as a template, converts the optical flow detection method process, and uses the image to be detected as a template for defect detection; after converting the optical flow process, the optical flow amplitude of the defect area is significantly improved compared with before the improvement, while the optical flow amplitude of the non-defect area remains basically unchanged, which effectively improves the signal-to-noise ratio of wafer defect detection; the preprocessing method of pyramid downsampling is improved, and the scale of the image is enlarged by a reverse pyramid method to improve the signal-to-noise ratio of defect detection; the present invention is compared with some traditional detection methods, and it is found that the present invention has a greater advantage in signal-to-noise ratio than traditional wafer defect detection methods, can achieve a signal-to-noise ratio of more than 10:1, and has higher robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a schematic diagram of light field flow;

[0045] Figure 2 It is a schematic diagram of the Hungarian algorithm; DETAILED DESCRIPTION

[0046] Specific implementation method 1: Combination Figure 1 and Figure 2 To illustrate this embodiment, the steps of a defect recognition method based on improved optical flow detection described in this embodiment include:

[0047] Step 1, extracting the sparse matrix of feature points in two frames of images;

[0048] Step 2: Estimate motion using feature point matching;

[0049] Step 3: Establish the streamer equation;

[0050] Step 4: Solve the motion speed by the least square method.

[0051] Specific implementation method 2: Combination Figure 1 and Figure 2 This embodiment is described. In step 1 of the defect recognition method based on improved optical flow detection described in this embodiment, feature points in two adjacent frames of images are extracted by Harris operator, wherein the acquisition process of the corner point detection algorithm is as follows:

[0052] Step 101, calculate the pixel gradient of each position in the wafer image to be inspected, the formula is:

[0053]

[0054] Step 102: Calculate the Harris matrix based on the pixel gradient at each position:

[0055]

[0056] The Harris function represents the distribution of the grayscale gradient of the image in the selected window, where w(x,y) represents the weight function. The corresponding function of the corner point at each position is calculated based on the Harris matrix of each position calculated previously:

[0057] R = detM-k(traceM) 2 ,

[0058] Among them, detM represents the determinant of the two-dimensional matrix M, traceM represents the trace of the two-dimensional matrix M, k is an empirical value, representing the Harris coefficient;

[0059] Step 103, find the local maximum response value through non-maximum suppression to determine the corner point position. In the feature corner point detection of the image, the entire image is used as a zero matrix, the corner point position is recorded as 1, and the non-corner point position is recorded as 0, and a sparse matrix is ​​obtained:

[0060] Specific implementation method three: Combination Figure 1 and Figure 2 To illustrate this embodiment, in step 2 of a defect recognition method based on improved optical flow detection described in this embodiment, feature points are matched to obtain matching point pairs (x, y) and (x+dx, y+dy), where (x, y) are corresponding points in the reference frame, and (x+dx, y+dy) are corresponding points in the current frame. The Hungarian algorithm is used to find the minimum weight perfect matching candidate match. For the undirected graph G=(V, E), the initial match is set to M, and an augmented path is first defined: the augmented path is an alternating path, and the end point and starting point of this alternating path are both non-saturated points of M.

[0061] Specific implementation method four: Combination Figure 1 and Figure 2 To illustrate this embodiment, the steps of the Hungarian algorithm of a defect recognition method based on improved optical flow detection described in this embodiment include:

[0062] Step a: Initialize the matching M to an empty set; set the matching status of all nodes to unmatched; then start from an unmatched node u and find an augmenting path p;

[0063] Step b: The augmented path is defined as a path starting from a previously unmatched node u, which alternately visits unmatched edges and matched edges in the path, and this path will connect to another unmatched node v at the end;

[0064] Step c: If an augmented path p is found, the edges on the path are inverted, that is, the unmatched edges are converted to matched edges, and the matched edges are converted to unmatched edges; this will result in a larger match M′, which is replaced by M′;

[0065] Step d: Repeat steps b and c until no augmenting path can be found. At this point, the maximum match has been obtained.

[0066] Specific implementation method five: Combination Figure 1 and Figure 2 This embodiment is described. In step 3 of the defect recognition method based on improved optical flow detection described in this embodiment, according to the grayscale constant assumption, the brightness of the object surface will not change significantly in two adjacent frames, and the optical flow equation can be obtained:

[0067] I(x,y,t)=I(x+dx,y+dy,t+dt),

[0068] This equation indicates that at time t and t+dt, the pixel grayscale values ​​I(x,y,t) and I(x+dx,y+dy,t+dt) at the positions (x,y) and (x+dx,y+dy) in the current frame and the reference frame are the same, which corresponds to the grayscale constant assumption; due to the small displacement assumption stipulated earlier, that is, dx and dy are small displacements, the above optical flow equation can be Taylor expanded in the x and y directions, and then the second-order and higher terms of the Taylor expansion will be deleted for the convenience of subsequent calculations, and the following equation is obtained:

[0069]

[0070] The above formula is simplified to:

[0071]

[0072] Assuming that u and v represent the motion components in the x and y directions respectively, they are calculated by the following formula:

[0073]

[0074]

[0075] The streamer equation is simplified to:

[0076] I x u+I y v+I t =0,

[0077] Among them I x ,I y ,I t are the gradient differences of the corresponding pixels in the current frame and the reference frame, namely:

[0078]

[0079] The least squares method is used to find an approximate solution to the above equation.

[0080] Specific implementation method six: Combination Figure 1 and Figure 2 To illustrate this embodiment, in step 4 of a defect recognition method based on improved optical flow detection described in this embodiment, for multiple point pairs, all motion equations are written in matrix form:

[0081]

[0082] Among them, A is a matrix of size 2N×2, N is the number of point pairs, b is a vector of size 2N×1, and the least squares method calculates the movement speed through the following formula:

[0083]

[0084] Where u and v are the components of the optical flow in the x and y directions.

[0085] The above is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent replacement and improvement made to the above embodiments without departing from the content of the technical solution of the present invention, based on the technical essence of the present invention, within the spirit and principles of the present invention, still fall within the protection scope of the technical solution of the present invention.

Claims

1. A defect recognition method based on improved optical flow detection, characterized in that: The steps of the defect recognition method based on improved optical flow detection include: Step 1, extracting the sparse matrix of feature points in two frames of images; Step 2: Estimate motion using feature point matching; match feature points to obtain matching point pairs (x, y) and (x+dx, y+dy), where (x, y) is the corresponding point in the reference frame and (x+dx, y+dy) is the corresponding point in the current frame. Use the Hungarian algorithm to find the minimum weight perfect match candidate match. Set the initial match to M. First, define the augmented path: the augmented path is an interlaced path, and the end point and starting point of this interlaced path are both non-saturated points of M. Step 3: Establish the optical flow equation. According to the grayscale constant assumption, the brightness of the object surface will not change significantly in two adjacent frames, and the optical flow equation can be obtained: I(x,y,t)=I(x+dx,y+dy,t+dt), This equation indicates that at time t and t+dt, the pixel grayscale values ​​I(x,y,t) and I(x+dx,y+dy,t+dt) at the positions (x,y) and (x+dx,y+dy) in the current frame and the reference frame are the same, which corresponds to the grayscale constant assumption; due to the small displacement assumption stipulated earlier, that is, dx and dy are small displacements, the above optical flow equation can be Taylor expanded in the x and y directions, and then the second-order and higher terms of the Taylor expansion will be deleted for the convenience of subsequent calculations, and the following equation is obtained: The above formula is simplified to: Assuming that u and v represent the motion components in the x and y directions respectively, they are calculated by the following formula: The streamer equation is simplified to: I x u+I y v+I t =0, Among them I x ,I y ,I t are the gradient differences of the corresponding pixels in the current frame and the reference frame, namely: I t =I(x+dx,y+dy)-I(x,y), The least squares method is used to fit the above equation to obtain an approximate solution; Step 4: Solve the motion speed by the least square method.

2. The defect recognition method based on improved optical flow detection according to claim 1, characterized in that: In step 1, the Harris operator is used to extract feature points in two adjacent frames of images, where the acquisition process of the corner point detection algorithm is as follows: Step 101, calculate the pixel gradient of each position in the wafer image to be inspected, the formula is: Step 102: Calculate the Harris matrix based on the pixel gradient at each position: The Harris function represents the distribution of the grayscale gradient of the image in the selected window, where w(x,y) represents the weight function. The corresponding function of the corner point at each position is calculated based on the Harris matrix of each position calculated previously: R=detM-k(traceM) 2 , Among them, detM represents the determinant of the two-dimensional matrix M, traceM represents the trace of the two-dimensional matrix M, k is an empirical value, representing the Harris coefficient; Step 103, find the local maximum response value through non-maximum suppression to determine the corner point position. In the feature corner point detection of the image, the entire image is used as a zero matrix, the corner point position is recorded as 1, and the non-corner point position is recorded as 0, and a sparse matrix is ​​obtained:

3. The defect recognition method based on improved optical flow detection according to claim 1, characterized in that: The steps of the Hungarian algorithm include: Step a: Initialize the matching M to an empty set; set the matching status of all nodes to unmatched; then start from an unmatched node u and find an augmenting path p; Step b: The augmented path is defined as a path starting from a previously unmatched node u, which alternately visits unmatched edges and matched edges in the path, and this path will connect to another unmatched node v at the end; Step c: If an augmented path p is found, the edges on the path are inverted, that is, the unmatched edges are converted to matched edges, and the matched edges are converted to unmatched edges; this will result in a larger match M′, which is replaced by M′; Step d: Repeat steps b and c until no augmenting path can be found. At this point, the maximum match has been obtained.

4. The defect recognition method based on improved optical flow detection according to claim 1, characterized in that: In step 4, for multiple point pairs, write all the motion equations in matrix form: Among them, A is a matrix of size 2N×2, N is the number of point pairs, b is a vector of size 2N×1, and the least squares method calculates the movement speed through the following formula: Where u and v are the components of the optical flow in the x and y directions.

Citation Information

Patent Citations

  • Vehicle front target detection method based on characteristic-point mutual information content and optical flow method

    CN104881645A

  • Optical flow estimation method and apparatus

    CN105261042A

  • Video jitter detection method and device

    WO2020253618A1

  • Posture tracking method and apparatus, and computer-readable storage medium

    WO2021008019A1

  • Moving target detection method and detection device, and storage medium

    WO2023134114A1

Cited By

  • Image recognition-based cooling tower water distributor operation state detection method

    CN123161139A