Autofocus method, focusing system, computer readable storage medium and electronic device for wafer detection
By employing multi-frame image synthesis and nonlinear correction techniques, along with an adaptive feature scoring mechanism, the problem of inaccurate focusing caused by metal layer reflection and optical aberrations in wafer inspection has been solved. This has enabled an efficient and reliable autofocus method, ensuring the imaging clarity and focusing accuracy of wafer inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MAIQIAOLI (SHANGHAI) SEMICON TECH CO LTD
- Filing Date
- 2026-04-14
- Publication Date
- 2026-06-23
AI Technical Summary
In wafer inspection, traditional autofocus methods suffer from overexposure or underexposure due to the strong specular reflection of the metal layer on the wafer surface and the edge aberration of the optical lens, which affects the accuracy of sharpness scoring. Furthermore, image quality fluctuations caused by differences in illumination and process layers interfere with the reliability of focusing criteria.
The system employs multi-frame image synthesis with different exposure times and nonlinear correction techniques. It reconstructs linear irradiance maps using the Debevec algorithm and performs gamma correction. Combined with high dynamic range (HDR) synthesis and nonlinear mapping, it generates standard 8-bit images. It also introduces a multi-dimensional image quality assessment and adaptive weighted feature scoring mechanism, and uses the Fibonacci search method to optimize the focus position.
It effectively suppresses overexposure caused by metal layer reflection, improves the robustness of focus feature extraction, ensures image sharpness, and enhances the accuracy and reliability of focus position.
Smart Images

Figure CN122027894B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of semiconductor manufacturing and inspection technology, and specifically to an automatic focusing method, focusing system, computer-readable storage medium, and electronic device for wafer optical inspection. Background Technology
[0002] In semiconductor manufacturing, the surface quality of wafers (such as photolithography patterns, thin film thickness, and defects) needs to be monitored using high-resolution vision inspection systems. The accuracy of the inspection directly depends on the clarity of the acquired images. Because wafer thickness often has slight deviations in actual production, it is impossible to keep the inspection camera at the same height continuously during measurement. Therefore, the height needs to be changed in real time, and the camera's imaging effect needs to be checked to ensure clear images for subsequent measurements.
[0003] To obtain sharp images, autofocus technology has become one of the core functions of high-end wafer inspection equipment. Traditional autofocus methods are usually based on image sharpness evaluation functions, such as gradient functions and frequency domain functions. They work by driving a Z-axis motion platform to scan different heights and calculate the sharpness score of each image, ultimately finding the position with the highest score as the optimal focus point.
[0004] When autofocusing, the following challenges are faced: First, the metal layer on the wafer surface has strong specular reflection characteristics, which makes it easy for single-frame images to be locally overexposed or underexposed, rendering traditional sharpness evaluation algorithms ineffective; Second, fluctuations in image quality (such as overall darkness and low contrast) caused by differences in illumination and process layers can interfere with the reliability of focus criteria; In addition, aberrations (field curvature, distortion) at the edges of the optical lens can introduce irrelevant blur, affecting the accuracy of overall image sharpness scoring.
[0005] Therefore, finding the position with the highest score as the best focus point is a problem that needs to be solved. Summary of the Invention
[0006] The purpose of this invention is to propose an autofocusing method for wafer inspection that can find the optimal focus position.
[0007] To achieve the above objectives, the present invention provides an autofocusing method for wafer inspection, comprising:
[0008] Step S1: For the focusing area on the wafer surface, acquire multiple frames of original images with different exposure times using a camera, and perform high dynamic range (HDR) synthesis and nonlinear correction to obtain a preprocessed image;
[0009] Step S2: Calculate at least one quality evaluation index of the preprocessed image. If the index does not reach the preset threshold, the current image is determined to be invalid and discarded; if it passes the verification, proceed with the subsequent steps.
[0010] Step S3: Extract at least one focus sharpness feature from the verified preprocessed image;
[0011] Step S4: Based on the extracted focus sharpness features, calculate the comprehensive focus score of the current image;
[0012] Step S5: Search along the Z-axis and iteratively repeat steps S1 to S4 at different Z-axis positions to obtain the comprehensive focus score for each position; by comparing the scores at each position, find and locate the Z-axis position that maximizes the comprehensive focus score, and use it as the optimal focus position.
[0013] In the optional scheme, step S1, the high dynamic range (HDR) synthesis and nonlinear correction, includes:
[0014] Based on the Debevec algorithm, a linear irradiance map of the scene is reconstructed using the original images of the multiple frames with different exposure times;
[0015] The linear irradiance map is subjected to a nonlinear mapping based on gamma correction, and the mapping result is quantized into an 8-bit depth image as the preprocessed image.
[0016] In the optional scheme, in step S2, the quality evaluation indicators include average brightness, brightness dispersion, and overexposure saturation rate;
[0017] If the average brightness is less than the first threshold or greater than the second threshold, it is determined to be an image with abnormal exposure and invalidity.
[0018] If the brightness dispersion is less than the third threshold, it is determined to be a low-contrast invalid image;
[0019] If the overexposure saturation rate is greater than the fourth threshold, the image is determined to be an overexposed invalid image.
[0020] In the optional scheme, in step S3, the focus sharpness features include high-frequency energy features, edge density features, and texture entropy features;
[0021] The high-frequency energy features are obtained by calculating the variance of the response value after performing a Laplacian convolution operation on the preprocessed image.
[0022] The edge density feature is obtained by performing Canny edge detection on the preprocessed image and calculating the proportion of edge pixels to the total pixels.
[0023] The texture entropy feature is obtained by constructing the gray-level co-occurrence matrix of the preprocessed image, normalizing the co-occurrence matrix to obtain a probability matrix, and calculating the entropy of the probability matrix.
[0024] In an optional embodiment, in step S3, when extracting the high-frequency energy features, the edge density features, and the texture entropy features, they are extracted only from the central region of interest of the preprocessed image;
[0025] The central region of interest is a region centered on the geometric center of the preprocessed image, with a width and height that are proportionate to the width and height of the original image, respectively.
[0026] In an optional scheme, step S4 includes: normalizing the high-frequency energy feature, the edge density feature, and the texture entropy feature respectively to obtain normalized feature values;
[0027] The normalized feature values are weighted and fused according to the wafer's process layer type to calculate the comprehensive focus score.
[0028] In the optional scheme, in step S5, the search in the Z-axis direction adopts the Fibonacci search method;
[0029] The search interval of the Fibonacci search method is [Z0 - Δ, Z0 + Δ], where Z0 is the focus starting position and Δ is the search radius. The Fibonacci search method finds the position that maximizes the overall focus score through iterative comparison and interval shrinkage. The search terminates when the interval length is less than or equal to a set threshold, or the improvement in the overall focus score is less than a set threshold, or the total number of sampling points reaches a preset value, and outputs the optimal focus position and the corresponding maximum overall focus score.
[0030] The present invention also provides an autofocus system for wafer inspection, comprising:
[0031] The image acquisition module is used to acquire multiple frames of raw images with different exposure times;
[0032] The image preprocessing module is used to perform high dynamic range (HDR) synthesis and nonlinear correction on the acquired raw images to obtain preprocessed images;
[0033] An image scoring module is used to calculate at least one quality assessment index of the preprocessed image; and extract at least one focus sharpness feature from the verified preprocessed image; and calculate the comprehensive focus score of the current image based on the extracted focus sharpness feature.
[0034] The focusing module controls the Z-axis motion platform to obtain a comprehensive focusing score for each position. By comparing the scores at each position, it finds and locates the Z-axis position that maximizes the comprehensive focusing score, which is then taken as the optimal focusing position.
[0035] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.
[0036] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described method.
[0037] The beneficial effects of this invention are as follows: This invention provides a method for finding the optimal focus point, ensuring clear imaging and facilitating subsequent measurements. Attached Figure Description
[0038] The above and other objects, features and advantages of the present invention will become more apparent from the accompanying drawings, in which like reference numerals generally denote like parts.
[0039] Figure 1 This is a flowchart of an automatic focusing method for wafer inspection in one embodiment of the present invention. Detailed Implementation
[0040] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The advantages and features of the present invention will become clearer from the following description and drawings. However, it should be noted that the concept of the technical solution of the present invention can be implemented in many different forms and is not limited to the specific embodiments described herein. The accompanying drawings are all in a very simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the embodiments of the present invention.
[0041] It should be understood that when an element or layer is referred to as "on," "adjacent to," "connected to," or "coupled to" other elements or layers, it may be directly on, adjacent to, connected to, or coupled to other elements or layers, or there may be intervening elements or layers. Conversely, when an element is referred to as "directly on," "directly adjacent to," "directly connected to," or "directly coupled to" other elements or layers, there are no intervening elements or layers. It should be understood that although the terms first, second, third, etc., may be used to describe various elements, components, areas, layers, and / or portions, these elements, components, areas, layers, and / or portions should not be limited by these terms. These terms are only used to distinguish one element, component, area, layer, or portion from another element, component, area, layer, or portion. Therefore, without departing from the teachings of this invention, the first element, component, area, layer, or portion discussed below may be referred to as the second element, component, area, layer, or portion.
[0042] Spatial relation terms such as “below,” “under,” “below,” “under,” “above,” “above,” etc., are used herein for convenience of description to describe the relationship between one element or feature shown in the figure and other elements or features. It should be understood that, in addition to the orientation shown in the figure, spatial relation terms are intended to also include different orientations of the device in use and operation. For example, if the device in the figure is flipped, then the element or feature described as “below” or “under” the other element or feature will be oriented “above” the other element or feature. Therefore, the exemplary terms “below” and “under” can include both upper and lower orientations. The device may be otherwise oriented (rotated 90 degrees or otherwise) and the spatial descriptive terms used herein will be interpreted accordingly.
[0043] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. When used herein, the singular forms “a,” “an,” and “the” are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising” and / or “including,” when used in this specification, identify the presence of the stated features, integers, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups. When used herein, the term “and / or” includes any and all combinations of the associated listed items.
[0044] Example 1
[0045] Reference Figure 1 This embodiment provides an autofocusing method for wafer inspection, including:
[0046] Step S1: Image acquisition and preprocessing: For the focus area on the wafer surface, multiple frames of original images with different exposure times are acquired by the camera, and high dynamic range (HDR) synthesis and nonlinear correction are performed to obtain the preprocessed image (Ic).
[0047] Step S2: Image quality verification: Calculate at least one quality evaluation index of the preprocessed image (Ic). If the index does not reach the preset threshold, the current image is determined to be invalid and discarded; if the verification is passed, proceed to the next step.
[0048] Step S3: Focus Feature Extraction: Extract at least one focus sharpness feature from the verified preprocessed image (Ic);
[0049] Step S4: Comprehensive score calculation: Based on the extracted focus sharpness features, a comprehensive focus score (F) is calculated.
[0050] Step S5: Focus Search and Positioning: Search along the Z-axis, iteratively repeating steps S1 to S4 at different Z-axis positions to obtain the comprehensive focus score (F) for each position; by comparing the scores at each position, find and position the Z-axis position that maximizes the comprehensive focus score (F), which is taken as the optimal focus position. .
[0051] Specifically, in step S1, the high dynamic range (HDR) synthesis and nonlinear correction includes: reconstructing a linear irradiance map of the scene using the original images of multiple frames with different exposure times based on the Debevec algorithm; performing a nonlinear mapping based on gamma correction on the linear irradiance map, and quantizing the mapping result into an 8-bit depth image as the preprocessed image (Ic), wherein the gamma correction coefficient (γ) ranges from 0.5 to 0.7.
[0052] Because the metal layers (such as copper and aluminum) on the wafer surface have high reflectivity, single-frame images are prone to local overexposure (pixel saturation) or underexposure, leading to distortion in subsequent focus feature extraction. This invention employs multi-exposure high dynamic range (HDR) reconstruction technology to suppress this distortion, specifically including the following sub-steps:
[0053] (1) Multi-exposure image acquisition
[0054] At the same Z-axis position and field of view, control the camera with three different exposure times. Three raw images were acquired in succession. Where k=1,2,3 represents the image sequence number. These are pixel coordinates.
[0055] (2) HDR irradiance map reconstruction
[0056] The camera response function g:[0,255]→R is constructed using the classic Debevec algorithm, and the true irradiance map of the scene is obtained. Based on imaging models:
[0057] .
[0058] in The pixel values are normalized from 12-bit to 8-bit. Let g(.) represent the natural logarithm. To solve for the unknown g(.) and g(.), we need to find the natural logarithm. Construct a weighted least squares objective function to minimize:
[0059] λ .
[0060] Where ω(.) is the weighting function, used to reduce the confidence weight of overexposed (close to 255) or underexposed (close to 0) pixels and increase the weight of mid-brightness pixels; λ is the smoothing coefficient, used to constrain the response function. Smoothness; For pixel brightness variables, For function The second derivative of , this term is used to prevent the solved response function from exhibiting violent oscillations; This indicates the search for the value that minimizes the above objective function. and combination.
[0061] By solving the above equations, the smooth camera response function g(.) and the linear irradiance map are obtained. .
[0062] (3) Adaptive Gamma Correction and Output
[0063] Since subsequent feature extraction algorithms (such as edge detection and gradient calculation) are typically optimized for standard 8-bit images and are more sensitive to details in low-to-medium brightness areas, directly using linear HDR images may lead to loss of dark area features or computational overflow. Therefore, non-linear compression and quantization of HDR images are necessary, as shown in the following formula:
[0064] .
[0065] The meanings of each parameter in the formula are as follows: The linear HDR irradiance map generated in step (2) is located on the coordinate system. The pixel value at that location (floating-point); The maximum pixel value in the HDR image is used to normalize the data to the [0,1] interval;
[0066] : Gamma correction coefficient, used to control the degree of nonlinear compression; experiments show that when At a value of 0.6, it can significantly improve the contrast of dark areas while preserving highlight details. This parameter is configurable, and the default value covers more than 90% of process scenarios; 255: quantization factor, which maps the normalized data to an 8-bit integer range. Final output and data flow: After the above calculations, a single-channel 8-bit corrected image is generated. Its mathematical representation is ,in: This indicates that the range of pixel grayscale values is a standard 8-bit unsigned integer; This indicates the spatial resolution of the image (height × width, e.g., 2448 × 2048). This is the corrected image. This data will be used as the sole input source and directly transmitted to step S3 (feature extraction). This ensures that subsequent focus feature calculations (such as Laplacian variance and Canny edge detection) can run stably under standard data formats, avoiding algorithm failure or accuracy degradation due to data format mismatch.
[0067] Final output corrected image The following objectives were achieved:
[0068] 1. Dynamic Range Extension: Effectively restores texture details in highly reflective areas such as metal pads, while preserving structural information of dark trenches and eliminating the "white block" phenomenon caused by single-frame overexposure.
[0069] 2. Linearity restoration: The image pixel value has a linear relationship with the real light intensity of the scene, ensuring that the subsequent calculation of focusing features such as Laplacian gradient and edge density is not affected by nonlinear exposure.
[0070] 3. Improved focusing robustness: Avoids inflated or ineffective focusing scores caused by local reflections, providing a reliable scoring basis for subsequent Fibonacci searches.
[0071] In step S2, the quality assessment indicators include average brightness (μ), brightness dispersion (σ), and overexposure saturation rate (R_sat); if the average brightness (μ) is less than 20 or greater than 230, it is determined to be an image with abnormal exposure; if the brightness dispersion (σ) is less than 10, it is determined to be an image with low contrast; if the overexposure saturation rate (R_sat) is greater than 5%, it is determined to be an image with overexposure.
[0072] To avoid focusing errors caused by abnormal exposure, missing texture, or reflection interference, this embodiment introduces a multi-dimensional image quality assessment mechanism (quality gate).
[0073] Before extracting focus features, the following three quality verification metrics are calculated. If any metric fails to meet the standard, the current image is determined to be an "invalid image" and will not participate in subsequent focus search:
[0074] 1. Average brightness This reflects the overall exposure level.
[0075]
[0076] like <20 or >230 is considered an exposure error (too dark or too bright).
[0077] 2. Brightness dispersion : This refers to the grayscale standard deviation, which reflects the image contrast.
[0078]
[0079] If σ < 10, it is judged as a "flat low-texture area", and even if the edge sharpness is high, it is considered invalid (to prevent noise misjudgment).
[0080] 3. Overexposure saturation : The percentage of pixels with a grayscale value greater than 254.
[0081]
[0082] like If the exposure rate is >5%, it is considered severely overexposed, resulting in loss of detail, and is therefore deemed invalid.
[0083] If the image passes the quality verification, three complementary features are further extracted to characterize sharpness from the perspectives of frequency domain response, spatial domain structure, and statistical texture, respectively.
[0084] In step S3, the focus sharpness features include high-frequency energy features (E_high), edge density features (D_edge), and texture entropy features (H_texture). The high-frequency energy features (E_high) are obtained by performing a Laplacian convolution operation on the preprocessed image (Ic) and calculating the variance of its response value. The edge density features (D_edge) are obtained by performing Canny edge detection on the preprocessed image (Ic) and calculating the proportion of edge pixels to the total pixels. The texture entropy features (H_texture) are obtained by constructing the gray-level co-occurrence matrix (GLCM) of the preprocessed image (Ic), normalizing the co-occurrence matrix to obtain the probability matrix P(i, j), and calculating the entropy of the probability matrix P(i, j).
[0085] (1) High-frequency energy (Frequency domain response):
[0086] High-frequency components are extracted using the discrete Laplacian operator. Convolution kernel. :
[0087]
[0088] Calculate the high frequency response diagram Then calculate its variance:
[0089] = , = ,in Convolution operation, This is the mean of the high-frequency response. The formula essentially calculates the variance of the high-frequency signal. When the image is accurately focused, the edges are sharp, the grayscale changes drastically, and the Laplacian response value... The fluctuation range is large, and the variance is large. This increases accordingly. The indicator is sensitive to edge sharpness, but it is prone to saturation in purely periodic structures (such as dense lines).
[0090] (2) Edge density (Spatial structure)
[0091] The Canny edge detector is used to extract strong edge structures in the image, and the proportion of edge pixels in the entire image is calculated. Parameters are set as follows:
[0092] Gaussian filter standard deviation =1.0;
[0093] High threshold =100;
[0094] low threshold =30.
[0095] Output binary edge map Calculate the percentage of edge pixels:
[0096]
[0097] This formula calculates the number of edges per unit area. When focus is successful, the wafer circuit structure outline is clear, and the edge connections are complete. The number of pixels with a median value of 1 increased. Increase. This indicator effectively reflects the integrity of the circuit structure, but it is sensitive to noise (noise may be falsely detected as edge noise), therefore it needs to be checked beforehand. Gaussian smoothing preprocessing with a value of 1.0.
[0098] (3) Texture entropy (Statistical characteristics)
[0099] Constructing the Gray-Level Co-occurrence Matrix (GLCM):
[0100] Direction: 0° (horizontal);
[0101] Distance: d = 1 pixel;
[0102] Gray levels: will be quantized to 32 levels (0–31);
[0103] Statistical grayscale values gray values of adjacent pixels The probability matrix is obtained by normalizing the number of times they occur simultaneously. If the local gray levels of an image are only 0, 1, 2, and 3, its GLCM matrix P is as follows:
[0104]
[0105] in Represents grayscale The adjacent pixel on the right is grayscale. The probability of a change in texture. A larger diagonal element indicates that the gray levels of adjacent pixels are closer (smoother); a larger off-diagonal element indicates that the texture changes more drastically.
[0106] Calculate the normalized probability matrix Next, calculate the texture entropy:
[0107]
[0108] This formula measures the disorder of image texture. When in sharp focus, the microstructure of irregular texture layers such as photoresist is distinct, with rich grayscale variations. The distribution is relatively scattered, and the entropy value is relatively high. The higher the resolution, the more consistent the resolution becomes in smooth areas (such as passivation layers) or in out-of-focus blur. Concentrated along the diagonal, it has a lower entropy value. This metric compensates for the shortcomings of the former two in textureless areas.
[0109] The three feature calculations are performed in parallel on the GPU.
[0110] Output: Triple feature vector .
[0111] In step S3, when extracting the high-frequency energy feature (E_high), the edge density feature (D_edge), and the texture entropy feature (H_texture), they are extracted only from the central region of interest (ROI) of the preprocessed image (Ic). The central ROI is a region centered on the geometric center of the preprocessed image (Ic), with a width and height that are a certain proportion (e.g., greater than 70%) of the width and height of the original image. The size and shape of this region are adjustable.
[0112] To avoid blurring at image edges caused by lens curvature or distortion interfering with focus scoring, this embodiment does not directly use the entire image for calculation. Instead, it employs a fixed-ratio center region cropping strategy to determine the Region of Interest (ROI). ROI selection logic: based on image correction... Using the geometric center as a reference, the central region is selected as the effective calculation area. Preferably, the width and height of the ROI are 80% of the original image. Technical principle: If different ROI sizes are selected for the same image, the sharpness score will differ significantly (e.g., the full image score is 18.24, while the central ROI score is 19.67). Blurred edges in the full image introduce noise, causing score fluctuations. This embodiment eliminates the influence of edge blur by fixing the selection of the central ROI, ensuring that when scanning at different Z-axis positions, score changes are caused only by focus sharpness, not by changes in the region, significantly improving the monotonicity and consistency of the score curve.
[0113] Step S4 includes: normalizing the high-frequency energy feature (E_high), the edge density feature (D_edge), and the texture entropy feature (H_texture) to obtain normalized feature values; weighting and fusing the normalized feature values according to the wafer's process layer type to calculate the comprehensive focus score (F). First, the process layer to which the current image belongs is automatically classified based on its features. For example, process layers can be divided into three categories: 1. Gate layer: high edge density, high texture entropy, fine line periodicity; 2. Pad layer: low edge density, low high-frequency energy, large area uniformity; 3. Metal layer: line density / coarseness layering, denser at the bottom and coarser at the top. An image contains only one process layer. When determining the weight coefficients of the process layer, corresponding values of sharp and out-of-focus samples are extracted based on the process layer dataset. Logistic regression is used to find the weight combination that best distinguishes between sharp and out-of-focus samples; the final weights can be fine-tuned based on the above recommended values to ensure classification accuracy. Focus score F = ω1 * high + ω2 * edge + ω3 * texture, where ω1, ω2, ω3 are weight coefficients related to the process layer type, and ω1+ω2+ω3=1. high edge `texture` represents the normalized value of the corresponding feature, with values ranging from [0, 1]. The weight coefficients ω1, ω2, and ω3 are the weight coefficients for the same process layer. The weight coefficients ω1, ω2, and ω3 have different values for different process layers.
[0114] For the image structural features of different process layers, the weighting coefficients are configured differently according to the following rules:
[0115] For front-end device layers with dense details and fine lines, such as gate layers and contact hole layers, the weights of edge density and texture entropy are increased, with typical configurations of ω1=0.4, ω2=0.4, and ω3=0.2.
[0116] For short-line mesh interconnect layers such as the lower metal layer, high-frequency energy is the core criterion for judgment, and the typical configuration is ω1=0.4, ω2=0.35, ω3=0.25.
[0117] For the upper metal layer and other thick and long interconnect layers, the high-frequency energy weight is increased, with typical configurations of ω1=0.5, ω1=0.3, and ω3=0.2.
[0118] For large, uniform areas such as pad layers and substrate layers, texture entropy is used as the core criterion for judgment. Typical configurations are: pad layer: ω1=0.2, ω2=0.2, ω3=0.6; substrate layer: ω1=0.1, ω2=0.1, ω3=0.8.
[0119] Through the unified calculation framework and hierarchical weight mapping described above, the logical correlation of focus scoring across all process layers is ensured, while also enabling differentiated and accurate calculations for image features at different process layers, thus adapting to the automatic focus detection requirements of the entire wafer fabrication process.
[0120] To eliminate the dimensional differences among the features in step S4 and to integrate prior knowledge from the process layer, this embodiment employs a normalization and adaptive weighting strategy based on historical statistics to calculate the final comprehensive focus score. .
[0121] Feature normalization: Each feature is divided by the historical statistical mean (based on data from 1000 wafers):
[0122]
[0123] Overall score calculation:
[0124]
[0125] final The larger the value, the clearer the image.
[0126] Output: Scalar score .
[0127] In step S5, the search along the Z-axis uses the Fibonacci search method. The search interval of the Fibonacci search method is [Z0 - Δ, Z0 + Δ], where Z0 is the starting position of focus and Δ is the search radius. The Fibonacci search method finds the position that maximizes the overall focus score (F) through iterative comparison and interval shrinkage. The search terminates when the interval length is less than or equal to a set threshold, or the improvement of the overall focus score is less than a set threshold, or the total number of sampling points reaches a preset value. The optimal focus position (Z*) and the corresponding maximum overall focus score (F_max) are then output.
[0128] This embodiment uses the Fibonacci search method for efficient positioning in the Z-axis direction. Maximize the optimal imaging position ( Since the previous steps have eliminated multi-peak interference and noise through quality gates, ROI optimization, and adaptive weighting, the scoring curve... (z) It exhibits good unimodal characteristics, satisfying the prerequisites for Fibonacci search. Search interval: μm; Accuracy requirement: δ=0.5μm; Calculate the minimum Fibonacci number: .
[0129] Initial interior points:
[0130] μm
[0131] μm
[0132] Iterative process (k=1 to k=11):
[0133] 1. Control the Z-axis platform to move to After executing steps S1-S4, we obtain... ;
[0134] 2. Move to After executing steps S1-S4, we obtain... ;
[0135] 3. Comparison:
[0136] like Then the new interval and order (Reuse);
[0137] Otherwise, the new interval and order
[0138] 4. Calculate the new inner partition point (only one new sampling point is added);
[0139] 5. Update .
[0140] Termination conditions (stop if any one of them is met):
[0141] Interval length ≤ δ;
[0142] Two consecutive maximums promote ;
[0143] Total number of sampling points = 12.
[0144] Output: Optimal position and .
[0145] The main features of this embodiment are as follows:
[0146] 1. The wafer surface (especially the metal layer) has strong specular reflection characteristics, causing local overexposure in traditional single-frame images, which severely interferes with focus feature extraction. This embodiment uses a multi-exposure HDR synthesis + adaptive nonlinear mapping joint strategy to suppress this.
[0147] 2. To avoid focusing errors caused by abnormal exposure, missing texture, or reflection interference, this embodiment introduces a multi-dimensional image quality assessment mechanism.
[0148] 3. To ensure the reliability of the focus scoring, this embodiment adopts a dual mechanism of "quality access control + feature scoring".
[0149] 4. To avoid the blurring effect caused by optical lens field curvature or distortion at the image edges interfering with the focus score, this embodiment does not directly use the entire image for calculation, but instead adopts a fixed-ratio center region cropping strategy to determine the region of interest (ROI).
[0150] 5. Adaptive weighted fusion at the process layer: final A higher value indicates greater clarity. Output: Scalar score .
[0151] 6. Fibonacci search optimizes focus, outputting: optimal position. and .
[0152] Example 2
[0153] This embodiment provides an autofocus system for wafer inspection, including:
[0154] The image acquisition module is used to acquire multiple frames of raw images with different exposure times;
[0155] The image preprocessing module is used to perform high dynamic range (HDR) synthesis and nonlinear correction on the acquired raw images to obtain preprocessed images;
[0156] An image scoring module is used to calculate at least one quality assessment index of the preprocessed image; and extract at least one focus sharpness feature from the verified preprocessed image; and calculate the comprehensive focus score of the current image based on the extracted focus sharpness feature.
[0157] The focusing module controls the Z-axis motion platform to obtain a comprehensive focusing score for each position. By comparing the scores at each position, it finds and locates the Z-axis position that maximizes the comprehensive focusing score, which is then taken as the optimal focusing position.
[0158] Example 3
[0159] This embodiment provides an electronic device, including: a memory storing executable instructions; and a processor that executes the executable instructions in the memory to implement the autofocus method for wafer inspection of Embodiment 1.
[0160] An electronic device according to an embodiment of the present disclosure includes a memory and a processor.
[0161] This memory is used to store non-transitory computer-readable instructions. Specifically, the memory may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory. The non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc.
[0162] The processor may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions. In one embodiment of this disclosure, the processor is used to execute computer-readable instructions stored in the memory.
[0163] Those skilled in the art will understand that, in order to solve the technical problem of how to achieve a good user experience, this embodiment may also include well-known structures such as communication buses and interfaces, and these well-known structures should also be included within the protection scope of this disclosure.
[0164] Example 4
[0165] This disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the autofocus method for wafer inspection of Embodiment 1.
[0166] A computer-readable storage medium according to embodiments of the present disclosure stores non-transitory computer-readable instructions. When these non-transitory computer-readable instructions are executed by a processor, all or part of the steps of the methods described in the foregoing embodiments of the present disclosure are performed.
[0167] The aforementioned computer-readable storage media include, but are not limited to: optical storage media (e.g., CD-ROM and DVD), magneto-optical storage media (e.g., MO), magnetic storage media (e.g., magnetic tape or portable hard drive), media with built-in rewritable non-volatile memory (e.g., memory card), and media with built-in ROM (e.g., ROM cartridge).
[0168] The above description is merely a description of preferred embodiments of the present invention and is not intended to limit the scope of the present invention in any way. Any changes or modifications made by those skilled in the art based on the above disclosure shall fall within the protection scope of the claims.
Claims
1. An automatic focusing method for wafer inspection, characterized in that, include: Step S1: For the focusing area on the wafer surface, acquire multiple frames of original images with different exposure times using a camera, and perform high dynamic range (HDR) synthesis and nonlinear correction to obtain a preprocessed image; Step S2: Calculate at least one quality assessment index of the preprocessed image. If any quality assessment index fails to reach a preset threshold, the current image is deemed invalid and discarded. If the verification is successful, proceed with the subsequent steps. Step S3: Extract at least one focus sharpness feature from the verified preprocessed image; The focus sharpness features include high-frequency energy features, edge density features, and texture entropy features; The high-frequency energy features are obtained by calculating the variance of the response value after performing a Laplacian convolution operation on the preprocessed image. The edge density feature is obtained by performing Canny edge detection on the preprocessed image and calculating the proportion of edge pixels to the total pixels. The texture entropy feature is obtained by constructing the gray-level co-occurrence matrix of the preprocessed image, normalizing the co-occurrence matrix to obtain a probability matrix, and calculating the entropy of the probability matrix. Step S4: Based on the extracted focus sharpness features, calculate the comprehensive focus score of the current image, specifically as follows: The high-frequency energy feature, the edge density feature, and the texture entropy feature are normalized respectively to obtain normalized feature values; The normalized feature values are weighted and fused according to the wafer's process layer type to calculate the comprehensive focus score; Step S5: Search along the Z-axis and iteratively repeat steps S1 to S4 at different Z-axis positions to obtain the comprehensive focus score corresponding to each Z-axis position. By comparing the scores of each Z-axis position, the Z-axis position that maximizes the overall focus score is found and located as the optimal focus position.
2. The autofocusing method for wafer inspection as described in claim 1, characterized in that, In step S1, the high dynamic range (HDR) synthesis and nonlinear correction include: Based on the Debevec algorithm, a linear irradiance map of the scene is reconstructed using the original images of the multiple frames with different exposure times; The linear irradiance map is subjected to a nonlinear mapping based on gamma correction, and the mapping result is quantized into an 8-bit depth image as the preprocessed image.
3. The autofocusing method for wafer inspection as described in claim 1, characterized in that, In step S2, the quality assessment indicators include average brightness, brightness dispersion, and overexposure saturation rate; if any of the quality assessment indicators fails to reach a preset threshold, the current image is determined to be invalid, specifically: If the average brightness is less than the first threshold or greater than the second threshold, it is determined to be an image with abnormal exposure and invalidity. If the brightness dispersion is less than the third threshold, it is determined to be a low-contrast invalid image; If the overexposure saturation rate is greater than the fourth threshold, the image is determined to be an overexposed invalid image.
4. The autofocusing method for wafer inspection as described in claim 1, characterized in that, In step S3, when extracting the high-frequency energy features, the edge density features, and the texture entropy features, they are extracted only from the central region of interest of the preprocessed image; The central region of interest is a region centered on the geometric center of the preprocessed image, with a width and height that are proportionate to the width and height of the original image, respectively.
5. The autofocusing method for wafer inspection as described in claim 1, characterized in that, In step S5, the search in the Z-axis direction adopts the Fibonacci search method; The search interval of the Fibonacci search method is [Z0 - Δ, Z0 + Δ], where Z0 is the focus starting position and Δ is the search radius. The Fibonacci search method finds the position that maximizes the overall focus score through iterative comparison and interval shrinkage. The search terminates when the interval length is less than or equal to a set threshold, or the improvement in the overall focus score is less than a set threshold, or the total number of sampling points reaches a preset value, and outputs the optimal focus position and the corresponding maximum overall focus score.
6. An automatic focusing system for wafer inspection, characterized in that, include: The image acquisition module is used to acquire multiple frames of raw images with different exposure times; The image preprocessing module is used to perform high dynamic range (HDR) synthesis and nonlinear correction on the acquired raw images to obtain preprocessed images; The image scoring module is used to calculate at least one quality assessment index of the preprocessed image. If any quality assessment index fails to reach a preset threshold, the current image is determined to be invalid and discarded. Otherwise, it passes the verification and at least one focus sharpness feature is extracted from the verified preprocessed image. The focus sharpness features include high-frequency energy features, edge density features, and texture entropy features. The high-frequency energy features are obtained by performing a Laplacian convolution operation on the preprocessed image and calculating the variance of its response values. The edge density features are obtained by performing Canny edge detection on the preprocessed image and calculating the proportion of edge pixels to the total pixels. The texture entropy features are obtained by constructing the gray-level co-occurrence matrix of the preprocessed image, normalizing the co-occurrence matrix to obtain a probability matrix, and calculating the entropy of the probability matrix. Based on the extracted focus sharpness features, a comprehensive focus score for the current image is calculated; specifically, the high-frequency energy features, edge density features, and texture entropy features are normalized respectively to obtain normalized feature values. The normalized feature values are weighted and fused according to the wafer's process layer type to calculate the comprehensive focus score; The focusing module is used to control the Z-axis motion platform and obtain the comprehensive focusing score corresponding to each Z-axis position; By comparing the scores of each Z-axis position, the Z-axis position that maximizes the overall focus score is found and located as the optimal focus position.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 5.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 5.