Wafer microstructure defect global interpretation method based on intelligent perception
By performing meshing and adaptive merging on wafer images, combined with a boundary smoothing algorithm, the problem of significant differences in features between different regions in wafer images was solved, achieving defect detection with high detection rate and low false alarm rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHAANXI SUN MOON CORE SEMICON CO LTD
- Filing Date
- 2026-05-07
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies cannot effectively address the significant differences in features between different regions in highly complex wafer images, resulting in over-enhancing in dense areas or insufficient enhancement in sparse areas by the global uniform contrast enhancement strategy, making it difficult to achieve high detection rates and low false alarm rates.
By segmenting the wafer grayscale image into multiple minimum grids, calculating the merging similarity of adjacent grids, adaptively determining the merging threshold and merging region blocks layer by layer, setting a limiting value based on the number of merging layers, performing differentiated contrast enhancement, and eliminating block effects through boundary distance weighting smoothing.
It achieves precise physical segmentation of functional areas on the wafer surface, improves the adaptability and robustness of defect detection, significantly reduces the false alarm rate, and improves the detection accuracy of microstructure defects.
Smart Images

Figure CN122175965A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of semiconductor defect detection technology and relates to a method for full-domain interpretation of wafer microstructure defects based on intelligent sensing. It is applied to image preprocessing for optical detection of defects in semiconductor wafer manufacturing, achieving adaptive enhancement, improving the accuracy of microdefect detection and reducing the false alarm rate. Background Technology
[0002] In semiconductor wafer manufacturing, accurate detection of minute surface defects is crucial for ensuring chip yield and product quality. As integrated circuit process nodes continue to shrink, the pattern density and texture differences in functional areas on the wafer surface become increasingly significant. Because the raw wafer grayscale images acquired by optical inspection equipment often lack sufficient contrast, weak defect signals are easily obscured by the complex background. Therefore, before implementing automated defect identification algorithms, it is essential to perform high-quality contrast enhancement preprocessing on the wafer grayscale images to improve the identifiability of various minute defects.
[0003] To meet the aforementioned image enhancement requirements, the most commonly used traditional techniques in the industry are global histogram equalization or adaptive histogram equalization algorithms with fixed-parameter contrast limits. These methods typically treat the entire wafer image as a whole, or forcibly divide it into a grid of fixed size, and apply a globally uniform contrast limit value for grayscale mapping. In engineering practice, engineers often set a fixed, compromise enhancement parameter based on experience, attempting to control background noise while stretching the overall image contrast, thereby adapting to the batch processing requirements of massive wafer images in standardized pipelines.
[0004] However, the aforementioned traditional techniques have significant drawbacks when dealing with highly complex wafer images. Due to their globally uniform enhancement strategy, they cannot address the actual physical requirements of different functional areas: in densely textured logic circuit areas, a fixed enhancement intensity easily leads to over-amplification of normal pattern edges, resulting in numerous false defects; while in uniform grayscale scribe lines or large-area pad areas, the enhancement intensity is often insufficient, causing real microparticle contamination to be missed. Existing technologies cannot achieve adaptive differentiated enhancement based on the spatial homogeneity of local areas, inevitably falling into the contradiction between over-enhancement and under-enhancement, making it difficult to balance high defect detection rates with low false alarm rates.
[0005] While various solutions exist in the existing technology, they still have shortcomings. For example, Chinese patent CN116773548B discloses a wafer surface defect detection method and system, which discloses a two-level wafer surface defect detection scheme. First, an image is acquired by a first detection station and processed through angle correction, noise reduction, and enhancement. A Canny operator is introduced to construct a defect edge information index, and wafers are classified into three categories—good, contaminated, and damaged—based on dual thresholds. After contaminated wafers are cleaned and re-inspected, defective and damaged wafers are sent to a second detection station. The image is segmented using the Otsu algorithm with particle swarm optimization, defect contours are extracted, and topological relationships are analyzed. The defect index is calculated by combining the defect area and topological level weights to complete the grain defect classification. This scheme is prone to missing micro-defects with insignificant edge features in the initial inspection, the fixed weights in the second detection lead to weak generalization ability, and the original image quality is not verified, resulting in insufficient detection robustness.
[0006] Chinese patent application CN120070407A discloses a method, apparatus, device, and storage medium for evaluating the image quality of wafer defect regions. The method involves dividing a wafer image into multiple image blocks, extracting target feature maps with defect labels using a CNN convolutional neural network, and inputting these features into a prediction model optimized through loss gradient iteration to obtain the quality index for each block. Weights are assigned to the image blocks according to the defect labels, and a weighted sum is obtained to obtain the overall quality index. The evaluation result is then output based on preset parameters, and a dataset optimization model is constructed based on the defect detection cross-union ratio and accuracy. However, this scheme can only evaluate image quality and cannot achieve defect localization and classification. The model relies on a large amount of labeled data, has poor generalization ability for novel defects, and the block-based processing also disrupts the global topological association of defects.
[0007] Chinese patent application CN118505655A discloses a method, apparatus, and computer-readable storage medium for detecting wafer defects. It discloses a wafer defect detection scheme based on reference image comparison. The scheme acquires images of the wafer to be tested and a reference wafer, performs enhancement processing, applies local filtering using a sliding filter kernel, calculates the mean and variance of each region, and calculates the similarity ratio of the same region. After threshold comparison and binarization, a feature map is obtained to achieve defect detection. In multi-reference image scenarios, the false detection rate is reduced by intersecting multiple feature maps. However, the detection results of this scheme are highly dependent on the quality of the reference images, making engineering implementation difficult. Relying solely on the mean and variance is insufficient to identify small, flat defects, and it can only detect the presence or absence of defects, not their fine-grained classification, thus limiting its application scenarios.
[0008] In summary, existing technologies, whether traditional global enhancement algorithms or existing deep learning and comparison-based detection schemes, cannot effectively solve the technical challenges of significant differences in features between different regions in highly complex wafer images and the difficulty in unifying enhancement strategies. Existing technologies cannot achieve adaptive differentiated enhancement based on the spatial homogeneity of local regions, making it difficult to achieve high defect detection rates and low false alarm rates. Summary of the Invention
[0009] The purpose of this invention is to overcome the shortcomings of the prior art and solve the technical problem that the use of a globally unified contrast enhancement strategy in different pattern density regions of wafer images can easily lead to over-enhancement in dense areas and insufficient enhancement in sparse areas. This invention provides a method for global interpretation of wafer microstructure defects based on intelligent perception.
[0010] To achieve the above-mentioned objectives, the present invention provides a method for global identification of wafer microstructure defects based on intelligent sensing, comprising the following steps: Acquire a grayscale image of the wafer surface; divide the wafer grayscale image into multiple minimum grids, and extract the grayscale variance and grayscale mean of each minimum grid; The merging similarity between adjacent minimum grids is calculated based on the gray-level variance and gray-level mean of each minimum grid. The merging threshold is adaptively determined based on the merging similarity. The merging threshold is used to merge adjacent smallest grids layer by layer to obtain multiple region blocks, and the merging level of each region block is recorded. The limiting value of each region block is adaptively set according to the number of merging levels. The limiting value is positively correlated with the number of merging levels. The limiting value is used to perform equalization processing independently on each region block. The boundary pixels of adjacent regions are smoothed to produce an enhanced image; the enhanced image and the standard image are compared to obtain the defect judgment result.
[0011] This invention establishes an automatic mapping mechanism from regional structural features to contrast enhancement parameters by adaptively determining the merging threshold and recording the number of merging levels for regional blocks. This method enables the enhancement intensity to be dynamically adjusted according to changes in regional texture complexity, effectively exposing weak defect features while suppressing the amplification of background noise. It achieves optimal image quality during the full-domain interpretation process and improves the adaptability and robustness of the defect detection system for different types of wafer patterns.
[0012] The method for obtaining the minimum grid side length described in this invention is as follows: obtain the region width of the minimum functional region in the wafer grayscale image, and take one-quarter to one-third of the region width as the number of pixels as the minimum grid side length.
[0013] The present invention calculates the merging similarity between adjacent minimum grids based on the gray-level variance and gray-level mean of each minimum grid. Satisfying the relation:
[0014] in, and These are the grayscale variances of two adjacent smallest grid cells, respectively. and These are the average gray values of the two adjacent smallest grid cells.
[0015] This invention introduces a mean-stabilizing term constructed from the global grayscale variance into the similarity calculation, enabling the algorithm to adaptively adjust the tolerance of local similarity based on the macroscopic contrast benchmark of the entire image. This effectively compensates for local feature interference caused by uneven lighting or process fluctuations, ensuring the accuracy of region segmentation.
[0016] The present invention describes an adaptive determination of the merging threshold based on merging similarity, comprising: obtaining the merging similarity of all adjacent merging units in the current merging level, calculating the mean similarity and the standard deviation of similarity, wherein adjacent merging units are the smallest grid or the region blocks generated after merging; multiplying the standard deviation of similarity by the adjustment coefficient to obtain the adjustment product, and subtracting the adjustment product from the mean similarity to obtain the merging threshold of the current merging level.
[0017] This invention dynamically determines the merging threshold based on the mean and standard deviation of the similarity at the current level, realizing real-time correction of the merging standard. This avoids over-merging or fragmentation when the texture distribution is uneven, ensuring that the generated region blocks are highly consistent with the actual physical functional partitions of the wafer.
[0018] The present invention describes the method of merging adjacent minimum grids layer by layer using a merging threshold to obtain multiple region blocks, which includes: in any merging level, obtaining the historical similarity of adjacent merging units in the previous level and the historical merging threshold of the previous level; in response to the historical similarity meeting a preset condition, accumulating the current similarity recalculated at the current level based on the historical similarity to obtain a corrected similarity; merging adjacent merging units with a corrected similarity greater than or equal to the merging threshold, and updating the gray variance and gray mean of the region blocks after merging, until a preset termination condition is met, thus obtaining multiple region blocks.
[0019] The preset conditions described in this invention are: the historical similarity is less than the historical merging threshold, and is greater than or equal to the difference between the historical merging threshold and the standard deviation of the similarity of the previous level. The current similarity is recalculated based on historical similarity and accumulated to obtain the corrected similarity, which includes: calculating the overflow compensation amount of historical similarity relative to the historical merging judgment benchmark composed of historical merging threshold and similarity standard deviation; The overflow compensation amount is positively superimposed with the current similarity to obtain the corrected similarity.
[0020] By using historical similarity to perform memory-based compensation calculations on current similarity, a correction mechanism is provided for boundaries with high merging potential, effectively bridging the merging interruptions caused by random noise and enhancing the connectivity and integrity of regional blocks in spatial morphology.
[0021] The preset termination conditions described in this invention include any of the following: there are no adjacent merging units in the current merging level with a corrected similarity greater than or equal to the merging threshold; the level value of the current merging level reaches the maximum level number, and the maximum level number is positively correlated with the logarithm of the ratio of the number of pixels on the short side of the wafer grayscale image to the side length of the smallest grid; after the layer-by-layer merging is completed, the smallest grid that has not been merged is independently retained as a region block, and the corresponding merging level number is recorded as zero.
[0022] The adaptive setting of the limiting value of each region block based on the number of merging levels described in this invention includes: obtaining the maximum number of merging levels based on the number of merging levels of all region blocks; using the ratio of the number of merging levels of the target region block to the maximum number of merging levels as a level normalization term; multiplying the level normalization term by the level adjustment coefficient and adding the value 1 to obtain the target magnification factor; and multiplying the preset basic limiting value by the target magnification factor to obtain the limiting value of the target region block.
[0023] The present invention describes the independent equalization processing of each region block using a limiting value, which includes: statistically analyzing the gray-level distribution of each pixel within any region block to obtain a gray-level histogram; cropping the portion of the gray-level histogram that exceeds the limiting value, and evenly distributing the cropped pixels to each gray-level group of the gray-level histogram to obtain a redistribution histogram; calculating the cumulative distribution function based on the redistribution histogram, and using the cumulative distribution function as a gray-level mapping function to perform equalization processing on the region block.
[0024] The present invention describes a smooth transition processing method for boundary pixels of adjacent regions to output an enhanced image, comprising: for a target pixel whose distance from the boundary of a region block does not exceed the transition width, obtaining the target pixel's own mapping value under the grayscale mapping function of its own region block, and the adjacent mapping values under the grayscale mapping function of the adjacent region blocks; obtaining the pixel distance from the target pixel to the boundary of the region block, and using the ratio of the pixel distance to the transition width as a distance weight; weighting the target pixel's own mapping value using the complementary value of the distance weight, weighting the adjacent mapping values using the distance weight, and adding the two weighted results to complete the smooth transition processing and output the enhanced image.
[0025] This invention employs a weighted fusion algorithm based on boundary distance weights to process the edges of adjacent regions, eliminating the block effect caused by block-based differential enhancement, ensuring a smooth grayscale transition of the enhanced image at cross-regional boundaries, and eliminating the interference of visual discontinuities on defect extraction.
[0026] Compared with existing technologies, this invention has at least the following advantages: First, by extracting wafer image mesh features and using a similarity metric based on global variance, combined with an adaptive layer-by-layer merging strategy with a history correction mechanism, it achieves precise physical segmentation of functional regions on the wafer surface; second, it establishes a positive correlation mapping between the number of merging levels and the amplitude limit, performs differentiated contrast-limited adaptive histogram equalization on regions with different homogenization levels, and supplements it with boundary distance-weighted fusion smoothing; third, it solves the inherent contradiction between over-enhancement in dense circuit regions and insufficient enhancement in sparse background regions, significantly improves the contrast of defect signals and the continuity of global brightness, greatly reduces the false alarm rate caused by process color differences, and improves the detection accuracy of microstructure defects. Attached Figure Description
[0027] Figure 1 This is a flowchart illustrating the whole-domain identification method for wafer microstructure defects based on intelligent sensing, which is the subject of this invention.
[0028] Figure 2 This is a grayscale image of the wafer surface involved in the present invention.
[0029] Figure 3 This is a schematic diagram of the present invention relating to dividing a wafer grayscale image into multiple minimum grids.
[0030] Figure 4 This is a schematic diagram of the multiple region blocks involved in the present invention.
[0031] Figure 5 This invention relates to an enhanced result of conventional histogram equalization processing.
[0032] Figure 6 This invention relates to enhanced images. Detailed Implementation
[0033] The technical solution of the present invention will now be clearly and completely described in conjunction with the embodiments and accompanying drawings.
[0034] Example 1: The technical solution involved in this embodiment addresses the defect detection stage in semiconductor wafer manufacturing. After the optical inspection equipment acquires an image of the wafer surface, it needs to enhance the image contrast to improve the identifiability of defects. The wafer surface contains functional regions with varying pattern densities, such as dense logic circuit areas, sparse pad areas, and dicing tracks, each with significantly different requirements for contrast enhancement. This embodiment is applicable to the image preprocessing stage of optical defect detection on wafer surfaces. Before executing the defect recognition algorithm, adaptive multi-scale contrast enhancement is performed on the acquired wafer grayscale image, ensuring that regions with different pattern densities receive appropriate enhancement effects.
[0035] The wafer microstructure defect global interpretation method based on intelligent sensing provided in this embodiment is as follows: Figure 1 As shown, the method for comprehensive identification of wafer microstructure defects based on intelligent sensing includes the following steps: S1: Obtain the wafer grayscale image, mesh it, and extract grayscale features.
[0036] Obtain a grayscale image of the wafer surface; divide the wafer grayscale image into multiple minimum grids, and extract the grayscale variance and grayscale mean of each minimum grid.
[0037] In one embodiment, this technical solution is applied to defect detection in semiconductor wafer manufacturing. After the optical inspection equipment acquires an image of the wafer surface, the image needs to be contrast-enhanced to improve the identifiability of defects. The wafer surface contains functional regions with varying pattern densities, such as dense logic circuit areas, sparse pad areas, and dicing tracks. Using a uniform enhancement strategy can easily lead to over-enhancing dense areas or under-enhancing sparse areas. Therefore, a grayscale image of the wafer surface is first acquired as the basic input data for subsequent adaptive processing. After acquiring the wafer grayscale image, it is uniformly divided into multiple non-overlapping minimum grids, and the grayscale variance and mean of all pixels within each minimum grid are extracted using standard statistical formulas to quantify the local texture complexity and brightness level.
[0038] To reasonably set the physical size of the grid to adapt to different wafer patterns, the minimum grid side length is obtained as follows: The width of the smallest functional region in the wafer grayscale image is obtained, and a preset proportion of this width is taken as the minimum grid side length. The smallest functional region is typically the smallest independent structural block on the wafer surface; preferably, the scribe line is used as the smallest functional region. The pixel width occupied by the scribe line in the wafer grayscale image is obtained as the region width. For example, if the scribe line width is 128 pixels, preferably, the preset proportion is one-quarter, then the minimum grid side length is calculated to be 32 pixels. Dividing the wafer grayscale image according to this side length ensures that the minimum grid does not cross too many different functional regions, preserving the most basic local feature details.
[0039] By adaptively determining the granularity of the minimum grid by combining the minimum functional area size of the wafer surface, and extracting the microscopic gray-level mean, gray-level variance and macroscopic global gray-level variance, the initial texture state of different regions of the wafer surface is effectively captured, and accurate and reliable data support is provided for subsequent mesh merging and differential contrast enhancement.
[0040] S2, calculate the similarity of adjacent merges based on the grayscale features of the grid.
[0041] The similarity between adjacent minimum grids is calculated based on the gray variance and gray mean of each minimum grid.
[0042] In one embodiment, after obtaining the local statistical features of each minimum grid, it is necessary to evaluate whether two spatially adjacent minimum grids belong to the same physical functional region. Based on this, the absolute value of the difference in gray-level variance and the absolute value of the difference in gray-level mean are extracted between adjacent minimum grids, and the difference between the two is used as a penalty term for similarity in reverse mapping.
[0043] To quantify the similarity of attributes between adjacent regions, the merged similarity between adjacent minimum grids satisfies the following relationship:
[0044] In the formula, To merge similarity; and These are the grayscale variances of two adjacent smallest grid cells, respectively. and These are the average gray values of the two adjacent smallest grid cells.
[0045] Understandably, this merged similarity constructs an inverse proportional measurement mechanism based on the absolute distance in the feature space. The similarity reaches its maximum value of 1 when the variance and mean of adjacent grids are exactly the same; as the local texture difference or the overall brightness difference increases, the similarity shows a smooth decreasing trend; the merged similarity provides an extremely reliable basis for merging decisions to capture the boundaries of real physical regions.
[0046] S3, adaptive threshold setting, layer-by-layer merging and recording of levels.
[0047] The merging threshold is adaptively determined based on the merging similarity. The merging threshold is used to merge adjacent smallest grids layer by layer to obtain multiple region blocks, and the merging level of each region block is recorded.
[0048] In one embodiment, the pattern distribution on the wafer surface exhibits strong non-uniformity. Using a fixed threshold for region merging often leads to over-merging of areas with small contrast differences, or fragmentation of areas with complex textures. Therefore, after calculating the merge similarity between adjacent merged units, the judgment benchmark needs to be dynamically adjusted based on the global statistical characteristics of the current level. The merge similarity of all adjacent merged units in the current merging level is obtained, and the mean similarity and standard deviation are calculated. Adjacent merged units are either the smallest grid or the resulting region blocks after merging. The standard deviation of similarity is multiplied by an adjustment coefficient to obtain an adjustment product. The mean similarity is subtracted from the adjustment product to obtain the merging threshold for the current merging level.
[0049] In order to enable the merging criteria to adaptively fluctuate according to the similarity distribution of the current processing level, the merging threshold is... Satisfying the relation:
[0050] In the formula, This is the merging threshold for the current merging level; This is the average of the merging similarities of all adjacent merging units in the current merging level; This represents the standard deviation of the merge similarity among all adjacent merged units in the current merge level. The adjustment factor is used to control the stringency of the merging criteria. Its preferred reference value is 0.5. The value of this factor is based on the accuracy of identifying the edges of known wafer patterns under experimental conditions.
[0051] Understandably, by subtracting a certain factor of the standard deviation from the mean, the algorithm can identify neighboring cells with significantly higher similarity than the average level. When the similarity distribution at a certain merging level is relatively concentrated, it indicates that the differences between the current grids are small, the standard deviation decreases, and the merging threshold automatically moves closer to the mean, thus ensuring the robustness of the merging decision.
[0052] The process involves merging adjacent smallest grid cells layer by layer using a merging threshold to obtain multiple region blocks. This includes: in any merging level, acquiring the historical similarity of adjacent merged units at the previous level and the historical merging threshold at that level; and, in response to historical similarity meeting preset conditions, accumulating the current similarity recalculated at the current level based on the historical similarity to obtain a corrected similarity. The preset conditions are: the historical similarity is less than the historical merging threshold and greater than or equal to the difference between the historical merging threshold and the standard deviation of the similarity at the previous level. When these preset conditions are met, the overflow compensation amount of the historical similarity relative to the historical merging judgment benchmark composed of the historical merging threshold and the standard deviation of similarity is calculated; this overflow compensation amount is then positively superimposed on the current similarity to obtain the corrected similarity.
[0053] Specifically, the similarity satisfies the following relation:
[0054] In the formula, To correct the similarity; The current similarity is recalculated for the current level; For the next higher level of historical similarity; The historical merging threshold of the previous level; This represents the standard deviation of similarity at the next higher level. It can be understood as Historical similarity Exceeding the tolerance limit The overflow amount is fully compensated to the current similarity by the above relationship for the overflow amount of historical similarity that exceeds the tolerance limit; the boundary connectivity trend that is covered by noise in the historical level is carried out by cross-level energy accumulation, thereby improving the integrity of the background area when extracting defects.
[0055] Understandably, this mechanism provides memory compensation for cells that failed to merge at the previous level by only a small margin. If the historical similarity is within one standard deviation of the historical merging threshold, it indicates that the boundary has extremely high merging potential. Instead of being limited to fixed weighting coefficients, it directly applies the overflow compensation from historical decisions to the current judgment, effectively mitigating merging interruptions caused by minor illumination fluctuations and ensuring that the final block more completely corresponds to the actual physical functional area on the wafer.
[0056] The preset termination conditions include: there are no adjacent merging units that meet the merging conditions in the current merging level, or the current merging level reaches the maximum number of levels; the maximum number of levels is positively correlated with the width of the smallest functional region in the wafer grayscale image. It should be noted that the maximum number of levels limits the depth of iterative merging. Since the width of the smallest functional region, such as a scribe line, determines the physical boundary of the thinnest structure in the image, positively correlated with its region width ensures that the algorithm stops in time when the physical boundary is reached, avoiding the forced merging of two functional regions with completely different properties. For example, if the number of pixels corresponding to the region width is 128 and the minimum grid side length is 32, the maximum number of levels can preferably be set to 8. After each level of merging is completed, the number of merging levels experienced by the region block to which each pixel belongs is recorded. This value is passed to subsequent steps as a key parameter characterizing the degree of homogenization of the local region.
[0057] By introducing an adaptive threshold and a layer-by-layer merging strategy with a memory correction mechanism, accurate clustering of complex textures on the wafer surface was achieved. This not only effectively suppressed the interference of random noise on the determination of region boundaries, but also ensured that the merged region blocks were highly consistent with the real physical structure in terms of spatial morphology, providing solid structured data support for subsequent accurate contrast enhancement of different regions.
[0058] S4 sets limits based on levels, and achieves independent regional balancing.
[0059] The limiting value of each region block is adaptively set according to the number of merging levels. The limiting value is positively correlated with the number of merging levels. The limiting value is used to perform equalization processing independently on each region block.
[0060] In one embodiment, after completing region merging and recording the merging level, the contrast enhancement requirements differ because different region blocks represent different pattern densities and texture complexities on the wafer surface. Region blocks with higher merging levels typically correspond to background areas with more uniform textures, such as scribe lines or large-area pad areas. These areas require stronger contrast enhancement to reveal subtle defects. Conversely, region blocks with lower merging levels correspond to densely patterned logic circuit areas, and excessive enhancement can lead to an increase in false defects. Therefore, a mapping mechanism that converts merging depth into enhancement intensity is needed.
[0061] The adaptive setting of the limiting value for each region block based on the number of merging levels includes: obtaining the maximum number of merging levels and the target magnification factor among all region blocks; and calculating the limiting value of the current region block based on the maximum number of merging levels, the target magnification factor, and the number of merging levels corresponding to the current region block.
[0062] The amplitude limit determines the pruning threshold for histogram components in the contrast-limited adaptive histogram equalization algorithm. To accurately convert the information on regional homogenization inherent in the merging process into quantized enhancement constraint parameters, the amplitude limit of the current region block satisfies the following relationship:
[0063] In the formula, This is the current limit value for the region block; This represents the number of merge levels corresponding to the current region block; This represents the maximum number of merged levels across all region blocks. The target magnification factor is 4.0, and the value is chosen to ensure that the contrast of the defect edges is improved without causing severe grayscale oversaturation.
[0064] Understandably, by establishing a positive correlation between the amplitude limit and the number of merging levels, the enhancement intensity automatically adapts to the physical properties of the region. When the number of merging levels of a region is close to the maximum number of merging levels, it indicates that the region has a very high degree of homogeneity, and the amplitude limit tends to the target magnification factor, thus providing the maximum contrast stretching. Conversely, if the number of merging levels is small, it indicates that the region has complex texture, and the amplitude limit automatically falls back, only performing a small amount of enhancement. This dynamic allocation mechanism solves the problem in traditional algorithms where the global amplitude limit cannot take into account both complex texture areas and uniform background areas, realizing a closed loop of feature extraction and image enhancement at the data flow level.
[0065] Performing equalization processing independently on each region block using the amplitude limit includes: calculating the grayscale histogram of the current region block; cropping and redistributing the grayscale histogram using the amplitude limit to obtain a redistributed histogram; calculating the cumulative distribution function based on the redistributed histogram; and using the cumulative distribution function to perform grayscale mapping on the current region block.
[0066] Understandably, differentiated enhancement operations are performed within each independent region block. Specifically, the distribution frequency of each gray level within the region block is statistically analyzed, high-frequency components exceeding the amplitude limit are truncated, and the total number of truncated pixels is uniformly compensated across the entire grayscale range. A cumulative distribution function is obtained by accumulating the adjusted distribution frequencies, and this function is used as a grayscale mapping function to remap the pixel values within the region block. This independent processing method ensures that each functional area can be adjusted within its optimal dynamic range, preserving the detailed features of minor local defects to the maximum extent, while effectively suppressing the excessive amplification of background noise.
[0067] By directly applying the number of merging layers, a key intermediate feature reflecting regional homogeneity, to the setting of equalization parameters, a refined and automated configuration of contrast enhancement constraints is achieved. This allows regions of different densities in the image to obtain the best visual representation effect without distortion, providing high-quality enhanced images for subsequent high-precision defect interpretation.
[0068] S5, smooth the boundary to generate an enhancement map, and compare to obtain the defect results.
[0069] The boundary pixels of adjacent regions are smoothed to produce an enhanced image; the enhanced image and the standard image are compared to obtain the defect judgment result.
[0070] In one embodiment, since contrast-limited adaptive histogram equalization is performed independently on each region block in step S4, the limiting values and the generated cumulative distribution functions used for different region blocks differ. This difference can lead to discontinuities in pixel grayscale values at the physical boundaries of adjacent region blocks, i.e., block artifacts. This not only interferes with visual interpretation but may also produce false defect edges in subsequent defect extraction. Therefore, it is necessary to smooth the transition of boundary pixels to ensure the brightness continuity of the entire enhanced image.
[0071] To eliminate block artifacts and enhance visual connectivity, a smooth transition process is performed on the boundary pixels of adjacent regions, including: defining a boundary transition zone and obtaining the distance between pixels located within the boundary transition zone and the boundary of their respective regions; calculating the self-mapping value of a pixel under its own region mapping and the fusion weight between adjacent mapping values under adjacent region mapping based on the distance; and performing weighted fusion of the self-mapping value and adjacent mapping values according to the fusion weight.
[0072] In this context, the boundary transition zone refers to a specific width region that spans the boundary between two adjacent regions. For any pixel within this region, its final grayscale value is no longer determined solely by the mapping function of its own region, but is generated by a weighted sum of the mapping results of the two adjacent regions.
[0073] The pixel fusion result satisfies the following relationship:
[0074] In the formula, This represents the final grayscale value after pixel smoothing processing. The self-mapping value of a pixel is calculated using the cumulative distribution function of its region block; The neighbor mapping value is calculated for each pixel using the cumulative distribution function of the neighboring regions; For weight fusion.
[0075] Fusion weights The reason for this calculation is to achieve a linear and smooth evolution of grayscale values with spatial location, which satisfies the following relationship:
[0076] In the formula, This represents the pixel distance of a pixel relative to the boundary of its region block. When a pixel is located inside its region block... Take a positive value when a pixel crosses the boundary and enters an adjacent region block. Take the negative value; The preset boundary transition band width.
[0077] Understandably, when a pixel happens to be located on the boundary line, =0, fusion weight The value is 0.5, at which point the final grayscale value is the arithmetic mean of the mapping values of two adjacent regions; as a pixel moves deeper into its region, the weight of its own mapping value gradually increases; when the distance reaches... When the weight becomes 1, a smooth switch from dual-block linked mapping to single-block independent mapping is achieved.
[0078] In this embodiment, the hyperparameter boundary transition band half-width is involved. The method for obtaining it is as follows: Obtain the minimum grid side length determined in step S1. Take the side length Half of the boundary transition zone width For example, if the minimum grid side length is 32 pixels, then The preferred reference value is 16 pixels.
[0079] After outputting the complete enhanced image, the enhanced image and the standard image are compared to obtain the defect judgment result. Specifically, the standard image is a pre-stored defect-free wafer template image. The gray-level difference between the enhanced image and the standard image at corresponding pixel positions is calculated using an image difference algorithm to generate a difference map. The difference map is binarized and segmented to extract connected components. If the area or morphological features of the connected component exceed a preset threshold, it is judged that there are microstructural defects such as scratches, particles, or bridging at that location.
[0080] This embodiment combines Figures 2 to 6 As can be seen, compared with the traditional contrast adaptive histogram equalization algorithm, its output enhanced image can perform differentiated processing on different regions, and each region can achieve a significant enhancement effect.
[0081] This embodiment effectively eliminates the block effect interference caused by block enhancement by using a boundary smoothing algorithm based on spatial distance weights. This ensures that the global image maintains high local contrast while having macroscopic brightness consistency, thereby greatly reducing the false alarm rate of defect detection and making the final interpretation results more accurate and reliable.
Claims
1. A method for comprehensive identification of microstructure defects in wafers based on intelligent sensing, characterized in that, Includes the following steps: Obtain a grayscale image of the wafer surface; The wafer grayscale image is divided into multiple minimum grids, and the grayscale variance and grayscale mean of each minimum grid are extracted. The merging similarity between adjacent minimum grids is calculated based on the gray-level variance and gray-level mean of each minimum grid. The merging threshold is adaptively determined based on the merging similarity. The merging threshold is used to merge adjacent smallest grids layer by layer to obtain multiple region blocks, and the merging level of each region block is recorded. The limiting value of each region block is adaptively set according to the number of merging levels. The limiting value is positively correlated with the number of merging levels. The limiting value is used to perform equalization processing independently on each region block. The boundary pixels of adjacent regions are smoothed to produce an enhanced image; the enhanced image and the standard image are compared to obtain the defect judgment result.
2. The method for global identification of wafer microstructure defects based on intelligent sensing according to claim 1, characterized in that, The method for obtaining the minimum grid side length is as follows: obtain the region width of the minimum functional area in the wafer grayscale image, and take one-quarter to one-third of the region width as the number of pixels as the minimum grid side length.
3. The method for global identification of wafer microstructure defects based on intelligent sensing according to claim 2, characterized in that, The merging similarity between adjacent minimum grids is calculated based on the gray-level variance and gray-level mean of each minimum grid. Satisfying the relation: in, and These are the grayscale variances of two adjacent smallest grid cells, respectively. and These are the average gray values of the two adjacent smallest grid cells.
4. The method for global identification of wafer microstructure defects based on intelligent sensing according to claim 1, characterized in that, The adaptive determination of the merging threshold based on merging similarity includes: obtaining the merging similarity of all adjacent merging units in the current merging level, calculating the mean similarity and the standard deviation of similarity, where adjacent merging units are the smallest grid or the region blocks generated after merging; multiplying the standard deviation of similarity by the adjustment coefficient to obtain the adjustment product, and subtracting the adjustment product from the mean similarity to obtain the merging threshold of the current merging level.
5. The method for global identification of wafer microstructure defects based on intelligent sensing according to claim 4, characterized in that, The process involves merging adjacent smallest grid cells layer by layer using a merging threshold to obtain multiple region blocks. This includes: in any merging level, obtaining the historical similarity of adjacent merged units in the previous level and the historical merging threshold of the previous level; in response to the historical similarity meeting a preset condition, accumulating the current similarity recalculated based on the historical similarity to obtain a corrected similarity; merging adjacent merged units with a corrected similarity greater than or equal to the merging threshold, and updating the grayscale variance and grayscale mean of the region blocks after merging, until a preset termination condition is met, resulting in multiple region blocks.
6. The method for global identification of wafer microstructure defects based on intelligent sensing according to claim 5, characterized in that, The preset conditions are: the historical similarity is less than the historical merging threshold, and is greater than or equal to the difference between the historical merging threshold and the standard deviation of the similarity of the previous level. The current similarity is recalculated based on historical similarity and accumulated to obtain the corrected similarity, which includes: calculating the overflow compensation amount of historical similarity relative to the historical merging judgment benchmark composed of historical merging threshold and similarity standard deviation; The overflow compensation amount is positively superimposed with the current similarity to obtain the corrected similarity.
7. The method for global identification of wafer microstructure defects based on intelligent sensing according to claim 5, characterized in that, The preset termination conditions include any of the following: there are no adjacent merge units in the current merge level with a corrected similarity greater than or equal to the merge threshold; The current merged level has reached the maximum number of levels. The maximum number of levels is positively correlated with the logarithm of the ratio of the number of pixels on the short side of the wafer grayscale image to the side length of the smallest grid. After the layer-by-layer merging is completed, the smallest grid that was not merged is retained as a separate region block, and the corresponding merging level number is recorded as zero.
8. The method for global identification of wafer microstructure defects based on intelligent sensing according to claim 1, characterized in that, The adaptive setting of the limiting value for each region block based on the number of merging levels includes: obtaining the maximum number of merging levels based on the number of merging levels of all region blocks; using the ratio of the number of merging levels of the target region block to the maximum number of merging levels as a level normalization term; multiplying the level normalization term by the level adjustment coefficient and adding the value 1 to obtain the target magnification factor; and multiplying the preset basic limiting value by the target magnification factor to obtain the limiting value of the target region block.
9. The method for global identification of wafer microstructure defects based on intelligent sensing according to claim 8, characterized in that, Performing equalization processing independently on each region block using a limiting value includes: statistically analyzing the gray-level distribution of each pixel within any region block to obtain a gray-level histogram; cropping the portion of the gray-level histogram exceeding the limiting value, and evenly distributing the cropped pixels to each gray-level group of the gray-level histogram to obtain a redistribution histogram; calculating the cumulative distribution function based on the redistribution histogram, and using the cumulative distribution function as a gray-level mapping function to perform equalization processing on the region block.
10. The method for global identification of wafer microstructure defects based on intelligent sensing according to claim 9, characterized in that, The process of smoothing the transition of boundary pixels of adjacent regions to output an enhanced image includes: for target pixels whose distance from the boundary of a region block does not exceed the transition width, obtaining the self-mapping value of the target pixel under the gray-level mapping function of its own region block, and the adjacent mapping value under the gray-level mapping function of the adjacent region blocks; obtaining the pixel distance from the target pixel to the boundary of the region block, and using the ratio of the pixel distance to the transition width as the distance weight; weighting the self-mapping value using the complementary value of the distance weight, weighting the adjacent mapping value using the distance weight, and adding the two weighted results to complete the smooth transition processing and output the enhanced image.