Contour acquisition method and device of SEM image, computer device and storage medium

By combining clustering and traveling salesman algorithms, the problem of complex contour point connections in SEM images was solved, achieving efficient and ordered connections under no-map conditions, thus improving the speed and accuracy of contour point extraction.

CN115841499BActive Publication Date: 2026-07-24DONGFANG 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-07-24

AI Technical Summary

Technical Problem

Existing SEM image contour point connection methods are complex and dependent on the design layout, making them unable to work correctly when the layout varies significantly.

Method used

Clustering algorithms are used to group contour points, and the connection order of each group of contour points is solved using a first preset traveling salesman algorithm. Inspired by this, the connection order of all contour points is solved using a second preset traveling salesman algorithm, ultimately achieving ordered connections.

Benefits of technology

Without the need for layout design, it can quickly and accurately extract contour points from SEM images, reducing computational load and connection time while improving connection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115841499B_ABST
    Figure CN115841499B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computing lithography, in particular to a kind of profile acquisition method, device, computer equipment and storage medium of SEM image. Method includes the following steps: obtaining the SEM image to be processed and extracting several profile points from SEM image;Using clustering algorithm to group several profile points;Using first preset algorithm to solve the connection order of each group of profile points;With the connection order obtained by first preset algorithm as heuristic, and using second preset algorithm to solve the connection order of all profile points;And with the connection order obtained by second preset algorithm to connect all profile points in order.The connection speed of the profile acquisition method of the present application is fast and the calculation amount is low.The profile acquisition device, computer equipment and storage medium of the present application have the same beneficial effects as the profile acquisition method of SEM image, which will not be described here.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

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

[0002] Scanning electron microscope (SEM) images are crucial data in computational lithography modeling. Accurately extracting and sequentially connecting the contour points from SEM images is essential. Traditional SEM image contour extraction and connection relies on the design layout. Contours are extracted from the locations where graphics appear in the design layout, and then connected sequentially according to the connection order of points within the graphics. However, this traditional method has limitations; it depends entirely on the design layout and fails to work correctly when there are significant differences between the SEM image and the design layout. To overcome these limitations, layout-independent SEM image extraction techniques have begun to develop. These techniques first extract the contour points from the SEM image, classifying them according to graphic regions, and then sequentially connecting the contour points within each region. Contour point connection is a critical step in layout-independent SEM image extraction techniques, but existing contour point connection methods are relatively complex. Therefore, how to efficiently and sequentially connect contour points remains a technical problem to be solved. [Summary of the Invention]

[0003] To address the technical problem of complex connection methods for contour points in existing technologies, this invention provides a method, apparatus, computer device, and storage medium for acquiring contours in SEM images.

[0004] To solve the above-mentioned technical problems, the technical solution of the present invention is to provide a method for obtaining the contour of a SEM image, the method comprising the following steps:

[0005] Obtain the SEM image to be processed and extract several contour points from the SEM image;

[0006] Clustering algorithms are used to group the contour points.

[0007] The connection order of each set of contour points is determined using the first preset traveling salesman algorithm.

[0008] Inspired by the connection order obtained from the first preset traveling salesman algorithm, the second preset traveling salesman algorithm is used to solve for the connection order of all contour points; and

[0009] The contour of the SEM image is obtained by connecting all contour points in an ordered manner using the connection order obtained by the second preset traveling salesman algorithm.

[0010] Preferably, grouping the contour points using a clustering algorithm specifically involves grouping them based on the distance information between the contour points.

[0011] Preferably, after solving the connection order of each set of contour points using the first preset traveling salesman algorithm, the method further includes the following steps:

[0012] Each set of contour points is connected in an orderly manner according to the connection sequence obtained by the first preset traveling salesman algorithm.

[0013] Obtain the first and last points of each set of contour points;

[0014] Connect the first and last points of each adjacent group.

[0015] Preferably, extracting several contour points from the SEM image specifically includes the following steps:

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

[0017] 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.

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

[0019] The peak points are several contour points extracted from the SEM image.

[0020] Preferably, the first preset traveling salesman algorithm is a local TSP algorithm.

[0021] Preferably, the second preset traveling salesman algorithm is a global TSP heuristic algorithm.

[0022] Preferably, the clustering algorithm is the K-Means clustering algorithm or the DBSCAN clustering algorithm.

[0023] Another technical solution of the present invention to solve the above-mentioned technical problems is to provide a contour acquisition device for SEM images, applied to the above-mentioned contour acquisition method for SEM images, wherein the contour acquisition device for SEM images includes:

[0024] Acquisition module: Used to acquire the SEM image to be processed;

[0025] Extraction module: used to extract several contour points from the SEM image;

[0026] Grouping module: used to group several of the contour points;

[0027] First solution module: used to solve the connection order of each set of contour points;

[0028] The second solution module is used to solve the connection order of all contour points, guided by the connection order of the first solution module.

[0029] Connection module: used to connect all contour points in an ordered manner according to the connection order solved by the second solving module;

[0030] Output module: Used to output the contour of the SEM image based on all contour points connected by the connection module.

[0031] Another technical solution of the present invention to solve the above-mentioned technical problems 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 contour acquisition method.

[0032] Another technical solution of the present invention to solve the above-mentioned technical problems is to provide a storage medium including a processor, wherein when the storage medium is executed by the processor, it implements the above-mentioned method for obtaining the contour of an SEM image.

[0033] Compared with existing technologies, the contour acquisition method, apparatus, computer equipment, and storage medium for SEM images provided by this invention have the following advantages:

[0034] 1. The contour acquisition method for SEM images provided in the embodiments of the present invention first clusters several acquired contour points using a clustering algorithm. Then, it solves the connection order of each group of contour points using a first preset traveling salesman's algorithm. Since all contour points are grouped using the clustering algorithm, solving the connection order of each group of contour points significantly reduces the problem size, thereby reducing the time required for the first solution. Then, using the connection order obtained from the first solution as a guide, it solves the connection order of all contour points a second time using a second preset traveling salesman's algorithm. Since a relatively optimal solution has been obtained after the first preset algorithm's grouping and solving, even if the problem size is large, the second preset traveling salesman's algorithm can quickly complete the second solution. Therefore, the contour acquisition method provided by the present invention can achieve the function of efficiently and orderly connecting all contour points, and it is fast and computationally inefficient when connecting several contour points.

[0035] 2. The contour acquisition method for SEM images provided in the embodiments of the present invention groups contour points based on distance information between several contour points. This design allows contour points with similar distances to be grouped together. Because grouping the contour points significantly reduces the problem size when the first preset traveling salesman algorithm solves the connection order, the time and computational load of the first solution are significantly reduced. Therefore, by grouping the distance information between several contour points, the subsequent solution time and computational load are reduced, thereby further improving the connection rate of contour points in the SEM image.

[0036] 3. The SEM image contour acquisition method provided in the embodiments of the present invention, after solving the connection order of each group of contour points using the first preset traveling salesman algorithm, further includes the steps of: connecting each group of contour points in an orderly manner according to the connection order obtained by the first preset traveling salesman algorithm; obtaining the first and last points of each group of contour points; and connecting the first and last points between adjacent groups. This design enables the orderly connection between each group of contour points, and by connecting the first and last points of the contour points between adjacent groups, a preliminary connection order can be obtained. This connection order can then be used as a guide to quickly solve the connection order of all contour points using the second preset traveling salesman algorithm.

[0037] 4. The SEM image contour acquisition method provided in the embodiments of the present invention obtains several contour points of the SEM image in such a way that several contour points of the SEM image can be extracted quickly and accurately from the SEM image alone, without the presence of a GDS layout file.

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

[0039] 6. The computer device provided in the embodiments of the present invention has the same beneficial effects as the contour acquisition method of SEM image of the present invention, and will not be described again here.

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

[0041] Figure 1 This is a flowchart illustrating the contour acquisition method for SEM images provided in the first embodiment of the present invention;

[0042] Figure 2 This is a detailed flowchart illustrating the steps of the SEM image contour acquisition method provided in the first embodiment of the present invention. Figure 1 ;

[0043] Figure 3 This is a detailed flowchart illustrating the steps of the SEM image contour acquisition method provided in the first embodiment of the present invention. Figure 2 ;

[0044] Figure 4 This is the SEM image to be processed obtained by the contour acquisition method of SEM image provided in the first embodiment of the present invention;

[0045] Figure 5 (a) to (c) are schematic diagrams of state changes when extracting several contour points of a SEM image using the contour acquisition method for SEM images provided in the first embodiment of the present invention.

[0046] Figure 6 This is a system block diagram of the contour acquisition device for SEM images provided in the second embodiment of the present invention.

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

[0048] 1. Method for obtaining the contour of SEM images; 2. Device for obtaining the contour of SEM images;

[0049] 21. Acquisition Module; 22. Extraction Module; 23. Grouping Module; 24. First Solving Module; 25. Second Solving Module; 26. Connection Module; 27. Output Module.

Detailed Implementation Methods

[0050] 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.

[0051] Please see Figure 1 The first embodiment of the present invention provides a method 1 for obtaining the contour of a SEM image, which includes the following steps:

[0052] S1: Obtain the SEM image to be processed and extract several contour points from the SEM image;

[0053] S2: A clustering algorithm is used to group several contour points;

[0054] S3: Use the first preset traveling salesman algorithm to solve the connection order of each set of contour points;

[0055] S4: Using the connection order obtained from the first preset traveling salesman algorithm as inspiration, and employing the second preset traveling salesman algorithm to solve for the connection order of all contour points; and

[0056] S5: Connect all contour points in an ordered manner using the connection order obtained from the second preset traveling salesman algorithm to obtain the contour of the SEM image.

[0057] It should be noted that the SEM image contour acquisition method provided by this invention is performed without relying on a design layout. Since there is no design layout, existing contour point connection methods first classify contour points according to graphic regions, and then connect the contour points within each region in an orderly manner. This connection method is complex and computationally intensive. Furthermore, heuristic algorithms are proposed in contrast to optimization algorithms; that is, they use previously obtained results as a basis to solve for the next result. In step S4 of this embodiment, the connection order obtained by the first preset algorithm is used as a basis, and this connection order is used as a heuristic to solve for the connection order of all contour points.

[0058] In view of this, the present invention provides a contour acquisition method for SEM images. First, the acquired contour points are clustered using a clustering algorithm. Then, a first preset traveling salesman's algorithm is used to solve for the connection order of each group of contour points. Since the clustering algorithm groups all contour points, solving for the connection order of each group significantly reduces the problem size, thereby reducing the time required for the first solution. Then, using the connection order obtained from the first solution as a guide, a second preset traveling salesman's algorithm is used to solve for the connection order of all contour points a second time. Since the first preset traveling salesman's algorithm has already obtained a relatively optimal solution after grouping, even with a large problem size, the second preset traveling salesman's algorithm can quickly complete the second solution. Therefore, the contour acquisition method provided by the present invention can achieve the function of efficiently and orderly connecting all contour points, and it is fast and computationally inefficient when connecting multiple contour points.

[0059] Furthermore, the clustering algorithm is used to group several contour points, specifically by grouping them according to the distance information between the contour points.

[0060] This design, due to the characteristics of clustering algorithms, allows for the grouping of closely spaced contour points. Grouping the contour points significantly reduces the problem size when the first preset algorithm solves the connection order, thus noticeably decreasing the time and computational cost of the initial solution and allowing for the rapid acquisition of multiple locally optimal solutions. Therefore, grouping the distance information between several contour points reduces subsequent solution time and computational cost, further improving the connection rate of contour points in SEM images.

[0061] Optionally, the first preset traveling salesman algorithm is a local TSP algorithm, the second preset traveling salesman algorithm is a global TSP heuristic algorithm, and the clustering algorithm is either the K-Means clustering algorithm or the DBSCAN clustering algorithm.

[0062] It's important to note that the Traveling Salesman Problem (TSP) is an NP-hard problem in combinatorial optimization, which involves finding the shortest loop that visits each city once and returns to the starting city, given a set of cities and the distances between each pair of cities. Clustering refers to dividing a dataset (such as points on a two-dimensional plane) into different classes or clusters based on a certain feature (such as distance). Data with similar features are grouped into the same cluster as much as possible, while data with significantly different features are placed in different clusters. If distance is used as a measure of dissimilarity, then nearby points will be clustered together, and points that are far apart will be placed in different clusters.

[0063] Understandably, the connection problem of contour points extracted from SEM images in this invention can be abstracted as a Traveling Salesman Problem (TSP). However, as the problem size (i.e., the number of contour points) increases, the solution time increases dramatically. Since contour points in SEM images are typically distributed along contour curves, a clustering algorithm can be applied to group the contour points. For each group, a local TSP algorithm is applied to solve for the connection order of the contour points. Finally, a global TSP heuristic algorithm is applied globally to solve for the connection order of all contour points. Therefore, when solving for the contour points within each group, the problem size is significantly reduced after grouping, allowing the use of a local TSP algorithm to solve for the connection order, thus greatly reducing the solution time. Finally, a global TSP heuristic algorithm is used for global solving. Since a relatively optimal solution has already been obtained after grouping, even with a large problem size, the global TSP heuristic algorithm can be executed quickly, ultimately obtaining the optimal connection order of all contour points, facilitating the subsequent output of a complete and accurate contour image.

[0064] Further, please refer to Figure 2 After solving the connection order of each set of contour points using the first preset traveling salesman algorithm, the following steps are also included:

[0065] S30: Connect each set of contour points in an orderly manner according to the connection order obtained by the first preset traveling salesman algorithm;

[0066] S31: Obtain the first and last points of each set of contour points;

[0067] S32: Connect the first and last points of each adjacent group.

[0068] Understandably, this design enables orderly connections between each group of contour points, and by connecting the first and last points of adjacent groups of contour points, a preliminary connection order can be obtained. This connection order can then be used as a guide to quickly solve the connection order of all contour points using the second preset traveling salesman algorithm.

[0069] Further, please refer to Figure 3 Extracting several contour points from a SEM image specifically includes the following steps:

[0070] S11: Perform pixelation on the SEM image to obtain the original matrix;

[0071] S12: 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.

[0072] S13: Obtain all pixels with gradient values ​​within a preset range, and find the peak point along the gradient direction among all selected pixels;

[0073] Peak points are several contour points extracted from the SEM image.

[0074] Understandably, this method of obtaining several contour points from a SEM image allows for the rapid and accurate extraction of these points from the SEM image itself, even without a GDS map file. Furthermore, by first acquiring all pixels within a preset range and then searching for peak points among the selected pixels, the extraction of contour points becomes faster and more accurate, thus facilitating subsequent contour extraction.

[0075] 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.

[0076] 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 within a certain range in the SEM image (it should be understood that the lines in the SEM image have a certain width, and the brightest point in the width direction best reflects the local position of the SEM image contour at that location; connecting these brightest points sequentially yields the SEM image contour that retains the most detail of the original image). Searching along the gradient direction allows for accurate and rapid identification of the desired peak points. This method is simple to implement, highly reliable, and the identified peak points accurately reflect the contour point information of the SEM image. Furthermore, the preset search range is 30-50 pixels.

[0077] For example, first randomly select a SEM image to be processed (e.g. Figure 4 As shown), and then the SEM image is pixelated (as shown). Figure 5 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 5 (as shown in (b)) and finds peak points along the gradient direction among all selected pixels (e.g. Figure 5 (The pixels between the two lines in (c)). It can be seen that the contour points obtained in this way are more accurate, which facilitates the subsequent connection of contour points.

[0078] Please see Figure 6 The second embodiment of the present invention provides a contour acquisition device for SEM images, applied to the contour acquisition method for SEM images provided in the first embodiment of the present invention. The contour acquisition device for SEM images includes:

[0079] Acquisition module 21: Used to acquire the SEM image to be processed;

[0080] Extraction module 22: used to extract several contour points from the SEM image;

[0081] Grouping module 23: used to group several of the contour points;

[0082] First Solving Module 24: Used to solve the connection order of each set of contour points;

[0083] Second solver module 25: Used to solve the connection order of all contour points, inspired by the connection order of the first solver module;

[0084] Connection module 26: used to connect all contour points in an ordered manner according to the connection order solved by the second solving module;

[0085] Output module 27: Used to output the contour of the SEM image based on all contour points connected by the connection module.

[0086] It is understood that the contour acquisition device for SEM images provided in the second embodiment of the present invention has the same beneficial effects as the contour acquisition method for SEM images provided in the first embodiment of the present invention, and will not be described again here.

[0087] 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 acquisition method for SEM images according to the first embodiment of the present invention.

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

[0089] 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 contour acquisition method for SEM images according to a first embodiment of the present invention.

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

[0091] 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.

[0092] 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.

[0093] 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.

[0094] Compared with existing technologies, the contour acquisition method, apparatus, computer equipment, and storage medium for SEM images provided by this invention have the following advantages:

[0095] 1. The contour acquisition method for SEM images provided in the embodiments of the present invention first clusters several acquired contour points using a clustering algorithm. Then, it solves the connection order of each group of contour points using a first preset traveling salesman's algorithm. Since all contour points are grouped using the clustering algorithm, solving the connection order of each group of contour points significantly reduces the problem size, thereby reducing the time required for the first solution. Then, using the connection order obtained from the first solution as a guide, it solves the connection order of all contour points a second time using a second preset traveling salesman's algorithm. Since a relatively optimal solution has been obtained after the first preset algorithm's grouping and solving, even if the problem size is large, the second preset traveling salesman's algorithm can quickly complete the second solution. Therefore, the contour acquisition method provided by the present invention can achieve the function of efficiently and orderly connecting all contour points, and it is fast and computationally inefficient when connecting several contour points.

[0096] 2. The contour acquisition method for SEM images provided in the embodiments of the present invention groups contour points based on distance information between several contour points. This design allows contour points with similar distances to be grouped together. Because grouping the contour points significantly reduces the problem size when the first preset traveling salesman algorithm solves the connection order, the time and computational load of the first solution are significantly reduced. Therefore, by grouping the distance information between several contour points, the subsequent solution time and computational load are reduced, thereby further improving the connection rate of contour points in the SEM image.

[0097] 3. The SEM image contour acquisition method provided in the embodiments of the present invention, after solving the connection order of each group of contour points using the first preset traveling salesman algorithm, further includes the steps of: connecting each group of contour points in an orderly manner according to the connection order obtained by the first preset traveling salesman algorithm; obtaining the first and last points of each group of contour points; and connecting the first and last points between adjacent groups. This design enables the orderly connection between each group of contour points, and by connecting the first and last points of the contour points between adjacent groups, a preliminary connection order can be obtained. This connection order can then be used as a guide to quickly solve the connection order of all contour points using the second preset traveling salesman algorithm.

[0098] 4. The SEM image contour acquisition method provided in the embodiments of the present invention obtains several contour points of the SEM image in such a way that several contour points of the SEM image can be extracted quickly and accurately from the SEM image alone, without the presence of a GDS layout file.

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

[0100] 6. The computer device provided in the embodiments of the present invention has the same beneficial effects as the contour acquisition method of SEM image of the present invention, and will not be described again here.

[0101] 7. The storage medium provided in the embodiments of the present invention has the same beneficial effects as the contour acquisition method of SEM images of the present invention, and will not be described again here.

[0102] 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 obtaining the contour of an SEM image, characterized in that: The method for obtaining the contour of the SEM image includes the following steps: The process involves acquiring a SEM image to be processed and pixelating it to obtain an original matrix; performing Gaussian filtering on the original matrix to obtain an image matrix and calculating the gradient values ​​of all pixels in the image matrix; dividing the image matrix into blocks of a preset size and finding the middle pixel with the largest gradient value within 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 within a preset search range along the gradient direction of the key pixel, and using it as the peak point; the peak point is a number of contour points extracted from the SEM image without a design layout, and the contour points are distributed along the graphic contour curve in the SEM image; Clustering algorithms are used to group the contour points. The connection order of each set of contour points is determined using the first preset traveling salesman algorithm. Inspired by the connection order obtained from the first preset traveling salesman algorithm, the second preset traveling salesman algorithm is used to solve for the connection order of all contour points; and The contour of the SEM image is obtained by connecting all contour points in an ordered manner using the connection order obtained by the second preset traveling salesman algorithm. After solving the connection order of each group of contour points using the first preset traveling salesman algorithm, the method further includes: connecting each group of contour points in an orderly manner according to the connection order obtained by the first preset traveling salesman algorithm; obtaining the first point and the last point of each group of contour points; and connecting the first point and the last point between adjacent groups.

2. The contour acquisition method for SEM images as described in claim 1, characterized in that: The clustering algorithm is used to group the contour points into groups based on the distance information between them.

3. The contour acquisition method for SEM images as described in claim 1, characterized in that: The first preset traveling salesman algorithm is a local TSP algorithm.

4. The contour acquisition method for SEM images as described in claim 1, characterized in that: The second preset traveling salesman algorithm is a global TSP heuristic algorithm.

5. The contour acquisition method for SEM images as described in claim 1, characterized in that: The clustering algorithm is either the K-Means clustering algorithm or the DB SCAN clustering algorithm.

6. A contour acquisition device for SEM images, applied to the contour acquisition method for SEM images according to any one of claims 1-5, characterized in that, The contour acquisition device for the SEM image includes: Acquisition module: Used to acquire the SEM image to be processed; Extraction module: This module performs pixelation on the SEM image to obtain an original matrix; it performs Gaussian filtering on the original matrix to obtain an image matrix and calculates the gradient values ​​of all pixels in the image matrix; it divides the image matrix into blocks of a preset size and finds the middle pixel with the largest gradient value within each block; it filters the middle pixels within all blocks, and when the gradient value of the middle pixel is greater than a preset gradient threshold, it selects the corresponding key pixel and records its coordinates and gradient direction; starting from the coordinates of the key pixel in the image matrix, it finds the pixel with the smallest grayscale value within a preset search range along the gradient direction of the key pixel, and uses this as the peak point; the peak point is a number of contour points extracted from the SEM image without a design layout, and these contour points are distributed along the graphic contour curve in the SEM image. Grouping module: used to group several of the contour points; The first solution module is used to solve the connection order of each group of contour points. After solving the connection order of each group of contour points using the first preset traveling salesman algorithm, the method further includes: connecting each group of contour points in an orderly manner according to the connection order obtained by the first preset traveling salesman algorithm; obtaining the first point and the last point of each group of contour points; and connecting the first point and the last point between adjacent groups. The second solution module is used to solve the connection order of all contour points, guided by the connection order of the first solution module. Connection module: used to connect all contour points in an ordered manner according to the connection order solved by the second solving module; Output module: Used to output the contour of the SEM image based on all contour points connected by the connection module.

7. 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 contour acquisition method for SEM images as described in any one of claims 1-5.

8. A storage medium, characterized in that: Includes a processor, wherein when the storage medium is executed by the processor, it implements the contour acquisition method for SEM images according to any one of claims 1-5.