A positioning method of a CD-SEM device

CN122115813APending Publication Date: 2026-05-29SHANGHAI PRECISION MEASUREMENT SEMICON TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI PRECISION MEASUREMENT SEMICON TECH INC
Filing Date
2024-11-26
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In the existing technology, CD-SEM equipment is prone to AP positioning failure on FEM wafers, resulting in inaccurate measurement point positioning and time consumption. In particular, when the photolithography conditions of different dies vary greatly, the template matching method is not effective.

Method used

A macroscopic edge pair acquisition method is adopted. By acquiring template images at positioning points and performing image processing, macroscopic edge pairs and their basic features are extracted. Target images are acquired in the grains to be tested for macroscopic edge pair matching. The position of the measurement point is corrected using offset to achieve accurate positioning.

Benefits of technology

This improves the accuracy and efficiency of AP positioning on FEM wafers using CD-SEM equipment, reduces manual intervention, and ensures accurate positioning of measurement points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115813A_ABST
    Figure CN122115813A_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a positioning method of CD-SEM equipment, when creating a work menu of the equipment, determining a to-be-measured die and a given die on a FEM wafer, determining a measurement point and a positioning point in the given die, collecting a template image at the positioning point, and obtaining a macro edge pair and basic features thereof based on the template image; when executing the work menu, collecting a target image at the positioning point in the to-be-measured die and obtaining a macro edge pair and basic features thereof, matching and searching the macro edge pair corresponding to the template image with the macro edge pair corresponding to the target image to determine an offset, and correcting a position of the measurement point by using the offset to obtain a corrected position. The positioning method provided by the embodiment of the present application solves the problem that the positioning of the positioning point on the FEM wafer is prone to failure in the prior art, and an accurate position of the measurement point can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of scanning electron microscopy, and more particularly to a positioning method for a CD-SEM device. Background Technology

[0002] Critical Dimension-Scanning Electron Microscope (CD-SEM) equipment is widely used in the semiconductor field. A CD-SEM is an instrument specifically designed to measure the critical dimensions of semiconductor structures. It can be used for process evaluation of FEM (Focus Exposure Matrix) wafers. The lithography conditions for different grains on an FEM wafer vary, including the focus and exposure dose of the lithography equipment. Measuring the grains on an FEM wafer using CD-SEM is often used as an important means of evaluating lithography effectiveness. Figure 1 This is a schematic diagram of an FEM wafer 100. The photolithography conditions for each die on the FEM wafer 100 are different. For example, the photolithography conditions for dies D1, D2, D3, D4, D5, D6, D7, D8, and D9 are all different.

[0003] See Figure 2 The CD-SEM equipment includes a SEM column 211, an optical microscope (OM) 212, and a mechanical motion platform 213 for carrying the wafer 214. The mechanical motion platform 213 includes a stage that can translate in the X direction and a stage that can translate in the Y direction. The equipment also includes a vacuum transition chamber (not shown), a robot for loading and unloading the wafer 214, a front-end module (EFEM), and computer hardware and software, etc. These are all prior art and will not be described in detail.

[0004] CD-SEM equipment can be used to measure critical dimensions of semiconductor structures on wafers, with linewidth being a common critical dimension. Taking the measurement of a single IC line's linewidth as an example, the cross-section of a single IC line is as follows: Figure 3 As shown in cross section 301 (this article uses X-direction measurement as an example, but the Y-direction is also applicable; here it refers to the X and Y directions in the image coordinate system), the SEM image of this IC line acquired using a CD-SEM device is as follows. Figure 3As shown in image 302, the bright band 303 indicates a higher number of electrons emitted from the structure's edge, with significant contributions from secondary electrons (SE) and reflected electrons (BSE). The linewidth measurement area is typically defined by a rectangle 304 or a pair of rectangles 305. Sampling along the X-direction at a position y = y0 within rectangle 304 yields a pixel intensity profile (assuming a maximum value of 255), referred to simply as the profile. The resulting profile is shown in the image. Figure 3 As shown in curve 306 (excluding the average in the y direction), the edge position of the IC line can be obtained based on the information in the contour, and the line width can be calculated based on the edge position.

[0005] When creating the working menu (Recipe) for the CD-SEM equipment, it is necessary to determine the die to be measured and the predefined die on the wafer. The die to be measured is determined according to the user's measurement requirements, while the predefined die is a die produced under optimal photolithography conditions. The user can select the predefined die on the wafer. The predefined die is usually a central die near the center of the wafer. The die to be measured and the predefined die can be the same die or different dies. When creating the working menu, it is necessary to determine the measurement point (MP) and the addressing point (AP) near the predefined die to assist in its precise positioning. Specifically, the MP and AP are obtained based on the SEM image. Here, MP and AP are points in a general sense, including their coordinates on the wafer (coordinates in the wafer coordinate system) and the field of view (FOV). When creating the Recipe, the MP and AP are determined from an SEM image with a relatively larger FOV. This SEM image is called the working image (e.g., ...). Figure 4 The working image 401 allows selection of MP and AP, as well as acquisition of their relative positions. Figure 4For example, working image 401 contains two access points (APs), namely positioning points 402 and 403, which can contain templates 4021 and 4031 for template matching, respectively. Working image 401 includes two measurement points (MPs), namely measurement points 404 and 405, which can each contain a rectangular measurement area, used for linewidth measurement. There are many template matching methods in existing technologies, such as the NCC (Normalized Cross Correlation) algorithm and methods based on image features. When executing a recipe, for the MP to be measured in a certain die, its related APs are first used for positioning. The position of the AP is the position of the AP determined when creating the working menu. Specifically, the position of the AP is determined in the target image using a template matching method. Then, based on the relative positions of the AP and MP, the position of the MP is determined in the target image, i.e., the MP is located. Finally, the measurement area in the MP is measured. These are also common workflows in existing CD-SEM technologies.

[0006] In existing technologies, due to the different photolithography conditions on different grains of a FEM wafer, images acquired at the same AP location in different grains show significant differences, with some images being quite poor. (Reference) Figure 5 , Figure 5 This illustration shows AP images taken at the same AP location in different dies on an FEM wafer. Image 501 is an image taken in a die under optimal lithography conditions, for example, in... Figure 1 Images of the AP (AP) located at the AP position in die D5, near the wafer center, show progressively worsening pattern variations in images 502, 503, and 504. These variations manifest in various ways, such as blurring, thickening of pattern edges, and localized distortion. The worst image, 504, was acquired at the AP position in a die significantly deviating from optimal lithography conditions; for example, image 504 is an image acquired at the AP position in a die far from the center of the FEM wafer. This renders existing template matching methods, including those based on grayscale or features, largely ineffective, as they are limited to localized changes in the image and therefore unsuitable. Consequently, when using CD-SEM equipment to locate APs in FEM wafers for further MP (MP) positioning, AP positioning often fails, necessitating manual intervention to locate the AP and determine the MP's position—a time-consuming and inaccurate process. Summary of the Invention

[0007] The purpose of this invention is to provide a positioning method for CD-SEM equipment to solve the problem of easy failure in AP positioning on FEM wafers in the prior art.

[0008] To achieve this objective, the embodiments of the present invention adopt the following technical solutions:

[0009] A method for locating a CD-SEM device, comprising:

[0010] S1. When creating the working menu of the device, the test grain and the predetermined grain are determined on the FEM wafer. The measurement point and the positioning point for positioning the measurement point are determined in the predetermined grain. The template image is acquired at the position of the positioning point, and the edge image of the template image is obtained through image processing. Then, the macro edge pairs and their basic features in the edge image are obtained based on the macro edge pair acquisition method.

[0011] Among them, the macro-edge pair acquisition method is used to obtain macro-edge pairs and their basic features in the edge image, including:

[0012] Based on each line segment in the edge image, a straight line fitting is performed to obtain multiple candidate straight line segments, and the features of each candidate straight line segment are obtained. The features of the candidate straight line segments include the positions of the two ends and the orientation angle relative to the same direction.

[0013] Multiple sets of line segments are obtained from the multiple candidate line segments, such that each set of line segments includes at least two candidate line segments, and each set of line segments satisfies the following: the difference in orientation angles between any two candidate line segments in the set is less than a predetermined first angle threshold, the distance between the nearest endpoints of any two candidate line segments in the set is less than a predetermined distance threshold, and the two perpendicular lines passing through the two endpoints of any candidate line segment in the set do not intersect with the other candidate line segments in the set.

[0014] Each group of line segments is refitted with a macro edge to fit each group of line segments into a macro edge, thus obtaining multiple macro edges; the remaining candidate line segments with a length greater than or equal to a predetermined length threshold are selected as the macro edges; the features of each macro edge are obtained, including the positions of the two ends and the orientation angle relative to the direction.

[0015] Based on preset endpoint distance threshold and included angle threshold conditions, all macro edge pairs that meet the conditions are filtered out from all the macro edges. The basic characteristics of each macro edge pair are obtained, including the included angle between the two macro edges, the average orientation angle, and the position of their respective endpoints.

[0016] S2. When executing the working menu, a target image is acquired at the location of the positioning point in the die to be tested, and the edge image of the target image is obtained through image processing. Based on the macro edge pair acquisition method, the macro edge pairs and their basic features in the edge image of the target image are acquired. The macro edge pairs corresponding to the template image are traversed, and macro edge pair matching is performed with each macro edge pair corresponding to the target image in a predetermined order. The macro edge pair matching includes determining whether the difference of the basic features of a pair of macro edge pairs meets a preset condition. When the difference of the basic features of at least one pair of macro edge pairs meets the preset condition, the offset between the template image and the target image is acquired based on the position of the macro edge pair that meets the preset condition. The offset is used to correct the position of the measurement point to obtain the corrected position.

[0017] Beneficial effects of the embodiments of the present invention:

[0018] This invention provides a positioning method for a CD-SEM device. When creating the device's working menu, the die to be measured and a predetermined die are determined on the FEM wafer. Measurement points and positioning points are determined within the predetermined die. A template image (i.e., the AP template image) is acquired at the positioning point, and macroscopic edge pairs and their basic features are obtained based on the template image. When executing the working menu, a target image (i.e., the AP target image) is acquired at the positioning point in the die to be measured, and macroscopic edge pairs and their basic features are obtained. The macroscopic edge pairs corresponding to the template image are matched and searched with the macroscopic edge pairs corresponding to the target image to determine the offset. The offset is used to correct the position of the measurement point to obtain the corrected position. This positioning method provided by this invention solves the problem of easy failure in AP positioning on FEM wafers in the prior art and can obtain accurate measurement point positions. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of a FEM wafer in the prior art.

[0020] Figure 2 This is a schematic diagram of a CD-SEM device in the prior art.

[0021] Figure 3 This is a schematic diagram of the cross-section, SEM image, and contour of the IC line under test in the prior art.

[0022] Figure 4 This is a schematic diagram of existing technology for acquiring measurement points and positioning points based on SEM images.

[0023] Figure 5 This is a schematic diagram of images captured at the same location of different grains in an FEM wafer in the prior art.

[0024] Figure 6AThis is a schematic diagram of the AP template image and the corresponding edge image provided in an embodiment of the present invention.

[0025] Figure 6B This is a schematic diagram of the AP target image and the corresponding edge image provided in an embodiment of the present invention.

[0026] Figure 7A This is a schematic diagram of line segments and candidate line segments in an edge image provided in an embodiment of the present invention.

[0027] Figure 7B To Figure 7A A schematic diagram of candidate line segments obtained by performing line fitting on the line segments in the diagram.

[0028] Figure 7C Based on Figure 7B The candidate line segments are obtained by matching the candidate line segments to form a group of candidate line segments and then fitting the data to obtain a schematic diagram of the macroscopic edge.

[0029] Figure 7D for Figure 7B A schematic diagram of a line segment and its corresponding candidate line segment.

[0030] Figure 7E This is a schematic diagram of another macroscopic edge and its corresponding candidate line segment in an embodiment of the present invention.

[0031] Figure 8 This is a schematic diagram of macroscopic edge pairs in the edge image in an embodiment of the present invention.

[0032] Figure 9A This is a schematic diagram illustrating the use of vertex position to determine offset in an embodiment of the present invention.

[0033] Figure 9B This is a schematic diagram illustrating the determination of offset using the intersection of angle bisectors, as provided in an embodiment of the present invention.

[0034] Figure 10 A flowchart illustrating a positioning method for a CD-SEM device provided in an embodiment of the present invention.

[0035] Figure 11 This is a flowchart illustrating the macroscopic edge pair acquisition method for obtaining macroscopic edge pairs and their basic features in an edge image, as provided in an embodiment of the present invention. Detailed Implementation

[0036] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0037] As mentioned earlier, in practical applications, there are significant differences between the AP images corresponding to different dies of FEM wafers. Some images are of poor quality, and may be blurred, have thickened edges, or exhibit local distortions. Existing template matching methods are prone to causing localization failures. However, from a macroscopic perspective (involving tens to hundreds of pixels rather than being limited to a few local pixels), most of the graphic edge features, including edges and corners, still exist at the macroscopic level and can still be used for matching.

[0038] Based on this, this invention provides a positioning method for a CD-SEM device. The goal is to obtain the offset based on the matching of the AP template image and the AP target image. Because there is a definite relative position between the AP and the MP, the MP position when executing the work menu also has this offset relative to the MP position obtained when creating the work menu. Therefore, the MP position obtained when creating the work menu is corrected according to this offset to obtain the corrected position, thus completing the positioning of the measurement point. For example, in order to subsequently realize critical dimension measurement, a measurement image can be acquired at the corrected position and critical dimension measurement can be performed. This is prior art and will not be described in detail here.

[0039] Specifically, the localization method in this embodiment of the invention obtains corresponding macroscopic edge pairs based on the AP template image and the AP target image, and locates the measurement point based on the matching between the macroscopic edge pairs. Both the AP template image and the AP target image can obtain numerous line segments in their corresponding edge images. Longer macroscopic edges can be obtained from these line segments, and macroscopic edge pairs can be obtained based on these macroscopic edges. Matching based on these macroscopic edge pairs is then easily successful. Because the coarse contours in the AP image, i.e., the macroscopic structural contours, are still traceable, and the relationships between the macroscopic structural contours remain relatively fixed, their matching can be used for localization. That is, as mentioned above, from a macroscopic level (involving tens to hundreds of pixels rather than being limited to a few local pixels), a large portion of the graphic edge features, including edges and corners, still exist at the macroscopic level and can still be used for matching. The following further describes the content of this embodiment of the invention.

[0040] like Figure 10 As shown, this embodiment of the invention provides a positioning method for a CD-SEM device, including the following steps S1-S2.

[0041] S1. When creating the working menu of the device, the die to be measured and the predetermined die are determined on the FEM wafer. The measurement point and the positioning point for locating the measurement point are determined in the predetermined die. The template image is acquired at the position of the positioning point, and the edge image of the template image is obtained through image processing. Then, the macro edge pairs and their basic features in the edge image are obtained based on the macro edge pair acquisition method.

[0042] In this embodiment of the invention, a test grain and a predetermined grain are determined on the FEM wafer. The test grain is determined according to the user's measurement requirements, and the predetermined grain is a grain produced under optimal photolithography conditions. The user can select the predetermined grain on the wafer. The predetermined grain is usually a central grain close to the center of the wafer. The test grain and the predetermined grain can be the same grain or different grains.

[0043] In this embodiment of the invention, a grain is defined on the FEM wafer. Specifically, it is a grain in the FEM wafer with no irregular deformation in its structure, which can be referred to as a predetermined grain, such as a central grain near the center of the wafer. Then, an SEM image is acquired on this grain as a working image, and measurement points and positioning points for locating the measurement points are determined in the working image. As described in the background art, both measurement points and positioning points are points in a general sense, and will not be elaborated further here. For example, as shown in the figure... Figure 4 The working image 401 is shown, and measurement point 405 and positioning point 402 for locating the measurement point are determined in the working image 401. It should be noted that since the following embodiments of the present invention are based on macroscopic edge pairs for matching, it is not necessary to determine template 4021 for template matching in positioning point 402 as in the prior art.

[0044] In this embodiment of the invention, the template image acquired at the location of the positioning point can be called an AP template image, for example, as shown below. Figure 6A The AP template image 601 shown.

[0045] In this embodiment of the invention, after obtaining the AP template image, image processing is performed to obtain the corresponding edge image. The image processing includes: a. performing image edge extraction on the AP template image to obtain the edge image; b. filtering noise in the edge image using a threshold to obtain a binarized edge image. The image edge extraction method is existing technology, and there are many methods available. For example, using the gradient of a low-pass filter function (such as a Gaussian function G) as a kernel function to convolve the image can obtain the corresponding edge images Ex and Ey in the X and Y directions, respectively. Then, the edge intensity map is obtained as the output edge image E (whose pixel value is the edge gradient at that location). Furthermore, the gradient vector angle of pixel (x, y) in the edge image E is denoted as Eθ(x, y). The formula for calculating the gradient vector angle will be used later. These related formulas are all existing technologies and are listed below:

[0046]

[0047]

[0048] Eθ(x, y) = tan -1 (Ey(x,y) / Ex(x,y))

[0049] Where I represents the image for which edge extraction needs to be performed, in this embodiment of the invention, for example, an AP template image. The threshold can be obtained by applying the Otsu algorithm to the edge image E or by obtaining a threshold Tb based on experience. The value of pixel (x, y) in the binarized edge image Em is:

[0050]

[0051] Here, bg is, for example, 0, while fg is a non-zero constant, such as fg = 1 or fg = 255 (for images of 8-bit data types), or vice versa, i.e., bg is 1 or 255, and fg is 0. Alternatively, non-maximum suppression can be applied to the edges in the binarized edge image Em, for details of which can be found in the Canny algorithm.

[0052] These image processing algorithms are all common methods in existing image processing, and will not be described in detail.

[0053] Taking image processing of AP template image 601 as an example, the following can be obtained: Figure 6A The edge image 602 shown is a specific example of a binarized edge image Em. For the edge image corresponding to the AP template image, it is necessary to obtain the macro edge pairs and their basic features based on the macro edge pair acquisition method provided in this embodiment of the invention.

[0054] Furthermore, such as Figure 11 As shown, the macro edge pair acquisition method is used to obtain macro edge pairs and their basic features in the edge image, including the following steps S11-S14.

[0055] S11. Based on each line segment in the edge image, perform line fitting to obtain multiple candidate line segments, and obtain the features of each candidate line segment. The features of the candidate line segments include the positions of the two ends and the orientation angle relative to the same direction.

[0056] To illustrate the further processing of the edge image, in this embodiment of the invention, using... Figure 7A This illustrates a portion of the edges in edge image 602, that is, Figure 7A This is a magnified view of a portion of the edges in edge image 602. It should be noted that, in this embodiment of the invention... Figures 6A to 9B These are all illustrative images. Figure 6A and Figure 7A For example, whether Figure 6A still Figure 7A These are all just illustrations, so Figure 7A Not strictly with Figure 6A The edge image 602 in the diagram corresponds to the schematic.

[0057] It needs to be explained that, Figure 7A The edge shown is an image of the die at the AP position generated under suboptimal photolithography conditions, i.e., template image 601. Since the positioning method in this embodiment of the invention needs to be applied to each die to be tested on the FEM wafer, and the photolithography conditions for these dies to be tested are usually deviated from the optimal ones, an image of the die at the AP position generated under suboptimal photolithography conditions is used here as an example.

[0058] like Figure 7A As shown, a portion of the edge in the edge image 602 is illustrated. This portion of the edge is specifically represented by multiple discrete line segments 700. In this embodiment of the invention, the line segments extracted by the image edge extraction method are usually curved segments that are close to straight lines, but the possibility of some straight lines cannot be ruled out.

[0059] Since the actual structure on a wafer is theoretically mostly horizontal and vertical, line fitting is performed on the line segments in the edge image to obtain the corresponding candidate line segments. Alternatively, line fitting can be performed directly on all line segments in the edge image to obtain the corresponding candidate line segments. Or, line segments with a preset length threshold (dc) can be filtered out first, removing those shorter than the threshold (e.g., dc = 5 pixels). Then, line fitting is performed on the remaining line segments in the edge image to obtain the corresponding candidate line segments.

[0060] For any given line segment, a candidate line segment is obtained by performing a line fitting based on all pixel values ​​of that line segment in the edge image. The line fitting algorithm is an existing technique, such as using the least squares method to perform line fitting, ensuring that the mean square error (MSE) of the distances from each point on the candidate line segment to the line segment is less than a predetermined threshold, which will not be elaborated further here.

[0061] like Figure 7B As shown, for Figure 7A By performing line fitting on the multiple line segments 700 shown, corresponding candidate line segments can be obtained. Figure 7B The candidate line segments are indicated by dashed lines. A total of 7 candidate line segments are obtained, namely candidate line segments 701, 702, 703, 704, 705, 706, and 707.

[0062] In this embodiment of the invention, both the AP template image and the AP target image (described later) are rectangular images; therefore, their corresponding edge images are also rectangular images. In this embodiment, the direction is either the horizontal direction of one rectangular edge of the edge image or the vertical direction of the other adjacent rectangular edge.

[0063] After performing line fitting, the positions of the two endpoints of each candidate line segment are obtained. Furthermore, the angle of each candidate line segment relative to the horizontal (or vertical) direction mentioned above is also obtained, referred to as the orientation angle. In this embodiment of the invention, the horizontal direction is taken as an example; the orientation angle of each candidate line segment relative to the horizontal direction is obtained. Figure 7B The diagram illustrates the orientation angle θ of candidate line segment 704 relative to the horizontal direction. The orientation angles of other candidate line segments are not shown in the diagram.

[0064] In this embodiment of the invention, the feature of the candidate line segment further includes the average gradient vector angle, which is the average value of the gradient vector angle of each pixel in the corresponding edge image of the candidate line segment.

[0065] In this embodiment of the invention, the features of each candidate line segment include: a. the positions of the two endpoints, where the position of one end of the candidate line segment can be denoted as (xa, ya) and the position of the other end can be denoted as (xb, yb); b. the orientation angle, which is between 0 and 180 degrees; c. the average gradient vector angle.

[0066] As described above, the average gradient vector angle is calculated using the following formula in this embodiment of the invention:

[0067]

[0068] Where Nl is the number of all pixels on the candidate line segment L, and the pixel (x, y) comes from the candidate line segment L, therefore the summation of the above formula is restricted by x, y∈L. It can be seen that the average gradient vector angle reflects the average gradient direction of the candidate line segment.

[0069] S12. Obtain multiple sets of line segments (multiple sets of line segments are short for multiple sets of candidate line segments) from the multiple candidate line segments, such that each set of line segments includes at least two candidate line segments, and each set of line segments satisfies the following: the difference in orientation angles between any two candidate line segments in the set is less than a predetermined first angle threshold, the distance between the nearest endpoints of any two candidate line segments in the set is less than a predetermined distance threshold, and the two perpendicular lines passing through the two endpoints of any candidate line segment in the set do not intersect with the remaining candidate line segments in the set.

[0070] S13. Refit the candidate line segments in each group of line segments with a macro edge so that each group of line segments is fitted into a macro edge, so as to obtain multiple macro edges; obtain the candidate line segments with a length greater than or equal to a predetermined length threshold from the remaining candidate line segments as the macro edges; obtain the features of each macro edge, the features of the macro edge including the positions of the two ends and the orientation angle relative to the direction.

[0071] In this embodiment of the invention, there are a large number of line segments in the edge image. After corresponding straight line fitting, a large number of candidate straight line segments can be obtained. For these candidate straight line segments, a group of candidate straight line segments that meet the conditions will be selected from these candidate straight line segments. The purpose is to make the candidate straight line segments in the group basically parallel and the beginning and end relatively close.

[0072] In this embodiment of the invention, the above-mentioned candidate line segments are integrated into candidate line segment groups according to the following conditions, ensuring that each group contains M (M≥2) candidate line segments, and that the candidate line segments within each candidate line segment group satisfy the following conditions a)-d):

[0073] a) The difference in orientation angle between any two candidate line segments in the group is less than the predetermined first angle threshold Ths. The purpose is to make any two candidate line segments in the group basically parallel, and thus make all candidate line segments in the group basically parallel. The range of the first angle threshold Ths is, for example, (0°, 5°], such as Ths = 2.5°.

[0074] b) The distance between the nearest endpoints of any two candidate line segments within the group is less than the predetermined distance threshold Thd. The purpose is to make the distances between each candidate line segment relatively close. The predetermined distance threshold Thd = β × min(W, H), 0 ≤ β ≤ 1.75%, where W and H are the width and height of the edge image, respectively.

[0075] c) The two perpendicular lines passing through the endpoints of any candidate line segment 2 do not intersect with any other candidate line segments in the group; where, since a candidate line segment has two endpoints, and there is a perpendicular line through each endpoint perpendicular to the candidate line segment, a candidate line segment corresponds to two perpendicular lines. It is required that these two perpendicular lines do not intersect with any of the other candidate line segments. This ensures that all candidate line segments in the group form a beginning-end interval distribution, which is beneficial for subsequent fitting of macroscopic edges with longer lengths.

[0076] In some embodiments, non-intersection means complete non-intersection in the usual sense. In other embodiments, non-intersection may have a certain tolerance, that is, it is required that the two perpendicular lines do not intersect with any of the other candidate line segments within a certain range, the range being based on image size and experience, such as 5 pixels. For example, if a perpendicular line passing through the endpoint of candidate line segment A intersects line segment B, then nearby there must also be a perpendicular line passing through the endpoint of candidate line segment B intersecting candidate line segment A. The distance between the two intersection points in approximately along the direction of the two candidate line segments (which can be the direction of one of the candidate line segments, such as candidate line segment A or candidate line segment B) does not exceed a predetermined range. For example, if the distance between the two intersection points in the direction of candidate line segment A is 3 pixels, which is less than 5 pixels, it can still be considered non-intersecting.

[0077] d) The difference between the average gradient vector angles of any two candidate line segments in the group is less than a predetermined second angle threshold Thθ. The second angle threshold Thθ is more lenient than the first angle threshold Ths. The range of the second angle threshold Thθ can be [10°, 65°], for example, the second angle threshold Thθ is 40°.

[0078] In this embodiment of the invention, for each candidate line segment group, the corresponding macro edge is obtained by re-fitting the lines using the pixels on all candidate line segments in the group. At this time, the number of candidate line segment groups is the same as the number of macro edges.

[0079] The above describes how to filter candidate line segments in an edge image to obtain a group of candidate line segments that meet the conditions, and obtain the same number of macroscopic edges as the group of candidate line segments.

[0080] Considering that after the initial screening, there may still be some candidate line segments that do not meet the criteria for forming a candidate line segment group, these are referred to as remaining candidate line segments. For these remaining candidate line segments, further screening is performed to ensure that the length of each remaining candidate line segment is greater than or equal to a predetermined length threshold. These remaining candidate line segments are also included as macroscopic edges. Combined with the macroscopic edges already obtained through line fitting, the number of macroscopic edges in this embodiment is greater than or equal to the number of candidate line segment groups. If there are no remaining candidate line segments, or if none of the remaining candidate line segments have a length greater than or equal to the predetermined length threshold, then the number of macroscopic edges is equal to the number of candidate line segment groups.

[0081] In this embodiment of the invention, the feature of the macro edge also includes the macro gradient vector angle, which is the average value of the average gradient vector angle of each candidate line segment corresponding to the macro edge.

[0082] In this embodiment of the invention, the candidate line segments whose length is greater than or equal to a predetermined length threshold among the remaining candidate line segments are directly used as the macro edge. At this time, the characteristics of the macro edge are the characteristics of the candidate line segment, including the positions of the two ends, the orientation angle, and the average gradient vector angle.

[0083] based on Figure 7B After filtering each candidate line segment using the above method, only one group of candidate line segments is obtained, namely, a group of candidate line segments, including candidate line segments 702, 704, and 706. Line fitting is then performed again on these three candidate line segments to obtain the corresponding macroscopic edge 708. In other words, a single line segment, called macroscopic edge 708, is obtained by performing line fitting on all pixels of the three candidate line segments. Figure 7C The macroscopic edge 708 is indicated by a solid line. (Regarding...) Figure 7BAfter filtering the candidate line segments shown, a set of candidate line segments is obtained. There are remaining candidate line segments (specifically, candidate line segments 701, 703, 705, and 707). For these remaining candidate line segments, none have a length greater than or equal to a predetermined length threshold. Therefore, for... Figure 7B Each candidate line segment listed can only obtain one macro edge, namely macro edge 708.

[0084] The following section will explain how to determine the two endpoints of a candidate line segment, and how to determine the two endpoints of a macroscopic edge.

[0085] In this embodiment of the invention, the two endpoints of the candidate line segment are the two endpoints of the line segment to be fitted, or the two points on the fitted line that are closest to the two endpoints of the line segment to be fitted.

[0086] like Figure 7D As shown, it provides Figure 7B The diagram illustrates a line segment 700 and a corresponding candidate line segment 704. A straight line can be obtained by fitting line segment 700 to a line, but the endpoints of the fitted line need to be determined to form a macroscopic edge. One approach is to use the two endpoints of line segment 700, namely endpoints 709 and 710, as endpoints. Although the endpoints may not lie on the fitted line in this approach, it does not affect the implementation of subsequent steps. Another approach is to determine the point 711 closest to endpoint 709 on the fitted line, and the point 712 closest to endpoint 710 on the same line. Points 711 and 712 are then used as the two endpoints of the candidate line segment, thus determining candidate line segment 704. In this case, the two endpoints of candidate line segment 704 undoubtedly lie on the fitted line.

[0087] In this embodiment of the invention, the two endpoints of the macroscopic edge are the two endpoints that are farthest apart among the candidate line segments participating in the fitting, or the two points obtained on the fitted line that are closest to the two farthest endpoints respectively.

[0088] like Figure 7E As shown, this embodiment of the invention provides another example of a macroscopic edge, for candidate line segments 713, 714, and 715 (in Figure 7E(The lines shown are all indicated by dashed lines) A ​​straight line can be obtained by fitting a straight line, but the endpoints of the fitted line need to be determined to form a macroscopic edge. One approach is to use the two endpoints that are farthest apart from the three candidate line segments, namely endpoints 716 and 717, as endpoints. Although the endpoints may not be on the fitted line in this approach, it does not affect the implementation of subsequent steps. Another approach is to determine the point 718, which is closest to endpoint 716, on the fitted line, and the point 719, which is closest to endpoint 717, on the same line. Points 718 and 719 are then used as the two endpoints of the macroscopic edge, thus determining the macroscopic edge 720. In this case, the two endpoints of the macroscopic edge 720 are undoubtedly located on the fitted line.

[0089] S14. Based on preset endpoint distance threshold conditions and included angle threshold conditions, filter all macro edge pairs that meet the conditions from all the macro edges, and obtain the basic characteristics of each macro edge pair. The basic characteristics include the included angle between the two macro edges, the average orientation angle, and the position of their respective endpoints.

[0090] In this embodiment of the invention, all macro-edge pairs that meet the conditions are selected from all the macro-edges based on preset endpoint distance threshold conditions and included angle threshold conditions, including:

[0091] Obtain at least one candidate macro edge pair from all the macro edges;

[0092] The included angle between the two macro edges is obtained based on the orientation angle of the two macro edges in each candidate macro edge pair, and the shortest endpoint distance between the two macro edges is obtained based on the positions of the two ends of the two macro edges in each candidate macro edge pair.

[0093] Each candidate macro edge pair is determined to satisfy a preset endpoint distance threshold condition, and the included angle of each candidate macro edge pair is determined to satisfy a preset included angle threshold condition. Based on the determination results, all candidate macro edge pairs that simultaneously satisfy the included angle threshold condition and the endpoint distance threshold condition are selected as all macro edge pairs obtained through filtering.

[0094] The included angle between two macroscopic edges can be obtained by calculating the difference in their orientation angles. Since each macroscopic edge has two endpoints, two macroscopic edges have four endpoints, and there are four endpoint distances between two macroscopic edges, the shortest endpoint distance is the one that is closest to the other of the four endpoint distances. Therefore, each candidate pair of macroscopic edges corresponds to an included angle and a shortest endpoint distance.

[0095] In this embodiment of the invention, macro edges in the edge image are paired according to the following conditions to form macro edge pairs. For example, macro edges in the edge image are paired in descending order of length. First, the longest macro edges are paired to obtain some candidate macro edge pairs. Then, candidate macro edge pairs that satisfy the following conditions are selected as the macro edge pairs corresponding to the longest macro edges, and so on. These conditions are denoted as conditions a, b, c, and d below, and are described in detail below:

[0096] a. The shortest endpoint distance between the nearest endpoints of two macro edges must be less than or equal to a predetermined endpoint distance threshold Thdis. Where the endpoints of two macro edges intersect directly in the graph, the shortest endpoint distance is zero, which conforms to the rule.

[0097] In this embodiment of the invention, determining whether the shortest endpoint distance of each candidate macroscopic edge pair satisfies a preset endpoint distance threshold condition includes:

[0098] Determine whether the shortest endpoint distance of each candidate macro edge pair is less than or equal to a preset endpoint distance threshold. If the determination is yes, then the candidate macro edge pair satisfies the endpoint distance threshold condition.

[0099] b. The included angle between the two macroscopic sides must be greater than or equal to the predetermined lower limit of the included angle threshold Thang1 and less than or equal to the preset upper limit of the included angle threshold Thang2. The purpose is to ensure that the two macroscopic sides are not parallel or nearly parallel. The value range of the lower limit of the included angle threshold Thang1 is [10°, 20°], for example, Thang1 = 15°, and the value range of the upper limit of the included angle threshold Thang2 is [160°, 170°], for example, Thang2 = 165°.

[0100] In this embodiment of the invention, determining whether the included angle of each candidate macroscopic edge pair satisfies a preset included angle threshold condition includes:

[0101] Determine whether the included angle of each candidate macroscopic edge pair is greater than or equal to a preset lower limit of the included angle threshold and less than or equal to a preset upper limit of the included angle threshold. If the determination is yes, then the candidate macroscopic edge pair satisfies the included angle threshold condition.

[0102] c. A single macro edge can be used to form a macro edge at most twice.

[0103] In this embodiment of the invention, obtaining at least one candidate macro edge pair from the plurality of macro edges includes:

[0104] Obtain at least one candidate macro edge pair from all the macro edges, such that the two macro edges in the candidate macro edge pair are used by only one or two candidate macro edge pairs respectively.

[0105] In this embodiment of the invention, when the intersection of the extensions of two macro edges is located outside the edge image, the final macro edge pair may be further required to satisfy the following condition d, which is an optional condition and is described as follows:

[0106] d. The horizontal and vertical distances between the intersection of the extensions of the two macroscopic sides and the rectangular side of the edge image cannot exceed the preset distance Thout, for example, Thout = 0.125 × min(W, H), where W and H are the width and height of the edge image, respectively.

[0107] After obtaining the macro-edge pairs using the above methods, we also obtain the basic characteristics of each macro-edge pair. The basic characteristics include:

[0108] The average orientation angle is defined as the average of the orientation angles of the two macroscopic sides.

[0109] Angle is defined as the angle formed by the two macroscopic sides.

[0110] Endpoint position is defined as the position of the endpoint of each of the two macro edges.

[0111] Following the above method, refer to Figure 8 For example, the diagram illustrates an edge image 800 and its macro edges. Edge image 800 is, for instance, the edge image obtained after performing the image processing described earlier on a template image. Edge image 800 includes a macro edge pair formed by macro edges 801 and 802. The intersection point 803 of the extensions of macro edges 801 and 802 is within the edge image to which they belong. It should be noted that the intersection point of the extensions of the two macro edges in a macro edge pair may extend beyond the image range of the edge image. Edge image 800 also includes another macro edge pair formed by macro edges 804 and 805; the intersection point of this other macro edge pair is not shown in the diagram.

[0112] In this embodiment of the invention, each pair of macro edges has an intersection point, which is called a vertex in this embodiment. When two macro edges intersect directly, their intersection point is used as a vertex. When two macro edges do not intersect directly, the intersection point of their extensions is used as a vertex.

[0113] S2. When executing the working menu, a target image is acquired at the location of the positioning point in the die to be tested, and the edge image of the target image is obtained through image processing. Based on the macro edge pair acquisition method, the macro edge pairs and their basic features in the edge image of the target image are acquired. The macro edge pairs corresponding to the template image are traversed, and macro edge pair matching is performed with each macro edge pair corresponding to the target image in a predetermined order. The macro edge pair matching includes determining whether the difference of the basic features of a pair of macro edge pairs meets a preset condition. When the difference of the basic features of at least one pair of macro edge pairs meets the preset condition, the offset between the template image and the target image is acquired based on the position of the macro edge pair that meets the preset condition. The offset is used to correct the position of the measurement point to obtain the corrected position.

[0114] In this embodiment of the invention, a target image is acquired at the location of the positioning point for a similar FEM wafer, wherein a series of FEM wafers obtained based on the same photomask lithography are considered similar FEM wafers. When executing the work menu, a target image can be acquired at the positioning point for the FEM wafer used when creating the work menu, or a target image can be acquired at the positioning point for another FEM wafer of the same type as the FEM wafer used when creating the work menu. That is, the similar wafer can be the FEM wafer used when creating the work menu, or it can be another FEM wafer of the same type.

[0115] In this embodiment of the invention, the target image and the template image have the same size, and naturally, their field of view (FOV) is also the same. The acquired target image can be called the AP target image, for example, as shown below. Figure 6B The target image 603 is shown. Image processing is performed on the target image to obtain the corresponding edge image, for example, as shown below. Figure 6B Similarly, the macro edge pairs and their basic features are obtained from the edge image 604 shown. The method for obtaining macro edge pairs is used to obtain the macro edge pairs and their basic features. The method for obtaining the edge image, macro edge pairs and their basic features has been introduced earlier and will not be repeated here.

[0116] Each pair of macro edges includes two macro edges, and one macro edge comes from the edge image of the template image, while the other macro edge comes from the edge image of the target image.

[0117] In this embodiment of the invention, determining whether the difference in the basic features of a pair of macroscopic edge pairs satisfies a preset condition includes:

[0118] Obtain the first difference between the two included angles of the two macroscopic edge pairs, the second difference between the two average orientation angles, and the third difference between the two macroscopic gradient vector angles;

[0119] Determine whether the first difference, the second difference, and the third difference are all less than or equal to the corresponding preset thresholds. If the determination is yes, then the difference of the basic feature satisfies the preset condition.

[0120] In this embodiment of the invention, after obtaining the macroscopic edge pairs, the macroscopic edge pairs from the template image are traversed one by one, and their basic features are compared with those from the target image in a predetermined order (optionally), for example, starting from the macroscopic edge pair containing the longest macroscopic edge pair. The matching results are described as follows:

[0121] Matching case 1: Only one pair of macroscopic edges in the edge images of the template image and the target image satisfies the above preset conditions.

[0122] Matching case 2: There are at least two pairs of macroscopic edges in the edge images of the template image and the edge images of the target image that satisfy the above preset conditions.

[0123] Matching case 3 refers to cases other than matching cases 1 and 2, which means that the match was unsuccessful. Usually, manual intervention is possible or the above process needs to be repeated after re-acquiring the target image, which will not be elaborated further.

[0124] The above lists different matching scenarios. The following will explain how to further obtain the offset for matching scenario 1 and matching scenario 2 respectively.

[0125] In this embodiment of the invention, when the difference in the basic features of at least one pair of macroscopic edge pairs satisfies a preset condition, the offset between the template image and the target image is obtained based on the position of the macroscopic edge pair that satisfies the preset condition, including:

[0126] Obtain the logarithm of all macroscopic edge pairs that satisfy the preset conditions;

[0127] When the logarithm is one, the offset is obtained based on the position of a pair of macroscopic edge pairs that satisfy the preset condition; when the logarithm is multiple, the offset is obtained based on the position of multiple pairs of macroscopic edge pairs that satisfy the preset condition.

[0128] In this embodiment of the invention, for matching case 1, the offset is determined based on the vertex position of the macroscopic edge pair. For matching case 2, the offset can be determined based on either the vertex position of the macroscopic edge pair or the intersection point of the angle bisectors of the macroscopic edge pair.

[0129] For matching case 1, in this embodiment of the invention, obtaining the offset based on the position of a pair of macroscopic edge pairs that satisfy the preset conditions includes:

[0130] Obtain the first vertex position of one macro edge pair and the second vertex position of the other macro edge pair that satisfy the preset conditions, wherein the intersection of the two macro edges in the macro edge pair is the vertex of the macro edge pair;

[0131] The difference between the position of the first vertex and the position of the second vertex is used as the offset.

[0132] For matching case 2, in one embodiment of the present invention, obtaining the offset based on the positions of multiple pairs of macroscopic edge pairs that satisfy the preset conditions includes:

[0133] Obtain the first vertex position of one macro edge pair and the second vertex position of the other corresponding macro edge pair among all pairs of macro edge pairs that satisfy the preset conditions, wherein the intersection of the two macro edges in the macro edge pair is the vertex of the macro edge pair;

[0134] A corresponding position difference is obtained based on the difference between the first vertex position and the second vertex position of each pair of macroscopic edge pairs, and the average of all position differences is used as the offset.

[0135] In some embodiments, for both matching case 1 and matching case 2 above, the offset can be determined based on the vertex position of the macro edge pair, as illustrated below.

[0136] In this embodiment of the invention, when executing the working menu, there is no relative rotation between the template image and the target image. This is not only because the device has necessarily performed wafer alignment (WA), but also because the FOV of the AP template image and the AP target image are the same and small, making the relative rotation between the AP target image and the AP template image negligible.

[0137] by Figure 9A For example, the diagram illustrates macroscopic edge pair 9011 in the edge image 901 of the template image (not shown in the accompanying drawings in this embodiment), and also illustrates macroscopic edge pair 9021 in the edge image 902 of the target image. As mentioned above, the intersection of two macroscopic edges in a macroscopic edge pair can be called the vertex of the macroscopic edge pair. Figure 9A In the diagram, black dots represent vertices. Furthermore, to illustrate that the difference between the two vertices of these two macroscopic edge pairs is the relative displacement (dx, dy), we use... Figure 9A The image shows two edge images, 901.

[0138] In this embodiment of the invention, the offset (Δx, Δy) of the AP position can be determined based on the above relative displacement and pixel size, as shown in the following formula:

[0139]

[0140] Because the AP and MP positions have a fixed relative position, the offset of the MP position is the same as the offset of the AP position. When acquiring the image to be measured at the MP position, the position of the measurement point must be corrected according to this offset (Δx, Δy) to obtain the corrected position.

[0141] Where (Px, Py) are the pixel dimensions in the X and Y directions under the current FOV. This FOV refers to the FOV of the CD-SEM device when acquiring the target image. How to calculate the pixel dimensions is an existing technology and will not be elaborated here.

[0142] When there are multiple successfully matched macro-edge pairs, similarly, the offset of the AP position is determined based on the average of the position differences between the vertices of the multiple macro-edge pairs and the pixel size, or based on the weighted average of the position differences between the vertices of the multiple macro-edge pairs and the pixel size. For example, when there are N (N≥2) successfully matched macro-edge pairs, the formula for the offset (Δx, Δy) of the AP position is as follows:

[0143]

[0144] Where wi is the weight of the i-th macroscopic edge pair, and the sum of all wi is 1, 1≤i≤N. For example, all weights are equal.

[0145] To clarify, the above discussion / formulas assume that the AP positions on the wafer are identical. Otherwise, the difference between the two image acquisition positions must be taken into account (the movement of the mechanical motion platform always has a certain error, which can usually be fed back by other monitoring devices such as grating rulers / laser interferometers for more precise position feedback). Thus, (Δx, Δy) becomes (Δx + dsX, Δy + dsY), where (dsX, dsY) is the deviation between the two image acquisition positions. Since it is relatively small, even if ignored, it will not significantly affect the image. Because it is very small, it does not affect the basic idea of ​​this invention and can be ignored thereafter. Similarly, it will be ignored in the subsequent method for determining the offset based on the intersection of the angle bisectors of macroscopic edge pairs.

[0146] For matching case 2, the offset can be determined based on the intersection of the angle bisectors of the macroscopic edge pair. The following section will explain how to determine the offset based on the intersection of the angle bisectors of the macroscopic edge pair.

[0147] For matching case 2, in another embodiment of the present invention, obtaining the offset based on the positions of multiple pairs of macroscopic edge pairs that satisfy the preset conditions includes:

[0148] Obtain template macro edge pairs and target macro edge pairs from all macro edge pairs that satisfy the preset conditions, wherein the template macro edge pairs are located in the edge image of the template image, and the target macro edge pairs are located in the edge image of the target image;

[0149] Obtain the angle bisectors of all macroscopic edges of the template and the intersection points of all angle bisectors to obtain at least one intersection point of the first angle bisector.

[0150] Obtain the angle bisectors of all target macro edges and the intersection points of all angle bisectors to obtain at least one intersection point of the second angle bisector.

[0151] The difference between the position of the intersection of the first angle bisector and the position of the intersection of the second angle bisector corresponding to the position of the first angle bisector is obtained to obtain at least one position difference, and the average of all position differences is used as the offset.

[0152] For matching case 2, the number of matched macroscopic edge pairs N ≥ 2. The angle bisectors of each of these macroscopic edge pairs are obtained, and the offset is determined based on the intersection of these angle bisectors, serving as the offset between the template image and the target image. Compared to the previous method using the vertices of macroscopic edge pairs, this method is simpler and more accurate when the image quality is good. When the image quality is poor, the method based on the intersection of the angle bisectors of multiple macroscopic edge pairs is more robust and has a higher tolerance for changes in image quality.

[0153] refer to Figure 9B , Figure 9B The diagram illustrates edge image 901 of the template image and edge image 902 of the target image. Edge image 901 includes macro-edge pairs 9011 and 9012, and edge image 902 includes macro-edge pairs 9021 and 9022. Macro-edge pairs 9011 and 9021 meet the aforementioned conditions to form one macro-edge pair, and macro-edge pairs 9012 and 9022 meet the aforementioned conditions to form another macro-edge pair. In other words, there are two pairs of macro-edge pairs that are successfully matched between edge images 901 and 902. The intersection point of the angle bisectors of macro-edge pairs 9011 and 9012 is intersection point 9013, and the intersection point of the angle bisectors of macro-edge pairs 9021 and 9022 is intersection point 9023. Then, the relative displacement (dx, dy) between intersection points 9013 and 9023 in the wafer coordinate system can be obtained, which can be used to determine the offset (Δx, Δy) of the AP position, as shown in the following formula:

[0154]

[0155] If the edge images of the template image and the target image have at least three pairs of macroscopic edge pairs that satisfy the aforementioned condition, then the edge images of the template image and the target image each correspond to at least three angle bisector intersection points. A difference between the positions of the corresponding angle bisector intersection points is obtained for each pair of macroscopic edge pairs. Then, the offset (Δx, Δy) of the AP position is determined based on the average of all these differences in angle bisector intersection point positions, as shown in the following formula:

[0156]

[0157] As mentioned above, Px and Py are the pixel dimensions in the X and Y directions under the current FOV, where 1 ≤ i ≤ N.

[0158] This invention provides a positioning method for a CD-SEM device. When creating the device's working menu, the die to be measured and a predetermined die are determined on the FEM wafer. Measurement points and positioning points are determined within the predetermined die. A template image (i.e., the AP template image) is acquired at the positioning point, and macroscopic edge pairs and their basic features are obtained based on the template image. When executing the working menu, a target image (i.e., the AP target image) is acquired at the positioning point in the die to be measured, and macroscopic edge pairs and their basic features are obtained. The macroscopic edge pairs corresponding to the template image are matched and searched with the macroscopic edge pairs corresponding to the target image to determine the offset. The offset is used to correct the position of the measurement point to obtain the corrected position. This positioning method provided by this invention solves the problem of easy failure in AP positioning of FEM wafers in the prior art and can obtain accurate measurement point positions.

[0159] The above embodiments only illustrate the basic principles and characteristics of the present invention. The present invention is not limited to the above embodiments. Without departing from the spirit and scope of the present invention, all other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

Claims

1. A positioning method for a CD-SEM device, characterized in that, include: S1. When creating the working menu of the device, the test grain and the predetermined grain are determined on the FEM wafer. The measurement point and the positioning point for positioning the measurement point are determined in the predetermined grain. The template image is acquired at the position of the positioning point, and the edge image of the template image is obtained through image processing. Then, the macro edge pairs and their basic features in the edge image are obtained based on the macro edge pair acquisition method. Among them, the macro-edge pair acquisition method is used to obtain macro-edge pairs and their basic features in the edge image, including: Based on each line segment in the edge image, a straight line fitting is performed to obtain multiple candidate straight line segments, and the features of each candidate straight line segment are obtained. The features of the candidate straight line segments include the positions of the two ends and the orientation angle relative to the same direction. Multiple sets of line segments are obtained from the multiple candidate line segments, such that each set of line segments includes at least two candidate line segments, and each set of line segments satisfies the following: the difference in orientation angles between any two candidate line segments in the set is less than a predetermined first angle threshold, the distance between the nearest endpoints of any two candidate line segments in the set is less than a predetermined distance threshold, and the two perpendicular lines passing through the two endpoints of any candidate line segment in the set do not intersect with the other candidate line segments in the set. Each group of line segments is refitted with a macro edge to fit each group of line segments into a macro edge, thus obtaining multiple macro edges; the remaining candidate line segments with a length greater than or equal to a predetermined length threshold are selected as the macro edges; the features of each macro edge are obtained, including the positions of the two ends and the orientation angle relative to the direction. Based on preset endpoint distance threshold and included angle threshold conditions, all macro edge pairs that meet the conditions are filtered out from all the macro edges. The basic characteristics of each macro edge pair are obtained, including the included angle between the two macro edges, the average orientation angle, and the position of their respective endpoints. S2. When executing the working menu, a target image is acquired at the position of the positioning point in the die to be tested, and the edge image of the target image is obtained through image processing. Based on the macro edge pair acquisition method, the macro edge pairs and their basic features in the edge image of the target image are acquired. The macro edge pairs corresponding to the template image are traversed, and macro edge pair matching is performed with each macro edge pair corresponding to the target image. The macro edge pair matching includes determining whether the difference of the basic features of a pair of macro edge pairs meets a preset condition. When the difference of the basic features of at least one pair of macro edge pairs meets the preset condition, the offset between the template image and the target image is acquired based on the position of the macro edge pair that meets the preset condition. The offset is used to correct the position of the measurement point to obtain the corrected position.

2. The positioning method according to claim 1, characterized in that, From all the macro edges, all macro edge pairs that meet the preset endpoint distance threshold and included angle threshold are selected, including: Obtain at least one candidate macro edge pair from all the macro edges; The included angle between the two macro edges is obtained based on the orientation angle of the two macro edges in each candidate macro edge pair, and the shortest endpoint distance between the two macro edges is obtained based on the positions of the two ends of the two macro edges in each candidate macro edge pair. Each candidate macro edge pair is determined to satisfy a preset endpoint distance threshold condition, and the included angle of each candidate macro edge pair is determined to satisfy a preset included angle threshold condition. Based on the determination results, all candidate macro edge pairs that simultaneously satisfy the included angle threshold condition and the endpoint distance threshold condition are selected as all macro edge pairs obtained through filtering.

3. The positioning method according to claim 2, characterized in that, Obtain at least one candidate macro edge pair from all the aforementioned macro edges, including: Obtain at least one candidate macro edge pair from all the macro edges, such that the two macro edges in the candidate macro edge pair are used by only one or two candidate macro edge pairs respectively.

4. The positioning method according to claim 2, characterized in that, Determining whether the shortest endpoint distance of each candidate macroscopic edge pair satisfies a preset endpoint distance threshold condition includes: Determine whether the shortest endpoint distance of each candidate macro edge pair is less than or equal to a preset endpoint distance threshold. If the determination is yes, then the candidate macro edge pair satisfies the endpoint distance threshold condition. Determining whether the included angle of each candidate macroscopic edge pair satisfies a preset included angle threshold condition includes: Determine whether the included angle of each candidate macroscopic edge pair is greater than or equal to a preset lower limit of the included angle threshold and less than or equal to a preset upper limit of the included angle threshold. If the determination is yes, then the candidate macroscopic edge pair satisfies the included angle threshold condition.

5. The positioning method according to claim 1, characterized in that, The features of the candidate line segments also include the average gradient vector angle, which is the average gradient vector angle of each pixel in the corresponding edge image of the candidate line segment; when obtaining multiple sets of line segments from the multiple candidate line segments, each set of line segments is also made to satisfy: the difference between the average gradient vector angles of any two candidate line segments in the set is less than a predetermined second angle threshold; the features of the macro edge also include the macro gradient vector angle, which is the average gradient vector angle of each candidate line segment corresponding to the macro edge.

6. The positioning method according to claim 5, characterized in that, Determine whether the difference in the basic features of a pair of macroscopic edges satisfies preset conditions, including: Obtain the first difference between the two included angles of the two macroscopic edge pairs, the second difference between the two average orientation angles, and the third difference between the two macroscopic gradient vector angles; Determine whether the first difference, the second difference, and the third difference are all less than or equal to the corresponding preset thresholds. If the determination is yes, then the difference of the basic feature satisfies the preset condition.

7. The positioning method according to claim 6, characterized in that, When the difference in the basic features of at least one pair of macroscopic edge pairs satisfies a preset condition, the offset between the template image and the target image is obtained based on the position of the macroscopic edge pair that satisfies the preset condition, including: Obtain the logarithm of all macroscopic edge pairs that satisfy the preset conditions; When the logarithm is one, the offset is obtained based on the position of a pair of macroscopic edge pairs that satisfy the preset condition; when the logarithm is multiple, the offset is obtained based on the position of multiple pairs of macroscopic edge pairs that satisfy the preset condition.

8. The positioning method according to claim 7, characterized in that, The offset is obtained based on the position of a pair of macroscopic edge pairs that satisfy the preset conditions, including: Obtain the first vertex position of one macro edge pair and the second vertex position of the other macro edge pair that satisfy the preset conditions, wherein the intersection of the two macro edges in the macro edge pair is the vertex of the macro edge pair; The difference between the position of the first vertex and the position of the second vertex is used as the offset.

9. The positioning method according to claim 7, characterized in that, The offset is obtained based on the positions of multiple pairs of macroscopic edge pairs that satisfy the preset conditions, including: Obtain the first vertex position of one macro edge pair and the second vertex position of the other corresponding macro edge pair among all pairs of macro edge pairs that satisfy the preset conditions, wherein the intersection of the two macro edges in the macro edge pair is the vertex of the macro edge pair; A corresponding position difference is obtained based on the difference between the first vertex position and the second vertex position of each pair of macroscopic edge pairs, and the average of all position differences is used as the offset.

10. The positioning method according to claim 7, characterized in that, The offset is obtained based on the positions of multiple pairs of macroscopic edge pairs that satisfy the preset conditions, including: Obtain template macro edge pairs and target macro edge pairs from all macro edge pairs that satisfy the preset conditions, wherein the template macro edge pairs are located in the edge image of the template image, and the target macro edge pairs are located in the edge image of the target image; Obtain the angle bisectors of all macroscopic edges of the template and the intersection points of all angle bisectors to obtain at least one intersection point of the first angle bisector. Obtain the angle bisectors of all target macro edges and the intersection points of all angle bisectors to obtain at least one intersection point of the second angle bisector. The difference between the position of the intersection of the first angle bisector and the position of the intersection of the second angle bisector corresponding to the position of the first angle bisector is obtained to obtain at least one position difference, and the average of all position differences is used as the offset.

11. The positioning method according to claim 1, characterized in that, The edge image is a rectangular image, and the direction is the horizontal direction of one rectangular side of the edge image, or the vertical direction of another adjacent rectangular side; the two endpoints of the candidate line segment are the two endpoints of the line segment participating in the fitting, or the two points obtained on the fitted line that are closest to the two endpoints of the line segment participating in the fitting; the two endpoints of the macro edge are the two endpoints of the candidate line segment participating in the fitting that are farthest apart, or the two points obtained on the fitted line that are closest to the two farthest endpoints.