Image template matching result evaluation method and system and readable storage medium

By automating the evaluation of edge matching in semiconductor device images, determining the gradient direction of edge points and the points with the most drastic changes in the neighborhood, the problem of low efficiency and poor accuracy of manual detection is solved, and efficient and accurate edge matching result evaluation is achieved.

CN122066639APending Publication Date: 2026-05-19MATRIXTIME ROBOTICS (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512028484.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-05-19

Smart Images

  • Figure CN122066639A_ABST
    Figure CN122066639A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of semiconductor detection, discloses a semiconductor image processing method, and particularly relates to an image template matching result evaluation method and system and a readable storage medium. According to the embodiment of the invention, the edge point corresponding to each edge point in the to-be-matched image, namely the edge image, in the template image is constructed, the inner point set of the template image is constructed based on the edge points to serve as the target feature for evaluating the to-be-matched image, and then the point which changes most violently in the inner point set is determined as the optimal edge point. The optimal edge point is used as an optimal point for evaluating the positions of the template image and the image to be matched; based on the edge point position error of the optimal edge point and the matched edge point, the deviation between single point positions is determined, finally, the average deviation of the deviation of the multiple point positions serves as the final deviation between the two images, and evaluation of the accuracy of the matching result is achieved through the deviation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of semiconductor detection technology, specifically a semiconductor image processing method, namely an image template matching result evaluation method, system, and readable storage medium. Background Technology

[0002] Obtaining edge information through template matching is a common image processing method. After matching, it is necessary to verify whether the edge template match is correct. In existing technologies, edge template matching detection is mainly achieved through manual inspection. However, semiconductor device images involve many device types and complex edge information. Manually verifying the correctness of the edge template is tedious and prone to errors due to the large amount of edge information. Summary of the Invention

[0003] To address the technical problems in the prior art, this application provides an image template matching result evaluation method, system, and readable storage medium. By automatically evaluating the matching results based on the distribution of image features between edge information and template images, this method offers significantly higher processing efficiency and more accurate evaluation results compared to manual evaluation methods in the prior art.

[0004] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0005] In a first aspect, a method for evaluating image template matching results is provided. The method includes: determining the first contour gradient direction and the second contour gradient direction of each edge point in a template image and an image to be matched, and determining the contour gradient deviation degree of each corresponding matching edge point, and taking edge points with deviation degrees within a preset threshold range as matching edge points; the template image is a background image, and the image to be matched is an edge image; for each matching edge point, searching within its neighborhood, and extracting the point with the most drastic change as the best edge point; determining the distance between the best edge points corresponding to each matching edge point as the edge point position error, calculating the average of the edge point position errors of all matching edge points as the best edge error, and evaluating the matching result based on the best edge error.

[0006] In some specific implementations, determining the second contour gradient direction of each edge point in the image to be matched includes: determining the first and second adjacent points of each edge point on the contour corresponding to the image to be matched, and determining the second contour gradient direction of the edge point based on the first adjacent point, the edge point, and the second adjacent point.

[0007] In some specific implementations, the direction of the second contour gradient is perpendicular to the contour formed by the first adjacent point, the edge point, and the second adjacent point.

[0008] In some specific implementations, determining the first contour gradient direction of each edge point in the template image includes: determining the image gradient direction of the template image region where the edge point is located, wherein the image gradient direction is the first contour gradient direction.

[0009] In some specific implementations, determining the image gradient direction of the template image region where the edge point is located includes: obtaining the region image of the edge point within the standard region of the template image; calculating the corresponding first gradient magnitude and second gradient magnitude of the region image based on the Sobel operator and the depth gradient; and then fusing the first gradient magnitude and the second gradient magnitude based on weights to obtain the image gradient magnitude and the image gradient direction; the depth gradient calculation is implemented based on a convolutional structure.

[0010] In some specific implementations, determining the degree of contour gradient deviation for each corresponding matched edge point includes: determining the angle between the first contour gradient direction and the second contour gradient direction, and determining the degree of deviation based on the angle and a preset angle threshold.

[0011] In some specific implementations, for each matching edge point, a search is performed in its neighborhood to extract the point with the most drastic change as the optimal edge point. This includes: determining multiple sampling points within the adjacent pixel range of each matching edge point in the second contour gradient direction; performing curve fitting based on the pixel values ​​of the multiple sampling points and the matching edge point to obtain a fitted curve; and determining the inflection point of the fitted curve as the optimal edge point.

[0012] In some specific implementations, for each matching edge point, a search is performed within its neighborhood to extract the point with the most drastic change as the optimal edge point. This includes: determining multiple sampling points within the adjacent pixel range of each matching edge point in the second contour gradient direction; performing curve fitting based on the pixel values ​​of the multiple sampling points and the matching edge point to obtain a fitted curve; determining the maximum and minimum values ​​of the fitted curve; determining multiple secondary sampling ranges between the maximum and the minimum values; performing secondary curve fitting based on the pixel values ​​of the matching edge point and the multiple sampling points in the secondary sampling range; and determining the inflection point of the secondary fitted curve as the optimal edge point.

[0013] Secondly, an evaluation system is provided, comprising: a comparison module, used to determine the first contour gradient direction and the second contour gradient direction of each edge point in the template image and the image to be matched, and to determine the contour gradient deviation degree of each corresponding matching edge point, and to take edge points with deviation degrees within a preset threshold range as matching edge points; the template image is a background image, and the image to be matched is an edge image; a point determination module, used to search within the neighborhood of each matching edge point and extract the point with the most drastic change as the best edge point; and an evaluation module, used to determine the distance between the best edge points corresponding to each matching edge point as the edge positioning error, calculate the average edge point position error of all matching edge points as the best edge error, and evaluate the matching result based on the best edge error.

[0014] Thirdly, a computer-readable storage medium is provided, the computer-readable storage medium storing computer-executable instructions, which, when called and executed by a processor, cause the processor to implement the image template matching result evaluation method described in any of the above claims.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] In the technical solution provided in this application, edge points corresponding to each edge point in the template image relative to the edge image to be matched are constructed. An inner point set of the template image is then constructed based on these edge points as the target feature for evaluation against the image to be matched. The point with the most drastic change in the inner point set is then determined as the optimal edge point. This optimal edge point is used to evaluate the optimal position of the template image and the image to be matched. The deviation between individual points is determined based on the edge point position error between the optimal edge point and the matching edge point. Finally, the average deviation of multiple point deviations is used as the final deviation between the two images, and this deviation is used to evaluate the accuracy of the matching result. Compared to existing technologies, this application overcomes the high time cost and low accuracy problems of existing technologies by implementing manual judgment logic based on image processing technology through an automated image processing method.

[0017] Other features and advantages of this disclosure will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.

[0018] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] The methods, systems, and / or procedures shown in the accompanying drawings will be further described with reference to exemplary embodiments. These exemplary embodiments will be described in detail with reference to the drawings. These exemplary embodiments are non-limiting exemplary embodiments, wherein example figures represent similar mechanisms in the various views of the drawings.

[0021] Figure 1 This is a diagram illustrating the matching results;

[0022] Figure 1 'a' is a schematic diagram of the first matching result;

[0023] Figure 1 b is a schematic diagram of the second matching result.

[0024] Figure 2 A schematic diagram of the process for evaluating image template matching results.

[0025] Figure 3 This is a schematic diagram illustrating the degree of contour gradient deviation.

[0026] Figure 3 a is a schematic diagram of the first type of contour gradient deviation;

[0027] Figure 3 b is a schematic diagram of the second type of contour gradient deviation.

[0028] Figure 4 This is a schematic diagram of the sampling results.

[0029] Figure 5 This is a schematic diagram of an evaluation system structure.

[0030] Figure 6 This is a schematic diagram of a readable medium structure. Detailed Implementation

[0031] To better understand the above technical solutions, the technical solutions of this application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of this application and the specific features in the embodiments are detailed descriptions of the technical solutions of this application, rather than limitations on the technical solutions of this application. In the absence of conflict, the embodiments of this application and the technical features in the embodiments can be combined with each other.

[0032] In the detailed description below, numerous specific details are illustrated with examples to provide a comprehensive understanding of the relevant guidance. However, it will be apparent to those skilled in the art that this application can be practiced without these details. In other instances, well-known methods, procedures, systems, components, and / or circuits have been described at a relatively high level without detail to avoid unnecessarily obscuring aspects of this application.

[0033] This application uses flowcharts to illustrate the execution process performed by a system according to embodiments of this application. It should be clearly understood that the execution processes in the flowcharts may not be executed sequentially. Instead, these execution processes may be executed in reverse order or simultaneously. Additionally, at least one other execution process may be added to the flowchart. One or more execution processes may be deleted from the flowchart.

[0034] This application provides a method for evaluating image template matching results, applied in a semiconductor product inspection scenario, to evaluate the template matching results of edges. The semiconductor products in this embodiment include chips and integrated circuit products containing multiple chips or devices. Specifically, in the semiconductor inspection, it is necessary to extract the edges of each device or chip to achieve segmentation of each device. Template matching is a commonly used method in the prior art. It involves constructing a template image and matching the template image with the edges to be matched to determine the final edges. Whether the obtained edges correctly match the template is a verification mechanism used to verify whether the matching results meet the requirements.

[0035] For details regarding the matching results, please refer to [link / reference]. Figure 1 a and Figure 1 b, where for Figure 1 In image a, it is evident that there is a significant deviation between this edge and the edge in the template image. This result is a negative matching result, indicating a large matching error between the edge and the template. Figure 1 b represents a positive match result, indicating a high degree of matching between the edge and the template. Generally, the determination of the matching in the above image is based on manual detection. However, through... Figure 1 It is evident that, for the scenarios described in this application embodiment, manual detection is time-consuming and labor-intensive due to the complexity of edge information.

[0036] Therefore, see Figure 2 To address the aforementioned technical scenarios and problems, this application provides a method for evaluating image template matching results, comprising the following steps:

[0037] Step S21. Determine the first contour gradient direction and the second contour gradient direction of each edge point in the template image and the image to be matched, and determine the contour gradient deviation degree of each corresponding matching edge point. Edge points with deviation degrees within a preset threshold range are used as matching edge points.

[0038] In this embodiment, two evaluation features are constructed for matching evaluation: inlier rate and optimal edge error. Inliers refer to all points in the template image that can be mapped to an edge, while outliers are considered outside points. For each inlier, an optimal edge point is determined nearby; this optimal edge point should be the point with the largest gradient change. Then, all optimal edge points are determined based on all inliers, and the average error is determined based on all optimal edge points. Finally, the matching result is determined based on the average error.

[0039] Therefore, step S21 is used to obtain the aforementioned interior points, i.e., the matching edge points are the interior points. The determination of interior points involves filtering each candidate edge point in the template image, and selecting the candidate edge points that satisfy the deviation relationship with the edge points in the template image as the matching edge points.

[0040] The deviation relationship is determined by measuring the deviation between the gradient direction of the candidate edge point in the template image and the gradient direction of the edge point in the edge image. The gradient direction of the candidate edge point in the template image is the first contour gradient direction in this embodiment, and the gradient direction of the edge point is the second contour gradient direction in this embodiment.

[0041] In this embodiment, the first contour gradient direction for each edge point in the template image is actually the image gradient corresponding to the region image of the current edge point within the standard area of ​​the template image. This first contour gradient direction can be determined using gradient operators in existing technologies, such as the Sobel operator which calculates the gradient using a fixed template. However, operators in existing technologies typically suffer from noise sensitivity and struggle to capture complex semantic edges. Since the scenario in this embodiment often involves complex semantic edges, a hybrid gradient extraction method is employed in this embodiment to achieve accurate edge localization, combining traditional gradient operators with deep learning extraction methods.

[0042] Specifically, in this embodiment, the determination of the first contour gradient direction involves calculating the first gradient magnitude and gradient direction of the region image using the Sobel operator. Then, abstract gradient features of the region image are extracted based on two 3×3 convolutions. These abstract gradient features are then processed by a 1×1 convolution to generate the second gradient magnitude. Finally, the first and second gradient magnitudes are dynamically fused using learnable weights to obtain the final image gradient magnitude and gradient direction. This gradient direction indicates the overall gradient distribution direction of the region image.

[0043] Furthermore, the determination of the second contour gradient direction in this embodiment is achieved by identifying the adjacent edge points of each edge point in the image to be matched, constructing an edge point group containing at least three edge points, and determining the second contour gradient direction based on the distribution of the edge point group. Specifically, in this embodiment, the adjacent edge points are the first adjacent point and the second adjacent point. The first adjacent point and the second adjacent point are actually the point before and the point after the edge point in spatial distribution. Because the gradient of each point on the contour should be perpendicular to the contour, the gradient is calculated based on the previous point and the point after the edge point. The calculated gradient is the second contour gradient in this embodiment.

[0044] The above process obtains the contour gradient direction corresponding to each edge point in the image to be matched and the template image. Then, the angle between the first contour gradient direction and the second contour gradient direction is determined, and the degree of deviation is determined based on the relationship between this angle and a preset angle threshold. In this embodiment, the angle threshold is 10°. This can be understood as follows: if the angle between the first contour gradient direction and the second contour gradient direction is within 10°, it means that the edge point in the current template image is a matching edge point (inner point) in this embodiment; if the angle between the first contour gradient direction and the second contour gradient direction is greater than 10°, it means that the edge point in the current template image is an outer point.

[0045] For details regarding the above matching results, please refer to [link / reference]. Figure 3 As shown, in the image to be matched, a gradient is calculated for a point in the contour. If the error between this gradient and the contour gradient is within a preset range, it can be considered a point close to the edge. Specifically, in... Figure 3 In diagram 'a', the dark blue lines represent the edge contours, the intersections of the red cross segments indicate the edge points in the image to be matched, the light blue lines represent the gradient direction of the template image (i.e., the first contour gradient direction), the two green crosses represent the first and second adjacent points of the edge point, respectively, and the yellow cross symbol represents the contour gradient direction of the edge point (i.e., the second contour gradient direction). From the above diagram, it can be seen that if the angle between the first and second contour gradient directions is less than 10°, then the current edge point is a matching edge point.

[0046] Furthermore, in Figure 3 In b, each identifier is the same as the one mentioned above. The difference is that in the schematic result of this image, if the angle between the first contour gradient direction and the second contour gradient direction is greater than 10°, it means that the current edge point is not a matching edge point.

[0047] In this embodiment, the gradient direction of each edge point in the image to be matched and the template image is obtained, and the correlation between each relative edge point in the image to be matched and the template image is constructed based on the gradient direction. This allows the selection of edge points in the template image that are highly correlated with the edge points in the image to be matched, which are then considered as matching edge points. Through this process, a set of all interior points related to the edge points can be obtained.

[0048] Step S22. For each matching edge point, search within its neighborhood and extract the point with the most drastic change as the best edge point.

[0049] In this embodiment, the optimal edge point is the point with the most drastic change among the aforementioned matched edge points, i.e., the point with the most dramatic change in the aforementioned set of interior points. This point is obtained by configuring a sampling method to acquire multiple sampling points associated with the matched edge point. Then, curve fitting is performed based on these multiple sampling points and the matched edge point. The inflection point of the straight line is determined by the fitted curve. This inflection point is the numerical point with the largest gradient change, i.e., the point with the most drastic change in this embodiment, and is therefore the optimal edge point.

[0050] Furthermore, the sampling in this embodiment has a sampling range, specifically a range of three pixels before and after the gradient direction of the matching edge point. Multiple sampling points are determined based on this range. The curve fitting process involves the pixel values ​​of multiple sampling points and the matching edge points, and the fitting method uses y = ax². 3 +bx 2 +cx+d is used as the fitted curve. Preferably, in this embodiment, the sampling points are set to 4, which can be understood as determining 12 sampling points within the sampling range of the corresponding three pixel ranges. After calculating the fitted curve, it is then... The point of maximum gradient is determined as the inflection point.

[0051] This embodiment uses the above-described fitting method and inflection point determination method to obtain the point with the most drastic change based on the matching edge points, and takes this point as the optimal edge point.

[0052] However, it is worth noting that although the above method can obtain the optimal edge points, the sampling range in the above sampling method is incorrect, which can easily lead to the inflection point of the fitted curve being calculated at the other end of the curve. Therefore, in order to optimize the above results, this embodiment also provides a resampling method to solve the above technical problem.

[0053] Specifically, this method first coarsely samples points along the gradient direction using the aforementioned method, calculating the maxima and minima of the fitted curve. The maxima and minima represent the deepest and shallowest positions of the edge, respectively. Then, the sampling range is narrowed to between the maxima and minima for a second fitting of the curve, and the inflection point of the second fitting curve is determined as the optimal edge point. If, after the second fitting, there are inflection points exceeding the maxima and minima, the sampling range is narrowed again for a second fitting until the inflection point falls between the maxima and minima. For more details on this result, please refer to [link to relevant documentation]. Figure 4 As shown, in Figure 4 In the image, the orange cross symbol represents the initial inflection point after the first coarse sampling calculation, while the green cross symbol represents the target inflection point after resampling between the minimum and maximum values. It is clearly visible in the image that the orange inflection point suddenly appears on another edge, while the target inflection point after narrowing the sampling range is located on the target edge. Therefore, this sampling method is preferred in this embodiment for determining the optimal edge point.

[0054] Step S23. Determine the distance between the optimal edge points corresponding to each of the matching edge points as the edge point position error, calculate the average of the edge point position errors of all matching edge points as the optimal edge error, and evaluate the matching result based on the optimal edge error.

[0055] In step S22, the optimal edge point corresponding to each matching edge point is determined. Then, the straight-line distance error between the optimal edge point and the matching edge point (i.e., the inner point) is determined. This error is used to characterize the positional deviation between the template image and the image to be matched.

[0056] Finally, by averaging the accumulated linear distance errors obtained from the calculation, the optimal edge error, representing the best characteristic of the deviation degree, is obtained. Then, the matching result between the image to be matched and the template image is evaluated based on the optimal edge error. This process mainly involves summing the results of each optimal edge point and averaging the sum. This process can be implemented using existing technologies and will not be elaborated further in this embodiment.

[0057] In summary, the image template matching result evaluation method provided in this application constructs edge points in the template image corresponding to each edge point in the image to be matched (i.e., the edge image). Based on these edge points, an inner point set of the template image is constructed as the target feature for evaluation with the image to be matched. Then, the point with the most drastic change in the inner point set is determined as the optimal edge point. This optimal edge point is used to evaluate the optimal position of the template image and the image to be matched. The deviation between individual points is determined based on the edge point position error between the optimal edge point and the matching edge point. Finally, the average deviation of multiple point deviations is used as the final deviation between the two images, and this deviation is used to evaluate the accuracy of the matching result. Compared to existing technologies, this application, through an automated image processing method, implements the manual judgment logic based on image processing technology, overcoming the high time cost and low accuracy problems of existing technologies.

[0058] See Figure 5 In this embodiment, an evaluation system is also provided, and the evaluation system 50 includes:

[0059] The comparison module 51 is used to determine the first contour gradient direction and the second contour gradient direction of each edge point in the template image and the image to be matched, respectively, and to determine the contour gradient deviation degree of each corresponding matching edge point, and to take the edge points whose deviation degree is within the preset threshold range as matching edge points.

[0060] The point determination module 52 is used to search within the neighborhood of each matching edge point and extract the point with the most drastic change as the best edge point;

[0061] Evaluation module 53 is used to determine the distance between the best edge points corresponding to each of the matching edge points as the edge point position error, calculate the average of the edge point position errors of all matching edge points as the best edge error, and evaluate the matching result based on the best edge error.

[0062] See Figure 6 The present invention also provides a readable medium 60, which stores computer-readable instructions 601, including instructions for performing the aforementioned image template matching result evaluation method.

[0063] The functions and technical effects of the readable medium 60 provided in this embodiment of the invention can be referred to the technical effects of the calibration method in the foregoing embodiments, and will not be repeated here.

[0064] It should be noted that, in the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and / or methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units / modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0065] The units / modules described as separate components may or may not be physically separate. The components shown as units / modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units / modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0066] Furthermore, in the various embodiments of the present invention, the functional units / modules can be integrated into one processing unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated into one unit / module. The integrated unit / module described above can be implemented in hardware or in the form of hardware plus software functional units / modules.

[0067] The integrated unit / module implemented as a software functional unit / module described above can be stored in a computer-readable storage medium. The software functional unit, stored in a storage medium, includes several instructions to cause one or more processors of a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the methods described in the various embodiments of the present invention.

[0068] The integrated unit / module implemented as a software functional unit / module described above can be stored in a computer-readable storage medium. The software functional unit, stored in a storage medium, includes several instructions to cause one or more processors of a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the methods described in the various embodiments of the present invention.

[0069] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0070] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for evaluating image template matching results, characterized in that, The method includes: The first contour gradient direction and the second contour gradient direction of each edge point in the template image and the image to be matched are determined respectively, and the contour gradient deviation degree of each corresponding matching edge point is determined. Edge points with deviation degrees within a preset threshold range are used as matching edge points; the template image is the background image, and the image to be matched is the edge image. For each matching edge point, a search is performed within its neighborhood, and the point with the most drastic change is extracted as the best edge point; The distance between the optimal edge points corresponding to each matching edge point is determined as the edge point position error. The average of the edge point position errors of all matching edge points is calculated as the optimal edge error, and the matching result is evaluated based on the optimal edge error.

2. The image template matching result evaluation method according to claim 1, characterized in that, Determining the second contour gradient direction of each edge point in the image to be matched includes: determining the first and second adjacent points of each edge point on the contour corresponding to the image to be matched, and determining the second contour gradient direction of the edge point based on the first adjacent point, the edge point and the second adjacent point.

3. The image template matching result evaluation method according to claim 2, characterized in that, The second contour gradient direction is perpendicular to the contour formed by the first adjacent point, the edge point, and the second adjacent point.

4. The image template matching result evaluation method according to claim 2, characterized in that, Determining the first contour gradient direction of each edge point in the template image includes: determining the image gradient direction of the template image region where the edge point is located, wherein the image gradient direction is the first contour gradient direction.

5. The image template matching result evaluation method according to claim 4, characterized in that, Determining the image gradient direction of the template image region where the edge point is located includes: acquiring the region image of the edge point within the standard region of the template image; calculating the corresponding first gradient magnitude and second gradient magnitude of the region image based on the Sobel operator and the depth gradient; and then fusing the first gradient magnitude and the second gradient magnitude based on weights to obtain the image gradient magnitude and the image gradient direction; the depth gradient calculation is implemented based on a convolutional structure.

6. The image template matching result evaluation method according to claim 5, characterized in that, Determining the degree of contour gradient deviation for each corresponding matching edge point includes: determining the angle between the first contour gradient direction and the second contour gradient direction, and determining the degree of deviation based on the angle and a preset angle threshold.

7. The image template matching result evaluation method according to claim 6, characterized in that, For each matching edge point, a search is performed in its neighborhood to extract the point with the most drastic change as the optimal edge point. This includes: determining multiple sampling points within the adjacent pixel range of each matching edge point in the second contour gradient direction; performing curve fitting based on the pixel values ​​of the multiple sampling points and the matching edge point to obtain a fitted curve; and determining the inflection point of the fitted curve as the optimal edge point.

8. The image template matching result evaluation method according to claim 6, characterized in that, For each matching edge point, a search is performed within its neighborhood to extract the point with the most drastic change as the optimal edge point. This includes: determining multiple sampling points within the adjacent pixel range of each matching edge point in the second contour gradient direction; performing curve fitting between the multiple sampling points and the pixel values ​​of the matching edge point to obtain a fitted curve; determining the maximum and minimum values ​​of the fitted curve; determining multiple secondary sampling ranges between the maximum and the minimum values; performing secondary curve fitting between the multiple sampling points in the secondary sampling range and the pixel values ​​of the matching edge point to obtain a secondary fitted curve; and determining the inflection point of the secondary fitted curve as the optimal edge point.

9. An evaluation system, characterized in that, The system includes: The comparison module is used to determine the first contour gradient direction and the second contour gradient direction of each edge point in the template image and the image to be matched, and to determine the contour gradient deviation degree of each corresponding matching edge point. Edge points with deviation degrees within a preset threshold range are used as matching edge points. The template image is a background image, and the image to be matched is an edge image. The point determination module is used to search within the neighborhood of each matching edge point and extract the point with the most drastic change as the best edge point; The evaluation module is used to determine the distance between the optimal edge points corresponding to each of the matching edge points as the edge point position error, calculate the average of the edge point position errors of all matching edge points as the optimal edge error, and evaluate the matching result based on the optimal edge error.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the image template matching result evaluation method according to any one of claims 1-8.