Sem image foreground extraction method and device, computer equipment and storage medium

By performing binarization, connected component detection, and contour extraction on SEM images, the problems of low accuracy and slow speed in SEM image foreground extraction are solved, achieving efficient and accurate image foreground extraction.

CN115619813BActive Publication Date: 2026-04-28DONGFANG JINGYUAN ELECTRON LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DONGFANG JINGYUAN ELECTRON LTD
Filing Date
2022-10-20
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In existing SEM image analysis, the presence of noise results in low accuracy and slow speed in foreground extraction.

Method used

After binarization, connected components are detected and labeled for the first time. The image is then split, contours are extracted and labeled for the second time, and finally the foreground of the SEM image is obtained by image stitching.

Benefits of technology

It improves the accuracy and speed of foreground extraction from SEM images, reduces the impact of noise, and enables fast and accurate contour extraction even without GDS map files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115619813B_ABST
    Figure CN115619813B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computing lithography image analysis, and particularly relates to a SEM image foreground extraction method, device, computer equipment and storage medium. The method comprises the steps of: obtaining a SEM image to be processed and binarizing the SEM image; detecting all connected domains in the binarized SEM image and performing first labeling; splitting the SEM image based on the first labeling; performing contour extraction on each split SEM image to obtain a contour extraction image and performing second labeling; and performing image splicing on the contour extraction image based on the second labeling to obtain a SEM image foreground image. The foreground extraction method of the present application has greatly increased accuracy and high splitting speed. The extraction device, computer equipment and storage medium of the present application have the same beneficial effects as the SEM image foreground extraction method, and will not be described here again.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to the field of computational lithography image analysis technology, specifically to a method, apparatus, computer device, and storage medium for foreground extraction of SEM images. [Background Technology]

[0002] As a fundamental aspect of image research, foreground extraction can quickly and accurately extract important information from images using image processing algorithms. Foreground segmentation primarily uses efficient and accurate algorithms to determine whether each pixel belongs to the foreground or the background to be discarded. Current foreground extraction methods mainly involve obtaining a distance threshold for the current pixel based on preset conditions, calculating the integral histogram of the current pixel, and then counting the number of samples within the distance threshold range based on the integral histogram. The number of samples is then compared with a preset threshold to determine foreground and background points. However, in scanning electron microscopy (SEM) image analysis, the presence of noise significantly reduces the accuracy and speed of foreground polygon segmentation using thresholding alone. [Summary of the Invention]

[0003] To address the technical problems in the prior art, this invention provides a method, apparatus, computer device, and storage medium for extracting the foreground of SEM images.

[0004] To solve the above-mentioned technical problems, the technical solution of the present invention is to provide a method for foreground extraction of SEM images, characterized in that: the SEM image foreground extraction method includes the following steps:

[0005] Acquire the SEM image to be processed and binarize the SEM image;

[0006] Detect all connected components in the binarized SEM image and perform the first labeling;

[0007] The SEM image is split based on the first labeling;

[0008] Each of the split SEM images is subjected to contour extraction to obtain a contour extraction map, and then a second labeling is performed.

[0009] Based on the second labeling, the extracted contour map is stitched together to obtain the foreground image of the SEM image.

[0010] Preferably, binarizing the SEM image specifically involves converting the SEM image into a binary image using the Ostu algorithm.

[0011] Preferably, all connected components in the binarized SEM image are detected using a two-pass connected component algorithm.

[0012] Preferably, contour extraction of the split SEM image specifically includes the following steps:

[0013] The SEM image is pixelated to obtain the original matrix;

[0014] After performing Gaussian filtering on the original matrix, an image matrix is ​​obtained, and the gradient values ​​of all pixels in the image matrix are calculated.

[0015] Obtain all pixels whose gradient values ​​are within a preset range, and find the peak point along the gradient direction among all selected pixels;

[0016] The peak points are connected in a preset manner to extract the contour map of the split SEM image.

[0017] Preferably, connecting the peak points in a preset manner to extract the contour map of the SEM image specifically includes the following steps:

[0018] A point-to-point distance matrix is ​​formed based on all the aforementioned peak points;

[0019] Iterate through the elements on the diagonal of the distance matrix;

[0020] The peak points where the distance matrix values ​​reach a preset value are marked a second time;

[0021] The peak points are then connected in an orderly manner using a second label to extract the contour map of the SEM image.

[0022] Preferably, the elements on the diagonal of the distance matrix are iterated according to a gradient optimization algorithm.

[0023] Preferably, before binarizing the SEM image, the process further includes a step of preprocessing the SEM image.

[0024] Another solution of the present invention to solve the above-mentioned technical problem is to provide a SEM image foreground extraction device, applied to the above-mentioned SEM image foreground extraction method, wherein the foreground extraction device includes:

[0025] Detection module: Used to detect all connected components in the binarized SEM image;

[0026] Segmentation module: used to segment the SEM image based on the first label;

[0027] Extraction module: used to extract contours from the split SEM image to obtain a contour extraction map and perform a second marking;

[0028] Image stitching module: Based on the second mark, the contour extraction map is stitched together to obtain the foreground image of the SEM image.

[0029] Another solution of the present invention to solve the above-mentioned technical problem is to provide a computer device, including a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-mentioned SEM image foreground extraction method.

[0030] Another solution of the present invention to solve the above-mentioned technical problems is to provide a storage medium including a processor, wherein the storage medium implements the above-mentioned SEM image foreground extraction method when executed by the processor.

[0031] Compared with existing technologies, the foreground extraction method, foreground extraction device, computer equipment, and storage medium for SEM images provided by this invention have the following advantages:

[0032] 1. The foreground extraction method for SEM images provided in the embodiments of the present invention first binarizes the acquired SEM image to be processed, facilitating subsequent connected component analysis. Then, a connected component algorithm is used to detect connected components in the binarized SEM image and perform a first labeling design. This quickly identifies all connected components in the SEM image, allowing for the initial acquisition of approximate edge points for subsequent contour extraction, and marking different connected component regions for the first time. The design of splitting the SEM image based on this first labeling facilitates the segmentation of different connected component regions within the same SEM image, enabling subsequent basic contour extraction and image stitching. A second labeling design is then applied to each split SEM image to obtain a contour extraction map. This serves two purposes: firstly, it smooths the contour curves; secondly, it allows for accurate stitching of the extracted contour maps from adjacent connected components during image stitching, resulting in more accurate foreground images extracted using the SEM image foreground extraction method of the present invention. Therefore, the foreground extraction method of the present invention significantly increases the accuracy and speed of the splitting process.

[0033] 2. The foreground extraction method for SEM images provided in the embodiments of the present invention detects all connected components in the binarized SEM image using a two-pass connected component algorithm. This design improves the accuracy of the connected component regions extracted from the SEM image, thereby further enhancing the accuracy of foreground extraction from the SEM image.

[0034] 3. The foreground extraction method for SEM images provided in the embodiments of the present invention, through the design of the preset contour extraction method for contour extraction of SEM images, enables the rapid and accurate extraction of the contour of the SEM image based solely on the SEM image, even without a GDS map file, and the extracted contour image has low noise. Therefore, this design can further improve the accuracy of the foreground extraction results of the present invention.

[0035] 4. The foreground extraction method for SEM images provided in the embodiments of the present invention forms a point-to-point distance matrix from all peak points, iteratively calculates the elements on the diagonal of the distance matrix using a preset iterative algorithm, and marks peak points whose distance matrix values ​​reach a preset value a second time. The contour extraction image obtained by this method has lower noise and more accurate extraction results. Therefore, this design can further improve the accuracy of foreground extraction results of the present invention.

[0036] 5. The foreground extraction method for SEM images provided in the embodiments of the present invention further includes a step of preprocessing the SEM image before binarization. This design allows for noise removal when there is excessive noise in the SEM image, thus facilitating subsequent processing.

[0037] 6. The contour foreground extraction device for SEM images provided in the embodiments of the present invention has the same beneficial effects as the foreground extraction method for SEM images of the present invention, and will not be described again here.

[0038] 7. The computer device provided in the embodiments of the present invention has the same beneficial effects as the foreground extraction method of SEM images of the present invention, and will not be described again here.

[0039] 8. The storage medium provided in the embodiments of the present invention has the same beneficial effects as the foreground extraction method of SEM images of the present invention, and will not be described again here. [Attached Image Description]

[0040] Figure 1 This is a flowchart illustrating the foreground extraction method for SEM images provided in the first embodiment of the present invention;

[0041] Figure 2 This is a detailed flowchart illustrating the foreground extraction method for SEM images provided in the first embodiment of the present invention. Figure 1 ;

[0042] Figure 3 This is a detailed flowchart illustrating the foreground extraction method for SEM images provided in the first embodiment of the present invention. Figure 2 ;

[0043] Figure 4This is the SEM image to be processed in the foreground extraction method of SEM image provided in the first embodiment of the present invention;

[0044] Figure 5 (a) to (e) are schematic diagrams of SEM image splitting in the foreground extraction method of SEM image provided in the first embodiment of the present invention;

[0045] Figure 6 This is a schematic diagram illustrating the state changes when extracting several contour points of a SEM image using the foreground extraction method provided in the first embodiment of the present invention.

[0046] Figure 7 This is the SEM foreground image extracted by the SEM image foreground extraction method provided in the first embodiment of the present invention;

[0047] Figure 8 A system block diagram of a foreground extraction device for SEM images provided in the second embodiment of the present invention.

[0048] Explanation of reference numerals in the attached diagram:

[0049] 1. SEM image foreground extraction method; 2. SEM image foreground extraction device;

[0050] 21. Detection module; 22. Splitting module; 23. Extraction module; 24. Image stitching module.

Detailed Implementation Methods

[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0052] Please see Figure 1 The first embodiment of the present invention provides a SEM image foreground extraction method 1, which includes the following steps:

[0053] S1: Obtain the SEM image to be processed and binarize the SEM image;

[0054] S2: Detect all connected components in the binarized SEM image and perform the first labeling;

[0055] S3: SEM image split based on the first labeling;

[0056] S4: Extract contours from each of the split SEM images to obtain contour extraction maps and perform a second labeling;

[0057] S5: Based on the second label, the extracted contour map is stitched together to obtain the foreground image of the SEM image.

[0058] It should be noted that the SEM image foreground extraction method of the present invention can be performed without relying on the layout design file. The contour can be extracted directly from an acquired SEM image through a preset contour extraction method, and then the foreground image of the SEM image can be extracted through image stitching.

[0059] Understandably, this invention first binarizes the acquired SEM image to facilitate subsequent connected component analysis. Then, it detects connected components in the binarized SEM image and performs a first labeling design, which quickly identifies all connected components in the SEM image, providing approximate edge points for subsequent contour extraction, and marking different connected component regions for the first time. Based on this first labeling, the design of splitting the SEM image facilitates the segmentation of different connected component regions within a single SEM image, enabling subsequent basic contour extraction and image stitching. Contour extraction is then performed on each split SEM image to obtain a contour extraction image, followed by a second labeling design. This second labeling serves two purposes: firstly, it smooths the contour curves; secondly, it accurately stitches the extracted contour images from adjacent connected components during image stitching, resulting in a more accurate and smoother foreground image extracted using this invention's SEM image foreground extraction method. Therefore, this invention significantly improves the accuracy and speed of the foreground extraction method.

[0060] Furthermore, the binarization of SEM images specifically involves converting the SEM image into a binary image using the Ostu algorithm.

[0061] Understandably, since subsequent connected component detection algorithms generally process binarized images, binarizing SEM images using the Ostu algorithm can ignore color and background information while preserving more important morphological information. Furthermore, binarization significantly reduces the amount of information in the SEM image, making subsequent processing much easier.

[0062] Furthermore, all connected components in the binarized SEM image are detected using a two-pass connected component algorithm.

[0063] Understandably, this design enables higher accuracy in the connected component regions of the split SEM image, thereby further improving the accuracy of foreground extraction from the SEM image.

[0064] Further, please refer to Figure 2The specific steps for contour extraction from the split SEM image include:

[0065] S41: Pixelate the SEM image and obtain the original matrix;

[0066] S42: After performing Gaussian filtering on the original matrix, the image matrix is ​​obtained, and the gradient values ​​of all pixels in the image matrix are calculated.

[0067] S43: Obtain all pixels whose gradient values ​​are within a preset range, and find the peak point along the gradient direction among all pixels;

[0068] S44: Connect the peak points in a preset manner to extract the contour map of the split SEM image.

[0069] Understandably, the design of this preset contour extraction method for SEM image contour extraction enables the rapid and accurate extraction of SEM image contours based solely on the SEM image, even without a GDS (Gross Layout Data Sheet) file. Furthermore, the extracted contour image has low noise, meaning that the contour image extracted using this method reduces the impact of noise on foreground extraction from the SEM image. Therefore, this design further improves the accuracy of foreground extraction and contour segmentation in this invention.

[0070] It should be noted that the preset range refers to pixels with larger gradient values.

[0071] Specifically, finding the peak point along the gradient direction among all pixels involves: dividing the image matrix into blocks of a preset size, finding the middle pixel with the largest gradient value in each block; filtering the middle pixels in all blocks, and when the gradient value of the middle pixel is greater than a preset gradient threshold, selecting the corresponding key pixel and recording its coordinates and gradient direction; starting from the coordinates of the key pixel in the image matrix, finding the pixel with the smallest gray value along the gradient direction of the key pixel within a preset search range, which is the peak point.

[0072] Understandably, dividing the image matrix into blocks and filtering out key pixels for reference ensures that the subsequent search for peak points starts from the edges of lines in the SEM image. The pixel with the lowest grayscale value is the brightest point in the SEM image, and searching along the gradient direction can accurately and quickly find the required peak points. It is evident that the above method is simple to implement, highly reliable, and the identified peak points accurately reflect the contour points of the SEM image, thus facilitating the subsequent extraction of the foreground image.

[0073] Further, please refer to Figure 3The specific steps for connecting peak points in a preset manner to extract the contour map of the SEM image include:

[0074] S441: A point-to-point distance matrix is ​​formed based on all the aforementioned peak points;

[0075] S442: Elements on the diagonal of the iterative distance matrix;

[0076] S443: Mark the peak points where the distance matrix values ​​reach the preset values ​​for the second time;

[0077] S444: Connect the peak points in an ordered manner using the second label to extract the contour map of the SEM image.

[0078] It should be noted that when acquiring all pixels whose gradient values ​​are within the preset range, the coordinate information of these pixels is also recorded. This means that the peak points acquired subsequently also have specific coordinate information. The element refers to the distance information between each peak point.

[0079] Specifically, the formula for the distance between two peak points is expressed as:

[0080]

[0081] Where, x n The x-coordinate of the peak point, y n The ordinate of the peak point;

[0082] Specifically, the distance matrix is ​​represented as:

[0083]

[0084] Understandably, by constructing a point-to-point distance matrix from all peak points and iteratively calculating the elements on the diagonal of the distance matrix using a preset iterative algorithm, and then marking the peak points whose distance matrix values ​​reach a preset value during the iteration process, this design achieves two advantages: first, the contour extraction map obtained by this method has lower noise and more accurate extraction results; second, the contour extraction map obtained by connecting in this way is smoother, and the second marking enables accurate connection of contour extraction maps in two adjacent connected regions. Therefore, this design can further improve the accuracy of foreground extraction results of this invention.

[0085] Specifically, the elements on the diagonal of the distance matrix are iterated according to the gradient optimization algorithm.

[0086] It should be understood that in some embodiments, the distance between each peak point and other peak points can be optimized by iterating over the elements on the diagonal of the distance matrix. When connecting peak points, the system traverses the data in ascending order of distance from the current peak point and marks the selected peak points a second time. For example, if the current peak point is A, and the peak points B, C, and D are sorted in ascending order of distance from A, if it is determined that the peak point B, which is closest to the current peak point A, is not yet connected to peak point A, then A is connected to B; if it is determined that peak point B is already connected to peak point A, the system traverses downwards to determine whether peak point C is connected to peak point A, and so on. After processing one peak point, the system processes the next peak point until all peak points are connected, thus obtaining the contour extraction map of the SEM image.

[0087] In summary, for example, please refer to Figure 4 The input is a SEM image, which is converted into a binary image using the Ostu algorithm. Then, a two-pass algorithm is used to detect all connected regions in the SEM image and perform an initial labeling. If five connected regions are detected, they are labeled as 1-5. Based on this initial labeling, the SEM image is then segmented, such as... Figure 5 As shown in (a) to (e), the contours of the split SEM images are then extracted. Specifically, the SEM images are first pixelated (e.g., Figure 6 As shown in (a)), the original matrix is ​​then subjected to Gaussian filtering to obtain the image matrix, and the gradient value of each pixel in the image matrix is ​​calculated. Then, all pixels whose gradient values ​​fall within a preset range are obtained (e.g., ...). Figure 6 (as shown in (b)) and finds peak points along the gradient direction among all selected pixels (e.g. Figure 6 (The pixels between the two lines in (c)) are then marked a second time, and the peak points where the distance matrix values ​​reach the preset values ​​are used for image stitching to obtain the foreground extraction image of the SEM image (e.g., Figure 7 (As shown).

[0088] Furthermore, before binarizing the SEM image, a step is included: preprocessing the SEM image.

[0089] Understandably, this design allows for preprocessing when SEM images contain excessive noise, such as denoising the SEM image. This design removes noise from the SEM image, facilitating subsequent processing. It is also understandable that whether this preprocessing is necessary depends on the quality of the SEM image; if the SEM image quality is good, denoising is not required.

[0090] Please see Figure 8The second embodiment of the present invention provides a SEM image foreground extraction device 2, applied to the SEM image foreground extraction method 1 of the first embodiment of the present invention. The foreground extraction device 2 includes:

[0091] Detection module 21: Used to detect all connected components in the binarized SEM image;

[0092] Splitting module 22: Used to split SEM images based on the first label;

[0093] Extraction module 23: used to extract contours from the split SEM image to obtain a contour extraction map and perform a second marking;

[0094] Image stitching module 24: Based on the second mark, the contour extraction map is stitched together to obtain the foreground image of the SEM image.

[0095] It is understood that the SEM image foreground extraction device 2 of the second embodiment of the present invention has the same beneficial effects as the SEM image foreground extraction method 1 of the first embodiment of the present invention, and will not be described again here.

[0096] A third embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the contour extraction method for SEM images according to the first embodiment of the present invention.

[0097] It is understood that the computer device of the third embodiment of the present invention has the same beneficial effects as the SEM image foreground extraction method of the first embodiment of the present invention, and will not be described again here.

[0098] A fourth embodiment of the present invention provides a storage medium including a processor, wherein when the storage medium is executed by the processor, it implements a SEM image foreground extraction method as described in the first embodiment of the present invention.

[0099] It is understood that the storage medium of the fourth embodiment of the present invention has the same beneficial effects as the SEM image foreground extraction method of the first embodiment of the present invention, and will not be described again here.

[0100] Compared with existing technologies, the foreground extraction method, foreground extraction device, computer equipment, and storage medium for SEM images provided by this invention have the following advantages:

[0101] 1. The foreground extraction method for SEM images provided in the embodiments of the present invention first binarizes the acquired SEM image to be processed, facilitating subsequent connected component analysis. Then, it detects connected components in the binarized SEM image and performs a first labeling design, which can quickly identify all connected components in the SEM image, obtaining approximate edge points for subsequent contour extraction, and marking different connected component regions for the first time. The design of splitting the SEM image based on the first labeling facilitates the segmentation of different connected component regions within the same SEM image, enabling subsequent basic contour extraction and image stitching. Then, contour extraction is performed on each split SEM image to obtain a contour extraction map, followed by a second labeling design. This serves two purposes: firstly, it smooths the contour curve; secondly, it allows for accurate stitching of the extracted contour maps from adjacent connected components during image stitching, resulting in a more accurate foreground image extracted by the SEM image foreground extraction method of the present invention. Therefore, the foreground extraction method of the present invention significantly increases the accuracy and speed of the splitting process.

[0102] 2. The foreground extraction method for SEM images provided in the embodiments of the present invention detects all connected components in the binarized SEM image using a two-pass connected component algorithm. This design improves the accuracy of the connected component regions extracted from the SEM image, thereby further enhancing the accuracy of foreground extraction from the SEM image.

[0103] 3. The foreground extraction method for SEM images provided in the embodiments of the present invention, through the design of the preset contour extraction method for contour extraction of SEM images, enables the rapid and accurate extraction of the contour of the SEM image based solely on the SEM image, even without a GDS map file, and the extracted contour image has low noise. Therefore, this design can further improve the accuracy of the foreground extraction results of the present invention.

[0104] 4. The foreground extraction method for SEM images provided in the embodiments of the present invention forms a point-to-point distance matrix from all peak points, iteratively calculates the elements on the diagonal of the distance matrix using a preset iterative algorithm, and marks peak points whose distance matrix values ​​reach a preset value a second time. The contour extraction image obtained by this method has lower noise and more accurate extraction results. Therefore, this design can further improve the accuracy of foreground extraction results of the present invention.

[0105] 5. The foreground extraction method for SEM images provided in the embodiments of the present invention further includes a step of preprocessing the SEM image before binarization. This design allows for noise removal when there is excessive noise in the SEM image, thus facilitating subsequent processing.

[0106] 6. The contour foreground extraction device for SEM images provided in the embodiments of the present invention has the same beneficial effects as the foreground extraction method for SEM images of the present invention, and will not be described again here.

[0107] 7. The computer device provided in the embodiments of the present invention has the same beneficial effects as the foreground extraction method of SEM images of the present invention, and will not be described again here.

[0108] 8. The storage medium provided in the embodiments of the present invention has the same beneficial effects as the foreground extraction method of SEM images of the present invention, and will not be described again here.

[0109] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Those skilled in the art should also recognize that the embodiments described in the specification are optional embodiments, and the actions and modules involved are not necessarily essential to the invention.

[0110] In various embodiments of the present invention, it should be understood that the sequence number of each process does not necessarily imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0111] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It is particularly important to note that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for foreground extraction from SEM images, characterized in that: The SEM image foreground extraction method includes the following steps: Acquire the SEM image to be processed and binarize the SEM image; Detect all connected components in the binarized SEM image and perform the first labeling; Based on the first labeling, the SEM image is split to obtain multiple split SEM images; The split SEM image is pixelated to obtain the original matrix; The image matrix is ​​obtained by performing Gaussian filtering on the original matrix. The image matrix is ​​divided into multiple block matrices of a preset size, and the middle pixel with the largest gradient value is found in each block matrix. The middle pixels within all the block matrices are filtered out, and if the gradient value of the middle pixel is greater than a preset gradient threshold, the middle pixel is designated as a key pixel, and the coordinates and gradient direction of the key pixel are recorded. In the image matrix, starting from the coordinates of the key pixel, the brightest pixel is determined within a preset search range along the gradient direction of the key pixel, and this pixel is taken as the peak point. Based on all the peak points, a point-to-point distance matrix is ​​formed, wherein each element in the distance matrix represents the distance information between the peak points; When connecting the peak points, all peak points are traversed in ascending order of distance from the current peak point, and peak points that meet the selection criteria are marked a second time. The peak points are connected in an orderly manner using the second marker to extract the contour map of the split SEM image; Based on the peak points after the second marking, the contour extraction images corresponding to multiple split SEM images are stitched together to obtain the foreground image of the SEM image.

2. The SEM image foreground extraction method as described in claim 1, characterized in that: Binarizing the SEM image specifically involves converting the SEM image into a binary image using the Ostu algorithm.

3. The SEM image foreground extraction method as described in claim 1, characterized in that: All connected components in the binarized SEM image were detected using the two-pass connected component algorithm.

4. The SEM image foreground extraction method as described in claim 1, characterized in that: Before binarizing the SEM image, the process includes a step of preprocessing the SEM image.

5. A foreground extraction device for SEM images, applied to the foreground extraction method for SEM images according to any one of claims 1-4, characterized in that: The foreground extraction device includes: Detection module: Used to detect all connected components in the binarized SEM image; The splitting module is used to split the SEM image based on the first label to obtain multiple split SEM images; Extraction Module: This module performs pixelation on the split SEM image to obtain an original matrix; performs Gaussian filtering on the original matrix to obtain an image matrix; divides the image matrix into multiple block matrices of a preset size, and finds the middle pixel with the largest gradient value within each block matrix; filters all middle pixels within the block matrices, and if the gradient value of the middle pixel is greater than a preset gradient threshold, designates it as a key pixel and records its coordinates and gradient direction; in the image matrix, starting from the coordinates of the key pixel, along its gradient direction within a preset search range, identifies the brightest pixel and designates it as a peak point; based on all peak points, a point-to-point distance matrix is ​​constructed, where each element in the distance matrix represents the distance information between peak points; when connecting peak points, all peak points are traversed sequentially from smallest to largest in order of distance from the current peak point, and peak points meeting the selection criteria are marked a second time; the peak points are then connected in an ordered manner using the second marking to extract the contour map of the split SEM image. Image stitching module: Based on the peak points after the second marking, the contour extraction images corresponding to multiple split SEM images are stitched together to obtain the foreground image of the SEM image.

6. A computer device, characterized in that: The device includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the SEM image foreground extraction method as described in any one of claims 1-4.

7. A storage medium, characterized in that: Includes a processor, wherein when the storage medium is executed by the processor, it implements the SEM image foreground extraction method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Image recognition method, yield estimation method, and electronic device

    CN113936056A