A detection method and electronic device
By using the initial template diagram and the test image of the reference sample surface in wafer detection for matching processing, the intermediate template diagram is obtained and the target position deviation is calculated, the problem of low positioning accuracy in the prior art is solved, and higher positioning accuracy is achieved.
Patent Information
- Application Number
- CN202411730825.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art has low positioning accuracy during wafer detection, making it difficult to accurately determine the location of wafer defects.
By obtaining the test images of the initial template map and the reference sample surface, the matching process is performed to obtain overlapping areas with similarity satisfies the preset conditions as the intermediate template map, and then the target template map and target position deviation are obtained.
The positioning accuracy is greatly improved, and the position of the intermediate template diagram is more accurate, which improves the accuracy of the target position deviation.
Smart Images

Figure CN119762427A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of semiconductor technology, and in particular to a detection method and electronic equipment. Background Art
[0002] Wafers are core components in semiconductor technology. In the process of manufacturing wafers, it is inevitable that they will be damaged, resulting in defects on the wafers. In order to ensure the quality of the wafers, the wafers need to be inspected.
[0003] During wafer inspection, the wafer needs to be positioned to accurately determine the location of wafer defects. However, the current positioning method is not accurate and needs to be improved urgently. Summary of the invention
[0004] The embodiments of the present application provide a detection method and an electronic device, wherein the detection method can significantly improve positioning accuracy.
[0005] The embodiment of the present application provides a detection method, comprising: obtaining an initial template image, wherein the initial template image corresponds one-to-one with each point of a target area on a surface of a reference sample;
[0006] Acquire a test image of the surface of the reference sample, wherein the test image includes initial position information and pixel values of each point in the image of the target area;
[0007] Matching the initial template image with the test image of the reference sample surface to obtain an overlapping area in the test image whose similarity with the initial template image meets a first preset condition as an intermediate template image;
[0008] A target template image is obtained according to at least one of the intermediate template image and the initial template image, and a target position deviation is obtained according to a difference between the initial position information of the image corresponding points of the intermediate template image and the target area.
[0009] In some embodiments, matching the initial template image with the test image of the reference sample surface to obtain a region in the test image whose similarity with the initial template image satisfies a first preset condition as an intermediate template image includes:
[0010] During the relative movement between the initial template image and the test image, a plurality of overlapping regions in the test image that overlap with the initial template image are acquired;
[0011] An intermediate template image is determined based on the multiple overlapping areas, wherein the intermediate template image is an area in the multiple overlapping areas whose similarity with the initial template image meets the first preset condition, and the first preset condition is that the similarity is greater than a first threshold or the similarity is maximum.
[0012] In some embodiments, the test image includes a plurality of regions to be matched, each of which includes initial position information and pixel values of each point in the image of the target area;
[0013] The matching process of the initial template image with the test image of the reference sample surface includes:
[0014] Perform matching processing on the plurality of to-be-matched areas respectively to obtain a plurality of the intermediate template images;
[0015] The acquiring the target template image according to the intermediate template image comprises: performing grayscale processing on a plurality of the intermediate template images of the test image to obtain the target template image.
[0016] In some embodiments, obtaining the target position deviation according to the difference between the initial position information of the corresponding point of the image of the intermediate template image and the target area includes:
[0017] Respectively obtaining the differences between the initial position information of the corresponding points of the intermediate template images and the image of the target area to obtain a plurality of intermediate position deviation values; obtaining the target position deviation according to the plurality of intermediate position deviation values;
[0018] The step of obtaining the position deviation value according to the plurality of intermediate position deviation values comprises:
[0019] Determine any one of the intermediate position deviation values as the target position deviation; or perform median processing on a plurality of the intermediate position deviation values to obtain the target position deviation.
[0020] In some embodiments, the grayscale processing of the plurality of intermediate template images of the test image to obtain the target template image includes:
[0021] Obtaining the average pixel value of all points in each of the intermediate template images;
[0022] Obtaining a difference between the average pixel value and an average grayscale value of the image to be tested of the sample to be tested;
[0023] Determine that the intermediate template image corresponding to the absolute value of the plurality of differences that meets a second preset condition is the target template image; the second preset condition is that the absolute value of the difference is greater than a second threshold or the absolute value of the difference is the smallest.
[0024] In some embodiments, the grayscale processing of the plurality of intermediate template images of the test image to obtain the target template image includes:
[0025] The pixel average of the pixels at the same position of the target area in the plurality of intermediate template images is obtained as the target pixel value at the corresponding position in the target template image.
[0026] In some embodiments, the intermediate template image is determined based on the multiple overlapping areas, wherein the intermediate template image is an area in the multiple overlapping areas whose similarity with the initial template image satisfies the first preset condition, and the first preset condition is that the similarity is greater than a first threshold or the similarity is maximum, including:
[0027] Respectively obtaining similarity representation values between the plurality of overlapping regions and the initial template image, wherein the similarity representation value is positively correlated or negatively correlated with the similarity; the similarity representation value includes any one of cosine similarity, Euclidean distance, Manhattan distance and Pearson correlation coefficient;
[0028] Determine among the multiple overlapping areas, an area whose similarity characterization value with the initial template image satisfies the initial preset condition as the intermediate template image; wherein, if the similarity characterization value is positively correlated with the similarity, the initial preset condition includes that the similarity characterization value is greater than or equal to a first preset threshold, or the similarity characterization value is maximum; if the similarity characterization value is negatively correlated with the similarity, the initial preset condition includes that the similarity characterization value is less than or equal to a second preset threshold, or the similarity characterization value is minimum.
[0029] In some embodiments, after acquiring the target template image according to the intermediate template image, and obtaining the target position deviation according to the difference between the initial position information of the image corresponding points of the intermediate template image and the target area, the detection method further includes:
[0030] According to the target position deviation, move the position of the support platform of the reference sample;
[0031] After moving the position of the support platform of the reference sample, testing the sample to be tested;
[0032] or,
[0033] Detecting the sample to be tested to obtain a test image of the test area of the sample to be tested;
[0034] The position information of the point to be corrected in the image to be measured is corrected by using the target position deviation to obtain the target position.
[0035] In some embodiments, after acquiring the target template image according to the intermediate template image, and obtaining the target position deviation according to the difference between the initial position information of the image corresponding points of the intermediate template image and the target area, the detection method further includes:
[0036] Matching the target template image with the image to be tested on the surface of the sample to be tested to obtain a target area to be tested; wherein the similarity between the target area to be tested and the target template image satisfies a third preset condition;
[0037] The target area to be tested and the matching points of the target template image are respectively identified to obtain the target points in the target area to be tested.
[0038] In some embodiments, after the matching points of the target area to be tested and the target template image are respectively identified to obtain the target points in the target area to be tested, the detection method further includes:
[0039] Correcting the position information of the point to be corrected in the image to be tested by using the target position deviation, wherein the point to be corrected is a target point in the target area to be tested;
[0040] Alternatively, the position information of the point to be corrected in the image to be measured is corrected by using the target position deviation, including: correcting the position information of each point in the image to be measured by using the target position deviation to obtain the target position of each point.
[0041] In some embodiments, the reference sample is a sample to be tested;
[0042] The step of obtaining a target template image according to at least one of the intermediate template image and the initial template image comprises:
[0043] Using the initial template image as the target template image;
[0044] The detection method further comprises:
[0045] The matching points of the target template image and the intermediate template image are identified to obtain the target points in the sample to be tested.
[0046] In some embodiments, the identification process includes: a threshold comparison process or a machine learning process;
[0047] The threshold comparison process includes: performing difference processing on each matching point respectively, taking the matching point corresponding to the absolute value of the difference greater than the third threshold or the maximum absolute value of the difference as the target point, and the target point is the defect point;
[0048] The machine learning process includes: identifying each matching point through a neural network to obtain defect points.
[0049] The present application also provides an electronic device, including:
[0050] at least one processor;
[0051] a memory communicatively coupled to the at least one processor;
[0052] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the above-mentioned detection method.
[0053] The embodiment of the present application provides a detection method and electronic device, in which, by matching the initial template image and the test image of the reference sample surface, the overlapping area in the test image whose similarity with the initial template image meets the first preset condition is used as the intermediate template image; then, the target template image is obtained according to at least one of the intermediate template image and the initial template image, and the target position deviation is obtained according to the difference between the initial position information of the intermediate template image and the image corresponding points of the target area. In the detection method, the initial template image and the test image of the reference sample surface are matched to obtain the intermediate template image; the position of the intermediate template image obtained by this method is more accurate, thereby improving the accuracy of the difference between the initial position information of the intermediate template image and the image corresponding points of the target area, thereby improving the accuracy of the target position deviation, and greatly improving the positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] One or more embodiments are exemplarily illustrated by the pictures in the corresponding drawings. These exemplified descriptions do not constitute a limitation on the embodiments. Unless otherwise specified, the pictures in the drawings do not constitute a scale limitation. In order to more clearly illustrate the embodiments of the present application or the technical solutions in the traditional technology, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 A flow chart of a detection method provided in an embodiment of the present application;
[0056] Figure 2 A schematic diagram of the structure of a wafer image provided in an embodiment of the present application;
[0057] Figures 3 to 9 Flow charts of various detection methods provided in embodiments of the present application;
[0058] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0060] In the description of the embodiments of the present application, "at least one" means one or more, and "plurality" means two or more, unless otherwise clearly and specifically defined.
[0061] In the description of the embodiments of the present application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features.
[0062] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0063] The first embodiment of the present application provides a detection method, referring to Figure 1 As shown, including:
[0064] S1. Obtain an initial template image, which corresponds one-to-one to each point in the target area on the surface of the reference sample.
[0065] S2. Acquire a test image of the surface of the reference sample, wherein the test image includes initial position information and pixel values of each point in the image of the target area.
[0066] S3, matching the initial template image with the test image of the reference sample surface to obtain an overlapping area in the test image whose similarity with the initial template image meets a first preset condition as the intermediate template image.
[0067] S4. Obtain a target template image according to at least one of the intermediate template image and the initial template image, and obtain a target position deviation according to a difference between the initial position information of the image corresponding points of the intermediate template image and the target area.
[0068] The application scenario of the detection method provided in this embodiment is not limited, and any component or device that needs to be positioned and detected can adopt the detection method. In step S1 of this embodiment, the reference sample is a standard sample or a sample to be tested. Specifically, if the detection method is applied to wafer detection, the reference sample is a standard wafer sample or a wafer sample to be tested.
[0069] In step S1 of this embodiment, the method for obtaining the initial template image is not limited. Specifically, the initial template image can be obtained from the design drawing, or from the standard sample image. If the detection method is applied to wafer detection, the initial template image includes a chip image, and the chip image refers to a die image. A wafer refers to a whole circular silicon wafer. A wafer can be divided into multiple small squares, each of which is called a die (also called a chip). The design content of each small square on a wafer is the same, and they are all repeating units of the same die. The die image is the image of each square on the wafer.
[0070] In step S2 of this embodiment, the method for obtaining the test image of the reference sample surface is not limited. Specifically, the test image of the reference sample surface is obtained by photographing the reference sample surface. The size of the test image is larger than the size of the initial template image. Specifically, the size of the test image is larger than or equal to the sum of the size of a chip image and the size of two cutting lines, and smaller than the sum of the sizes of the two chip images. According to the relevant technology, a cutting line is set around a chip. Reference Figure 2 As shown, the sum of the size of a chip image 1 and the size of two cutting lines 2 refers to: the sum of the width W1 of a chip image 1 and the width W2 of the two cutting lines 2, and the sum of the length L1 of a chip image 1 and the width W2 of the two cutting lines 2; the sum of the sizes of two chip images refers to: the sum of the width W1 of the two chip images, and the sum of the length L1 of the two chip images.
[0071] In step S2 of this embodiment, in the image of the target area, the initial position information of each point includes the coordinate information of each point, specifically, the coordinate information includes the horizontal coordinate x and the vertical coordinate y. In the image of the target area, the pixel value of each point includes the brightness value of each point, specifically, 8 bits are used to represent one pixel, and the range of the pixel value is 0-255.
[0072] In step S3 of this embodiment, the specific method of matching processing is not limited, as long as the intermediate template image can be obtained. The specific method of obtaining the overlapping area in the test image whose similarity with the initial template image meets the first preset condition is also not limited. The first preset condition indicates that the similarity between the intermediate template image and the initial template image meets the preset requirements. Specifically, the first preset condition is that the similarity is greater than the first threshold or the similarity is the maximum. The first threshold can be selected according to actual conditions.
[0073] In step S4 of this embodiment, the specific method of obtaining the target template image based on the intermediate template image is not limited; the specific form of the target position deviation is not limited, specifically, the target position deviation includes the difference between the horizontal coordinates and the vertical coordinates of the corresponding points of the intermediate template image and the image of the target area.
[0074] In the detection method provided in this embodiment, the initial template image and the test image of the reference sample surface are matched, and the overlapping area in the test image whose similarity with the initial template image meets the first preset condition is used as the intermediate template image; then the target template image is obtained according to at least one of the intermediate template image and the initial template image, and the target position deviation is obtained according to the difference between the initial position information of the intermediate template image and the image corresponding points of the target area. In this detection method, the initial template image and the test image of the reference sample surface are matched to obtain the intermediate template image; the position of the intermediate template image obtained by this method is more accurate, thereby improving the accuracy of the difference between the initial position information of the intermediate template image and the image corresponding points of the target area, thereby improving the accuracy of the target position deviation, and greatly improving the positioning accuracy.
[0075] In this embodiment, reference Figure 3 As shown, step S3, matching the initial template image with the test image of the reference sample surface to obtain a region in the test image whose similarity with the initial template image meets a first preset condition as an intermediate template image, includes:
[0076] S31. During the relative movement between the initial template image and the test image, a plurality of overlapping regions in the test image that overlap with the initial template image are obtained.
[0077] In step S31 of this embodiment, the relative movement of the initial template image and the test image means: the initial template image moves and the test image remains stationary; or the initial template image remains stationary and the test image moves. There is no limitation on the speed, step length and direction of movement. In order to further improve the positioning accuracy, the step length can be the size of at least one pixel in the test image, and the size of a pixel refers to the length or width of a pixel.
[0078] S32. Determine an intermediate template image according to the multiple overlapping areas, wherein the intermediate template image is an area in the multiple overlapping areas whose similarity with the initial template image meets a first preset condition, and the first preset condition is that the similarity is greater than a first threshold or the similarity is maximum.
[0079] In step S32 of this embodiment, the first threshold can be selected according to actual conditions and is not limited here.
[0080] In this detection method, the initial template image and the test image are relatively moved to determine multiple overlapping areas; and the area in the multiple overlapping areas whose similarity with the initial template image meets the first preset condition is used as the intermediate template image. Through this method, the position accuracy and precision of the intermediate template image can be further improved, thereby further improving the accuracy of the target position deviation and further improving the positioning accuracy.
[0081] In this embodiment, the test image includes a plurality of to-be-matched regions, and each to-be-matched region includes initial position information and pixel values of each point in the image of the target area.
[0082] Step S3, matching the initial template image with the test image of the reference sample surface includes: performing matching processing on multiple to-be-matched areas respectively to obtain multiple intermediate template images.
[0083] It should be noted that in step S3, the specific method for performing matching processing on multiple areas to be matched respectively can refer to the aforementioned steps S31 and S32. Specifically, the matching processing performed on each area to be matched includes: in the process of relative movement between the initial template image and each area to be matched, obtaining multiple overlapping areas in each area to be matched that overlap with the initial template image; according to the multiple overlapping areas, determining the intermediate template images corresponding to each area to be matched, thereby obtaining multiple intermediate templates. Among them, the intermediate template image is an area in the multiple overlapping areas whose similarity with the initial template image meets the first preset condition, and the first preset condition is that the similarity is greater than the first threshold or the similarity is the maximum.
[0084] In step S4, obtaining a target template image according to the intermediate template image includes: S40, grayscale processing is performed on multiple intermediate template images of the test image to obtain a target template image.
[0085] It should be noted that in step S4, the grayscale processing refers to performing mathematical processing on the pixel values of each pixel in the plurality of intermediate template images, and the specific processing method is not limited.
[0086] In this embodiment, multiple intermediate template images are obtained by performing matching processing on multiple to-be-matched areas respectively, and then grayscale processing is performed on the multiple intermediate template images to obtain a target template image. The target template image obtained by this method has higher accuracy and is more conducive to subsequent detection.
[0087] In this embodiment, reference Figure 3 As shown, in the case where multiple intermediate template images are obtained in step S3, in step S4, the target position deviation is obtained according to the difference between the initial position information of the intermediate template image and the image corresponding point of the target area, including:
[0088] S41, respectively obtaining differences between initial position information of corresponding points of a plurality of intermediate template images and an image of a target area to obtain a plurality of intermediate position deviation values.
[0089] In step S41 of this embodiment, the specific form of the intermediate position deviation value is not limited. Specifically, each intermediate position deviation value includes the difference between the horizontal coordinates and the vertical coordinates of the corresponding points of each intermediate template image and the image of the target area.
[0090] S42. Obtain a target position deviation according to a plurality of intermediate position deviation values.
[0091] Among them, step S42, obtaining a position deviation value according to multiple intermediate position deviation values, includes: S421, determining any intermediate position deviation value as a target position deviation; or, S422, performing median processing on multiple intermediate position deviation values to obtain a target position deviation.
[0092] In step S422 of this embodiment, median processing of multiple intermediate position deviation values includes averaging the multiple intermediate position deviation values. Specifically, multiple intermediate position deviation values are calculated including the average value of the difference between the horizontal coordinates and the average value of the difference between the vertical coordinates of the corresponding points of the image of each intermediate template image and the target area; or, weighted values are obtained for the multiple intermediate position deviation values, that is, the multiple intermediate position deviation values are multiplied by corresponding weights and then the average value is obtained; or, the median of the multiple intermediate position deviation values is determined, that is, the multiple intermediate position deviation values are sorted according to size, and the intermediate position deviation value located in the middle position is the median, and the median is used as the target position deviation.
[0093] By executing step S41 and step S42, a more accurate target position deviation can be obtained, thereby further improving the positioning accuracy.
[0094] In order to further improve the accuracy of the target template image, in this embodiment, step S40, grayscale processing is performed on multiple intermediate template images of the test image to obtain the target template image, including:
[0095] S401, obtaining an average pixel value of all points in each intermediate template image, wherein the average pixel value of all points in each intermediate template image is obtained by averaging the pixel values of all points in each intermediate template image.
[0096] S402, obtaining the difference between the average pixel value and the average grayscale value of the image to be tested of the sample to be tested, wherein the average grayscale value of the image to be tested of the sample to be tested refers to the average grayscale value of all pixels of the image to be tested of the sample to be tested.
[0097] S403, determining that the intermediate template image corresponding to the absolute value of the plurality of differences that meets the second preset condition is the target template image; the second preset condition is that the absolute value of the difference is greater than a second threshold or the absolute value of the difference is the smallest.
[0098] In this embodiment, the difference between the average pixel value of all points in each intermediate template image and the average grayscale value of the image to be tested of the sample to be tested can be a positive value or a negative value. The smaller the absolute value of the difference is, the closer the intermediate template image and the image to be tested of the sample to be tested are. The second preset condition characterizes that the absolute value of the difference between the average pixel value of the intermediate template image and the average grayscale value of the image to be tested of the sample to be tested meets the preset requirement. The second threshold value can be selected according to actual conditions. The method determines the target template image by comparing the average pixel value of all points in multiple intermediate template images with the average grayscale value of the image to be tested of the sample to be tested, and the obtained target template image is more accurate.
[0099] In another embodiment, in order to further improve the accuracy of the target template image, step S40, grayscale processing is performed on multiple intermediate template images of the test image to obtain the target template image, including:
[0100] S400, obtaining the pixel average of the pixels at the same position of the corresponding target area in the multiple intermediate template images as the target pixel value of the corresponding position in the target template image. The target template image can be obtained according to the multiple intermediate template images, and this method is simpler.
[0101] In order to facilitate the acquisition of the intermediate template image, in this embodiment, step S32, based on the multiple overlapping areas, determines the intermediate template image, wherein the intermediate template image is an area in the multiple overlapping areas whose similarity with the initial template image meets a first preset condition, and the first preset condition is that the similarity is greater than a first threshold or the similarity is maximum, including:
[0102] S321, respectively obtaining similarity representation values between the multiple overlapping regions and the initial template image, wherein the similarity representation value is positively or negatively correlated with the similarity; the similarity representation value includes any one of cosine similarity, Euclidean distance, Manhattan distance and Pearson correlation coefficient.
[0103] The similarity representation value and the similarity are positively correlated, which means that the similarity representation value and the similarity have the same changing trend, that is, when the similarity representation value increases, the similarity also increases; when the similarity representation value decreases, the similarity also decreases.
[0104] The negative correlation between the similarity representation value and the similarity means that the similarity representation value and the similarity have opposite changing trends, that is, when the similarity representation value increases, the similarity decreases; when the similarity representation value decreases, the similarity also increases.
[0105] The above cosine similarity is also called cosine similarity, which evaluates the similarity between two vectors by calculating the cosine value of the angle between them. Cosine similarity plots the vector into the vector space according to the coordinate value. Euclidean distance (also known as Euclidean distance) is the distance between two points in Euclidean space. The Euclidean distance in two-dimensional and three-dimensional space is the actual distance between two points. Manhattan distance is a geometric term used in geometric metric space to indicate the sum of the absolute wheelbases of two points in the standard coordinate system. The Pearson correlation coefficient, also known as the Pearson product-moment correlation coefficient, is used to measure the correlation (linear correlation) between two variables X and Y, and its value is between -1 and 1. It should be noted that the specific method of calculating the similarity representation value using any one of the cosine similarity, Euclidean distance, Manhattan distance and Pearson correlation coefficient can be obtained by referring to the relevant technology, which will not be repeated here.
[0106] S322. Determine, among multiple overlapping areas, an area whose similarity representation value with the initial template image satisfies an initial preset condition as an intermediate template image; wherein, if the similarity representation value is positively correlated with the similarity, the initial preset condition includes that the similarity representation value is greater than or equal to a first preset threshold, or the similarity representation value is maximum; if the similarity representation value is negatively correlated with the similarity, the initial preset condition includes that the similarity representation value is less than or equal to a second preset threshold, or the similarity representation value is minimum.
[0107] The first preset threshold and the second preset threshold can be selected according to actual requirements and are not limited here.
[0108] In this embodiment, reference Figure 4 As shown, in step S4, after obtaining the target template image according to the intermediate template image, and obtaining the target position deviation according to the difference between the initial position information of the image corresponding points of the intermediate template image and the target area, the detection method further includes:
[0109] S100, moving the position of the support platform of the reference sample according to the target position deviation;
[0110] After the position of the support platform of the reference sample is moved, step S101 is executed to test the sample to be tested.
[0111] This method first moves the position of the base sample's carrier according to the target position deviation, and then tests the sample to be tested. If the test result has a point to be corrected (for example, a defect point), this method can directly obtain the exact position of the point to be corrected, which is beneficial for subsequent re-inspection.
[0112] Or, in another embodiment, reference Figure 5 As shown, in step S4, after obtaining the target template image according to the intermediate template image, and obtaining the target position deviation according to the difference between the initial position information of the image corresponding points of the intermediate template image and the target area, the detection method further includes:
[0113] S200 , testing the sample to be tested to obtain a test image of the test area of the sample to be tested.
[0114] S201 , correcting the position information of the point to be corrected in the image to be tested by using the target position deviation to obtain the target position.
[0115] The method first detects the sample to be tested, and then corrects the position information of the point to be corrected in the image to be tested according to the target position deviation, thereby obtaining the target position.
[0116] In this embodiment, reference Figure 6 As shown, the detection method further includes: S300, matching the target template image with the image to be tested on the surface of the sample to be tested to obtain a target area to be tested; wherein the similarity between the target area to be tested and the target template image satisfies a third preset condition.
[0117] It should be noted that, in step S300, the specific method for matching the target template image and the image to be tested on the surface of the sample to be tested can refer to the aforementioned steps S31 and S32. Specifically, matching the target template image and the image to be tested on the surface of the sample to be tested includes: in the process of relative movement between the target template image and the image to be tested on the surface of the sample to be tested, obtaining multiple overlapping areas in the image to be tested on the surface of the sample to be tested that overlap with the target template image; according to the multiple overlapping areas, determining the target area to be tested, wherein the target area to be tested is an area in the multiple overlapping areas whose similarity with the target template image meets a third preset condition, and the third preset condition is that the similarity is greater than a preset threshold or the similarity is maximum.
[0118] S301, respectively identify and process the matching points of the target area to be tested and the target template image to obtain the target point in the target area to be tested. The specific method of the identification process in step S301 is not limited; the type of the target point is not limited, and specifically, the target point is a defect point.
[0119] In this embodiment, the target area to be tested is obtained by matching the target template image with the image to be tested on the surface of the sample to be tested; then the matching points of the target area to be tested and the target template image are identified, thereby obtaining the target points in the target area to be tested. The target points obtained by this method are more accurate and efficient.
[0120] In this embodiment, reference Figure 7 As shown, after step S301, respectively identifying and processing the matching points of the target area to be tested and the target template image to obtain the target points in the target area to be tested, the detection method further includes:
[0121] S302 , correcting the position information of the point to be corrected in the image to be measured by using the target position deviation, wherein the point to be corrected is a target point in the target area to be measured.
[0122] In this embodiment, since the precision and accuracy of the target position deviation are greatly improved, the position information of the point to be corrected in the measured image is corrected according to the target position deviation, so that the position of the point to be corrected is more accurate and more conducive to subsequent re-inspection and other processes.
[0123] Alternatively, in another embodiment, step S302, correcting the position information of the point to be corrected in the image to be measured by using the target position deviation, includes: correcting the position information of each point in the image to be measured by using the target position deviation to obtain the target position of each point.
[0124] In this embodiment, since the precision and accuracy of the target position deviation are greatly improved, the position information of each point in the image to be tested is corrected according to the target position deviation, so that the target position of each point is more accurate and more conducive to subsequent re-inspection processes.
[0125] In this embodiment, the recognition processing in step S301 and step S401 includes: threshold comparison processing or machine learning processing; wherein, the threshold comparison processing includes: performing difference processing on each matching point respectively, and taking the matching point corresponding to the absolute value of the difference greater than the third threshold or the maximum absolute value of the difference as the target point, and the target point is the defect point.
[0126] The machine learning process includes: identifying each matching point through a neural network to obtain defect points.
[0127] In this embodiment, in the threshold comparison process, the specific method of performing difference processing on each matching point is not limited. Specifically, performing difference processing on each matching point includes: performing difference processing on the pixel value of each matching point.
[0128] It should be noted that in the machine learning process, the specific method of identifying each matching point through a neural network can be obtained by referring to the relevant technology and will not be described in detail here.
[0129] Through threshold comparison processing or machine learning processing, the recognition efficiency and accuracy can be improved, which is conducive to acquiring target points.
[0130] In the above embodiments, the target position deviation is obtained in the process of forming the target template image, wherein the reference sample can be different from or the same as the sample to be tested.
[0131] In the second embodiment of the present application, the reference sample and the sample to be tested are the same sample, and the image to be tested on the surface of the sample to be tested is the initial image of the surface of the reference sample.
[0132] In this embodiment, the detection method includes: S1, obtaining an initial template image, the initial template image corresponds one-to-one to each point in the target area of the reference sample surface; S2, obtaining a test image of the reference sample surface, the test image including initial position information and pixel values of each point in the image of the target area; S3, matching the initial template image with the test image of the reference sample surface to obtain an overlapping area in the test image whose similarity with the initial template image meets a first preset condition as an intermediate template image; S4, obtaining a target template image based on at least one of the intermediate template image and the initial template image, and obtaining a target position deviation based on the difference between the initial position information of the corresponding points of the intermediate template image and the image of the target area.
[0133] refer to Figure 8 As shown, the difference between this embodiment and the previous embodiment is that:
[0134] In step S4, obtaining a target template image according to at least one of the intermediate template image and the initial template image includes:
[0135] S4', taking the initial template image as the target template image.
[0136] refer to Figure 8 As shown, the detection method also includes:
[0137] S400: Identify and process each matching point of the target template image and the intermediate template image to obtain a target point in the sample to be tested. The type of the target point is not limited here, and specifically, the target point is a defect point.
[0138] In other embodiments of the present application, refer to Fig. 9 As shown, step S4, obtaining a target template image according to at least one of the intermediate template image and the initial template image, and obtaining a target position deviation according to the difference between the initial position information of the image corresponding points of the intermediate template image and the target area, includes:
[0139] Step S4', using the intermediate template image as the target template image, and obtaining the target position deviation according to the difference between the initial position information of the corresponding points of the image of the intermediate template image and the target area.
[0140] In this embodiment, in the case where the reference sample is the sample to be tested and the initial template is the target template, by executing step S400, the target point in the sample to be tested can be accurately obtained. Figure 8 For steps S1-S3 shown, reference may be made to the relevant description of the first embodiment, which will not be repeated here.
[0141] Among them, the identification processing in step S400 includes: threshold comparison processing or machine learning processing; wherein, the threshold comparison processing includes: performing difference processing on each matching point respectively, and taking the matching point corresponding to the absolute value of the difference greater than the third threshold or the maximum absolute value of the difference as the target point, and the target point is the defect point; the machine learning processing includes: identifying each matching point through a neural network to obtain the defect point.
[0142] In the threshold comparison processing of this embodiment, the specific method of performing difference processing on each matching point is not limited. Specifically, performing difference processing on each matching point includes: performing difference processing on the pixel value of each matching point. It should be noted that in the machine learning processing, the specific method of identifying each matching point through a neural network can be obtained by referring to the relevant technology and will not be described in detail here. Through threshold comparison processing or machine learning processing, the recognition efficiency and recognition accuracy can be improved, which is conducive to obtaining the target point.
[0143] In this embodiment, the initial template image is the target template image; the method for obtaining the initial template image refers to the relevant description of the method for obtaining the target template image in the first embodiment. The initial template image used to obtain the target template image is different from the initial template image used as the target template image in this embodiment. The initial template image used to obtain the target template image is the first initial template image; the initial template image used to obtain the target position deviation process is the second initial template image.
[0144] Specifically, in this embodiment, obtaining the initial template includes:
[0145] S100, obtaining a first initial template image, wherein the first initial template image corresponds one-to-one to each point in the target area on the surface of the first reference sample.
[0146] S101, obtaining a test image of the surface of a first reference sample, wherein the test image includes initial position information and pixel values of each point in the image of a target area.
[0147] S102, matching the first initial template image with the test image of the first reference sample surface to obtain an overlapping area in the test image of the first reference sample surface whose similarity with the first initial template image meets a first preset condition as a first intermediate template image.
[0148] S103: Acquire a target template image according to at least one of the first intermediate template image and the first initial template image.
[0149] In this embodiment, the specific contents of each step of obtaining the initial template can refer to the relevant description of the first embodiment. Only the initial template image for obtaining the target template in the first embodiment is changed to the first initial template image; the intermediate template image is changed to the first intermediate template image, which will not be repeated here.
[0150] The third embodiment of the present application also provides an electronic device. The structural block diagram of the electronic device is as follows: Fig.10 As shown, it includes: at least one processor 701; a memory 702 communicatively connected to the at least one processor 701; wherein the memory 702 stores instructions that can be executed by the at least one processor 701, and the instructions are executed by the at least one processor 701 so that the at least one processor 701 can execute any of the above-mentioned detection methods.
[0151] The memory 702 and the processor 701 are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus links various circuits of one or more processors 701 and the memory 702 together. The bus can also link various other circuits such as peripherals, voltage regulators, and power management circuits together, which are all well known in the art, and therefore, are not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor 701 is transmitted on a wireless medium through an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0152] The processor 701 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management and other control functions. The memory can be used to store data used by the processor when performing operations.
[0153] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present application, and in practical applications, various changes may be made to the embodiments in form and detail without departing from the spirit and scope of the present application. Any person skilled in the art may make various changes and modifications without departing from the spirit and scope of the present application, and therefore the scope of protection of the present application shall be subject to the scope defined in the claims.
Claims
1. A detection method, characterized in that: include: Acquire an initial template image, wherein the initial template image corresponds one-to-one to each point of the target area on the surface of the reference sample; Acquire a test image of the surface of the reference sample, wherein the test image includes initial position information and pixel values of each point in the image of the target area; Matching the initial template image with the test image of the reference sample surface to obtain an overlapping area in the test image whose similarity with the initial template image meets a first preset condition as an intermediate template image; A target template image is obtained according to at least one of the intermediate template image and the initial template image, and a target position deviation is obtained according to a difference between the initial position information of the image corresponding points of the intermediate template image and the target area.
2. The detection method according to claim 1, characterized in that: The matching process of the initial template image with the test image of the reference sample surface to obtain a region in the test image whose similarity with the initial template image meets a first preset condition as an intermediate template image includes: During the relative movement between the initial template image and the test image, a plurality of overlapping regions in the test image that overlap with the initial template image are acquired; An intermediate template image is determined based on the multiple overlapping areas, wherein the intermediate template image is an area in the multiple overlapping areas whose similarity with the initial template image meets the first preset condition, and the first preset condition is that the similarity is greater than a first threshold or the similarity is maximum.
3. The detection method according to claim 1, characterized in that: The test image includes a plurality of areas to be matched. Each of the to-be-matched regions includes initial position information and pixel values of each point in the image of the target region; The matching process of the initial template image with the test image of the reference sample surface includes: Perform matching processing on the plurality of to-be-matched areas respectively to obtain a plurality of the intermediate template images; The acquiring the target template image according to the intermediate template image comprises: performing grayscale processing on a plurality of the intermediate template images of the test image to obtain the target template image.
4. The detection method according to claim 3, characterized in that: The step of obtaining the target position deviation based on the difference between the initial position information of the corresponding points of the image of the intermediate template image and the target area includes: Respectively obtaining the differences between the initial position information of the corresponding points of the intermediate template images and the image of the target area to obtain a plurality of intermediate position deviation values; obtaining the target position deviation according to the plurality of intermediate position deviation values; The step of obtaining the position deviation value according to the plurality of intermediate position deviation values comprises: Determine any one of the intermediate position deviation values as the target position deviation; or perform median processing on a plurality of the intermediate position deviation values to obtain the target position deviation.
5. The detection method according to claim 3, characterized in that: The grayscale processing of the plurality of intermediate template images of the test image to obtain the target template image includes: Obtaining the average pixel value of all points in each of the intermediate template images; Obtaining a difference between the average pixel value and an average grayscale value of the image to be tested of the sample to be tested; Determine that the intermediate template image corresponding to the absolute value of the plurality of differences that meets a second preset condition is the target template image; the second preset condition is that the absolute value of the difference is greater than a second threshold or the absolute value of the difference is the smallest.
6. The detection method according to claim 3, characterized in that: The grayscale processing of the plurality of intermediate template images of the test image to obtain the target template image includes: The pixel average of the pixels at the same position of the target area in the plurality of intermediate template images is obtained as the target pixel value at the corresponding position in the target template image.
7. The detection method according to claim 2, characterized in that: The step of determining an intermediate template image based on the plurality of overlapping regions, wherein the intermediate template image is an area in the plurality of overlapping regions whose similarity to the initial template image satisfies the first preset condition, and the first preset condition is that the similarity is greater than a first threshold or the similarity is maximum, includes: Respectively obtaining similarity representation values between the plurality of overlapping regions and the initial template image, wherein the similarity representation value is positively correlated or negatively correlated with the similarity; the similarity representation value includes any one of cosine similarity, Euclidean distance, Manhattan distance and Pearson correlation coefficient; Determine among the multiple overlapping areas, an area whose similarity characterization value with the initial template image satisfies the initial preset condition as the intermediate template image; wherein, if the similarity characterization value is positively correlated with the similarity, the initial preset condition includes that the similarity characterization value is greater than or equal to a first preset threshold, or the similarity characterization value is maximum; if the similarity characterization value is negatively correlated with the similarity, the initial preset condition includes that the similarity characterization value is less than or equal to a second preset threshold, or the similarity characterization value is minimum.
8. The detection method according to claim 1, characterized in that: After acquiring the target template image according to the intermediate template image, and obtaining the target position deviation according to the difference between the initial position information of the image corresponding points of the intermediate template image and the target area, the detection method further includes: According to the target position deviation, move the position of the support platform of the reference sample; After moving the position of the support platform of the reference sample, testing the sample to be tested; or, Detecting the sample to be tested to obtain a test image of the test area of the sample to be tested; The position information of the point to be corrected in the image to be measured is corrected by using the target position deviation to obtain the target position.
9. The detection method according to claim 1, characterized in that: After acquiring the target template image according to the intermediate template image, and obtaining the target position deviation according to the difference between the initial position information of the image corresponding points of the intermediate template image and the target area, the detection method further includes: Matching the target template image with the image to be tested on the surface of the sample to be tested to obtain a target area to be tested; wherein the similarity between the target area to be tested and the target template image satisfies a third preset condition; The target area to be tested and the matching points of the target template image are respectively identified to obtain the target points in the target area to be tested.
10. The detection method according to claim 9, characterized in that: After the matching points of the target area to be tested and the target template image are respectively identified to obtain the target points in the target area to be tested, the detection method further includes: Correcting the position information of the point to be corrected in the image to be tested by using the target position deviation, wherein the point to be corrected is a target point in the target area to be tested; Alternatively, the position information of the point to be corrected in the image to be measured is corrected by using the target position deviation, including: correcting the position information of each point in the image to be measured by using the target position deviation to obtain the target position of each point.
11. The detection method according to claim 1, characterized in that: The reference sample is a sample to be tested; The step of obtaining a target template image according to at least one of the intermediate template image and the initial template image comprises: Using the initial template image as the target template image; The detection method further includes: performing identification processing on each matching point between the target template image and the intermediate template image to obtain the target point in the sample to be tested.
12. The detection method according to claim 9 or 11, characterized in that: The identification process includes: threshold comparison process or machine learning process; The threshold comparison process includes: performing difference processing on each matching point respectively, taking the matching point corresponding to the absolute value of the difference greater than the third threshold or the maximum absolute value of the difference as the target point, and the target point is the defect point; The machine learning process includes: identifying each matching point through a neural network to obtain defect points.
13. An electronic device, characterized in that: include: at least one processor; a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the detection method according to any one of claims 1 to 12.