A method for detecting wafer surface residue

By matching the material dispersion database with the grayscale ratio R of blue light and near-infrared dual wavelengths, combined with grayscale morphological reconstruction and the constraint of grayscale gradient consistency between adjacent pixels, the problem of insufficient detection accuracy of wafer surface residues was solved, and more accurate pixel assignment of transition zones and clear boundary of connected regions were achieved.

CN122492687APending Publication Date: 2026-07-31QINGSOFT MICROVISION (HANGZHOU) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGSOFT MICROVISION (HANGZHOU) TECH CO LTD
Filing Date
2026-06-26
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In existing technologies, the detection of residues on wafer surfaces suffers from insufficient accuracy and inaccurate assignment of transition zone pixels, resulting in fluctuations in the measured area of ​​connected regions and equivalent diameters with threshold values, which fails to meet detection requirements.

Method used

The material dispersion database is matched using the gray-scale ratio R of blue light and near-infrared dual wavelengths. By gray-scale morphological reconstruction and gray-scale gradient consistency constraints of adjacent pixels, the assignment of transition zone pixels is determined, the residual connected domain is formed, and the residual parameters are output.

Benefits of technology

It improves the accuracy and stability of wafer surface residue detection, suppresses the effects of light intensity fluctuations and local noise, and ensures the accurate assignment of transition zone pixels and the clarity of connected domain boundaries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492687A_ABST
    Figure CN122492687A_ABST
Patent Text Reader

Abstract

This application relates to a method for detecting residues on a wafer surface, comprising the following steps: dividing the wafer surface into multiple detection areas; acquiring a blue light channel grayscale image and a near-infrared channel grayscale image for each detection area; performing thresholding on the blue light channel grayscale image to obtain a residue area, a transition zone, and a background area; obtaining the ratio R of the blue light channel grayscale value to the near-infrared channel grayscale value of the pixels in the transition zone, and obtaining the residue membership degree M in the transition zone based on the ratio R; performing grayscale morphological reconstruction on the pixels in the transition zone based on the residue area, under the constraint of grayscale gradient consistency between adjacent pixels; merging the reconstructed pixels in the transition zone with the residue area to form a residue connected domain; and outputting the parameters of the residue based on the residue connected domain. This invention can determine the type of residues on the wafer surface and improve the accuracy of defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of semiconductor testing technology, and in particular to a method for detecting residues on the surface of a wafer. Background Technology

[0002] In the semiconductor wafer manufacturing process, automated optical inspection (AOI) is widely used to identify residual defects on the wafer surface.

[0003] In existing technologies, a single global threshold or different global thresholds set according to defect type are typically used for threshold division, forcibly classifying transition zones as either background or defect. This makes it impossible to accurately determine the true classification of pixels within the transition zone. Furthermore, due to the influence of the optical system's point spread function and the three-dimensional morphology of the defect, residue edges often exhibit a grayscale gradient transition zone three to five pixels wide. The adaptive threshold itself fluctuates with local background statistics, causing transition zone pixels to be repeatedly split or merged in adjacent detection batches. This results in the measurement results of the connected region area and equivalent diameter of the same residue drifting with threshold fluctuations, failing to meet the required detection accuracy.

[0004] Therefore, it is necessary to provide a new method for detecting residues on wafer surfaces to solve the aforementioned problems in the prior art. Summary of the Invention

[0005] The technical problem to be solved by this application is how to provide a method for detecting wafer surface residues that can determine the type of residues on the wafer surface and improve the accuracy of defect detection.

[0006] To address the aforementioned technical problems, according to embodiments of this application, a method for detecting residues on a wafer surface is provided, comprising the following steps: dividing the wafer surface into multiple detection regions; acquiring a blue light channel grayscale image and a near-infrared channel grayscale image for each detection region; performing thresholding on the blue light channel grayscale image to obtain a residue region, a transition zone, and a background region; obtaining the ratio R of the blue light channel grayscale value to the near-infrared channel grayscale value of the pixels in the transition zone, and obtaining the residue membership degree M in the transition zone based on the ratio R; performing grayscale morphological reconstruction on the pixels in the transition zone based on the residue region, under the constraint of grayscale gradient consistency between adjacent pixels; merging the reconstructed pixels in the transition zone with the residue region to form a residue connected region; and outputting the parameters of the residue based on the residue connected region.

[0007] According to an embodiment of this application, the thresholding of the blue channel grayscale image includes: determining a corresponding threshold coefficient based on different partitions of the wafer; and obtaining the average background grayscale value of each partition. and background grayscale standard deviation Based on the threshold coefficient and the average gray value and the standard deviation Obtain the first threshold T1 and the second threshold T2; , Where k1 is the first threshold coefficient; k2 is the second threshold coefficient; and k1 < k2, T1 > T2; pixels with gray values ​​less than the second threshold T2 are classified as the residue area, pixels with gray values ​​greater than the first threshold T1 are classified as the background area, and pixels with gray values ​​greater than or equal to the second threshold T2 and less than or equal to the first threshold T1 are classified as the transition zone.

[0008] According to an embodiment of this application, obtaining the residual membership degree M within the transition band based on the ratio R includes: calibrating a material dispersion database; comparing the ratio R with the material dispersion database to obtain a material matching coefficient Cm; and obtaining the residual membership degree M of the pixels in the transition band based on the material matching coefficient Cm.

[0009] According to an embodiment of this application, comparing the ratio R with the material dispersion database to obtain the material matching coefficient Cm includes: dividing the residue material dispersion confidence interval and the substrate material dispersion confidence interval according to the material dispersion database, wherein the residue material dispersion confidence interval includes an organic residue interval and a metal residue interval; when the ratio R falls into the residue material dispersion confidence interval, the material matching coefficient Cm is 1; when the ratio R falls into the substrate material dispersion confidence interval, the material matching coefficient Cm is 0; when the ratio R does not fall into any of the above intervals, the material matching coefficient Cm is calculated. ,in, denoted as the calibrated mean of the dispersion confidence interval of the substrate material; D is the larger of the absolute value of the difference between the calibrated mean of the organic residue interval and the calibrated mean of the dispersion confidence interval of the substrate material, and the absolute value of the difference between the calibrated mean of the metal residue interval and the calibrated mean of the dispersion confidence interval of the substrate material.

[0010] According to an embodiment of this application, obtaining the residual membership degree M of the pixels in the transition zone based on the material matching coefficient Cm includes: calculating the initial residual membership degree M0 of the pixels in the transition zone; M0=(T1-I) / (T1-T2), where I is the gray value of the pixels in the transition zone; and multiplying the initial residual membership degree M0 with the material matching coefficient Cm to obtain the residual membership degree M.

[0011] According to an embodiment of this application, after obtaining the residual membership degree M of the pixels in the transition zone based on the material matching coefficient Cm, the method further includes calculating the gray-level gradient components and gradient magnitude of the pixels in the transition zone. and gradient direction angle ; ,in, Let be the partial derivative of the image in the x-direction; Let P be the partial derivative of the image in the y-direction; for each pixel within the transition band, determine the pixel of the nearest residue region, construct a direction vector pointing to the residue region, and calculate the gray-level directional derivative P along the direction of the residue region; based on the average gray level of the adjacent background regions... The average gray level of the adjacent residue area The relative relationship determines the defect polarity; based on the defect polarity, the residual membership degree M is corrected using a sign function to obtain the standard residual membership degree. , , where λ is the gradient correction intensity coefficient and satisfies 0 < λ < 1; sgn is the sign function.

[0012] According to an embodiment of this application, the step of performing grayscale morphological reconstruction of the pixels in the transition zone based on the residual region under the constraint of grayscale gradient consistency between adjacent pixels includes reconstructing the pixels according to the standard residual membership degree. Arranged in descending order From the decreasing sequence, select corresponding pixels p to be merged, and determine the gray-level gradient consistency of adjacent pixels p. If the gray-level gradient consistency of adjacent pixels is satisfied, merge the pixel p into the residual region, allowing the residual region to grow outward under the constraint of the gray-level gradient consistency of adjacent pixels. If the gray-level gradient consistency is not satisfied, move the pixel p to the end of the decreasing sequence for delayed processing, and reset the standard residual membership degree of the pixel p. Multiply by the delay attenuation coefficient δ, where 0 < δ < 1; repeat the above steps until there are no pixels in the decreasing sequence that satisfy the gray-level gradient consistency of adjacent pixels, and complete the gray-level morphological reconstruction.

[0013] According to an embodiment of this application, the consistency of grayscale gradient between adjacent pixels includes: setting an angle threshold; taking the residual area as a reference, sequentially selecting corresponding pixels p to be merged from the decreasing sequence, and checking whether there are adjacent pixels q that already belong to the residual area in their neighborhood; if there are adjacent pixels q, calculating the angle between the gradient directions of the pixel p to be merged and the adjacent pixel q. , ,in, The gradient direction angle of the pixel p to be merged; Let be the gradient direction angle of the adjacent pixel q; and let the gradient direction angle be... Compared with an angle threshold, if the gradient direction angle If the angle is less than the stated angle threshold, then the grayscale gradient consistency of adjacent pixels is satisfied; if the gradient direction angle is less than the stated angle, then the grayscale gradient consistency of adjacent pixels is satisfied. If the angle threshold is greater than or equal to the angle threshold, it is determined that the grayscale gradient consistency of adjacent pixels is not satisfied.

[0014] According to an embodiment of this application, the setting of the angle threshold includes setting different angle thresholds for dark defects and bright defects respectively, wherein the dark defect corresponds to a first angle threshold, the bright defect corresponds to a second angle threshold, and the first angle threshold is less than the second angle threshold; the first angle threshold is 35°-45°, and the second angle threshold is 50°-70°.

[0015] According to an embodiment of this application, the step of outputting the parameters and defect type of the residue based on the connected components of the residue includes: marking the connected components of the residue to obtain the pixel area A; and obtaining the equivalent circle diameter. , Based on the comparison result between the ratio R and the material dispersion database, the defect type of each residue connected region is marked as organic residue or metal particle; the defect coordinates, the pixel area A, and the equivalent circle diameter are output. .

[0016] By adopting the above technical solution, a material dispersion database matching the grayscale ratio R of blue light and near-infrared dual wavelengths is introduced. The unique properties of the residue material are used as the basis for determining the assignment of transition zone pixels. This is not affected by fluctuations in the absolute value of light intensity. At the same time, the membership degree of the pixels is corrected to suppress local random noise and improve the accuracy of determining the assignment of transition zone pixels. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the steps of a detection method according to an embodiment of the present invention; Detailed Implementation To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Unless otherwise defined, the technical or scientific terms used herein should have the ordinary meaning understood by those skilled in the art. The terms "comprising" and similar expressions used herein mean that the element or object preceding the word covers the element or object listed after the word and its equivalents, but does not exclude other elements or objects.

[0018] The following is in conjunction with the appendix Figure 1 The specific embodiments of the present invention will be further described in detail below.

[0019] Embodiments of the present invention provide a method for detecting residues on a wafer surface, used to detect the coordinates and types of residues on the wafer surface. Specifically, the detection method includes the following steps: S1. Divide the wafer surface into multiple inspection areas. Specifically, since the object-side field of view of an automated optical inspection system is determined by both the optical magnification and the target size of the camera sensor, a single field of view can typically only cover a local area of ​​0.5mm×0.5mm to 2mm×2mm. For example, a 12-inch wafer requires the stitching of multiple areas formed by single fields of view to be covered. Therefore, during inspection, multiple inspection areas need to be divided on the wafer surface, and a step-scanning method is used to image each inspection area, thereby achieving full coverage inspection of the wafer surface. At the same time, an overlap rate of 10% to 20% is usually maintained between adjacent inspection areas to detect image stitching and prevent missed detections, avoiding edge omissions caused by insufficient imaging range of a single field of view. S2. Acquire grayscale images of the blue light channel and the near-infrared channel for each detection area. Specifically, the same detection area is detected using a dual-band detection method, employing both blue and near-infrared light bands. The center wavelength of the blue light channel is 450nm, and the center wavelength of the near-infrared channel is 850nm. Since the ratio of optical reflectance between the blue light band and the near-infrared band differs between different residues and the substrate, and this difference stems from the dispersive characteristics of the material's dielectric function, it is unaffected by fluctuations in the absolute value of light intensity. Therefore, by simultaneously acquiring grayscale images of the blue light channel and the near-infrared channel, a basis can be provided for subsequent determination of the material composition of the residue. In addition, the dual-band acquisition introduces the inherent dielectric dispersion characteristics of the material, that is, the variation law of the refractive index / reflectivity of the material to different wavelengths of light. This is determined by the atomic structure and electronic transition characteristics of the material and does not change with the intensity of external light, the thickness of the film, or the batch of tests. This avoids misjudgment caused by the interference of light fluctuations and film thickness changes in a single grayscale channel.

[0020] S3. Thresholding is performed on the blue light channel grayscale image to obtain the residue area, transition zone, and background area. Specifically, due to the influence of the point spread function of the optical system and the three-dimensional morphology of the defects, there is usually a grayscale gradient transition zone of three to five pixels wide at the edge of the residue. If a single threshold is used for segmentation, the pixels of the transition zone will be forcibly classified as background or defects, causing the measurement results of the connected domain area and the equivalent diameter of the residue to drift with the threshold fluctuation. Since the blue light wavelength is relatively short (center wavelength 450nm), the penetration depth on the silicon and silicon dioxide surfaces is shallow, and it is sensitive to the micro-morphology and thin film interference of the wafer surface. The grayscale contrast between defects and background is higher than that of the near-infrared channel. Therefore, the blue light channel grayscale image is selected as the basis for thresholding to ensure that the spatial boundary between the core area of ​​the residue and the transition zone is clearly distinguishable. If the near-infrared channel is used directly for thresholding, its longer wavelength will cause the boundary of the transition zone to be blurred, and small residues are easily missed. Meanwhile, the threshold division here adopts a dual threshold, which allows the width of the transition band to be stretched or contracted. Specifically, the complex texture area is widened to avoid misjudging periodic textures, while the simple texture area is automatically narrowed to avoid missing tiny residues. This will be explained in detail later.

[0021] S4. Obtain the ratio R of the blue light channel grayscale value to the near-infrared channel grayscale value of the pixel within the transition zone, and obtain the residue membership degree M within the transition zone based on the ratio R. Specifically, if the classification of pixels in the transition zone relies solely on the grayscale value itself, the same pixel may be repeatedly merged in different detection batches due to threshold fluctuations, resulting in poor repeatability of connected component size measurement. In this application, the residue membership degree M is obtained by calculating the ratio R of the blue light channel grayscale value to the near-infrared channel grayscale value. The residue membership degree M is the confidence that a pixel belongs to the residue region, and its value ranges from 0 to 1. The larger the value, the higher the confidence that the pixel belongs to the residue. Thus, it can be confirmed whether the pixel truly belongs to the residue. That is, by using the two criteria of morphology and material, pseudo-defects with similar grayscale characteristics but different materials are distinguished from real contaminants, thereby improving detection accuracy.

[0022] S5. Using the residue region as a reference, perform grayscale morphological reconstruction on the pixels of the transition zone under the constraint of grayscale gradient consistency between adjacent pixels. Specifically, since the membership degree M of the residue is determined by the grayscale position of the pixel, it is easily interfered with by local illumination noise or film reflection, causing noise points to be misjudged as residue edges, resulting in boundary expansion and equivalent diameter distortion of the subsequent residue connected regions. In this application, by using the residue region as a reference, that is, using the residue region as the starting area, grayscale morphological reconstruction is performed on the pixels of the transition zone, and the grayscale gradient consistency constraint between adjacent pixels is applied during the reconstruction process, thereby distinguishing between real residue edges and random noise, avoiding the situation where noise points are mistakenly swallowed and the connected region boundary distortion occurs, thereby improving the stability of detection.

[0023] S6. Merge the pixels of the reconstructed transition zone with the residue region to form a residue connected region. Specifically, during the grayscale morphological reconstruction process, transition zone pixels that satisfy the grayscale gradient consistency constraint of adjacent pixels are incorporated into the residue region, causing the residue region to grow outward. After reconstruction, the residue region is marked with connected regions, and each connected region corresponds to an independent residue defect, thereby combining discrete pixel sets into defect individuals to facilitate the subsequent output of defect information.

[0024] S7. Output the parameters of the residue based on the connected components of the residue.

[0025] In some embodiments, thresholding is performed on the blue channel grayscale image, including determining the corresponding threshold coefficient based on different partitions of the wafer; and obtaining the average background grayscale value of each partition. and background grayscale standard deviation Based on threshold coefficient and grayscale mean and standard deviation Obtain the first threshold T1 and the second threshold T2; ; Where k1 is the first threshold coefficient; k2 is the second threshold coefficient; and k1 < k2, T1 > T2; pixels with gray values ​​less than the second threshold T2 are classified as residue areas, pixels with gray values ​​greater than the first threshold T1 are classified as background areas, and pixels with gray values ​​greater than or equal to the second threshold T2 and less than or equal to the first threshold T1 are classified as transition zones. Specifically, the surface of a wafer has different partitions, such as memory array areas, logic circuit areas, bare silicon areas, and edge ring areas. The optical texture complexity and film structure within each partition are significantly different. If a uniform threshold coefficient is used to process the wafer, the periodic high-density patterns in the memory array area may be easily misjudged as defects, and the tiny residues in the bare silicon area may be classified as background areas due to excessively high thresholds and narrow transition zones, resulting in missed detections. Therefore, in this embodiment, the corresponding first threshold coefficient k1 and second threshold coefficient k2 are determined by the partition type of the pixel, and the average gray value of the background of each partition is calculated. and background grayscale standard deviation Meanwhile, due to the width of the buffer zone of the transition zone Therefore, the width of the buffer zone of the transition band Directly from local standard deviation Decision, and The local standard deviation varies with the texture complexity of the partition, such as the local standard deviation of textured regions with complex textures, like the storage array area. Large, buffer area width Widening the area to prevent periodic textures from being misjudged as defect edges; local standard deviation in simple textured regions such as bare silicon areas. Small, buffer area width The narrowing of the detection area prevents tiny residues from being misclassified as background and missed during detection. This solves the problem of background distortion caused by detection in different partitions on the wafer surface, while improving the anti-spoofing defect detection capability in complex pattern areas and the detection capability of tiny defects in simple pattern areas. This allows the same detection system to adapt to wafer structure features at different process nodes. It is worth noting that a single detection area may span multiple partitions, for example, the left side might be a memory array area, and the right side a bare silicon area. Each pixel independently determines its applicable first threshold coefficient k1 and second threshold coefficient k2 based on the partition type, and performs local grayscale statistics within that partition. For example, in the bare silicon region, the first threshold coefficient k1 has a value range of 1.5-2.5, preferably 2, and the second threshold coefficient k2 has a value range of 2.5-3.5, preferably 3; in the memory array region, the first threshold coefficient k1 has a value range of 2.5-3.5, preferably 3, and the second threshold coefficient k2 has a value range of 3.5-4.5, preferably 4; in the logic circuit region, the first threshold coefficient k1 has a value range of 2.0-3.0, preferably 2.5, and the second threshold coefficient k2 has a value range of 3.0-4.0, preferably 3.5; in the edge ring region, the first threshold coefficient k1 has a value range of 3.0-4.0, preferably 3.5, and the second threshold coefficient k2 has a value range of 4.0-5.0, preferably 4.5. Furthermore, the residues on the wafer surface also include bright defect residues, such as reflective defects from metal particles. The grayscale value of the blue channel in these defects is significantly higher than the average grayscale value μ of the background, and cannot directly fall within the range of the first threshold T1 and the second threshold T2. Therefore, it is necessary to perform grayscale inversion on the blue channel grayscale image of the same detection area, using the average grayscale value μ of the background as a symmetrical reference, to obtain the inverted grayscale value I′=2μ. I; The inverted blue channel grayscale image is used to replace the original image for thresholding. Since the mean grayscale value of the background of the inverted image is still μ and the standard deviation is still σ, the first threshold T1 and the second threshold T2 are also applicable to bright defects: pixels with grayscale values ​​less than the second threshold T2 are classified as residue areas. At this time, the residue in the residue area is the bright defect residue. Pixels with grayscale values ​​greater than the first threshold T1 are classified as background areas. Pixels with grayscale values ​​greater than or equal to the second threshold T2 and less than or equal to the first threshold T1 are classified as transition zones.

[0026] In some embodiments, the membership degree M of the residue within the transition zone is obtained based on the ratio R, including: calibrating a material dispersion database; comparing the ratio R with the material dispersion database to obtain the material matching coefficient Cm; and 0 ≤ Cm ≤ 1, in addition, Cm satisfies min(1, The smaller of the two values ​​is taken as Cm; the residual membership degree M of the pixel in the transition zone is obtained according to the material matching coefficient Cm. Specifically, during the calibration of the material dispersion database, substrate calibration samples, organic residual calibration samples, and metal particle calibration samples are prepared separately. The substrate calibration samples use defect-free wafers that have been confirmed by both production line electrical testing and manual re-inspection. The organic residual calibration samples use residual films with controllable thickness formed by spin-coating standard photoresist on the bare silicon surface and partial development. The metal particle calibration samples use discrete metal particles with controllable particle size formed by depositing standard metal films on the bare silicon surface and laser ablation. For each type of calibration sample, at least three sampling positions are selected in the radial direction of the wafer, and at each sampling position, at least three sampling windows are selected. For example, four sampling positions are selected in the radial direction of the wafer, and four sampling windows are selected in each sampling position. The samples are collected simultaneously. The sample window contains grayscale images of the blue light channel and the near-infrared channel. Background normalization is performed on each sampling window, and the set of normalized ratios R is fitted with a statistical distribution to determine the dispersion confidence intervals for various materials. The organic residue interval and the metal particle interval together constitute the dispersion confidence interval for the residue material, while the bare silicon or silicon dioxide substrate corresponds to the dispersion confidence interval for the substrate material. The detected ratios R are compared with a pre-calibrated material dispersion database to obtain the material matching coefficient Cm. Since the material matching coefficient Cm is not affected by fluctuations in the absolute value of light intensity, the residue membership degree M of the pixels in the transition zone can be obtained based on the material matching coefficient Cm, thereby improving the stability and accuracy of pixel attribution determination in the transition zone.

[0027] In some embodiments, the ratio R is compared with a material dispersion database to obtain a material matching coefficient Cm. This includes dividing the residue material dispersion confidence interval and the substrate material dispersion confidence interval according to the material dispersion database. The residue material dispersion confidence interval includes an organic residue interval and a metal residue interval. When the ratio R falls within the residue material dispersion confidence interval, the material matching coefficient Cm is 1. When the ratio R falls within the substrate material dispersion confidence interval, the material matching coefficient Cm is 0. When the ratio R does not fall within any of the above intervals, the material matching coefficient Cm is calculated. ,in, denoted as the calibrated mean of the dispersion confidence interval of the substrate material; D is the larger of the absolute values ​​of the differences between the calibrated mean of the organic residue interval and the calibrated mean of the dispersion confidence interval of the substrate material, and the absolute values ​​of the differences between the calibrated mean of the metal residue interval and the calibrated mean of the dispersion confidence interval of the substrate material. Specifically, due to fluctuations in production line illumination conditions, film thickness, and wafer radial position, the pixel ratio R in the transition zone may not fall exactly in the center of the calibrated interval, but rather near the interval boundary. Therefore, by comparing the ratio R with the dispersion confidence intervals of the residue material and the substrate material, and setting a three-level judgment mechanism, a smooth transition processing for pixels located at the boundary can be achieved, avoiding the possibility of pixel abrupt changes. Specifically, when the ratio R does not fall into any of the above intervals, the molecule in the calculation formula represents the ratio R of the current pixel to the calibrated mean of the dispersion confidence interval of the substrate material. The degree of deviation; the denominator D characterizes the calibrated mean of the dispersion confidence interval between the residual material (organic or metallic) and the substrate material. The maximum spectral span. That is, by quantifying the material matching coefficient Cm, the possibility of misjudgment is reduced, and the material identity determination of pixels in the transition zone has a probabilistic expressive ability, solving the problem of class oscillation of boundary pixels, thereby reducing the possibility of misjudgment.

[0028] In some embodiments, the residual membership degree M of the pixels in the transition zone is obtained based on the material matching coefficient Cm. This includes calculating the initial residual membership degree M0 of the pixels in the transition zone; M0 = (T1 - I) / (T1 - T2), where I is the grayscale value of the pixel in the transition zone; and multiplying the initial residual membership degree M0 with the material matching coefficient Cm to obtain the residual membership degree M. Specifically, the initial residual membership degree M0 only reflects the positional relationship of the pixel on the grayscale axis relative to the first threshold T1 and the second threshold T2. Therefore, when the illumination intensity fluctuates, causing an overall shift in grayscale, the initial residual membership degree M0 will change accordingly, resulting in poor stability. To improve stability, a material matching coefficient Cm is introduced to correct the initial residual membership degree M0. When a pixel is indeed a residue, the material matching coefficient Cm approaches 1, and the residue membership degree M is approximately equal to the initial residual membership degree M0, preserving its grayscale membership information. When a pixel is indeed a substrate, the material matching coefficient Cm approaches 0, and the residue membership degree M is suppressed. When a pixel is at a boundary, the material matching coefficient Cm is an intermediate value, thus achieving a smooth transition. In other words, by introducing the material matching coefficient Cm, the residue membership degree M is simultaneously constrained by both grayscale position and material properties, thereby suppressing the drift of pure grayscale membership degree with illumination fluctuations and improving the stability and accuracy of pixel assignment determination in the transition zone.

[0029] In some embodiments, after obtaining the residual membership degree M of the pixels in the transition zone based on the material matching coefficient Cm, the method further includes calculating the gray-level gradient components and gradient magnitude of the pixels in the transition zone. and gradient direction angle ; ,in, Let be the partial derivative of the image in the x-direction; Let be the partial derivative of the image in the y-direction; for each pixel within the transition zone, determine the pixel in the nearest residue region and construct a direction vector pointing towards the residue region, then calculate the gray-level directional derivative P along the direction of the residue region (i.e., the direction vector pointing towards the residue region); based on the average gray level of the adjacent background region... Average grayness of adjacent residue areas The relative relationship determines the defect polarity; based on the defect polarity, the residual membership degree M is corrected using a sign function to obtain the standard residual membership degree. , Where λ is the gradient correction intensity coefficient and satisfies 0 < λ < 1; sgn is the sign function. Specifically, although the membership degree M of the residue has been constrained by material dispersion to suppress misjudgment caused by global illumination intensity fluctuations, local illumination noise or film reflection may cause individual pixels to have abnormal grayscale values ​​I and ratios R within a very small spatial range. Such noise points are difficult to distinguish from real residues in terms of material properties, but their grayscale gradient directions are spatially disordered and do not point to any residue core area. Therefore, in this embodiment, it is also necessary to calculate the grayscale gradient components and gradient magnitudes of the pixels in the transition zone. and gradient direction angle The gray-level gradient component includes the partial derivatives of the image in the x-direction. Partial derivative with respect to the y-direction Used to characterize the rate of grayscale change of a pixel in the horizontal and vertical directions; gradient magnitude The overall intensity of local grayscale changes is used to characterize the overall intensity and serves as the normalization denominator in subsequent formulas, thereby eliminating the influence caused by the difference in strength between different defect edges. The gradient direction angle is used to determine the spatial direction of the fastest grayscale increase. In addition, it is necessary to calculate the direction vector of the pixel in the transition zone pointing to the nearest residue area, obtain the grayscale direction derivative P along this direction, and determine the defect polarity. Defect polarity refers to the grayscale performance characteristics of the residue defect relative to the background area. When the average grayscale value of adjacent background areas... The average gray level is greater than that of the adjacent residue area. When the grayscale of the background area is higher than that of the residue area, it is judged as a dark defect, for example, the organic residue absorbs light, resulting in a lower grayscale; when the average grayscale of the adjacent background areas is higher... Less than or equal to the average gray value of adjacent residue areas When the grayscale of the background area is lower than that of the residue area, it is considered a bright defect, for example, due to the reflection of metal particles causing a higher grayscale. The residue membership degree M is corrected according to the sign function of the defect polarity to obtain the standard residue membership degree M2. When the defect polarity is dark, sgn is -1; when the defect polarity is bright, sgn is +1. The sign function corrects the direction of increase or decrease of the residue membership degree M according to the defect polarity, ensuring that both dark and bright defects, with their opposite physical characteristics, receive directional correction without needing to establish separate correction relationships. Specifically, if the grayscale along the residue area shows a monotonic defect-type change, i.e., dark defects become darker or bright defects become brighter, then... As the gradient approaches 1, the standard residual membership M2 is strengthened; if the gradient direction deviates from the residual region or changes chaotically, then... When M² approaches 0 or is negative, it is suppressed. By introducing spatial gradient direction constraints, the interference of local random noise on membership degrees is suppressed, thus facilitating the detection process. It is worth noting that when the standard residual membership degree M² is greater than 1, it is set to 1. In some embodiments, grayscale morphological reconstruction of pixels in the transition zone based on the residual region, under the constraint of grayscale gradient consistency between adjacent pixels, includes reconstructing pixels according to standard residual membership. Arrange the pixels in descending order to form a descending sequence; select the corresponding pixels p to be merged from the descending sequence, and determine the consistency of gray-level gradients between adjacent pixels p; if the determination satisfies the consistency of gray-level gradients between adjacent pixels, the pixel p to be merged is incorporated into the residual region, allowing the residual region to grow outward under the constraint of the consistency of gray-level gradients between adjacent pixels; if the determination does not satisfy the consistency, the pixel p to be merged is moved to the end of the descending sequence for delayed processing, and the standard residual membership degree of the pixel p to be merged is adjusted. Multiply by the delay attenuation factor δ, where 0 < δ < 1; repeat the above steps until there are no pixels in the decreasing sequence that satisfy the gray-level gradient consistency of adjacent pixels, thus completing the gray-level morphological reconstruction. Specifically, this is achieved by reconstructing pixels according to standard residual membership. The decreasing sequence prioritizes the detection of pixels with reasonable spatial trends. It also uses the consistency of grayscale gradients between adjacent pixels for judgment. Pixels that do not meet the gradient consistency requirement are moved to the end of the sequence for delayed processing and their priority is gradually reduced by multiplying by the delay decay coefficient δ. This avoids detection errors caused by insufficient expansion of local neighborhoods and improves the accuracy of grayscale morphological reconstruction. In addition, by combining the decreasing sequence with delay decay, the residue is sorted by membership degree and then filtered by gradient direction, gradually expanding outward from the residue area. Defect edges are preferentially retained because of consistent gradient direction, while noise points are not retained because of divergent gradient direction.

[0030] In some embodiments, ensuring grayscale gradient consistency between adjacent pixels includes: setting an angle threshold; selecting corresponding pixels p to be merged sequentially from a decreasing sequence based on the residue area, and checking whether there are adjacent pixels q that already belong to the residue area in their neighborhood; if there are adjacent pixels q, calculating the angle between the gradient directions of the pixel p to be merged and the adjacent pixel q. , ,in, Let be the gradient direction angle of the pixel p to be merged; Let be the gradient direction angle of the adjacent pixel q; let the gradient direction angle be... Compared with the angle threshold, if the gradient direction angle If the angle is less than the angle threshold, it is determined that the gray-level gradient of adjacent pixels is consistent; if the gradient direction angle is less than the threshold, it is determined that the gray-level gradient of adjacent pixels is consistent. If the angle is greater than or equal to the angle threshold, it is determined that the gray-level gradient consistency between adjacent pixels is not satisfied. Specifically, it checks whether there are any adjacent pixels q that already belong to the residual area in the neighborhood of the pixel to be merged p, ensuring that the reconstruction process always grows from the identified residual area to the transition zone, preventing transition zone pixels from erroneously spreading towards the background area. This is achieved by calculating the angle between the gradient directions of the pixel to be merged p and its adjacent pixel q. The residual edge is compared with an angle threshold. The residual edge corresponds to a continuous abrupt change in the three-dimensional morphology of the wafer surface, with its surface normal vector varying tangentially along the boundary, and the gradient directions of adjacent pixels being highly consistent. In contrast, grayscale fluctuations caused by random noise are spatially uncorrelated, with gradient directions approximately uniformly distributed within the range of 0° to 180°. Therefore, by limiting the consistency of grayscale gradients between adjacent pixels, the possibility of noise points being merged as normal pixels can be further avoided.

[0031] In some embodiments, setting angle thresholds includes setting different angle thresholds for dark defects and bright defects, wherein dark defects correspond to a first angle threshold, bright defects correspond to a second angle threshold, and the first angle threshold is less than the second angle threshold; the first angle threshold is 35°-45°, preferably 40°; and the second angle threshold is 50°-70°, preferably 60°.

[0032] In some embodiments, the parameters and defect types of the residue are output based on the connected components of the residue, including: marking the connected components of the residue to obtain the pixel area A; and obtaining the equivalent circle diameter. , Based on the comparison results between the ratio R and the material dispersion database, the defect type of each residue connected region is labeled as organic residue or metal particle; the defect coordinates, pixel area A, and equivalent circle diameter are output. Specifically, after grayscale morphological reconstruction, the residual region already contains pixels from the merged transition zone. By labeling the reconstructed residual region with connected components (the labeling is well-known to those skilled in the art and will not be elaborated here), the discrete pixel set is formed into independent defect individuals, with each residual connected component corresponding to an independent defect individual. The total number of pixels within the residual connected components is calculated to obtain the pixel area A, and the equivalent circle diameter is obtained based on pixel area A. The equivalent circle diameter This involves equating the irregular connected domains to the diameter parameter of a circle, thus facilitating the determination of defect size. Furthermore, the defect type is labeled based on the comparison result between the ratio R and the material dispersion database. Specifically, based on whether the ratio R belongs to the organic residue or metal particle range, the defect type of each residue connected domain is determined to be either organic residue or metal particle. Simultaneously, the centroid coordinates of each connected domain are calculated as the defect coordinates, achieving precise spatial location of the defect.

[0033] While embodiments of the present invention have been described in detail above, it will be apparent to those skilled in the art that various modifications and variations can be made to these embodiments. However, it should be understood that such modifications and variations fall within the scope and spirit of the invention as set forth in the claims. Furthermore, the invention described herein may have other embodiments and can be implemented or carried out in various ways.

Claims

1. A method for detecting residues on a wafer surface, characterized in that, Includes the following steps: Multiple detection areas are defined on the wafer surface; For each of the detection areas, a grayscale image of the blue light channel and a grayscale image of the near-infrared channel are acquired respectively; The blue light channel grayscale image is divided by thresholding to obtain the residue area, transition zone and background area; Obtain the ratio R of the blue light channel gray value to the near-infrared channel gray value of the pixel within the transition zone, and obtain the membership degree M of the residue within the transition zone based on the ratio R; Based on the residual area, perform grayscale morphological reconstruction on the pixels of the transition zone under the constraint of grayscale gradient consistency between adjacent pixels; The pixels of the reconstructed transition zone are merged with the residue region to form a residue connected region; The parameters of the residue are output based on the connected domain of the residue.

2. The detection method according to claim 1, characterized in that, The thresholding of the blue light channel grayscale image includes, The corresponding threshold coefficient is determined based on the different partitions of the wafer; Obtain the average background grayscale value of each partition. and background grayscale standard deviation ; Based on the threshold coefficient and the average gray value and the standard deviation Obtain the first threshold T1 and the second threshold T2; Where k1 is the first threshold coefficient; k2 is the second threshold coefficient; and k1 < k2, T1 > T2; Pixels with gray values ​​less than the second threshold T2 are classified as the residue area, pixels with gray values ​​greater than the first threshold T1 are classified as the background area, and pixels with gray values ​​greater than or equal to the second threshold T2 and less than or equal to the first threshold T1 are classified as the transition zone.

3. The detection method according to claim 2, characterized in that, The step of obtaining the membership degree M of the residue within the transition zone based on the ratio R includes, Calibrate the material dispersion database; The ratio R is compared with the material dispersion database to obtain the material matching coefficient Cm; The residual membership degree M of the pixels in the transition zone is obtained based on the material matching coefficient Cm.

4. The detection method according to claim 3, characterized in that, The step of comparing the ratio R with the material dispersion database to obtain the material matching coefficient Cm includes, Based on the material dispersion database, confidence intervals for the dispersion of residue materials and confidence intervals for the dispersion of substrate materials are defined. The confidence intervals for the dispersion of residue materials include intervals for organic residues and intervals for metal residues. When the ratio R falls within the dispersion confidence interval of the residual material, the material matching coefficient Cm is 1. When the ratio R falls within the dispersion confidence interval of the substrate material, the material matching coefficient Cm is 0. When the ratio R does not fall into any of the above intervals, the material matching coefficient Cm is calculated; in, denoted as the calibrated mean of the dispersion confidence interval of the substrate material; D is the larger of the absolute value of the difference between the calibrated mean of the organic residue interval and the calibrated mean of the dispersion confidence interval of the substrate material, and the absolute value of the difference between the calibrated mean of the metal residue interval and the calibrated mean of the dispersion confidence interval of the substrate material.

5. The detection method according to claim 3, characterized in that, The residual membership degree M of the pixels in the transition zone is obtained based on the material matching coefficient Cm. include, Calculate the initial residual membership M0 of the pixels in the transition band; M0=(T1-I) / (T1-T2) Where I is the grayscale value of the pixel in the transition zone; The initial residual membership degree M0 is multiplied by the material matching coefficient Cm to obtain the residual membership degree M.

6. The detection method according to claim 3, characterized in that, After obtaining the residual membership degree M of the pixels in the transition band based on the material matching coefficient Cm, the method further includes: Calculate the grayscale gradient components and gradient magnitude of the pixels in the transition zone. and gradient direction angle ; in, Let be the partial derivative of the image in the x-direction; Let be the partial derivative of the image in the y-direction; For each pixel within the transition zone, determine the pixel in the residue region that is closest to it, construct a direction vector pointing to the residue region, and calculate the gray-level directional derivative P along the direction of the residue region; Based on the average gray level of the adjacent background areas The average gray level of the adjacent residue area The relative relationship determines the defect polarity; Based on the defect polarity, the residual membership degree M is corrected using a sign function to obtain the standard residual membership degree. , Where λ is the gradient correction intensity coefficient and satisfies 0 < λ < 1; sgn is the sign function.

7. The detection method according to claim 6, characterized in that, The step of performing grayscale morphological reconstruction on the pixels of the transition zone based on the residual region, under the constraint of grayscale gradient consistency between adjacent pixels, includes: Pixels are classified according to standard residual membership. Arranged in descending order, they form a descending sequence; Select the corresponding pixel p to be merged sequentially from the decreasing sequence, and determine the consistency of gray level gradient between adjacent pixels of the pixel p to be merged. If it is determined that the gray-level gradient consistency of adjacent pixels is satisfied, then the pixel to be merged p is incorporated into the residual area, so that the residual area grows outward under the constraint of the gray-level gradient consistency of adjacent pixels. If the condition is not met, the pixel p to be merged is moved to the end of the decreasing sequence for delayed processing, and the standard residual membership degree of the pixel p to be merged is adjusted. Multiply by the delay attenuation coefficient δ, where 0 < δ < 1; Repeat the above steps until there are no pixels in the decreasing sequence that satisfy the gray-level gradient consistency of adjacent pixels, and complete the gray-level morphological reconstruction.

8. The detection method according to claim 7, characterized in that, The grayscale gradient consistency of adjacent pixels includes, Set the angle threshold; Based on the residue area, select the corresponding pixel p to be merged sequentially from the decreasing sequence, and check whether there is a neighboring pixel q that already belongs to the residue area in its neighborhood; If a neighboring pixel q exists, calculate the gradient direction angle between the pixel p to be merged and the neighboring pixel q. , in, The gradient direction angle of the pixel p to be merged; The gradient direction angle of the adjacent pixel q; The gradient direction angle Compared with an angle threshold, if the gradient direction angle If the angle is less than the stated angle threshold, then the grayscale gradient consistency of adjacent pixels is satisfied; if the gradient direction angle is less than the stated angle, then the grayscale gradient consistency of adjacent pixels is satisfied. If the angle threshold is greater than or equal to the angle threshold, it is determined that the grayscale gradient consistency of adjacent pixels is not satisfied.

9. The detection method according to claim 8, characterized in that, The set angle threshold includes, Different angle thresholds are set for dark defects and bright defects respectively. Dark defects correspond to the first angle threshold, and bright defects correspond to the second angle threshold. The first angle threshold is less than the second angle threshold. The first angle threshold is 35°-45°, and the second angle threshold is 50°-70°.

10. The detection method according to claim 3, characterized in that, The step of outputting the parameters and defect type of the residue based on the connected components of the residue includes, Connectivity labeling is performed on the connected components of the residue to obtain the pixel area A; Obtain the equivalent circle diameter , Based on the comparison result between the ratio R and the material dispersion database, the defect type of each residue connected domain is marked as organic residue or metal particles; Output the defect coordinates, the pixel area A, and the equivalent circle diameter. .