Positioning method, conversion relationship acquisition method, detection method and system
By using two template images for matching in precision machining distortion detection, the problem of poor template matching robustness is solved, and the accuracy and precision of detection are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SKYVERSE TECH CO LTD
- Filing Date
- 2022-01-21
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, template matching methods have poor robustness in precision machining distortion detection, resulting in low detection accuracy.
Two template images are used for matching. The first template image includes a standard image of the target to be tested, and the second template image is a sub-image of the first template image. The matching results of the two are considered together to improve robustness.
This improves the robustness of template matching and the reliability of matching results, thereby improving the positioning accuracy of the target under test.
Smart Images

Figure CN116523814B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optical detection technology, and in particular to a positioning method, a method for obtaining conversion relationships, a detection method, and a system. Background Technology
[0002] With the development of modern industry, precision machining is being used in more and more fields; at the same time, there are increasingly higher requirements for machining accuracy. In order to meet the requirements for machining accuracy and improve the pass rate of machined samples, it is necessary to frequently test the morphological distortion of the machining process and the machined products to ensure that the distortion is within the tolerable range.
[0003] In precision machining distortion detection applications, it is often necessary to detect the height, film thickness, linewidth, or alignment error of a set measurement point on the test object (e.g., at a critical location). However, during the detection of a specific test point, precise positioning of the test point is required to ensure the accuracy of the detection.
[0004] In existing technologies, template matching is used to obtain the matching region of the target in the acquired image, but there is a problem of poor robustness in template matching, which leads to low detection accuracy. Summary of the Invention
[0005] The problem solved by this invention is to provide a positioning method, a method for obtaining transformation relationships, a detection method, and a system to improve the robustness of template matching, thereby improving the accuracy of positioning the target under test.
[0006] To address the above problems, the present invention provides a positioning method, comprising:
[0007] Provide a test object, wherein the test object includes the target to be tested;
[0008] Acquire the first image of the object under test;
[0009] The first image and the first template image are subjected to a first matching process to obtain a first matching region and a first matching result in the first image; the first template image includes a standard image of the target to be tested; the first matching result includes a first similarity between the first image and the first template image and a first candidate coordinate of the first matching region.
[0010] The first image and the second template image are subjected to a second matching process to obtain a second matching region and a second matching result in the first image; the second template image is a sub-image of the first template image and includes a standard image of the target to be tested; the second matching result includes a second similarity between the first image and the second template image and a second candidate coordinate of the second matching region;
[0011] Based on the first candidate coordinates and the second selected coordinates, a third matching result is obtained, and / or based on the first similarity and the second similarity, a fourth matching result is obtained; the third matching result and the fourth matching result include matching regions in the first matching region and the second matching region that have the target to be tested, or matching regions in the first matching region and the second matching region that do not have the target to be tested.
[0012] Optionally, the step of performing a first matching process between the first image and the first template image to obtain a first matching region and a first matching result in the first image includes:
[0013] The first image is traversed using a first matching window of the same size as the first template image to obtain a first correlation score between the region where the first matching window is located in the first image and the first template image; the first correlation score is negatively correlated with the variance of the gray level of each pixel of the first matching window and the first template image.
[0014] The region where the first matching window corresponding to the maximum value of the first relevance score in the first image is located is obtained as the first matching region, and the first candidate coordinates of the first matching region are obtained. The maximum value of the first relevance score is used as the first similarity between the first image and the first template image.
[0015] The step of performing a second matching process between the first image and the second template image to obtain a second matching region and a second matching result in the first image includes:
[0016] The first image is traversed using a second matching window of the same size as the second template image to obtain a second correlation score between the region where the second matching window is located in the first image and the second template image; the second correlation score is negatively correlated with the variance of the gray level of each pixel in the second matching window and the second template image.
[0017] The region where the second matching window corresponding to the maximum value of the second relevance score in the first image is located is obtained as the second matching region, and the second candidate coordinates of the second matching region are obtained. The maximum value of the second relevance score is used as the second similarity between the first image and the second template image.
[0018] Optionally, obtaining the first correlation score or the second correlation score in the first image includes: obtaining the first correlation score or the second correlation score through cross-correlation processing.
[0019] Optionally, obtaining the first correlation score or the second correlation score through cross-correlation processing includes:
[0020] or
[0021]
[0022] Wherein, NCC(p,d) represents the first relevance score or the second relevance score, and I1(x,y) represents the gray value at pixel (x,y) in the first template image or the second template image. Ix represents the average grayscale value of a pixel in the first template image or the second template image, and I2(x+p,y+d) represents the grayscale value at pixel (x+p,y+d) in the first image. Wp represents the average gray value of the pixels in the first image, Wp represents the region where the first matching window or the second matching window is located in the first image, and · represents the product operation.
[0023] Optionally, the first template image and the second template image share the same center, and the standard image of the target to be tested is located in the central region of the first template image and the second template image, respectively;
[0024] The step of obtaining the first candidate coordinates of the first matching region includes: obtaining the first candidate coordinates of the center point of the center point of the first matching region;
[0025] The step of obtaining the second candidate coordinates of the second matching region includes: obtaining the second candidate center point coordinates of the center point of the second matching region;
[0026] The step of obtaining the third matching result based on the first candidate coordinates and the second selected coordinates includes:
[0027] Determine whether the deviation between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to a preset deviation threshold.
[0028] If the deviation between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to the deviation threshold, the first candidate center point coordinates or the second candidate center point coordinates shall be used as the first target center point coordinates of the target to be measured.
[0029] Optionally, if the deviation between the first candidate center point coordinates and the second candidate center point coordinates is greater than the deviation threshold, obtaining the third matching result based on the first candidate coordinates and the second selected coordinates further includes:
[0030] The first and second matching regions do not have matching regions for the target to be tested, or a fourth matching result is obtained based on the first and second similarities.
[0031] Optionally, the first template image and the second template image share the same center, and the standard image of the target to be tested is located in the central region of the first template image and the second template image, respectively;
[0032] The step of obtaining the first candidate coordinates of the first matching region includes: obtaining the first candidate coordinates of the center point of the center point of the first matching region;
[0033] The step of obtaining the second candidate coordinates of the second matching region includes: obtaining the second candidate center point coordinates of the center point of the second matching region;
[0034] The step of obtaining the fourth matching result based on the first similarity and the second similarity includes:
[0035] If the first similarity is greater than the first similarity threshold and the second similarity is less than or equal to the second similarity threshold, the first candidate center point coordinates are used as the first center point target coordinates of the target to be tested in the first coordinate system.
[0036] If the first similarity is less than or equal to the first similarity threshold and the second similarity is greater than the second similarity threshold, the second candidate center point coordinates are used as the first center point target coordinates of the target to be tested in the first coordinate system.
[0037] If the first similarity is less than or equal to the first similarity threshold and the second similarity is less than or equal to the second similarity threshold, then the first matching region and the second matching region do not have a matching region for the target to be tested.
[0038] Optionally, the first similarity threshold is greater than the second similarity threshold.
[0039] Optionally, the range of the first similarity threshold is [0.9, 1], and the range of the second similarity threshold is [0.7, 0.95].
[0040] Optionally, the pixels in the first image have position coordinates in a first coordinate system, and the object to be tested has a second coordinate system;
[0041] The step of acquiring the first image of the object under test includes: acquiring the reference position coordinates of the center point of the object under test; the reference position coordinates are the position coordinates of the center point of the object under test in the first coordinate system, assuming that the first coordinate system and the second coordinate system coincide; and acquiring an image of the corresponding surface area of the object under test with the reference position coordinates as the center, as the first image.
[0042] The step of obtaining the first candidate center point coordinates of the center point of the first matching region includes: obtaining a first offset vector between the first candidate center point coordinates of the center point of the first matching region in the first coordinate system and the reference position coordinates; adding the reference position coordinates to the first offset vector to obtain the second candidate center point coordinates of the center point of the first matching region in the first coordinate system.
[0043] The step of obtaining the second candidate center point coordinates of the center point of the second matching region includes: obtaining a second offset vector between the second candidate center point coordinates of the center point of the second matching region in the first coordinate system and the reference position coordinates; adding the reference position coordinates and the second offset vector to obtain the second candidate center point coordinates of the center point of the second matching region in the first coordinate system.
[0044] Optionally, the first template image is a rectangle with a side length of 150um-250um; the second template image is a rectangle with a side length of 50um-110um.
[0045] Optionally, if neither the first matching region nor the second matching region has a matching region for the target to be tested, the method further includes:
[0046] The test object is subjected to region shifting processing, and the step of acquiring the first image of the test object is re-executed; wherein, the surface regions of the test object partially overlap or connect in the first images acquired before and after the region shifting processing.
[0047] Accordingly, embodiments of the present invention also provide a method for obtaining a transformation relationship, including:
[0048] The positioning method described above is used to obtain the first target coordinate information of at least two adjacent targets in the object under test in the first coordinate system along the first direction; the object under test has a second coordinate system, and the first direction is the coordinate axis direction of the first coordinate system;
[0049] Based on the first target coordinate information of at least two adjacent targets in the first coordinate system, the transformation relationship between the second coordinate system and the first coordinate system is obtained.
[0050] Optionally, the transformation relationship between the first coordinate system and the second coordinate system includes the rotation relationship between the first coordinate system and the second coordinate system; obtaining the transformation relationship between the first coordinate system and the second coordinate system includes:
[0051] Obtain the first center point target coordinate information of the center points of at least two adjacent targets under test in the first coordinate system;
[0052] Fit the first center point target coordinates of at least two adjacent target centers in the first coordinate system to obtain the corresponding first connecting line;
[0053] Calculate the rotation angle between the first connecting line and the first direction, and use it as the rotation relationship between the first coordinate system and the second coordinate system.
[0054] Optionally, the at least two adjacent targets to be tested are located near the center point of the object to be tested.
[0055] Accordingly, embodiments of the present invention also provide a detection method, comprising:
[0056] A target detection device is provided, the target detection device having a third coordinate system;
[0057] The transformation relationship between the first coordinate system and the second coordinate system is obtained using any of the transformation relationship acquisition methods described above; the surface of the object to be measured has a measurement area, and the measurement area has first coordinate information in the first coordinate system;
[0058] Based on the transformation relationship between the first coordinate system and the second coordinate system and the first coordinate information, the second coordinate information of the area to be measured in the second coordinate system is obtained;
[0059] Obtain the transformation relationship between the second coordinate system and the third coordinate system;
[0060] Based on the transformation relationship between the second coordinate system and the third coordinate system and the second coordinate information, the third coordinate information of the area to be measured in the third coordinate system is obtained;
[0061] The target detection device locates the area to be measured based on the third coordinate information;
[0062] After the target detection device locates the area to be tested based on the third coordinate information, it detects the area to be tested to obtain the physical information of the area to be tested.
[0063] Accordingly, embodiments of the present invention also provide a detection system, comprising:
[0064] The first transformation relationship acquisition module is adapted to acquire the transformation relationship between the first coordinate system and the second coordinate system using the transformation relationship acquisition method described in any of the above claims; the surface of the object to be measured has a test area, and the test area has first coordinate information in the first coordinate system;
[0065] The second coordinate acquisition module is adapted to acquire the second target coordinate information of the area to be measured in the second coordinate system based on the transformation relationship between the first coordinate system and the second coordinate system and the first target coordinate information;
[0066] The second transformation relationship acquisition module is adapted to acquire the transformation relationship between the third coordinate system and the second coordinate system;
[0067] The third coordinate acquisition module is adapted to acquire the third target coordinate information of the area to be measured in the third coordinate system based on the transformation relationship between the third coordinate system and the second coordinate system and the second target coordinate information;
[0068] The target detection device has the third coordinate system and is adapted to locate the area to be tested based on the third coordinate information, detect the area to be tested, and obtain the physical information of the area to be tested.
[0069] Compared with the prior art, the technical solution of the present invention has the following advantages:
[0070] In the positioning method of this invention, both the first template image and the second template image include a standard image of the target to be tested, and the second template image is a sub-image of the first template image. The first image of the target to be tested is obtained and subjected to a first matching process and a second matching process with the first template image and the second template image, respectively, to obtain a first matching region and a first matching result in the first image, as well as a second matching region and a second matching result in the first image. The first matching region and the first matching result and the second matching region and the second matching result are comprehensively considered to obtain a third matching result and / or a fourth matching result. Compared with using a single template image for matching processing, the robustness of template matching and the reliability of matching results can be improved, thereby improving the accuracy of the target positioning. Attached Figure Description
[0071] Figure 1 This is a flowchart illustrating a positioning method according to an embodiment of the present invention;
[0072] Figure 2 This is a top view of one embodiment of the target under test;
[0073] Figure 3 This is a schematic diagram of one embodiment of the first template image in this invention;
[0074] Figure 4 This is a schematic diagram of one embodiment of the second template image in this invention;
[0075] Figure 5 A flowchart illustrating a method for obtaining a conversion relationship according to an embodiment of the present invention is shown;
[0076] Figure 6 A flowchart illustrating a detection method according to an embodiment of the present invention is shown;
[0077] Figure 7 A schematic diagram of the structure of a detection system according to an embodiment of the present invention is shown. Detailed Implementation
[0078] As can be seen from the background technology, in the process of locating a specific position on the surface of the object to be tested, the template matching method is used to obtain the area that matches the target in the real-time acquired image. However, the template matching has poor robustness, resulting in low detection accuracy of the target.
[0079] Specifically, real-time image acquisition is performed on surface areas at different locations of the test object. The acquired images are then matched with a standard image of the test target using a template. The matching results are compared with a similarity threshold to determine whether the match is successful. However, due to differences in manufacturing processes among different test objects, the gap between the test target and the template image can be significant. Therefore, matching results obtained using a single template image with the acquired images have poor reliability and robustness.
[0080] To address the aforementioned problems, the localization method in this embodiment of the invention includes: providing a test object, the test object including a target; acquiring a first image of the test object; performing a first matching process on the first image and a first template image to acquire a first matching region and a first matching result in the first image; the first template image including a standard image of the target; the first matching result including a first similarity between the first image and the first template image and a first candidate coordinate of the first matching region; performing a second matching process on the first image and a second template image to acquire a second matching region and a second matching result in the first image; the second template image being a sub-image of the first template image and including a standard image of the target; the second matching result including a second similarity between the first image and the second template image and a second candidate coordinate of the second matching region; acquiring a third matching result based on the first candidate coordinate and the second selected coordinate, and / or acquiring a fourth matching result based on the first similarity and the second similarity; the third matching result and the fourth matching result including matching regions in the first and second matching regions that contain the target, or matching regions in the first and second matching regions that do not contain the target.
[0081] In the positioning method of this invention, both the first template image and the second template image include a standard image of the target to be tested, and the second template image is a sub-image of the first template image. The first image of the target to be tested is obtained and subjected to a first matching process and a second matching process with the first template image and the second template image, respectively, to obtain a first matching region and a first matching result in the first image, as well as a second matching region and a second matching result in the first image. The first matching region and the first matching result and the second matching region and the second matching result are comprehensively considered to obtain a third matching result and / or a fourth matching result. Compared with using a single template image for matching processing, the robustness of template matching and the reliability of matching results can be improved, thereby improving the accuracy of the target positioning.
[0082] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0083] Figure 1 A flowchart illustrating a positioning method according to an embodiment of the present invention is shown. See also Figure 1 The positioning method includes:
[0084] Step S101: Provide a test object, which includes the target to be tested;
[0085] Step S102: Obtain the first image of the object to be tested;
[0086] Step S103: Perform a first matching process on the first image and the first template image to obtain a first matching region and a first matching result in the first image; the first template image includes a standard image of the target to be tested; the first matching result includes a first similarity between the first image and the first template image and a first candidate coordinate of the first matching region;
[0087] Step S104: Perform a second matching process on the first image and the second template image to obtain a second matching region and a second matching result in the first image; the second template image is a sub-image of the first template image and includes a standard image of the target to be tested; the second matching result includes a second similarity between the first image and the second template image and a second candidate coordinate of the second matching region;
[0088] Step S105: Based on the first candidate coordinates and the second selected coordinates, obtain a third matching result, and / or based on the first similarity and the second similarity, obtain a fourth matching result; the third matching result and the fourth matching result include matching regions in the first matching region and the second matching region that have the target to be tested, or matching regions in the first matching region and the second matching region that do not have the target to be tested.
[0089] Please continue reading Figure 1 Step S101 is executed, providing a test object, which includes the target to be tested.
[0090] In this embodiment, the object under test is a wafer. In other embodiments, the object under test can also be other types of test targets, such as glass substrates, etc., which are not limited here.
[0091] In this embodiment, the target to be tested is formed on the object to be tested.
[0092] As an example, the target under test is a feature structure. Specifically, the feature structure is a mark or pattern, where the mark or pattern is a feature pattern located on a film layer on a wafer or chip.
[0093] Figure 2 This is a top view of one embodiment of the target under test. For example... Figure 2 As shown, the target to be tested 100 is a cross-shaped mark. In other embodiments, the target to be tested can also be a grating mark, a rectangular mark, a triangular mark, or a ring mark, etc.
[0094] Please continue reading Figure 1 Execute step S102 to obtain the first image of the object to be tested.
[0095] The first image of the object to be tested is obtained, which provides the basis for subsequent matching processing of the obtained first image with the preset first template image and second template image respectively.
[0096] In this embodiment, the step of acquiring the first image of the object to be tested includes: providing an initial detection device; and using the initial detection device to acquire the first image of the object to be tested.
[0097] In this embodiment, the initial detection device includes an imaging device. Specifically, the imaging device includes a bright-field imaging device or a dark-field imaging device. For example, the imaging device can be a telecentric imaging device. The telecentric imaging device only collects light parallel to the optical axis for imaging, so that the magnification is not affected by the position of the object under test, ensuring contour accuracy. The imaging device may include any suitable imaging device capable of implementing the positioning method of the present invention (e.g., capable of achieving sufficient contour accuracy measurement). In other embodiments, the imaging device may also be a microscope, etc. The initial detection device may also include other measurement hardware, such as a moving platform, optical measurement components, etc.
[0098] The initial detection device has a first coordinate system. Specifically, the first coordinate system includes a first coordinate axis and a second coordinate axis. The plane formed by the first coordinate axis and the second coordinate axis is a first coordinate plane. Specifically, the first coordinate system adopts a Cartesian coordinate system.
[0099] The first coordinate plane is the measurement plane of the imaging device. The imaging device is used to acquire an image of the object under test in the first coordinate plane. The image of the object under test in the first coordinate plane includes the coordinate information of the object under test in the first coordinate plane.
[0100] In this embodiment, the size of the object under test is larger than the field of view of the initial detection device, so only a portion of the object's surface can be captured in a single image. Accordingly, the first image acquired by the initial detection device is used as an image of a portion of the object's surface. Simultaneously, the field of view of the initial detection device is larger than the size of the target object, allowing the entire surface of the target object to be captured in a single image.
[0101] In this embodiment, the object to be tested includes periodically arranged test areas, and the target to be tested is correspondingly arranged with respect to the test areas, that is, the target to be tested exhibits the same periodic arrangement pattern in the object to be tested as the test areas. Therefore, as an example, the initial detection device takes the origin of the first coordinate system as its starting point and moves the object to be tested along the direction of the first coordinate axis and / or the second coordinate axis of the first coordinate system, with the length and / or width of the test area as the step size, to obtain an image of the corresponding part of the surface of the object to be tested, which is used as the first image.
[0102] It should be noted that the object under test has a second coordinate system, which is a self-built coordinate system of the object under test. The second coordinate system includes a third coordinate axis and a fourth coordinate axis, and the plane formed by the third coordinate axis and the fourth coordinate axis serves as the second coordinate plane. The second coordinate system adopts a Cartesian coordinate system.
[0103] Specifically, the edge of the object to be measured has a reference mark, the center point of the object to be measured is used to characterize the origin position of the second coordinate system, and the line connecting the center point of the object to be measured and the reference mark characterizes the direction of the third or fourth coordinate axis of the second coordinate plane. Wherein, the line connecting the center point of the object to be measured and the reference mark characterizes the direction of the third or fourth coordinate axis of the second coordinate plane by meaning that the line connecting the center point of the object to be measured and the reference mark has a known angle with the third or fourth coordinate axis, and the known angle is zero, acute, right, or obtuse.
[0104] In this embodiment, the object to be tested is placed on a platform. During the placement of the object on the platform, a coarse alignment operation is performed to align the center point of the object with the origin of the first coordinate system of the platform. However, this coarse alignment operation only aligns the center point of the object with the origin of the first coordinate system; it does not guarantee that the first coordinate system of the platform and the second coordinate system of the object are completely coincident. In other words, there may be a rotational relationship between the first and second coordinate systems, which is also a transformation relationship between the first and second coordinate systems. In other embodiments, the center point of the object is not coincident with the origin of the first coordinate system of the platform, and there is also a translational relationship between the first and second coordinate systems.
[0105] In this embodiment, when the initial detection device is used to acquire the first image of the object to be tested, since the corresponding rotation angle between the first coordinate system and the second coordinate system cannot be determined, the first image of the object to be tested can only be acquired in a predicted manner, so that the image of the target to be tested is present in the image of the corresponding surface of the object to be tested.
[0106] Specifically, the reference position coordinates of the center point of the target under test in the first coordinate system are obtained, and the reference position coordinates are used as the field of view center of the initial detection device to obtain an image of the corresponding surface area of the target under test, which is then used as the first image. The reference position coordinates are the position coordinates of the center point of the target under test in the first coordinate system, assuming that the first coordinate system coincides with the second coordinate system.
[0107] Please continue reading Figure 1 Step S103 is executed, in which the first image and the first template image are subjected to a first matching process to obtain a first matching region and a first matching result in the first image; the first template image includes a standard image of the target to be tested; the first matching result includes a first similarity between the first image and the first template image and a first candidate coordinate of the first matching region.
[0108] The first image and the first template image are subjected to a first matching process to obtain a first matching region and a first matching result in the first image. This is then combined with a second matching region and a second matching result to determine whether the image of the target to be tested exists in the first image. When it is determined that the image of the target to be tested exists in the first image, the coordinate information of the target to be tested in the first coordinate system is obtained, thereby realizing the positioning of the target to be tested in the first coordinate system.
[0109] In this embodiment, a coarse alignment operation is used to align the center point of the object to be measured with the origin of the first coordinate system where the stage is located, so that the first coordinate system and the second coordinate system have a corresponding rotation angle, which is also the rotation relationship between the first coordinate system and the second coordinate system.
[0110] When the rotation angle between the first and second coordinate systems is small, the first image acquired by the initial detection device of a portion of the surface of the object under test, using a predicted method, is highly likely to include an image of the target under test. However, when the rotation angle between the first and second coordinate systems is large, the first image acquired by the initial detection device of the object under test, using a predicted method, is highly likely to not include an image of the target under test. Therefore, it is necessary to identify the first image to determine whether an image of the target under test exists in the acquired first image.
[0111] The first template image includes a standard image of the target to be tested. The standard image of the target to be tested is a high-quality image of the target to be tested. The first image and the first template image are subjected to a first matching process to preliminarily determine whether the image of the target to be tested exists in the first image.
[0112] Figure 3 This is a schematic diagram of one embodiment of the first template image. See also... Figure 3 The first template image 200 includes the standard image 250 of the target to be tested, and the standard image 250 of the target to be tested is located in the central region of the first template image 200.
[0113] In this embodiment, the standard image 250 of the target to be tested is located in the central region of the first template image 200. Since the standard image 250 of the target to be tested is located in the central region of the first template image 200, and the centrally symmetrical region of the first template image is obtained using the center point of the first template image as the second template image, the standard image 250 of the target to be tested can appear in the second template image.
[0114] As an example, a standard object consistent with the object to be tested can be used in advance, and images of the sample can be acquired to obtain training images including the target to be tested. The acquired training images can be trained using training processing to obtain a first template image.
[0115] The first template image 200 includes one and only one standard image 250 of the target to be tested, so that when the first matching process is performed subsequently, the image of the target to be tested and its location information in the first image can be uniquely determined.
[0116] In addition to the standard image 250 of the target to be tested, the first template image 200 also includes images (not shown) of other structures on the surface of the standard object located around the target to be tested. These images of other structures on the surface of the standard object located around the target to be tested are used to characterize information about the environment in which the target to be tested is situated on the surface of the standard object. This allows for dual identification of the target to be tested using both the standard image of the target to be tested and the image information of other structures located around the target to be tested when matching the first template image with the first image, thus helping to improve the accuracy of target identification.
[0117] It is understood that the first template image 200 should include as many images of other structures surrounding the target object on the surface of the standard object as possible, so as to more accurately identify the information characterizing the environment of the target object on the surface of the standard object, thereby further improving the accuracy of target object recognition. At the same time, the images of other structures surrounding the target object on the surface of the standard object included in the first template image 200 should ensure that the first template image 200 includes only one standard image 250 of the target object, to avoid matching failures caused by the non-uniqueness of the standard image 250 of the target object.
[0118] The first template image 200 should be large enough to encompass the entire image of the target to be tested. Simultaneously, it should avoid situations where, during matching the first template image with the first image, more than one region in the first image might match the first template image 200, thereby increasing the probability of matching errors. Therefore, in this embodiment, the first template image is rectangular, and its side length is 150µm-250µm.
[0119] The steps of performing a first matching process on the first image and the first template image to obtain a first matching region and a first matching result in the first image include: traversing the first image using a first matching window of the same size as the first template image, obtaining a first correlation score between the region where the first matching window is located in the first image and the first template image; obtaining the region where the first matching window is located corresponding to the maximum value of the first correlation score in the first image as the first matching region, obtaining the first candidate coordinates of the first matching region, and using the maximum value of the first correlation score as the first similarity between the first image and the first template image.
[0120] As an example, a first matching window of the same size as the first template image is selected in the first image; the first matching window is slid in the first image according to a preset sliding direction, and after each slide, a first correlation score is calculated between the first template image and the area where the current first matching window is located, thereby obtaining multiple first correlation scores; the area where the first matching window corresponding to the largest first correlation score is selected as the first matching area, the first candidate coordinates of the first matching area are obtained, and the largest first correlation score is used as the first similarity between the first image and the first template image.
[0121] For example, the first matching window can be slid from the top left corner of the first image to the right, with each slide being the size of a column of pixels. After reaching the rightmost side of the first image, it slides down by the size of a row of pixels, then starts sliding from the leftmost side of the first image to the left, and so on, until the first matching window has traversed every pixel in the first image. It should be noted that the greater the similarity between the first image and the first template image, the smaller the variance of the pixel grayscale values between the region where the first matching window is located and the pixels of the first template image. Therefore, the first correlation score is negatively correlated with the variance of the grayscale values between the region where the first matching window is located and the pixels of the first template image.
[0122] The methods for calculating the first relevance score between the region containing the first matching window in the first image and the first template image include Mean Absolute Differences (MAD), Sum of Absolute Differences (SAD), Sum of Squared Differences (SSD), Mean Square Differences (MSD), Normalized CrossCorrelation (NCC), Sequential Similarity Detection Algorithm (SSDA), or Hadamard Transform.
[0123] In this embodiment, a first correlation score between the first matching region in the first image and the first template image is obtained through cross-correlation processing.
[0124] As an example, the first correlation score between the first matching region in the first image and the first template image is calculated using the following formula:
[0125]
[0126] Wherein, NCC(p,d) represents the first relevance score, and I1(x,y) represents the first template image. Let I2(x+d,y) represent the first image. Wp represents the matching region in the first image that matches the first template image, and · represents the product operation.
[0127] As another example, the first correlation score between the first matching region in the first image and the first template image is calculated using the following formula:
[0128]
[0129] In this embodiment, the standard image 250 of the target to be tested is located in the central region of the first template image 200. Accordingly, the first candidate coordinates of the first matching region are obtained, that is, the first candidate coordinates of the center point of the first matching region in the first coordinate system are obtained.
[0130] The candidate coordinates of the first center point of the first matching region in the first coordinate system are obtained so that when the image of the first matching region includes the target to be tested is subsequently determined, the candidate coordinates of the first center point can be used as the target coordinates of the first center point of the target to be tested.
[0131] In this embodiment, an initial detection device is used to acquire a first image with the reference position coordinates of the center point of the target to be tested as the center of the field of view. Correspondingly, the first center point candidate coordinates of the center point of the first matching region are acquired, including: acquiring a first offset vector between the first center point candidate coordinates of the center point of the first matching region in the first coordinate system and the reference position coordinates; adding the reference position coordinates and the first offset vector to acquire the first center point candidate coordinates of the center point of the first matching region in the first coordinate system.
[0132] Please continue reading Figure 1 Step S104 is executed to perform a second matching process on the first image and the second template image to obtain a second matching region and a second matching result in the first image; the second template image is a sub-image of the first template image and includes a standard image of the target to be tested; the second matching result includes a second similarity between the first image and the second template image and a second candidate coordinate of the second matching region.
[0133] The first image and the second template image are subjected to a second matching process to obtain a second matching region and a second matching result in the first image. This is then combined with the first matching region and the first matching result in the first image to determine whether the image of the target to be tested exists in the first image. When it is determined that the image of the target to be tested exists in the first image, the coordinate information of the target to be tested in the first coordinate system can be obtained, thereby realizing the positioning of the target to be tested.
[0134] The second template image includes a standard image of the target to be tested. The standard image of the target to be tested is a high-quality image of the target to be tested. The first image and the second template image are subjected to a second matching process to determine whether the image of the target to be tested exists in the first image. Then, when it is determined that the first image includes the image of the target to be tested, the second candidate coordinate information of the target to be tested in the first coordinate system is obtained.
[0135] Figure 4 A schematic diagram of a second template image according to an embodiment of the present invention is shown. See also Figure 4 The second template image 300 includes the standard image 250 of the target to be tested, and the standard image 250 of the target to be tested is located in the central region of the second template image 300.
[0136] In this embodiment, the second template image 300 is a sub-image of the first template image 200. The standard image 250 of the target to be tested 300 is located in the central region of both the first template image and the second template image, and the first template image and the second template image share a common center. Accordingly, taking the center point of the first template image 200 as the center, a centrally symmetrical region including the standard image 250 of the target to be tested is extracted from the first template image 200 and used as the second template image 300.
[0137] Therefore, the second template image 300 includes only one standard image 250 of the target to be tested, so that when the second matching process is performed subsequently, the image of the target to be tested and its location information in the first image can be uniquely determined.
[0138] The second template image 300 should not be too small; its size should be large enough to accommodate the entire standard image 250 of the target under test. Therefore, in this embodiment, the second template image is rectangular with a side length of 50µm-110µm.
[0139] The steps of performing a second matching process on the first image and the second template image to obtain the second matching region and matching result in the first image include: traversing the first image using a second matching window with the same size as the second template image, calculating the second correlation score between the region where the second matching window is located in the first image and the second template image; obtaining the region where the second matching window is located corresponding to the maximum value of the second correlation score in the first image as the second matching region, obtaining the second candidate coordinates of the second matching region, and using the maximum value of the second correlation score as the second similarity between the first image and the second template image.
[0140] As an example, a second matching window of the same size as the second template image is selected in the first image; the second matching window is slid in the first image according to the sliding direction, and after each slide, a second relevance score is calculated between the second template image and the area where the current second matching window is located, thereby obtaining multiple second relevance scores; the area where the second matching window corresponding to the largest second relevance score is located is selected as the second matching area, the second candidate coordinates of the second matching area are obtained, and the largest second relevance score is used as the second similarity between the first image and the second template image.
[0141] For example, the second matching window can be slid downwards from the top left corner of the first image, each slide being the size of one row of pixels. Once it reaches the bottom of the first image, it slides to the right, the slide being the size of one column of pixels. Then it starts sliding upwards again from the bottom of the first image, and so on, until the second matching window has traversed every pixel in the first image. It should be noted that the greater the similarity between the first image and the second template image, the smaller the variance of the grayscale values of the pixels in the first image corresponding to the area of the second matching window and the pixels in the first template image. Therefore, the second correlation score is negatively correlated with the variance of the grayscale values of the pixels in the area of the second matching window and the pixels in the first template image.
[0142] Similar to the first relevance score, the second relevance score between the region where the second matching window is located in the first image and the second template image can be calculated by means of absolute difference processing, absolute error sum processing, error sum of squares processing, mean error sum of squares processing, normalized cross-correlation processing, sequential similarity detection processing, or Hadamard transform processing, etc.
[0143] In this embodiment, cross-correlation processing is used to obtain a first correlation score between the region where the second matching window is located in the first image and the first template image. The formula for calculating the second correlation score is described above in the section on calculating the first correlation score, and will not be repeated here.
[0144] In this embodiment, the standard image 250 of the target to be tested is located in the central region of the second template image 200. Accordingly, the second candidate coordinates of the second matching region are obtained, that is, the second center point candidate coordinates of the center point of the second matching region in the first coordinate system are obtained.
[0145] The candidate coordinates of the second center point of the second matching region in the first coordinate system are obtained so that when the image of the second matching region includes the target to be tested is subsequently determined, the candidate coordinates of the second center point can be used as the target coordinates of the first center point of the target to be tested.
[0146] In this embodiment, an initial detection device is used to acquire a first image with the reference position coordinates of the center point of the target to be tested as the center of the field of view. Correspondingly, the second center point candidate coordinates of the center point of the second matching region are acquired, including: acquiring a second offset vector between the first center point candidate coordinates of the center point of the second matching region in the first coordinate system and the reference position coordinates; adding the reference position coordinates and the second offset vector to acquire the second center point candidate coordinates of the center point of the second matching region in the first coordinate system.
[0147] Please continue reading Figure 1 Execute step S105, obtain a third matching result based on the first candidate coordinates and the second selected coordinates, and / or obtain a fourth matching result based on the first similarity and the second similarity; the third matching result and the fourth matching result include matching regions in the first matching region and the second matching region that have the target to be tested, or matching regions in the first matching region and the second matching region that do not have the target to be tested.
[0148] Obtain a third and / or fourth result to determine whether the first and second matching regions have matching regions of the target to be tested. Then, if it is determined that the first and second matching regions have matching regions of the target to be tested, the first target coordinates of the target to be tested can be obtained, thereby enabling the positioning of the target to be tested.
[0149] In this embodiment, based on the first candidate coordinates and the second selected coordinates, a third matching result is obtained, including: determining whether the deviation between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to a preset deviation threshold; if the deviation between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to the deviation threshold, the first candidate center point coordinates or the second candidate center point coordinates are used as the first center point target coordinates of the center point of the target to be tested.
[0150] By determining whether the deviation between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to a preset deviation threshold, it can be determined whether the first matching result and the second matching result are consistent, and thus determine whether the first matching region and the second matching region have a matching region of the target to be tested.
[0151] Here, the deviation between the first candidate center point coordinates and the second candidate center point coordinates refers to the distance between the first candidate center point coordinates and the second candidate center point coordinates. Accordingly, it is determined whether the deviation between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to a deviation threshold, that is, it is determined whether the distance between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to the deviation threshold.
[0152] Specifically, when the deviation between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to the deviation threshold, it indicates that the distance between the first candidate center point coordinates and the second candidate center point coordinates is relatively close, indicating that the first matching result is consistent with the second matching result, and further indicating that the first matching region and the second matching region have matching regions of the target to be tested. Therefore, the first candidate center point coordinates or the second candidate center point coordinates can be used as the first center point target coordinates of the center point of the target to be tested in the first coordinate system.
[0153] It is understood that the second template image is a sub-image of the first template image. Accordingly, compared with the first template image, the second template image contains less information about other images besides the image of the target to be tested. Therefore, if the first matching result and the second matching result are consistent, the accuracy of the second matching result can be considered to be higher than that of the first matching result. Therefore, as an example, when the deviation between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to the deviation threshold, the second candidate center point coordinates can be directly used as the first center point target coordinates of the target to be tested in the first coordinate system.
[0154] As another example, when the deviation between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to the deviation threshold, if the maximum value of the first similarity score is greater than the maximum value of the second similarity score, it indicates that the accuracy of the first matching result is higher than that of the second matching result. Therefore, the first candidate center point coordinates can be used as the first center point target coordinates of the target to be tested in the first coordinate system.
[0155] As another example, when the deviation between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to the deviation threshold, if the maximum value of the first similarity score is less than the maximum value of the second similarity score, it indicates that the accuracy of the second matching result is greater than that of the first matching result. Therefore, the second candidate center point coordinates can be used as the first center point target coordinates of the target to be tested in the first coordinate system.
[0156] In this embodiment, if the deviation between the first candidate center point coordinates and the second candidate center point coordinates is greater than the deviation threshold, a third matching result is obtained based on the first candidate coordinates and the second selected coordinates. The third matching result also includes: the first matching region and the second matching region do not have a matching region of the target to be tested, or a fourth matching result is obtained based on the first similarity and the second similarity.
[0157] Specifically, if the deviation between the first candidate center point coordinates and the second candidate center point coordinates is greater than the deviation threshold, it indicates that the distance between the first candidate center point coordinates and the second candidate center point coordinates is large, which correspondingly indicates that the first matching result and the second matching result are inconsistent. In this case, there is a possibility that either the first matching region or the second matching region has a matching region of the target to be tested, or there is a possibility that neither the first matching region nor the second matching region has a matching region of the target to be tested.
[0158] Therefore, in this embodiment, a fourth matching result can be obtained based on the information of the first similarity between the first template image and the first image and the second similarity between the second template image and the first image, so as to determine whether the first matching region or the second matching region has a matching region of the target to be tested, or whether the first matching region or the second matching region does not have a matching region of the target to be tested.
[0159] Specifically, obtaining a fourth matching result based on the first similarity and the second similarity includes: if the first similarity is greater than the first similarity threshold and the second similarity is less than or equal to the second similarity threshold, the first candidate center point coordinates are used as the first center point target coordinates of the target under test in the first coordinate system; if the first similarity is less than or equal to the first similarity threshold and the second similarity is greater than the second similarity threshold, the second candidate center point coordinates are used as the first center point target coordinates of the target under test in the first coordinate system; if the first similarity is less than or equal to the first similarity threshold and the second similarity is less than or equal to the second similarity threshold, then the first matching region and the second matching region do not have a matching region for the target under test.
[0160] If the first similarity is greater than the first similarity threshold and the second similarity is less than or equal to the second similarity threshold, it indicates that there is a matching region for the target in the first matching region, but no matching region for the target in the second matching region. Therefore, the candidate coordinates of the first center point are used as the first center point target coordinates of the target in the first coordinate system.
[0161] If the first similarity is greater than the first similarity threshold and the second similarity is less than or equal to the second similarity threshold, it indicates that there is no matching region for the target in the first matching region, but there is a matching region for the target in the second matching region. Therefore, the second candidate center point coordinates are used as the first center point target coordinates of the target in the first coordinate system.
[0162] If the first similarity is less than or equal to the first similarity threshold and the second similarity is less than or equal to the second similarity threshold, it indicates that there is no matching region for the target in the first matching region and the second matching region.
[0163] In this embodiment, when there is no matching area for the target to be tested in the first matching area and the second matching area, the positioning method further includes: performing region movement processing on the target to be tested, and returning to obtain the first image of the target to be tested.
[0164] The object under test is subjected to region shifting processing to broaden the shooting range and acquire more first images, thereby enabling the acquisition of a matching region containing the target object from the first images.
[0165] When performing region movement processing on the object under test, the object under test can be moved along a preset direction to obtain more first images.
[0166] In this embodiment, the preset direction is along the first coordinate axis and the second coordinate axis to obtain images of other surface areas around the surface area of the object under test corresponding to the current first image, as the corresponding first image.
[0167] In this embodiment, the surface regions of the object under test corresponding to each other in the first images before and after the region shifting process are connected. The surface regions of the object under test corresponding to each other in the first images before and after the region shifting process are the same as the surface regions of the object under test corresponding to the two adjacent first images. Since the previously acquired first image has already undergone the first matching process and the second matching process with the first template image and the second template image respectively, the connection of the surface regions of the object under test corresponding to each other in the first images before and after the region shifting process helps avoid repeatedly acquiring the same image and allows for obtaining more information from the subsequently acquired first image, thereby avoiding resource waste and improving the speed of target localization. In other embodiments, depending on actual needs, the surface regions of the object under test corresponding to each other in the first images before and after the region shifting process can also partially overlap.
[0168] In other embodiments, after obtaining the first matching result and the second matching result, a fourth matching result can also be obtained directly based on the first similarity and the second similarity.
[0169] It should be noted that the second template image is a sub-image of the first template image. Accordingly, compared with the first template image, the second template image contains less information about other images besides the image of the target to be tested. Therefore, in order to ensure the accuracy of the matching results, the first similarity threshold is correspondingly greater than the second similarity threshold.
[0170] The first similarity threshold should not be too large or too small. If the first similarity threshold is too small, the matching accuracy between the first template image and the first image will be low, failing to meet the positioning accuracy requirements of the target under test; if the first similarity threshold is too large, the judgment standard will be too strict, thereby increasing the number of unnecessary acquisitions of the first image, resulting in wasted resources and reduced positioning speed. Therefore, in this embodiment, the range of the first similarity threshold is [0.9, 1]. For similar reasons, the range of the second similarity threshold is [0.7, 0.95].
[0171] Accordingly, embodiments of the present invention also provide a method for obtaining conversion relationships.
[0172] Figure 5 A flowchart illustrating a method for obtaining a transformation relationship according to an embodiment of the present invention is shown. See also... Figure 5 The method for obtaining the transformation relationship may include:
[0173] Step S501: Using the positioning method described in any of the above, obtain the first target coordinate information of at least two adjacent targets in the object to be measured in the first coordinate system along the first direction; the object to be measured has a second coordinate system, and the first direction is the coordinate axis direction of the first coordinate system;
[0174] Step S502: Based on the first target coordinate information of at least two adjacent targets under test in the first coordinate system, obtain the transformation relationship between the second coordinate system and the first coordinate system.
[0175] In this embodiment, by acquiring a first image of the object under test and matching the acquired first image with a first template image and a second template image respectively, the first target coordinate information of the target under test in the first coordinate system can be obtained, thereby achieving accurate positioning of the target under test in the first coordinate system. The method for obtaining the positioning information of the first target coordinates of at least two adjacent targets under test in the first coordinate system is described in the foregoing section and will not be repeated here.
[0176] In this embodiment, the plane on which the object to be tested is placed is parallel to or coincides with the first coordinate plane, so that the imaging device can acquire an image of the object to be tested. Specifically, the object to be tested is placed on a stage, and the surface of the stage on which the object to be tested is placed is parallel to or coincides with the first coordinate plane.
[0177] It should be noted that the object under test has a second coordinate system, which is a self-built coordinate system of the object under test. The second coordinate system includes a third coordinate axis and a fourth coordinate axis, and the plane formed by the third and fourth coordinate axes serves as the second coordinate plane. Specifically, the second coordinate system adopts a Cartesian coordinate system.
[0178] Specifically, the edge of the object to be measured has a reference mark, the center point of the object to be measured is used to characterize the origin position of the second coordinate system, and the line connecting the center point of the object to be measured and the reference mark characterizes the direction of the third or fourth coordinate axis of the second coordinate plane. Wherein, the line connecting the center point of the object to be measured and the reference mark characterizes the direction of the third or fourth coordinate axis of the second coordinate plane by meaning that the line connecting the center point of the object to be measured and the reference mark has a known angle with the third or fourth coordinate axis, and the known angle is zero, acute, right, or obtuse.
[0179] In this embodiment, the object to be tested is placed on a platform. During the placement of the object on the platform, a coarse alignment operation is performed to align the center point of the object with the origin of the first coordinate system of the platform. However, this coarse alignment operation only aligns the center point of the object with the origin of the first coordinate system; it does not guarantee that the first coordinate system of the platform and the second coordinate system of the object are completely coincident. Therefore, there may be a rotational relationship between the first and second coordinate systems, which is also a coordinate transformation relationship between them. In other embodiments, the center point of the object does not coincide with the origin of the first coordinate system of the platform, meaning the origins of the first and second coordinate systems are not coincident. Correspondingly, there may also be a translational relationship between the first and second coordinate systems.
[0180] The step of obtaining the transformation relationship between the first coordinate system and the second coordinate system includes: obtaining the transformation relationship between the second coordinate system and the first coordinate system based on the first target coordinate information of at least two adjacent targets under test in the first coordinate system.
[0181] Specifically, the first target coordinate information of at least two adjacent targets in the first coordinate system includes the first center point target coordinate information of the center points of at least two adjacent targets in the first coordinate system; the step of obtaining the transformation relationship between the second coordinate system and the first coordinate system based on the first target coordinate information of at least two adjacent targets in the first coordinate system includes: obtaining the first center point target coordinate information of the center points of at least two adjacent targets in the first coordinate system; fitting the first center point target coordinates of the center points of at least two adjacent targets in the first coordinate system to obtain the corresponding first connecting line; calculating the rotation angle between the first connecting line and the first direction as the rotation relationship between the first coordinate system and the second coordinate system.
[0182] Fit the first center point target coordinates of the center points of at least two adjacent test targets in the first coordinate system, that is, fit the first center point target coordinates (x, y, x) of the center points of at least two adjacent test targets in the first coordinate system. i y i Substitute the values of a and b into the following formula to calculate their values:
[0183] y = ax + b (3)
[0184] In this embodiment, the at least two adjacent targets to be tested are located near the center point of the object to be tested, so that the first line determined by the center points of the at least two adjacent targets to be tested is also located near the center point of the object to be tested. This can reduce the impact of the positioning error of the at least two adjacent targets to be tested on the acquisition of the conversion relationship, thereby improving the accuracy of the acquisition of the conversion relationship.
[0185] Accordingly, embodiments of the present invention also provide a detection method, comprising:
[0186] Figure 6 A schematic flowchart of a detection method according to an embodiment of the present invention is shown. See also Figure 6 The detection method includes:
[0187] Step S601: Provide a target detection device, the target detection device having a third coordinate system;
[0188] Step S602: Obtain the transformation relationship between the first coordinate system and the second coordinate system according to the transformation relationship acquisition method described above; the surface of the object to be measured has a test area, and the test area has first coordinate information in the first coordinate system;
[0189] Step S603: Based on the transformation relationship between the first coordinate system and the second coordinate system and the first coordinate information, obtain the second coordinate information of the area to be measured in the second coordinate system;
[0190] Step S604: Obtain the transformation relationship between the second coordinate system and the third coordinate system;
[0191] Step S605: Based on the transformation relationship between the second coordinate system and the third coordinate system and the second coordinate information, obtain the third coordinate information of the area to be measured in the third coordinate system;
[0192] Step S606: The target detection device locates the area to be tested based on the third coordinate information;
[0193] Step S607: After the target detection device locates the area to be tested based on the third coordinate information, the target detection device detects the area to be tested to obtain the physical information of the area to be tested.
[0194] In this embodiment, the target detection device can locate the test area based on the third target coordinate information of the test area of the test object in the third coordinate system.
[0195] In this embodiment, by obtaining the transformation relationship between the first coordinate system and the second coordinate system, and based on the transformation relationship and the first coordinate information of the area to be measured in the first coordinate system, the second coordinate information of the area to be measured in the second coordinate system is obtained. This enables rapid and high-precision measurement of the area to be measured based on the second coordinate information. The method for obtaining the transformation relationship between the first coordinate system and the second coordinate system is described in the foregoing section and will not be repeated here.
[0196] The third coordinate system and the second coordinate system have a target transformation relationship. This target transformation relationship can be represented by a target transformation matrix. According to the target transformation matrix, the coordinates of the same location in the measured area in the second coordinate system and its coordinates in the third coordinate system satisfy the following relationship:
[0197] D = T·D'(4)
[0198] or:
[0199] D = T -1 ·D'(5)
[0200] Where D represents the coordinates of the location in the test area in the third coordinate system, D' represents the coordinates of the same location in the test area in the second coordinate system, and T represents the target transformation matrix between the third and second coordinate systems. -1 Let T be the inverse of the target transformation matrix T.
[0201] In other words, the coordinates D of the same position in the test area in the third coordinate system and D' in the second coordinate system can be easily transformed by the transformation matrix T. That is, the first coordinate information of the test area in the first coordinate system can be transformed to the second coordinate system by using the target transformation matrix, and the third target coordinate information of the test area in the third coordinate system can be obtained.
[0202] The physical information includes one or more of the following: the width, thickness, and three-dimensional coordinates of the target within the test area. Accordingly, when the physical information includes the thickness of the target, the target detection device further includes a thickness detection module. The thickness detection module includes an ellipsometer or a spectrophotometer. The thickness detection module has the third coordinate system.
[0203] The method for obtaining the target transformation relationship between the third coordinate system and the second coordinate system is the same as the method for obtaining the transformation relationship between the first coordinate system and the second coordinate system described above, and will not be repeated here.
[0204] Accordingly, embodiments of the present invention also provide a detection system, comprising:
[0205] Figure 7A schematic flowchart of a detection system according to an embodiment of the present invention is shown. See also Figure 7 The detection system includes:
[0206] The first transformation relationship acquisition module 701 is adapted to acquire the transformation relationship between the first coordinate system and the second coordinate system using the transformation relationship acquisition method described above; the surface of the object to be measured has a test area, and the test area has first coordinate information in the first coordinate system;
[0207] The second coordinate acquisition module 702 is adapted to acquire the second coordinate information of the area to be measured in the second coordinate system according to the transformation relationship between the first coordinate system and the second coordinate system and the first coordinate information;
[0208] The second transformation relationship acquisition module 703 is adapted to acquire the transformation relationship between the third coordinate system and the second coordinate system;
[0209] The third coordinate acquisition module 704 is adapted to acquire the third target coordinate information of the area to be measured in the third coordinate system according to the transformation relationship between the third coordinate system and the second coordinate system and the second target coordinate information;
[0210] The target detection device 705 has the third coordinate system and is adapted to locate the area to be tested according to the third coordinate information, detect the area to be tested, and obtain the physical information of the area to be tested.
[0211] The detection system can execute the detection method described in the foregoing embodiments, or it can use other functional structures to execute the detection method. For a detailed description of the detection method in this embodiment, please refer to the corresponding descriptions in the foregoing embodiments, which will not be repeated here.
[0212] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.
Claims
1. A positioning method, characterized in that, include: Provide a test object, wherein the test object includes the target to be tested; Acquire the first image of the object under test; The first image is matched with the first template image to obtain the first matching region and the first matching result in the first image. The first template image includes a standard image of the target to be tested and environmental information of the target to be tested on the surface of the object to be tested; the first matching result includes a first similarity between the first image and the first template image and a first candidate coordinate of the first matching region; The first image and the second template image are subjected to a second matching process to obtain the second matching region and the second matching result in the first image; The second template image is a sub-image of the first template image and includes only the standard image of the target to be tested; the second matching result includes the second similarity between the first image and the second template image and the second candidate coordinates of the second matching region; Based on the first candidate coordinates and the second candidate coordinates, a third matching result is obtained, and / or based on the first similarity and the second similarity, a fourth matching result is obtained; The third and fourth matching results include matching regions in the first and second matching regions that contain the target to be tested, or matching regions in the first and second matching regions that do not contain the target to be tested.
2. The positioning method according to claim 1, characterized in that, The step of performing a first matching process between the first image and the first template image to obtain a first matching region and a first matching result in the first image includes: The first image is traversed using a first matching window of the same size as the first template image to obtain a first correlation score between the region where the first matching window is located in the first image and the first template image; the first correlation score is negatively correlated with the variance of the gray level of each pixel in the region where the first matching window is located and the first template image. The region where the first matching window corresponding to the maximum value of the first relevance score in the first image is located is obtained as the first matching region, and the first candidate coordinates of the first matching region are obtained. The maximum value of the first relevance score is used as the first similarity between the first image and the first template image. The step of performing a second matching process between the first image and the second template image to obtain a second matching region and a second matching result in the first image includes: The first image is traversed using a second matching window of the same size as the second template image to obtain a second correlation score between the region where the second matching window is located in the first image and the second template image; the second correlation score is negatively correlated with the variance of the gray level of each pixel in the region where the second matching window is located and the second template image. The region where the second matching window corresponding to the maximum value of the second relevance score in the first image is located is obtained as the second matching region, and the second candidate coordinates of the second matching region are obtained. The maximum value of the second relevance score is used as the second similarity between the first image and the second template image.
3. The positioning method according to claim 2, characterized in that, The step of obtaining the first relevance score in the first image or obtaining the second relevance score in the first image includes: The first correlation score or the second correlation score is obtained through cross-correlation processing.
4. The positioning method according to claim 3, characterized in that, The step of obtaining the first correlation score or the second correlation score through cross-correlation processing includes: or Wherein, NCC(p,d) represents the first relevance score or the second relevance score, and I1(x,y) represents the gray value at pixel (x,y) in the first template image or the second template image. Ix(x+p,y+d) represents the average gray value of a pixel in the first template image or the second template image, and I2(x+p,y+d) represents the gray value at pixel (x+p,y+d) in the first image. Wp represents the average gray value of the pixels in the first image, Wp represents the region where the first matching window or the second matching window is located in the first image, and · represents the product operation.
5. The positioning method according to claim 1, characterized in that, The first template image and the second template image share the same center, and the standard image of the target to be tested is located in the central region of the first template image and the second template image, respectively; The step of obtaining the first candidate coordinates of the first matching region includes: obtaining the first candidate coordinates of the center point of the center point of the first matching region; The step of obtaining the second candidate coordinates of the second matching region includes: obtaining the second candidate center point coordinates of the center point of the second matching region; The step of obtaining the third matching result based on the first candidate coordinates and the second candidate coordinates includes: Determine whether the deviation between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to a preset deviation threshold. If the deviation between the first candidate center point coordinates and the second candidate center point coordinates is less than or equal to the deviation threshold, the first candidate center point coordinates or the second candidate center point coordinates shall be used as the first target center point coordinates of the target to be measured.
6. The positioning method according to claim 5, characterized in that, If the deviation between the first candidate center point coordinates and the second candidate center point coordinates is greater than the deviation threshold, the step of obtaining a third matching result based on the first candidate coordinates and the second selected coordinates further includes: The first and second matching regions do not have matching regions for the target to be tested, or a fourth matching result is obtained based on the first and second similarities.
7. The positioning method according to claim 1, characterized in that, The first template image and the second template image share the same center, and the standard image of the target to be tested is located in the central region of the first template image and the second template image, respectively; The step of obtaining the first candidate coordinates of the first matching region includes: obtaining the first candidate coordinates of the center point of the center point of the first matching region; The step of obtaining the second candidate coordinates of the second matching region includes: obtaining the second candidate center point coordinates of the center point of the second matching region; The step of obtaining the fourth matching result based on the first similarity and the second similarity includes: If the first similarity is greater than the first similarity threshold and the second similarity is less than or equal to the second similarity threshold, then... The candidate coordinates of the first center point are used as the target coordinates of the first center point of the target under the first coordinate system. If the first similarity is less than or equal to the first similarity threshold and the second similarity is greater than the second similarity threshold, the second candidate center point coordinates are used as the first center point target coordinates of the target to be tested in the first coordinate system. If the first similarity is less than or equal to the first similarity threshold and the second similarity is less than or equal to the second similarity threshold, then the first matching region and the second matching region do not have a matching region for the target to be tested.
8. The positioning method according to claim 7, characterized in that, The first similarity threshold is greater than the second similarity threshold.
9. The positioning method according to claim 7, characterized in that, The first similarity threshold ranges from [0.9, 1], and the second similarity threshold ranges from [0.7, 0.95].
10. The positioning method according to claim 5, characterized in that, The pixels in the first image have position coordinates in a first coordinate system, and the object to be tested has a second coordinate system; The step of acquiring the first image of the object under test includes: acquiring the reference position coordinates of the center point of the object under test; the reference position coordinates are the position coordinates of the center point of the object under test in the first coordinate system, assuming that the first coordinate system and the second coordinate system coincide; and acquiring an image of the corresponding surface area of the object under test with the reference position coordinates as the center, as the first image. The step of obtaining the first candidate center point coordinates of the center point of the first matching region includes: obtaining a first offset vector between the first candidate center point coordinates of the center point of the first matching region in the first coordinate system and the reference position coordinates; adding the reference position coordinates to the first offset vector to obtain the second candidate center point coordinates of the center point of the first matching region in the first coordinate system. The step of obtaining the second candidate center point coordinates of the center point of the second matching region includes: obtaining a second offset vector between the second candidate center point coordinates of the center point of the second matching region in the first coordinate system and the reference position coordinates; adding the reference position coordinates and the second offset vector to obtain the second candidate center point coordinates of the center point of the second matching region in the first coordinate system.
11. The positioning method according to claim 1, characterized in that, The first template image is rectangular, and the side length of the first template image is 150um-250um; the second template image is rectangular, and the side length of the second template image is 50um-110um.
12. The positioning method according to claim 1, 6, or 7, characterized in that, If neither the first matching region nor the second matching region has a matching region for the target to be tested, the method further includes: The test object is subjected to region shifting processing, and the step of acquiring the first image of the test object is re-executed; wherein, the surface regions of the test object partially overlap or connect in the first images acquired before and after the region shifting processing.
13. A method for obtaining a transformation relationship, characterized in that, include: The positioning method as described in any one of claims 1-12 is used to obtain the first target coordinate information of at least two adjacent targets in the object to be measured in a first coordinate system along a first direction; The object to be tested has a second coordinate system, and the first direction is the direction of the coordinate axis of the first coordinate system; Based on the first target coordinate information of at least two adjacent targets in the first coordinate system, the transformation relationship between the second coordinate system and the first coordinate system is obtained.
14. The method for obtaining the transformation relationship according to claim 13, characterized in that, The at least two adjacent ones The first target coordinate information of the target in the first coordinate system includes the midpoint of the at least two adjacent targets to be measured. The target coordinates of the first center point in the first coordinate system; the transformation relationship between the first coordinate system and the second coordinate system includes the rotation relationship between the first coordinate system and the second coordinate system; Obtaining the transformation relationship between the first coordinate system and the second coordinate system includes: Obtain the first center point target coordinate information of the center points of at least two adjacent targets under test in the first coordinate system; Fit the first center point target coordinates of at least two adjacent target centers in the first coordinate system to obtain the corresponding first connecting line; Calculate the rotation angle between the first connecting line and the first direction, and use it as the rotation relationship between the first coordinate system and the second coordinate system.
15. The method for obtaining the transformation relationship according to claim 13 or 14, characterized in that, The at least two adjacent targets to be tested are located near the center point of the object to be tested.
16. A detection method, characterized in that, include: A target detection device is provided, the target detection device having a third coordinate system; The transformation relationship between the first coordinate system and the second coordinate system is obtained by the transformation relationship acquisition method as described in any one of claims 13 to 15; the surface of the object to be measured has a test area, and the test area has first coordinate information in the first coordinate system; Based on the transformation relationship between the first coordinate system and the second coordinate system and the first coordinate information, the second coordinate information of the area to be measured in the second coordinate system is obtained; Obtain the transformation relationship between the second coordinate system and the third coordinate system; Based on the transformation relationship between the second coordinate system and the third coordinate system and the second coordinate information, the third coordinate information of the area to be measured in the third coordinate system is obtained; The target detection device locates the area to be measured based on the third coordinate information; After the target detection device locates the area to be tested based on the third coordinate information, it detects the area to be tested to obtain the physical information of the area to be tested.
17. A detection system, characterized in that, include: The first transformation relationship acquisition module is adapted to acquire the transformation relationship between the first coordinate system and the second coordinate system using the transformation relationship acquisition method as described in any one of claims 13 to 15; the surface of the object to be measured has a test area, and the test area has first coordinate information in the first coordinate system; The second coordinate acquisition module is adapted to acquire the second target coordinate information of the area to be measured in the second coordinate system based on the transformation relationship between the first coordinate system and the second coordinate system and the first target coordinate information; The second transformation relationship acquisition module is adapted to acquire the transformation relationship between the third coordinate system and the second coordinate system; The third coordinate acquisition module is adapted to acquire the third target coordinate information of the area to be measured in the third coordinate system based on the transformation relationship between the third coordinate system and the second coordinate system and the second target coordinate information; The target detection device has the third coordinate system and is adapted to locate the area to be tested according to the third coordinate information, detect the area to be tested, and obtain the physical information of the area to be tested.
Citation Information
Patent Citations
Image recognition method, device and system and computing device
CN109858504A
Tunnel convergence monitoring method and device
CN112565690A