Template matching method for wafer mark visual localization
Patent Information
- Application Number
- CN202610851552.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-09-11
AI Technical Summary
[0005]本发明的目的是:针对现有方法在工况存在光照变化、液滴遮挡、目标轻微形变等情况时定位的精度会显著下降的问题,提供面向晶圆Mark视觉定位的模板匹配方法
[0046] This application avoids threshold segmentation failure due to illumination changes by converting Mark sample images into matching templates composed of point sets. Furthermore, by using only sampling point location features, it significantly reduces template storage space and minimizes background interference. This avoids the problem of significantly reduced localization accuracy in existing methods under conditions such as illumination changes, droplet occlusion, and slight target deformation, thus improving localization accuracy.
Smart Images

Figure CN122736994A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of semiconductor manufacturing and machine vision technology, specifically a template matching method for wafer mark visual positioning. Background Technology
[0002] With the booming development of the artificial intelligence industry, the wafer capacity gap has been widening in recent years. Companies in computing, storage, and related fields have proposed expansion plans of varying scales, which have played a positive role in promoting the future development of the semiconductor manufacturing industry. In the semiconductor manufacturing field, the number of wafers that can be processed per month and the yield rate are important indicators for measuring wafer fab capacity.
[0003] Wafer manufacturing encompasses six core processes: cleaning, deposition, photolithography, etching, ion implantation, and planarization. Photolithography, as a critical process, precisely transfers the circuit pattern from the mask to the wafer surface, creating a selective protective layer for subsequent etching and ion implantation, enabling the formation of transistors and interconnect structures. Photolithography also involves the most frequent use of alignment marks. During the exposure step, the alignment system within the photolithography machine needs to locate the alignment marks on each wafer layer. The detected mark positions are used to calculate the wafer offset and drive the equipment to correct the offset, ensuring the accuracy of the pattern transfer position. Post-photolithography development inspection also verifies alignment accuracy by detecting overlay marks. Furthermore, before high-precision etching, the etching equipment sometimes needs to locate the alignment marks on the wafer to ensure precise alignment between the plasma beam and the etched area. Finally, before implanting impurities, the ion implanter must use the alignment marks on the wafer to determine the precise position of the implantation window. In summary, wafer mark positioning is an essential step in wafer production, and the accuracy and speed of detection have a significant impact on throughput.
[0004] Current visual localization methods mainly rely on template matching based on image grayscale or gradient features, and shape detection based on binary images. However, the accuracy of localization decreases significantly when conditions such as changes in lighting, droplet occlusion, or slight deformation of the target occur. Summary of the Invention
[0005] The purpose of this invention is to provide a template matching method for wafer mark visual positioning, addressing the problem that the positioning accuracy of existing methods will significantly decrease when there are changes in lighting conditions, droplet occlusion, slight deformation of the target, etc.
[0006] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:
[0007] A template matching method for visual positioning of wafer marks includes the following steps:
[0008] Step 1: Convert the Mark sample image into a matching template;
[0009] Step 2: Extract the region of interest from the wafer mark image to be matched, and obtain the three-layer image pyramid of the region of interest;
[0010] Step 3: Use a three-layer image pyramid to determine the selection range, and use a matching template to slide the template within the selected range to obtain the matching result;
[0011] Step 4: Fit the matching results obtained in Step 3 using a smooth asymmetric model to obtain the final matching results.
[0012] Furthermore, the specific steps of step 1 are as follows:
[0013] Step 11: Extract edge pixels from the Mark sample image, and use the edge pixels as sampling points to calculate the contour unit normal vector at the sampling points using the Sobel operator;
[0014] Step 12: Along the normal direction of each edge pixel sampling point, indent 2 pixels into the contour, and use the position of the indented pixel as the position of the additional grayscale sampling point;
[0015] Step 13: Construct a matching template using the contour unit normal vector at the sampling point and the position of the additional grayscale sampling point;
[0016] Step 14: Store the x-axis coordinate, y-axis coordinate, x-axis component of the unit normal vector, and y-axis component of the unit normal vector for each sampling point in the sampling point set into consecutive addresses, and then store them via vector... , , , express.
[0017] Furthermore, the specific steps of step 2 are as follows:
[0018] Step 21: Extract the ROI at the center of the Mark point image of the wafer to be matched, with a width and height twice the size of the Mark.
[0019] Step 22: Calculate the three-layer image pyramid of the ROI.
[0020] Furthermore, the edge pixels in the Mark sample image are extracted using the Canny algorithm in step 11.
[0021] Furthermore, the specific steps of step 3 are as follows:
[0022] Step 31: Calculate the normalized amplitude map of the third layer image in the three-layer image pyramid, and select pixels with values greater than the set threshold in the normalized amplitude map to form a convex hull. Then, use the convex hull as the selection range of candidate points.
[0023] Step 32: Narrow the selection range of candidate points to within the convex hull, slide the matching template in the candidate region with a fixed step size, and calculate the mean of the normalized amplitude of all sampling points in the matching template at different rotation angles. Select the two candidate points with the highest mean normalized amplitude and different center coordinates as the results, and then proceed to step 33:
[0024] Step 33: Using the two candidate points as centers, crop the ROI in the second layer image pyramid with a width and height 1.5 times the size of the Mark, and obtain the minimum bounding rectangle of the two cropped ROIs as the final ROI;
[0025] Step 34: Based on the final ROI in Step 33, calculate the normalized grayscale image, normalized gradient magnitude image, and gradient direction vector of the final ROI respectively;
[0026] Step 35: Transform the positions of the two candidate points into the final ROI obtained in Step 33, and within a circular area of fixed radius, use vectors... , , , The normalized grayscale image, normalized gradient magnitude image, and gradient direction vector of the final ROI are obtained. The mixed similarity of templates at different angles is calculated. Finally, the position with the highest mixed similarity is taken as the matching result of the current stage, and step 36 is executed.
[0027] Step 36: Using the matching result obtained in step 35 as the center, extract the ROI from the image of the first layer image pyramid with a width and height 1.25 times the size of the Mark, and calculate the gradient direction vector of the ROI;
[0028] Step 37: Within a circular area of fixed radius, obtain the unit normal vector of the contour of each sampling point and the cosine similarity of the gradient direction vector of the ROI by matching the template;
[0029] Step 38: Based on step 37, obtain the cosine similarity corresponding to all sampling points, and then obtain the mean of the cosine similarity.
[0030] Step 39: Repeat steps 37 and 38 to obtain the mean cosine similarity of the matching templates at different rotation angles, and select the position and angle corresponding to the highest mean as the matching result of the current stage.
[0031] Furthermore, the angle step size for different rotation angles in step 32 is expressed as follows:
[0032] ,
[0033] in, This represents the width and height of Mark's minimum bounding moment. This indicates the level of the current image pyramid.
[0034] Furthermore, in step 31, the threshold is a threshold value, and the step size of the template sliding is 2 pixels.
[0035] Furthermore, the mixed similarity in step 35 is represented as follows:
[0036] ,
[0037] ,
[0038] ,
[0039] in, This represents the unit normal vector of the template contour. Represents the image gradient direction vector. Indicates candidate locations in the image. and These represent the sampling points in the gradient template and grayscale template, respectively. and Relative to the coordinates of the template center, and These represent the weights of the cosine similarity of the direction vectors and the mean of the normalized gradient magnitudes, respectively, in the mixed similarity metric. and These represent the number of sampling points.
[0040] Furthermore, the specific steps of step 4 are as follows:
[0041] Based on the matching results of the current stage in step 39, the gradient magnitude within a set pixel distance of the positive and negative directions of the contour normal vector of the template sampling point in the matching result is obtained. Then, the trend of gradient magnitude change is fitted by a smooth asymmetric model, the distance between the gradient peak position and the sampling point is calculated, and the sum of squares of the distances from all sampling points to their gradient direction peak positions is optimized by the Levenberg-Marquardt method to obtain the final matching result.
[0042] Furthermore, the smooth asymmetric model is represented as:
[0043] ,
[0044] in, This represents the distance from any position along the gradient direction of the sampling point to the sampling point. , , , The parameters represent the bell-shaped function to be fitted. Used to determine the magnitude of the bell function peak. Used to control the position of the bell function peak. and These are used to control the rate of decay of the curves at both ends of the peak position of the bell-shaped function.
[0045] The beneficial effects of this invention are:
[0046] This application avoids threshold segmentation failure due to illumination changes by converting Mark sample images into matching templates composed of point sets. Furthermore, by using only sampling point location features, it significantly reduces template storage space and minimizes background interference. This avoids the problem of significantly reduced localization accuracy in existing methods under conditions such as illumination changes, droplet occlusion, and slight target deformation, thus improving localization accuracy. Attached Figure Description
[0047] Figure 1 This is the overall flowchart of this application;
[0048] Figure 2 This is a diagram illustrating the matching results. Detailed Implementation
[0049] It should be noted that, where there is no conflict, the various embodiments disclosed in this application can be combined with each other.
[0050] Specific Implementation Method 1: The template matching method for wafer mark visual positioning described in this implementation method includes:
[0051] S1. Convert the Mark sample image into a matching template composed of point sets using the edge detection operator;
[0052] S2. Extract the region of interest (ROI) from the wafer mark image to be matched and calculate the image pyramid;
[0053] S3. In the coarse matching stage, the candidate region is reduced and high-quality candidate positions are quickly obtained by simply using the normalized gradient magnitude map.
[0054] S4. In the intermediate matching stage, a unique matching result is obtained by using a hybrid similarity metric.
[0055] S5. Achieve precise positioning with minimal translation and rotation steps during the fine matching stage;
[0056] S6. Use a smooth asymmetric model to fit the gradient magnitude of the template sampling point location contour normal direction. By optimizing the sum of squares of the distances between the sampling points and the peak locations of the gradient magnitude, sub-pixel level accuracy compensation is achieved.
[0057] The specific process of step S1 includes:
[0058] The Canny algorithm is used to extract edge information from the Mark sample images. A template consisting of point sets is constructed using edge pixels as sampling points, and the Sobel operator is used to calculate the contour unit normal vector at the sampling points.
[0059] The position of the additional grayscale sampling point is located 2 pixels inward from the contour along the normal direction of each edge pixel sampling point.
[0060] The template consists of the positions of sample points, the contour unit normal vector, and the positions of additional grayscale sampling points. To ensure computational efficiency, the x-axis coordinates, y-axis coordinates, the x-axis component of the unit normal vector, and the y-axis component of the unit normal vector for each sampling point in the point set are stored in contiguous addresses and then processed via vector... , , , Indicate. For example, Denotes the x-axis coordinates of the point set, where This represents the number of sampling points.
[0061] In step S2, the image of the Mark points to be matched is extracted. Find the ROI and calculate the ROI image. Three-layered image pyramid .
[0062] Preferably, the ROI region is cropped at the center of the image with a width and height twice the overall size of the Mark.
[0063] In the coarse matching stage described in step S3, the normalized amplitude map of the third layer of the image pyramid is first calculated. According to the set threshold, pixels with values greater than the threshold are selected in the normalized amplitude map and a convex hull is formed. Then, the convex hull is used as the selection range of candidate points.
[0064] The candidate point selection range is narrowed down to the interior of the convex hull composed of all pixels with a normalized amplitude threshold. The template is slid across the candidate region with a fixed step size, and the mean of the normalized amplitude of all sampling points in the template is calculated at different rotation angles. The two candidate points with the highest mean normalized amplitude and different center coordinates are selected as the results to enter the next stage of matching. The angle step size for different rotation angles is shown in the following formula:
[0065] ,
[0066] in, This represents the width and height of Mark's minimum bounding moment. This indicates the level of the current image pyramid, and the same formula is used to calculate the angle step size in subsequent matching stages.
[0067] Preferably, the normalized amplitude threshold Using 0.5, the template sliding step size Use 2 pixels.
[0068] In the intermediate matching stage described in step S4, a small-amplitude (0.5 times) expanded ROI image is cropped from the image of the second-layer image pyramid based on the results of the coarse matching stage and the template size.
[0069] Centered on the two candidate points, the ROI images are cropped from the second layer of the image pyramid with a width and height of 1.5 times the overall size of the Mark. The minimum bounding rectangle of the two cropped images is then obtained as the final ROI region image.
[0070] Calculate the normalized grayscale image, normalized gradient magnitude image, and gradient direction vector (for mixed similarity calculation) of the ROI region image. , , , Calculate the mixture similarity.
[0071] The two result positions obtained in the coarse matching stage are transformed into the current ROI, and the mixed similarity of templates at different angles is calculated within a circular area of a fixed radius using the following formula. The position with the highest similarity is output as the matching result of the current stage to the next stage. The calculation of the mixed similarity is as follows:
[0072] ,
[0073] ,
[0074] ,
[0075] in, Template contour unit normal vector Image gradient direction vector, Indicates candidate locations in the image. and These represent the sampling points in the gradient template and grayscale template, respectively. and Relative to the coordinates of the template center, and These represent the weights of the cosine similarity of the direction vectors and the mean of the normalized gradient magnitudes, respectively, in the mixed similarity metric. and These represent the number of sampling points, respectively.
[0076] Preferably, the width of the ROI region is 1.5 times the overall width and height of the component, and the fixed radius of the matching region is [missing information]. Pixel.
[0077] Further, in the fine matching stage described in step S5, based on the results of the intermediate matching stage and the template size, a slightly expanded ROI image is cropped from the image of the first layer image pyramid. The gradient direction vector of the ROI image is calculated, and within a circular range of a fixed radius, the score of the template at different rotation angles is evaluated by the mean of the cosine similarity between the unit normal vector of the contour of all sampling points of the template and the image gradient direction vector. The position and angle with the highest score are taken as the matching result of the current stage and output to the next stage.
[0078] Preferably, the width of the ROI region is 1.25 times the overall width and height of the component, and the fixed radius of the matching region is [missing information]. Pixel.
[0079] Further, in step S6, sub-pixel accuracy compensation involves obtaining the gradient magnitude within a fixed pixel distance in the positive and negative directions of the contour normal vector of the template sampling points in the fine matching result. The trend of gradient magnitude variation is fitted using a smooth asymmetric model, and the distance between the gradient peak position and the sampling point is calculated. The sum of squares of the distances from all sampling points to their gradient direction peak positions is then optimized using the Levenberg-Marquardt method. This yields the final matching result.
[0080] The smooth asymmetric model is as follows:
[0081] ,
[0082] Preferably, the gradient magnitude within a 5-pixel distance in the positive and negative directions of the contour normal vector is used for fitting.
[0083] This application achieves high-speed visual localization of Mark through a three-stage matching process based on hybrid similarity metrics, and proposes a smooth asymmetric model to fit the gradient magnitude of the contour normal direction of the template sampling point position. Subpixel-level accuracy compensation is achieved by optimizing the sum of squares of the distances between the sampling point and the peak position of the gradient magnitude.
[0084] This application converts Mark sample images into matching templates composed of point sets by using edge detection operators, avoiding the failure of threshold segmentation due to changes in illumination. In addition, since only the location features of sampling points are used, the template storage space is significantly reduced while suppressing the influence of background interference.
[0085] Secondly, this application innovatively uses a hybrid similarity metric composed of the normalized grayscale mean of template sampling points, the normalized gradient magnitude mean, and the cosine similarity mean of direction vectors to comprehensively evaluate the matching results, thus eliminating the reliance on threshold segmentation and effectively improving the reliability of the algorithm's measurement. Thirdly, this method employs a designed three-stage matching process, particularly in the coarse matching stage where the normalized magnitude threshold combined with convex hull calculation reduces the candidate region, significantly improving matching speed while ensuring result reliability. Finally, a smooth asymmetric model is used to accurately fit the gradient magnitude variation trend, and combined with nonlinear least squares optimization techniques, sub-pixel accuracy matching is achieved for targets with slight deformations.
[0086] Implementation examples, in conjunction with Figure 1 This embodiment is described as follows:
[0087] Includes the following steps:
[0088] S1. Use the Canny algorithm to extract edge information from the Mark sample image, construct a template composed of point sets with edge pixels as sampling points, and calculate the contour unit normal vector at the sampling points using the Sobel operator.
[0089] S2. Extract the image of the Mark points to be matched. Find the ROI and calculate the ROI image. Three-layered image pyramid ;
[0090] S3. In the coarse matching stage: Calculate the normalized magnitude map of the third layer of the image pyramid. This reduces the range of candidate points to be matched to a value greater than the normalized amplitude threshold. The interior of the convex hull composed of all pixels, with The template is slid across the candidate region with a step size, and the mean of the normalized amplitude of all sampling points in the template is calculated at different rotation angles. The two candidate points with the highest scores and different center coordinates are selected as the results to enter the next stage of matching. The angle step size is calculated as follows.
[0091] ,
[0092] in, This represents the width and height of Mark's minimum bounding moment. This indicates the level of the current image pyramid, and the same formula is used to calculate the angle step size in subsequent matching stages;
[0093] S4. In the intermediate matching stage: Based on the results of the coarse matching stage and the template size, a slightly expanded ROI image is extracted from the second-layer image pyramid. The normalized grayscale image, normalized gradient magnitude image, and gradient direction vector of the ROI image are calculated respectively. The two result positions obtained in the coarse matching stage are converted into the current ROI, and within a radius of... Within the range, the mixed similarity of templates at different angles is calculated using the following formula. The position with the highest similarity is used as the matching result of the current stage and output to the next stage.
[0094] ,
[0095] ,
[0096] ,
[0097] in, Template contour unit normal vector Image gradient direction vector, Indicates candidate locations in the image. and These represent the sampling points in the gradient template and grayscale template, respectively. and Relative to the coordinates of the template center, and These represent the weights of the cosine similarity of the direction vectors and the mean of the normalized gradient magnitudes, respectively, in the mixed similarity metric. and These represent the number of sampling points, respectively;
[0098] S5. In the fine matching stage: similarly, based on the results of the intermediate matching stage and the template size, a slightly expanded ROI image is cropped from the image of the first layer image pyramid. The gradient direction vector of the ROI image is calculated, and within a radius of 2, the score of the template at different angles is evaluated by the mean of the cosine similarity between the unit normal vector of the contour of all sampling points of the template and the image gradient direction vector. The position and angle with the highest score are taken as the matching result of the current stage and output to the next stage.
[0099] S6. Perform sub-pixel accuracy compensation, obtain the gradient magnitude within 5 pixels in the positive and negative directions of the contour normal vector of the template sampling point in the fine matching result, fit the gradient magnitude variation trend through a smooth asymmetric model as shown in the following formula, calculate the distance between the gradient peak position and the sampling point, and optimize the sum of squares of the distances from all sampling points to their gradient direction peak positions using the Levenberg-Marquardt method to obtain the final result. Figure 2 The matching results are shown.
[0100] ,
[0101] This application has the following effects:
[0102] (1) The Mark sample image is converted into a matching template composed of point sets by the edge detection operator, which avoids the failure of threshold segmentation due to changes in illumination. In addition, since only the sampling point location features are used, the template storage space is significantly reduced while the introduction of background interference is reduced.
[0103] (2) The matching results are comprehensively evaluated by a hybrid similarity metric consisting of the normalized gray mean of template sampling points, the normalized gradient magnitude mean, and the cosine similarity mean of direction vectors. This eliminates the dependence on threshold segmentation and effectively improves the reliability of algorithm measurement.
[0104] (3) Through the designed three-stage matching process, especially the reduction of candidate regions by normalized amplitude threshold combined with convex hull calculation in the coarse matching stage, the matching speed is significantly improved while ensuring the reliability of the results.
[0105] (4) The gradient magnitude variation trend was accurately fitted by a smooth asymmetric model, and with the help of nonlinear least squares optimization technology, sub-pixel accuracy matching for targets with slight deformation was achieved.
[0106] It should be noted that the specific embodiments are merely explanations and illustrations of the technical solution of the present invention and should not be used to limit the scope of protection. Any modifications made in accordance with the claims and specification of the present invention that are only partial should still fall within the protection scope of the present invention.
Claims
1. A template matching method for wafer mark visual positioning, characterized in that... Includes the following steps: Step 1: Convert the Mark sample image into a matching template; Step 2: Extract the region of interest from the wafer mark image to be matched, and obtain the three-layer image pyramid of the region of interest; Step 3: Use a three-layer image pyramid to determine the selection range, and use a matching template to slide the template within the selected range to obtain the matching result; Step 4: Fit the matching results obtained in Step 3 using a smooth asymmetric model to obtain the final matching results.
2. The template matching method for wafer mark visual positioning according to claim 1, characterized in that... The specific steps of step 1 are as follows: Step 11: Extract edge pixels from the Mark sample image, and use the edge pixels as sampling points to calculate the contour unit normal vector at the sampling points using the Sobel operator; Step 12: Along the normal direction of each edge pixel sampling point, indent 2 pixels into the contour, and use the position of the indented pixel as the position of the additional grayscale sampling point; Step 13: Construct a matching template using the contour unit normal vector at the sampling point and the position of the additional grayscale sampling point; Step 14: Store the x-axis coordinate, y-axis coordinate, x-axis component of the unit normal vector, and y-axis component of the unit normal vector for each sampling point in the sampling point set into consecutive addresses, and then store them via vector... , , , express.
3. The template matching method for wafer mark visual positioning according to claim 2, characterized in that... The specific steps of step 2 are as follows: Step 21: Extract the ROI at the center of the Mark point image of the wafer to be matched, with a width and height twice the size of the Mark. Step 22: Calculate the three-layer image pyramid of the ROI.
4. The template matching method for wafer mark visual positioning according to claim 3, characterized in that... The edge pixels in the Mark sample image are extracted in step 11 using the Canny algorithm.
5. The template matching method for wafer mark visual positioning according to claim 4, characterized in that... The specific steps of step 3 are as follows: Step 31: Calculate the normalized amplitude map of the third layer image in the three-layer image pyramid, and select pixels with values greater than the set threshold in the normalized amplitude map to form a convex hull. Then, use the convex hull as the selection range of candidate points. Step 32: Narrow the selection range of candidate points to within the convex hull, slide the matching template in the candidate region with a fixed step size, and calculate the mean of the normalized amplitude of all sampling points in the matching template at different rotation angles. Select the two candidate points with the highest mean normalized amplitude and different center coordinates as the results, and then proceed to step 33: Step 33: Using the two candidate points as centers, crop the ROI in the second layer image pyramid with a width and height 1.5 times the size of the Mark, and obtain the minimum bounding rectangle of the two cropped ROIs as the final ROI; Step 34: Based on the final ROI in Step 33, calculate the normalized grayscale image, normalized gradient magnitude image, and gradient direction vector of the final ROI respectively; Step 35: Transform the positions of the two candidate points into the final ROI obtained in Step 33, and within a circular area of fixed radius, use vectors... , , , The normalized grayscale image, normalized gradient magnitude image, and gradient direction vector of the final ROI are obtained. The mixed similarity of templates at different angles is calculated. Finally, the position with the highest mixed similarity is taken as the matching result of the current stage, and step 36 is executed. Step 36: Using the matching result obtained in step 35 as the center, extract the ROI from the image of the first layer image pyramid with a width and height 1.25 times the size of the Mark, and calculate the gradient direction vector of the ROI; Step 37: Within a circular area of fixed radius, obtain the unit normal vector of the contour of each sampling point and the cosine similarity of the gradient direction vector of the ROI by matching the template; Step 38: Based on step 37, obtain the cosine similarity corresponding to all sampling points, and then obtain the mean of the cosine similarity. Step 39: Repeat steps 37 and 38 to obtain the mean cosine similarity of the matching templates at different rotation angles, and select the position and angle corresponding to the highest mean as the matching result of the current stage.
6. The template matching method for wafer mark visual positioning according to claim 5, characterized in that... The angle step size for different rotation angles in step 32 is expressed as follows: , in, This represents the width and height of Mark's minimum bounding moment. This indicates the level of the current image pyramid.
7. The template matching method for wafer mark visual positioning according to claim 6, characterized in that... In step 31, the threshold is a threshold value, and the step size of the template sliding is 2 pixels.
8. The template matching method for wafer mark visual positioning according to claim 7, characterized in that... The mixed similarity in step 35 is represented as follows: , , , in, This represents the unit normal vector of the template contour. Represents the image gradient direction vector. Indicates candidate locations in the image. and These represent the sampling points in the gradient template and grayscale template, respectively. and Coordinates relative to the center of the template and These represent the weights of the cosine similarity of the direction vectors and the mean of the normalized gradient magnitudes, respectively, in the mixed similarity metric. and These represent the number of sampling points.
9. The template matching method for wafer mark visual positioning according to claim 8, characterized in that... The specific steps of step 4 are as follows: Based on the matching results of the current stage in step 39, the gradient magnitude within a set pixel distance of the positive and negative directions of the contour normal vector of the template sampling point in the matching result is obtained. Then, the trend of gradient magnitude change is fitted by a smooth asymmetric model, the distance between the gradient peak position and the sampling point is calculated, and the sum of squares of the distances from all sampling points to their gradient direction peak positions is optimized by the Levenberg-Marquardt method to obtain the final matching result.
10. The template matching method for wafer mark visual positioning according to claim 9, characterized in that... The smooth asymmetric model is represented as follows: , in, This represents the distance from any position along the gradient direction of the sampling point to the sampling point. , , , The parameters represent the bell-shaped function to be fitted. Used to determine the magnitude of the bell function peak. Used to control the position of the bell function peak. and These are used to control the rate of decay of the curves at both ends of the peak position of the bell-shaped function.