Focusing method and system, device and storage medium for a target under test
Patent Information
- Application Number
- CN202111674728.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2041-12-31
AI Technical Summary
但该方式的聚焦精度并不稳定,例如当待测目标表面具有高度起伏时,该聚焦方式会导致对整个待测目标的聚焦精度降低,并且由于系统定位精度有限,在时间重复,或对空间重复特征多次检测时,每次光斑打点的相对位置容易发生变化,从而导致聚焦稳定性变差
[0011]In the focusing method provided by this embodiment of the invention, a first image acquisition process is first performed. Within a first preset height region, a first imaging system acquires first images of the target at different first relative height positions. From multiple first images, the image with the highest similarity to a standard image of a reference region is selected. The relative height corresponding to the selected first image is used as an initial reference height. A reference height is then obtained based on the initial reference height and the positional relationship between the reference region and the target region along the focusing direction. A second image acquisition process is then performed based on the reference height. Within a second preset height region near the reference height, the first imaging system acquires images of the target at different second relative height positions. The second image of the test area is obtained, and the image with the highest focus parameter in the test area is selected from multiple second images. The selected second image is used to obtain a focused image, and the shooting height corresponding to the focused image is used as the focus height. In this embodiment of the invention, the target to be tested is imaged multiple times at different first relative height positions. After obtaining the reference height using the first image that is closest to the standard image of the reference area, since the reference height is already closer to the focus height of the target to be tested, it is easy to obtain an accurate focus height by imaging the target to be tested multiple times at different second relative heights near the reference height. This also reduces the number of images to be processed in the second image acquisition, thereby improving both focusing accuracy and focusing speed.
Smart Images

Figure CN116413002B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical detection technology, and in particular to a focusing method, system, device and storage medium for a target to be measured. Background Technology
[0002] In high-precision optical inspection, high-magnification magnifying glasses have a small depth of field. To improve imaging accuracy, the target under test needs to be focused with high precision. The accuracy of focusing often directly affects the inspection accuracy. For example, in the measurement of overlay error, even a difference of only tens of nanometers at different heights will result in differences in the measured overlay error. On the other hand, focusing speed directly affects the measurement efficiency; excessively long focusing time will lead to lower measurement efficiency.
[0003] Existing laser autofocus modules offer advantages for rapid and accurate focusing. However, these modules typically employ single-point focusing, meaning they project a laser beam onto a specific point in the field of view and then adjust the relative height of the intensity signal from that single point to focus on the entire target. This method suffers from unstable focusing accuracy. For example, when the target surface has significant elevation variations, this focusing method reduces the overall focusing accuracy. Furthermore, due to limited system positioning accuracy, the relative position of the laser beam can easily change during repeated time or spatial feature detections, leading to decreased focusing stability.
[0004] Therefore, both the accuracy and speed of focusing need to be improved. Summary of the Invention
[0005] The problem solved by the embodiments of the present invention is to provide a focusing method, system, device and storage medium for a target under test, which is beneficial to improving focusing accuracy and focusing speed.
[0006] To address the aforementioned problems, this invention provides a focusing method for a target to be tested. The target to be tested includes a reference area and a test area. The focusing method includes: performing a first image acquisition process, which includes: along the focusing direction, within a first relative height region between a first imaging system and the target to be tested, acquiring first images of the target to be tested at different first relative height positions using the first imaging system; selecting the image with the highest similarity to a standard image of the reference area from multiple first images, and using the relative height corresponding to the selected first image as an initial reference height, and further adjusting the focusing method based on the initial reference height and the relative height of the reference area and the test area of the target to be tested. The positional relationship of the area to be tested along the focusing direction is used to obtain a reference height; a second image acquisition process is performed, which includes: along the focusing direction, when the second relative height between the first imaging system and the target to be tested is within a second preset height region, acquiring second images of the area to be tested in the target to be tested at different second relative height positions through the first imaging system, and the reference height being within the second preset height region; selecting the image with the highest focus parameter in the area to be tested from multiple second images, and obtaining a focused image using the selected second image, and the second relative height corresponding to the focused image is used as the focus height, and the focus parameter is used to characterize the focus quality.
[0007] Accordingly, this embodiment of the invention also provides a focusing system for a target to be tested. The target to be tested includes a reference area and a target area. The focusing system includes: a first image acquisition module, used to perform a first image acquisition process, the first image acquisition process including: along the focusing direction, within a first relative height region between a first imaging system and the target to be tested, acquiring first images of the target to be tested at different first relative height positions through the first imaging system; and a first filtering module, used to select the image with the highest similarity to a standard image of the reference area from multiple first images, and take the relative height corresponding to the selected first image as an initial reference height, and according to the initial reference height and the reference area and target area of the target to be tested... The system obtains a reference height by assessing the positional relationship of the test area along the focusing direction; a second image acquisition module performs second image acquisition processing, which includes: along the focusing direction, when the second relative height between the first imaging system and the target to be tested is within a second preset height region, acquiring second images of the test area in the target to be tested at different second relative height positions through the first imaging system, and the reference height is located within the second preset height region; a second filtering module selects the image with the highest focus parameter in the test area from multiple second images, and obtains a focused image using the selected second image, wherein the second relative height corresponding to the focused image is used as the focus height, and the focus parameter is used to characterize the focus quality.
[0008] Accordingly, embodiments of the present invention also provide an apparatus including at least one memory and at least one processor, wherein the memory stores one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the focusing method described in the embodiments of the present invention.
[0009] Accordingly, embodiments of the present invention also provide a storage medium storing one or more computer instructions, the one or more computer instructions being used to implement the focusing method described in the embodiments of the present invention.
[0010] Compared with the prior art, the technical solution of the embodiments of the present invention has the following advantages:
[0011] In the focusing method provided by this embodiment of the invention, a first image acquisition process is first performed. Within a first preset height region, a first imaging system acquires first images of the target at different first relative height positions. From multiple first images, the image with the highest similarity to a standard image of a reference region is selected. The relative height corresponding to the selected first image is used as an initial reference height. A reference height is then obtained based on the initial reference height and the positional relationship between the reference region and the target region along the focusing direction. A second image acquisition process is then performed based on the reference height. Within a second preset height region near the reference height, the first imaging system acquires images of the target at different second relative height positions. The second image of the test area is obtained, and the image with the highest focus parameter in the test area is selected from multiple second images. The selected second image is used to obtain a focused image, and the shooting height corresponding to the focused image is used as the focus height. In this embodiment of the invention, the target to be tested is imaged multiple times at different first relative height positions. After obtaining the reference height using the first image that is closest to the standard image of the reference area, since the reference height is already closer to the focus height of the target to be tested, it is easy to obtain an accurate focus height by imaging the target to be tested multiple times at different second relative heights near the reference height. This also reduces the number of images to be processed in the second image acquisition, thereby improving both focusing accuracy and focusing speed.
[0012] In an optional embodiment, the first image acquisition process includes: adjusting the first relative height between the first imaging system and the target under test within a first preset height region by a first step length; the second image acquisition process includes: adjusting the second relative height between the first imaging system and the target under test within a second preset height region by a second step length, wherein the second step length is less than the first step length. Therefore, based on the comparison result with a standard image, after obtaining a reference height, the embodiment of the present invention uses a smaller second step length for the second image acquisition process, thereby enabling more accurate acquisition of the focusing height near the reference height, further improving the accuracy of the acquired focusing height, and thus further improving the focusing precision. Moreover, the first image acquisition process uses a fixed first step length for multiple imaging operations, and the second image acquisition process uses a fixed second step length for multiple imaging operations, thereby simplifying the complexity of the focusing method. Attached Figure Description
[0013] Figure 1 This is a flowchart of an embodiment of the focusing method for the target under test of the present invention;
[0014] Figure 2 This is a top view of an embodiment of the target to be tested according to the present invention;
[0015] Figure 3 yes Figure 1 In step S5, a schematic diagram of an embodiment of the standard image is shown;
[0016] Figure 4 yes Figure 1 In step S3, a schematic diagram of an embodiment of the second image obtained with different targets as the focus objects;
[0017] Figure 5 yes Figure 1 In step S4, a schematic diagram of an embodiment of selecting the area to be tested is shown;
[0018] Figure 6 yes Figure 1 In step S4, a schematic diagram of an embodiment of the image of interest and a schematic diagram of the corresponding one-dimensional projection data are provided.
[0019] Figure 7 yes Figure 1 In another embodiment of step S4, a fitted curve of contrast score versus second relative height;
[0020] Figure 8 This is a functional block diagram of an embodiment of the object focusing system of the present invention;
[0021] Figure 9 This is a hardware structure diagram of a device provided in an embodiment of the present invention. Detailed Implementation
[0022] As can be seen from the background technology, it is difficult to improve the focusing speed while ensuring focusing accuracy in current focusing methods.
[0023] To address the aforementioned technical problem, embodiments of the present invention provide a focusing method for a target to be measured. (See reference...) Figure 1 The diagram illustrates a flowchart of an embodiment of the focusing method for a target under test according to the present invention. The target under test includes a reference area and a test area. The focusing method described in this embodiment includes the following basic steps:
[0024] Step S1: Perform first image acquisition processing, which includes: along the focusing direction, within a first preset height region where the first relative height between the first imaging system and the target under test is within the first imaging system, acquiring first images of the target under test at different first relative height positions through the first imaging system;
[0025] Step S2: Select the image with the highest similarity to the standard image of the reference area from multiple first images, and take the first relative height corresponding to the selected first image as the initial reference height, and obtain the reference height according to the initial reference height and the positional relationship between the reference area and the area to be tested of the target along the focusing direction;
[0026] Step S3: Perform second image acquisition processing, which includes: along the focusing direction, when the second relative height between the first imaging system and the target to be tested is within a second preset height region, acquire second images of the target to be tested area at different second relative height positions through the first imaging system, and the reference height is within the second preset height region;
[0027] Step S4: Select the image with the highest focus parameter in the test area from multiple second images, and obtain a focused image using the selected second image. The second relative height corresponding to the focused image is used as the focus height. The focus parameter is used to characterize the focus quality.
[0028] In this embodiment of the invention, after performing the first image acquisition process, the image with the highest similarity to the standard image of the reference area is selected from multiple first images. A reference height is obtained using the first relative height corresponding to the selected first image. Then, based on the reference height, a second image acquisition process is performed to acquire second images at different second relative height positions within a second preset height region near the reference height. The image with the highest focus parameter in the test area is selected from multiple second images, and a focused image is obtained using the selected second image. The shooting height corresponding to the focused image is used as the focus height. This embodiment of the invention obtains a reference height by imaging the target under test multiple times at different first relative height positions. Since this reference height is already closer to the focus height of the target under test, it is easy to obtain an accurate focus height by imaging the target under test multiple times at different second relative heights near the reference height. This also reduces the number of images processed in the second image acquisition process, thereby improving both focusing accuracy and focusing speed simultaneously.
[0029] 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.
[0030] Reference Figures 1 to 3 , Figure 2 This is a top view of one embodiment of the target under test. Figure 3 This is a schematic diagram of an embodiment of a standard image. Step S5 is executed to obtain a standard image 200 of the reference area (not shown) of the target to be tested 100.
[0031] First, a standard image 200 of the reference area of the target 100 is acquired to prepare for selecting the image with the highest similarity to the standard image of the reference area from multiple first images. The standard image 200 is a high-quality image. Accordingly, after imaging the target 100 to obtain the first image, the standard image 200 is used as a benchmark for evaluating multiple first images, so as to select the image with the highest similarity to the standard image 200 of the reference area from multiple first images.
[0032] In this embodiment, the target under test 100 is formed on the object under test, which can be a wafer or a chip. Specifically, the target under test 100 includes a multilayer target pattern 150 (e.g., Figure 2 As shown), the multi-layer target pattern 150 has different heights along the focusing direction. Here, the multi-layer target pattern 150 having different heights along the focusing direction means that the multi-layer target pattern 150 is located at different height positions on the object under test along the focusing direction, that is, the multi-layer target pattern 150 is located on the same object under test, and along the normal direction of the surface of the object under test, the multi-layer target pattern 150 is located in different layers in space.
[0033] It should be noted that when the multi-layer target pattern 150 has different heights along the focusing direction, after acquiring the image of the target 100 to be tested, the focusing heights of the target patterns 150 located in different layers of the same image will be different. This places higher demands on the focusing method to ensure the focusing accuracy of a specific layer of target pattern.
[0034] As an example, the target under test 100 is a mark pattern. Specifically, the target under test 100 is an overlay mark pattern, which is spatially located on different layers of a wafer or chip. Figure 2 As shown, as an example, the target to be tested 100 includes two layers of target graphics 150, that is, the multi-layer target graphics 150 includes a first target graphic 110 and a second target graphic 120, and the first target graphic 110 and the second target graphic 120 have different heights along the focusing direction.
[0035] It should be noted that the first target graphic 110 and the second target graphic 120 can be two adjacent layers of target graphics, or they can be separated by one or more other graphics. In other embodiments, the target to be tested may also contain more layers of target graphics. It is understood that the standard image 200 is an image that simultaneously contains multiple layers of target graphics.
[0036] In this embodiment, the example is that the height of the second target graphic 120 is greater than the height of the first target graphic 110.
[0037] As an example, the target to be tested 100 includes multiple bar-shaped target graphics 150.
[0038] Reference Figure 2 Taking the target under test 100 as an example of an overlay marking pattern, the inner marking pattern (i.e., inner bar) and the outer marking pattern (i.e., outer bar) in the target under test 100 are located in different layers in space. That is, there is a height difference between the second target pattern 120 and the first target pattern 110, and their corresponding focusing heights also differ accordingly (for example, the focusing heights differ by about 2 micrometers). Accordingly, one of the inner marking pattern and the outer marking pattern is used as the first target pattern 110, and the other is used as the second target pattern 120. For example, in this embodiment, the inner marking pattern is the second target pattern 120, the outer marking pattern is the first target pattern 110, and the projection of the second target pattern 120 onto the layer where the first target pattern 110 is located is located inside the first target pattern 110.
[0039] In this embodiment, the target to be tested includes a reference area (not shown) and a test area 150R. Specifically, the target pattern 150 in the target to be tested 100 has a test area 150R.
[0040] The reference area is the focus region for subsequent first image acquisition processing; correspondingly, the image in the reference area is the focus object during the first image acquisition processing. The test area is the focus region for subsequent second image acquisition processing; correspondingly, the image in the test area is the focus object during the second image acquisition processing. Specifically, the reference area is the region for subsequent image matching with the standard image 200; the test area 150R, also known as the region of interest, is the region used to extract focus parameters.
[0041] Correspondingly, the reference area and the area to be measured 150R can be located on the same horizontal plane or at different heights.
[0042] In this embodiment, the second target graphic 120 has a test area 150R, and the first target graphic 110 has a reference area, as an example. In other embodiments, the first target graphic may have a test area, and the second target graphic may have a reference area. In other embodiments, the second target graphic may have both a test area and a reference area; or, the first target graphic may have both a test area and a reference area.
[0043] The standard image 200 can be an image of a reference area obtained at the focus height of one layer of the target graphic; or, the standard image 200 can be an image of a reference area obtained at a common focus height of multiple layers of target graphics, where the common focus height includes the average, median, or weighted value of the focus heights of the multiple layers of target graphics.
[0044] As an example, the standard image 200 can be a high-quality image calculated through a theoretical model. Specifically, obtaining the standard image 200 corresponding to the target 100 includes: providing a theoretical model of the interaction between the sample and light, the theoretical model representing the relationship between the intensity distribution of the emitted light after the light interacts with the sample and the physical parameters of the sample; substituting the physical parameters of the reference area into the theoretical model to obtain a simulated image, which serves as the standard image 200.
[0045] In other embodiments, the same sample as the reference area can be used in advance to acquire images of the sample at different fourth relative heights using a second imaging system different from the first imaging system, and the image when the sample is in focus can be selected as the standard image.
[0046] In other embodiments, a third imaging system with autofocus can be used to obtain the autofocus height of the reference area of the target under test, and the image of the reference area of the target under test at the autofocus height can be used as a standard image. When obtaining the standard image, a third imaging system with high focusing stability is selected; for example, an interferometric system can be used. It should be noted that since the third imaging system is only used to obtain the standard image, only one standard image needs to be obtained for the same target under test, thus having a relatively small impact on focusing costs.
[0047] like Figure 3 As shown, in this embodiment, the second target pattern 120 has a test area 150R, and the first target pattern 110 has a reference area. Therefore, the standard image 200 is an image of the reference area obtained at the focusing height of the first target pattern 110.
[0048] Accordingly, the standard image 200 includes an image 210 corresponding to the first target image 110 and an image 220 corresponding to the second target image 120.
[0049] Step S1 is executed to perform a first image acquisition process, which includes: along the focusing direction, within a first preset height region where the first relative height between the first imaging system and the target under test is within the first imaging system, acquiring first images of the target under test at different first relative height positions (not shown in the figure).
[0050] Data is collected by taking pictures at different first relative height positions within a first preset height area, so that the image with the highest similarity to the standard image of the reference area can be selected from the first image to obtain the reference height.
[0051] It should be noted that each of the first images contains an image of the multi-layered target graphic 150. That is, when a first image is captured, the multi-layered target graphic 150 is captured simultaneously, meaning that the images of the multi-layered target graphic 150 are displayed in the same first image.
[0052] Specifically, the first image acquisition process includes: within a first preset height region, adjusting the first relative height between the first imaging system and the target 100 to be measured by a step length, thereby acquiring first images of the target 100 at different first relative height positions.
[0053] The first preset height region is the relative height range along the focusing direction, which refers to the direction perpendicular to the top surface of the target 100. The first image acquisition process uses a fixed first step length to perform multiple imaging operations, thereby regularly changing the relative height between the first imaging system and the target 100, which helps to simplify the complexity of the focusing method.
[0054] With a fixed first preset height region, the first step length determines the number of first images acquired; a larger first step length results in fewer first images. Subsequently, the image with the highest similarity to the standard image 200 in the reference area needs to be selected from multiple first images. If the number of first images is too small, the sampling amount for first image acquisition processing may be insufficient. Even after selecting the first image with the highest similarity to the standard image 200 in the reference area, the selected first image may still differ significantly from the standard image 200, resulting in poor quality of the second image acquired in subsequent second image acquisition processing. This affects the accuracy of the focus height, leading to a decrease in focus precision. Consequently, more time is needed for adjustment to obtain an accurate focus height, thus affecting the focus rate. However, if the first step length is too small, a larger number of first images need to be captured, resulting in excessively long first image acquisition processing time and reduced focus speed. Therefore, in this embodiment, to improve both focus precision and focus speed, the first step length is between 0.5 micrometers and 1 micrometer.
[0055] Similarly, the number of first images should not be too few or too many. If the number of first images is too few, it will easily lead to insufficient sampling for the first image acquisition and processing; if the number of first images is too many, it will lead to excessively long processing time for the second image acquisition. Therefore, in this embodiment, the number of first images is 20 to 30.
[0056] It should be noted that during the actual shooting process, the first step length and the number of first images are reasonably set and coordinated with each other to balance focusing accuracy and focusing speed, and to overcome the influence of the surface height difference of the target to be tested. In other words, the first preset height area can cover the height difference between the second target image 120 and the first target image 110.
[0057] In this embodiment, the first image acquisition process includes: triggering and controlling the acquisition signal of the first imaging system through hard triggering, acquiring images in an asynchronous manner, and performing image processing using a GPU (Graphics Processing Unit).
[0058] The triggering method of the acquisition signal affects the acquisition frame rate of the first imaging system. By using a hard trigger to control the acquisition signal of the first imaging system, hard synchronization is achieved, which helps to reduce the time required for image acquisition. Moreover, by using asynchronous acquisition, image acquisition and image processing are performed asynchronously. That is, image processing can be performed while acquiring the next frame. Therefore, after acquiring one image, the next image can be acquired immediately, and the image acquisition speed is not affected by the image processing speed. In addition, GPU is used for image processing to improve the image processing speed. Combining the above aspects, this embodiment uses hardware-triggered high-speed movement of the piezoelectric load, high-frame-rate camera acquisition, and high-performance graphics card computing operators for asynchronous processing, which significantly reduces the time spent on multiple image acquisitions and image processing (for example, single-point focusing only takes about 1 second). This enables stable focusing with high precision and high efficiency at the same time. Moreover, it can focus on specific parts of the test object with varying surface heights as needed (for example, when a first target image and a second target image of different heights are formed on the test object, the second target image is used as the focus object).
[0059] In this embodiment, in order to reduce the complexity of the first image acquisition process, the first image acquisition process includes: determining the maximum first relative height position and the minimum first relative height position of the first preset height region; taking the maximum or minimum first relative height position of the first preset height region as the starting shooting position, and taking pictures at different first relative height positions within the first preset height region along the focusing direction to obtain the corresponding first image.
[0060] It should be noted that there are no restrictions on the steps S1 and S5. Depending on the actual situation, a standard image can be obtained first, or the first image acquisition and processing can be performed first.
[0061] Continue to refer to Figure 1In step S2, the image with the highest similarity to the standard image 200 of the reference area is selected from multiple first images, and the first relative height corresponding to the selected first image is used as the initial reference height. Based on the initial reference height and the reference area and the test area 150R of the target 100 (e.g., ...), the image is then used as the initial reference height. Figure 2 (As shown) Obtain the reference height by the positional relationship along the focusing direction.
[0062] The standard image 200 is a high-quality image. Therefore, after selecting the image with the highest similarity to the standard image 200 in the reference area from multiple first images, the reference height can be regarded as being close to its focal height, which facilitates multiple imaging operations near the reference height to obtain the final focal height.
[0063] In this embodiment, selecting the image with the highest similarity to the standard image 200 of the reference area from multiple first images includes: performing matching processing between the standard image 200 of the reference area and each first image to obtain the similarity of each first image; and selecting the first image with the highest similarity.
[0064] The matching process includes: using a matching window of the same size as the standard image 200, traversing every pixel of the first image, calculating the correlation score between the region where the matching window is located in the first image and the standard image 200 in the reference region, and obtaining the maximum value of the correlation score between the first image and the standard image 200 in the reference region as the similarity. The correlation score is negatively correlated with the variance and standard deviation of the gray levels of each pixel in the matching window and the standard image 200 in the reference region. Accordingly, in each first image, the region with the highest similarity to the standard image in the reference region is taken as the matching region.
[0065] As an example, for each first image, a matching window of the same size as the standard image 200 is selected in the first image; the matching window is slid in the first image according to a preset sliding direction, and after each slide, the correlation score between the standard image 200 of the reference area and the area where the current matching window is located is calculated, thereby obtaining multiple correlation scores; the area where the matching window corresponding to the maximum correlation score is located is selected as the matching area that matches the standard image 200.
[0066] For example, the matching window can be slid from the top left corner of the first image to the right, with each slide being the size of one column of pixels. After reaching the far right, it slides down by the size of one row of pixels, then starts sliding from the far left of the first image to the left, and so on, until the matching window has traversed every pixel of the first image. It should be noted that the greater the similarity, the smaller the variance and standard deviation of the pixel grayscale values between the matching region and the standard image 200. Therefore, the correlation score is negatively correlated with the variance and standard deviation of the grayscale values of the matching window and the standard image 200.
[0067] Methods for calculating the correlation score between the matching window region in the first image and the standard image of the reference region include Mean Absolute Differences (MAD), Sum of Absolute Differences (SAD), Sum of Squared Differences (SSD), Mean Square Differences (MSD), Normalized Cross Correlation (NCC), Sequential Similarity Detection Algorithm (SSDA), or Hadamard Transform.
[0068] In this embodiment, a normalized cross-correlation algorithm is used to calculate the correlation score with the standard image 200 of the reference region. Specifically, the formula for the normalized cross-correlation algorithm is:
[0069]
[0070] Where I1 is the standard image, I2 is the first image, and Wp is the matching window, which is the range of the standard image (e.g., for...). Figure 3 (As shown in the image), the NCC value ranges between [-1, 1].
[0071] In this embodiment, during the process of selecting the image with the highest similarity to the standard image 200 in the reference area from multiple first images, the center position of the target 100 to be tested is also determined based on the standard image. Specifically, the center of the standard image 200 is mapped to the matching area to obtain the center position of the image of the target 100 to be tested.
[0072] In this embodiment, the height of the second target graphic 120 is greater than the height of the first target graphic 110, and the absolute value of the height difference between the second target graphic 120 and the first target graphic 110 is used as a preset height offset. Correspondingly, when the second target graphic 120 has a test area 150R and the first target graphic 110 has a reference area, obtaining the reference height based on the initial reference height and the positional relationship between the reference area and the test area along the focusing direction includes: adding the preset height offset to the initial reference height to obtain the height as the reference height.
[0073] Since there is a height difference between the second target image 120 and the first target image 110, when performing the second image acquisition process, if the focus object needs to be changed, a preset height offset needs to be added to the initial reference height to obtain the reference height.
[0074] In other embodiments, the first target graphic has a test area and the second target graphic has a reference area; correspondingly, the standard image is an image of the reference area obtained at the focusing height of the second target graphic; obtaining the reference height based on the initial reference height and the positional relationship between the reference area and the test area along the focusing direction of the target includes: subtracting a preset height offset from the initial reference height as the reference height.
[0075] In other embodiments, the second target image has a test area and a reference area, or the first target image has a test area and a reference area, and the distance between the test area and the reference area along the focusing direction is zero; correspondingly, the standard image is an image of the reference area obtained at the focusing height of the reference area; obtaining the reference height based on the initial reference height and the positional relationship between the reference area and the test area of the target along the focusing direction includes: using the initial reference height as the reference height.
[0076] Continue to refer to Figure 1 Before obtaining the reference height based on the initial reference height and the positional relationship between the reference area and the test area 150R of the target 100 along the focusing direction, the method further includes: executing step S21 to obtain the sorting result of the multiple first images according to the size order of the first relative height, and determining whether the sorting value of the first image with the highest similarity to the standard image 200 of the reference area is within a first preset sorting interval. The first preset sorting interval has a first boundary value and a second boundary value. The first relative height corresponding to the first boundary value is less than the first relative height corresponding to the second boundary value, and the first boundary value is greater than or equal to the minimum sorting value of the first image, and the second boundary value is less than or equal to the maximum sorting value of the first image.
[0077] By determining whether the ranking value of the first image with the highest similarity to the standard image 200 in the reference area is within the first preset ranking interval, the currently selected first image is checked, which helps to ensure the accuracy of the reference height.
[0078] Specifically, if the ranking value of the first image with the highest similarity to the standard image of the reference area is not within the first preset ranking interval, it means that the first relative height corresponding to the currently selected first image is too high or too low within the first preset height area corresponding to the first image acquisition process completed at the moment. Therefore, there is a possibility that the selected first image does not have the highest similarity to the standard image of the reference area. In this case, it is necessary to widen the shooting height range to obtain more images, thereby determining the image with the highest similarity to the standard image 200 of the reference area.
[0079] In this embodiment, if the sorting value of the first image with the highest similarity to the standard image 200 of the reference area is within the first preset sorting interval, the first relative height corresponding to the first image with the highest similarity to the standard image 200 of the reference area is taken as the initial reference height.
[0080] Correspondingly, if the ranking value of the first image with the highest similarity to the standard image of the reference area is less than or equal to the first boundary value, step S22 is executed to perform region shifting processing on the first preset height region along the focusing direction to reduce the first relative height corresponding to the first preset height region. If the ranking value of the first image with the highest similarity to the standard image of the reference area is greater than or equal to the second boundary value, region shifting processing on the first preset height region along the focusing direction is executed to increase the first relative height corresponding to the first preset height region. Based on the first preset height region after the region shifting processing, the first image acquisition processing is returned to be executed.
[0081] Based on the foregoing analysis, when the ranking value of the first image with the highest similarity to the standard image 200 in the reference area is not within the first preset ranking interval, it is necessary to perform the first image acquisition process again to acquire more first images, thereby obtaining the image with the highest similarity to the standard image 200 in the reference area through iteration.
[0082] In this embodiment, the first preset height regions before and after the region shifting process are connected. These first preset height regions before and after the region shifting process are the same as the first preset height regions corresponding to two adjacent first image acquisition processes. Since the first image has already been collected within the corresponding first preset height region in the previous first image acquisition process, connecting these regions helps avoid repeatedly acquiring the same image and allows for the acquisition of more information in the subsequent first image acquisition process, thus avoiding resource waste and improving focusing speed. In other embodiments, depending on actual needs, the first preset height regions before and after the region shifting process can also partially overlap. For example, by making the difference between the first preset height regions before and after the region shifting process an odd multiple of half a step length, a first image with a different first relative height than the previous first image acquisition process can be obtained.
[0083] If the value of the first boundary is too large, it may lead to overly stringent judgment criteria, thereby increasing the number of unnecessary first image acquisition and processing operations, resulting in wasted resources and reduced focusing speed. Therefore, in this embodiment, the value of the first boundary is any integer from 1 to 4.
[0084] For reasons similar to those mentioned above, the absolute value of the difference between the second boundary value and the number of first images corresponding to the current first image acquisition and processing is any integer from 0 to 4.
[0085] In one specific embodiment, the first boundary value is 1, and the absolute value of the difference between the second boundary value and the number of first images corresponding to the current first image acquisition process is 0. For example, in the first image acquisition process, if the number of first images is 50, then when the selected first image is the image with the lowest first relative height, the first preset height region is moved along the direction of decreasing first relative height, and the first image processing is performed again based on the first preset height region after the region moving process; or when the selected first image is the image with the highest first relative height, the first preset height region is moved along the direction of increasing first relative height, and the first image processing is performed again based on the first preset height region after the region moving process.
[0086] It should be noted that in other embodiments, steps S21 and S22 may be omitted depending on actual needs (e.g., cost or time considerations).
[0087] In this embodiment, before performing the second image acquisition process, the focusing method further includes: executing step S23, adjusting the relative position of the target 100 and the first imaging system in the horizontal direction, so that the center position of the target 100 is located at the field of view center of the first imaging system.
[0088] After focusing the target 100, further processing (e.g., detection or measurement) is required. The relative position of the center of the target 100 to the center of the field of view of the first imaging system will affect the image acquired during the process (e.g., when the center of the target is too close to the edge of the field of view of the first imaging system, it is easy to cause image distortion). Therefore, the focusing process is used to make the center of the target 100 located at the center of the field of view of the first imaging system, which facilitates the subsequent process processing.
[0089] Specifically, during the focusing process, the center position of the target 100 is first located at the center of the field of view of the first imaging system. After focusing is completed, the corresponding detection or measurement processing can be performed directly without adjusting the relative position of the target 100 and the imaging system in the horizontal direction. This avoids affecting the relative height of the target 100 and the imaging system due to readjusting their relative positions in the horizontal direction. In other words, it helps to ensure that the height of the target 100 is at the focusing height during subsequent detection or measurement processing.
[0090] Reference Figure 1 and Figure 4 , Figure 4 This is a schematic diagram of an embodiment of obtaining a second image using different targets as the focus object. Step S3 is executed to perform second image acquisition processing. The second image acquisition processing includes: along the focusing direction, when the second relative height between the first imaging system and the target 100 is within a second preset height area, acquiring a second image 300 of the test area 150R in the target 100 at different second relative height positions through the first imaging system, and the reference height is within the second preset height area.
[0091] Second images 300 of the target 100 at different second relative height positions are acquired within a second preset height region near the reference height. This allows for the subsequent selection of the image with the highest focus parameter in the target area from multiple second images 300. The selected second image is then used to obtain a focused image, and the shooting height corresponding to the focused image is taken as the focus height. Therefore, by performing multiple imaging operations at different first relative height positions to obtain the reference height, since this reference height is already closer to the focus height of the target 100, it is easy to obtain an accurate focus height by performing multiple imaging operations at different second relative heights near the reference height. This also reduces the number of second images 300 that need to be acquired and processed, thereby improving both focusing accuracy and focusing speed simultaneously.
[0092] It should be noted that each second image 300 contains images of multiple target graphics 150. That is, when a second image 300 is captured, multiple target graphics 150 are captured simultaneously, meaning that images of multiple target graphics 150 are displayed in the same second image 300.
[0093] Specifically, the second image acquisition process includes: within a second preset height region, adjusting the relative height between the first imaging system and the target 100 under test with a second step size, wherein the second step size is smaller than the first step size. The second preset height region is the longitudinal relative height range along the focusing direction. The second image acquisition process uses a fixed second step size for multiple imaging operations, thereby enabling a regular change in the shooting height and simplifying the complexity of the focusing method. Furthermore, compared to the first image acquisition process, the second image acquisition process uses a smaller second step size to capture images of the target 100 under test at different second relative height positions; that is, the relative height change between adjacent shots is smaller, thus enabling more accurate acquisition of the second image 300 near the reference height, further improving focusing accuracy.
[0094] In this embodiment, the product of the second step length and the number of second images 300 is greater than or equal to the first step length. The product of the second step length and the number of second images 300 is the second preset height region. By making the height variation of the second preset height region greater than the first step length, the relative height difference between two adjacent first images in the first image acquisition process is covered, thereby acquiring as many second images 300 as possible. Consequently, when selecting the second image 300 with the highest focus parameter in the 150R test area from multiple second images 300, the probability of not acquiring the second image 300 with the highest focus parameter in the 150R test area is reduced, thus improving the quality of the selected second images. Alternatively, if the product of the second step length and the number of second images 300 is equal to the first step length, the smaller second step length also facilitates obtaining more second images with a smaller relative height variation.
[0095] Specifically, the product of the second step length and the number of second images 300 is greater than or equal to twice the first step length. Correspondingly, the height change of the second preset height region covers the sum of the relative height differences between the first image corresponding to the initial reference height and the two adjacent first images, thereby further reducing the probability of not acquiring the second image with the highest 150R focus parameter in the test area, and thus improving the quality of the selected second image.
[0096] For example, in a first image acquisition process, there are 50 first images, which are sorted according to the first relative height. The first image corresponding to the initial reference height is the 9th image out of the 50 images. However, the actual focus height may be located at the height position between the 9th and 10th first images, or it may be located at the height position between the 9th and 8th first images. Therefore, by making the product of the second step size and the number of second images 300 greater than or equal to twice the first step size, the probability of not acquiring the second image with the highest focus parameter of 150R in the test area is further reduced.
[0097] In this context, with a fixed second preset height region, the second step size determines the number of second images 300 acquired. A larger second step size results in fewer second images 300. Subsequently, the image with the highest focus parameter in the 150R region of the test area needs to be selected from the multiple second images 300, and the focused image is obtained using the selected second image 300. If the number of second images 300 is too small, the sampling amount for second image acquisition and processing may be insufficient. Even after selecting the image with the highest focus parameter in the 150R region of the test area from multiple second images 300, the second relative height corresponding to the selected second image 300 may still differ from the optimal focus height, thus affecting the accuracy of the focus height and leading to a decrease in focus precision. Consequently, more time is needed for adjustment to obtain an accurate focus height, thus affecting the focusing speed. However, if the second step size is too small, a larger number of second images 300 need to be captured, resulting in excessively long second image acquisition and processing time, thereby reducing the focusing speed. In summary, in this embodiment, in order to improve both focusing accuracy and focusing speed, the second step length is 30 nanometers to 80 nanometers.
[0098] Similarly, the number of second images 300 should not be too few or too many. If the number of second images 300 is too few, it will easily lead to insufficient sampling for the acquisition and processing of second images 300; if the number of second images 300 is too many, it will lead to excessively long acquisition and processing time for second images 300. Therefore, in this embodiment, the number of second images 300 is 10 to 20. It should be noted that in the actual shooting process, the second step size and the number of second images 300 should be reasonably set and coordinated to balance focusing accuracy and focusing speed.
[0099] In this embodiment, the second image acquisition process includes: triggering and controlling the acquisition signal of the first imaging system via hard triggering, acquiring images asynchronously, and performing image processing using a GPU. For an analysis of the reasons for the hard triggering method, the asynchronous acquisition method, and the use of a GPU for image processing, please refer to the aforementioned description in the first image acquisition process; it will not be repeated here.
[0100] In this embodiment, in order to reduce the complexity of the second image acquisition process, the second image acquisition process includes: determining the maximum second relative height position and the minimum second relative height position of the second preset height region; taking the maximum second relative height position or the minimum second relative height position of the second preset height region as the starting shooting position, and taking pictures at different second relative height positions within the second preset height region along the focusing direction to obtain the corresponding second image 300.
[0101] When performing the second image acquisition process, the second target image 120 can be used as the focus object, or the first target image 110 can be used as the focus object. For example, Figure 4 (a) shows a second image 300 after the second target graphic 120 has been focused. Figure 4 (b) shows a second image 300 after the first target graphic 110 is in focus.
[0102] In this embodiment, the second target graphic 120 has a test area 150R and the first target graphic 110 has a reference area as an example. Therefore, the second target graphic 120 is used as the focus object.
[0103] In some other embodiments, the first target graphic has a test area and the second target graphic has a reference area, then the second image acquisition process uses the first target graphic as the focus object.
[0104] In other embodiments, the second target image has a test area and a reference area, or the first target image has a test area and a reference area. Correspondingly, the focus objects of the first image acquisition process and the second image acquisition process are the same. Fixing a single focus object helps reduce the complexity of the focusing method and avoids errors caused by changing the focus object.
[0105] The reference height is located within the second preset height area. That is, along the focusing direction, within a preset range above and below the reference height, multiple second images are captured with a second step size. Here, "above the reference height" refers to a position higher than the reference height, and "below the reference height" refers to a position lower than the reference height.
[0106] In this embodiment, the reference height is located at the middle position of the second preset height region. That is, the height difference between the reference height and the minimum second relative height position of the second preset height region is equal to the height difference between the reference height and the maximum second relative height position of the second preset height region. Regions above and below the reference height have the same sampling opportunity, which helps to reduce the probability of not capturing the second image with the highest focus parameter in the test area, thereby improving the quality of the selected second image.
[0107] Continue to refer to Figure 1 Step S4 is executed, selecting the image with the highest focus parameter in the test area 150R from multiple second images 300, and using the selected second image to obtain a focused image, and the second relative height corresponding to the focused image is used as the focus height.
[0108] As can be seen from the foregoing analysis, after obtaining the reference height closest to the standard image of the reference area, the reference height obtained by the selected first image is already closer to the focus height of the target under test than the first relative height of other first images. Therefore, it is easy to obtain the image with the highest 150R focus parameter in the target area by performing a second image acquisition process near the reference height, thereby improving the focusing accuracy.
[0109] The focus parameter is used to characterize focus quality. A better focus parameter indicates better focus quality and a smaller focus shift, thus preparing for subsequent processing. The focus parameter includes image sharpness, image contrast, image clarity, image center distance, image curvature, image autocorrelation, or the Gaussian derivative of the image. In this embodiment, image contrast is used as an example; higher image contrast indicates better focus quality.
[0110] In this embodiment, obtaining a focused image using the selected second image includes: selecting the second image with the highest focus parameter from multiple second images as the focused image.
[0111] In other words, the focused image is one of multiple second images. Since the second step size is small, sufficient accuracy can be obtained. Therefore, selecting the second image with the highest focus parameter as the focused image can meet the requirements for focusing accuracy. Moreover, directly selecting the second image with the highest focus parameter as the focused image allows for the direct acquisition of the focused image and focus height, reducing the complexity of the focusing method.
[0112] In this embodiment, selecting the image with the highest focus parameter in the test area 150R from multiple second images 300 includes: obtaining the focus parameter of the second image.
[0113] Reference Figure 5 , Figure 5 This is a schematic diagram of an embodiment of selecting the test area 150R in step S4. The acquisition of the focus parameters of the second image 300 includes: determining, within the second image 300, the image corresponding to the target graphic 150 of the test area 150R as the evaluation image 310; and, based on the position information of the test area 150R within the target graphic 150, acquiring the image of the test area 150R within the evaluation image 310 as the image of interest 350 (i.e.,...). Figure 5 (Image within the dashed box); The pixel values of one or more pixels in the image of interest 350 along the first direction are added together or averaged to obtain the projection value. The correspondence between each pixel and the projection value in the second direction within the image of interest 350 is obtained to obtain one-dimensional projection data, wherein the second direction is perpendicular to the first direction. The differential energy in the image of interest 350 is obtained using the one-dimensional projection data. The average value of each differential energy in the image of interest 350 is calculated as the focus parameter of the second image 300 in the area to be tested 150R.
[0114] Specifically, in this embodiment, since the second target graphic 120 has a test area 150R and the first target graphic 110 has a reference area, the image corresponding to the second target graphic 120 is used as the image to be evaluated 310.
[0115] It should be noted that since the target 100 includes multiple strip-shaped target patterns 150, pixels in the same row of the image of interest 350 constitute a single row of pixels along the direction perpendicular to the edge contour of the image of interest 350. Multiple single rows of pixels are then repeatedly arranged, thus enabling the acquisition of one-dimensional projection data. For example, in conjunction with a reference... Figure 6 , Figure 6 (a) is a schematic diagram of one embodiment of the image of interest 350. Figure 6 (b) is a schematic diagram of the corresponding one-dimensional projection data. In the schematic diagram of the one-dimensional projection data, the trough positions are the edge contour positions of the image of interest 350.
[0116] It should also be noted that the first direction specifically corresponds to the image of interest 350 for which one-dimensional projection data is to be acquired, and the first direction is parallel to the edge contour extension direction of the image of interest 350 for which one-dimensional projection data is to be acquired.
[0117] In this embodiment, using the image of interest 350 to obtain the focus parameter can effectively filter out noise. Moreover, by acquiring one-dimensional projection data of the image of interest 350, the difference caused by the edge signal of the image of interest 350 is statistically analyzed. Furthermore, by calculating the average value of the difference energy of the image of interest 350, it is beneficial to eliminate or reduce the difference energy caused by noise. In summary, using the average value of the difference energy of the image of interest 350 as the focus parameter is beneficial to suppressing noise while amplifying the edge signal of the image of interest 350, thereby improving the accuracy of the obtained focus parameter.
[0118] In other embodiments, depending on actual needs, the differential energy of the entire second image can be used as the contrast score. In still other embodiments, after obtaining the first focus parameter corresponding to the first target image and the second focus parameter corresponding to the second target image, the average value of the first focus parameter and the second focus parameter can be calculated as the focus parameter of the area to be tested.
[0119] It should be noted that, in other embodiments, depending on actual needs, the following may also be performed: the focus parameter of the second image in the area to be tested is fitted with the corresponding second relative height to obtain a fitting curve of the focus parameter changing with the second relative height between the first imaging system and the target to be tested, wherein the fitting curve is a Gaussian distribution curve; the second relative height corresponding to the peak of the Gaussian distribution curve is selected as the focus height; and the image of the target to be tested at the focus height position is obtained as the focused image.
[0120] For example, in conjunction with reference Figure 7 , Figure 7 This is a fitted curve graph of contrast score and second relative height in one embodiment. The horizontal axis represents the second relative height, and the vertical axis represents the contrast score. The Gaussian distribution curve has a peak value, and the peak value corresponds to a height z0. Therefore, the image taken at the relative height z0 position has the highest contrast score (i.e., the lowest defocus). By fitting the curve, the focus height can be easily obtained from the relative height corresponding to the peak value of the Gaussian distribution curve, which helps to improve the accuracy of the obtained focus height, thereby improving focus precision.
[0121] It is understandable that this focus height is obtained through a Gaussian distribution curve. Therefore, it is necessary to take an additional picture of the target under test at this focus height to obtain an image of the target under test at the focus height position as the focused image.
[0122] It should also be noted that in other embodiments, the image with the highest overall focus parameter can be selected by comparing the overall focus parameters of the second images. For example, the variance of all pixels in the second image can be calculated as the focus parameter. The larger the variance, the better the focus.
[0123] In this embodiment, after obtaining the focused image, the focusing method further includes: executing step S41, obtaining the sorting result of the focused image in multiple second images 300 according to the size order of the second relative height, and determining whether the sorting value of the focused image is within a second preset sorting interval. The second preset sorting interval has a third boundary value and a fourth boundary value. The second relative height corresponding to the third boundary value is less than the second relative height corresponding to the fourth boundary value, and the third boundary value is greater than or equal to the minimum sorting value of the second image, and the fourth boundary value is less than or equal to the maximum sorting value of the second image.
[0124] In theory, once the focus height is acquired, if it is the true focus height, then based on this focus height, increasing or decreasing the relative height between the imaging system and the target will result in a deterioration in the corresponding focus parameters of the image. Furthermore, if the sorting value of the focused image is not within the second preset sorting interval, it indicates that the second relative height corresponding to the currently selected focused image is either too high or too low. Therefore, there is a possibility that the focus height corresponding to the selected focused image may differ from the true focus height. In other words, if the second relative height corresponding to the currently selected focused image is too high, the true focus height may be at a higher position; conversely, if the second relative height corresponding to the currently selected focused image is too low, the true focus height may be at a lower position. Therefore, by determining whether the sorting value of the focused image is within the second preset sorting interval, the acquired focus height can be verified, which helps ensure the accuracy of the reference height.
[0125] If the value of the third boundary is too large, it can easily lead to overly stringent judgment criteria, thereby increasing the number of unnecessary acquisitions of the third image, resulting in wasted resources and reduced focusing speed. Therefore, in this embodiment, the value of the third boundary is any integer from 1 to 4. For similar reasons, the absolute value of the difference between the fourth boundary value and the number of the second images is any integer from 0 to 4. In a specific embodiment, the value of the third boundary is 1, and the absolute value of the difference between the fourth boundary value and the number of the second images is 0.
[0126] In this embodiment, focusing is completed when the sort value of the focused image is within the second preset sorting interval.
[0127] Accordingly, if the sorting value of the focused image is less than or equal to the third boundary value, step S42 is executed, and the height is decreased by a third step based on the second relative height corresponding to the focused image to obtain third images at different third relative height positions; or, if the sorting value of the focused image is greater than or equal to the fourth boundary value, the height is increased by a third step based on the second relative height corresponding to the focused image to obtain third images at different third relative height positions; step S43 is executed, and it is determined whether the focus parameters of the multiple third images decrease in the order of shooting.
[0128] The third relative height is changed based on the third step length to increase the number of sampled images, thereby using the third image to verify whether the currently acquired focus height is the true focus height. As the previous analysis shows, based on the true focus height, increasing or decreasing the relative height will worsen the focus parameters of the resulting images, and the further away from the true focus height, the worse the focus parameters. Therefore, it is necessary to determine whether the focus parameters of multiple third images decrease in the order of shooting.
[0129] In this embodiment, focusing is completed when the focus parameters of multiple third images decrease sequentially according to the shooting order, which means that the focus height obtained at this time is the true focus height.
[0130] If the focus parameters of multiple third images do not meet the requirement of decreasing in the shooting order, step S44 is executed to perform focus image replacement processing from multiple third images, replacing the original focus image with the third image with the largest focus parameter, and taking the third relative height corresponding to the third image with the largest focus parameter as the focus height.
[0131] The third step size should not be too large or too small. If the third step size is too large, the accuracy will be too low, failing to meet the requirement of verifying the acquired focus height; if the third step size is too small, it will easily lead to excessive and unnecessary time consumption. Therefore, in this embodiment, the third step size is 10 nanometers to 30 nanometers. The number of third images should not be too few or too many.
[0132] If the number of third images is too small, it may result in insufficient sample size, making it difficult to find the optimal focus height; if the number of third images is too large, it may lead to excessive and unnecessary time consumption. Therefore, in this embodiment, the number of third images is 2 to 4.
[0133] It should be noted that, in other embodiments, steps S41, S42, S43 and S44 may be omitted from the focusing method according to actual needs.
[0134] It should also be noted that after obtaining the final focus height, the first imaging system is used for focus detection.
[0135] Accordingly, embodiments of the present invention also provide a focusing system for the target to be measured. (See reference) Figure 8 The diagram shows a functional block diagram of an embodiment of the focusing system for the target under test of the present invention.
[0136] Reference Figures 2 to 7 The target to be tested includes a reference area and a test area. The focusing system for the target to be tested includes: a first image acquisition module 10, used to perform first image acquisition processing, which includes: along the focusing direction, within a first preset height region where the first relative height between the first imaging system and the target to be tested is within the first preset height region, acquiring first images of the target to be tested 100 at different first relative height positions through the first imaging system; and a first filtering module 20, used to select from multiple first images that are 150R (e.g., within the reference area) of the target to be tested. Figure 2 The first image is selected from multiple images 200 (shown) and has the highest similarity to the standard image 200. The first relative height of the selected first image is used as the initial reference height. The reference height is obtained based on the initial reference height and the positional relationship between the reference area and the test area of the target 100 along the focusing direction. The second image acquisition module 30 is used to perform second image acquisition processing, which includes: along the focusing direction, when the second relative height between the first imaging system and the target 100 is within a second preset height area, the first imaging system acquires second images 300 of the test area 150R in the target 100 at different second relative height positions, and the reference height is within the second preset height area. The second filtering module 40 is used to select the image with the highest focus parameter in the test area 150R from multiple second images 300, and obtain a focused image using the selected second image 300. The second relative height of the focused image is used as the focus height, and the focus parameter is used to characterize the focus quality.
[0137] In the focusing system, the target 100 is imaged multiple times at different first relative height positions (i.e., first image acquisition processing) to obtain the first image that is closest to the standard image 200 of the reference area 150R. After obtaining the reference height based on the first relative height of the selected first image, since the reference height is already closer to the focusing height of the target 100, it is easy to obtain the accurate focusing height by imagering the target 100 at different second relative heights near the reference height (i.e., second image acquisition processing). This also reduces the number of images acquired and processed in the second image 300, thereby improving both focusing accuracy and focusing speed.
[0138] In this embodiment, the target 100 to be tested includes a multi-layered target pattern 150, and the multi-layered target pattern 150 has different heights along the focusing direction. As an example, the target 100 to be tested can be a marking pattern, for example, the target 100 to be tested is an overprinted marking pattern.
[0139] As an example, the target to be tested 100 includes two layers of target graphics 150, that is, the multi-layer target graphics 150 includes a first target graphic 110 and a second target graphic 120, and the first target graphic 110 and the second target graphic 120 have different heights along the focusing direction.
[0140] As an example, the height of the second target graphic 120 is greater than the height of the first target graphic 110. Specifically, the target to be tested 100 includes multiple strip-shaped target graphics 150.
[0141] Reference Figure 2 The diagram shows a top view of a target 100 under test. Taking the target 100 as an example of an overprinted marking pattern, the inner and outer marking patterns in the target 100 are located on different layers in space. That is, there is a height difference between the second target pattern 120 and the first target pattern 110, and their corresponding focusing heights also differ. Accordingly, one of the inner and outer marking patterns is used as the first target pattern 110, and the other is used as the second target pattern 120. For example, in this embodiment, the inner marking pattern is the second target pattern 120, and the outer marking pattern is the first target pattern 110. The projection of the second target pattern 120 onto the layer where the first target pattern 110 is located is inside the first target pattern 110.
[0142] In this embodiment, the target to be tested includes a reference area (not shown) and a test area 150R. Specifically, the target pattern 150 in the target to be tested 100 has a test area 150R.
[0143] The reference area is the focused area during the first image acquisition process, and correspondingly, the image in the reference area is the focus object during the first image acquisition process. The test area is the focused area during the second image acquisition process, and correspondingly, the image in the test area is the focus object during the second image acquisition process. Specifically, the reference area is the area subsequently matched with the standard image 200; the test area 150R, also known as the region of interest, is the area subsequently used to extract focus parameters.
[0144] Correspondingly, the reference area and the area to be measured 150R can be located on the same horizontal plane or at different heights.
[0145] In this embodiment, the second target graphic 120 has a test area 150R, and the first target graphic 110 has a reference area, as an example. In other embodiments, the first target graphic may have a test area, and the second target graphic may have a reference area. In other embodiments, the second target graphic may have both a test area and a reference area; or, the first target graphic may have both a test area and a reference area.
[0146] In this embodiment, the focusing system further includes a third image acquisition module 50, used to acquire a standard image 200 corresponding to the reference area of the target 100. First, the standard image 200 corresponding to the reference area of the target 100 is acquired to prepare for selecting the image with the highest similarity to the standard image of the reference area from multiple first images.
[0147] The description of the standard image 200 can be found in the corresponding description in the foregoing embodiments, and will not be repeated here.
[0148] like Figure 3 As shown, in this embodiment, the second target pattern 120 has a test area 150R, and the first target pattern 110 has a reference area. Therefore, the standard image 200 is an image of the reference area obtained at the focusing height of the first target pattern 110.
[0149] Accordingly, the standard image 200 includes an image 210 corresponding to the first target image 110 and an image 220 corresponding to the second target image 120.
[0150] The first image acquisition module 10 captures images at different first relative height positions within a first preset height area to collect data, so that the image with the highest similarity to the standard image 200 in the reference area can be selected from the first image to obtain the reference height.
[0151] Specifically, the first image acquisition module 10 is used to adjust the first relative height between the first imaging system and the target 100 within a first preset height area by a step length. In this embodiment, in order to improve both focusing accuracy and focusing speed, the step length is 0.5 micrometers to 1 micrometer, and the number of the first images is 20 to 30.
[0152] Specifically, the first image acquisition module 10 includes: a first signal triggering unit, used to trigger and control the acquisition signal of the first imaging system through hard triggering; a first image acquisition unit, used to control the imaging system to acquire images in an asynchronous acquisition manner; and a first image processing unit, used to perform image processing using a GPU.
[0153] In this embodiment, in order to reduce the complexity of the first image acquisition process, the first image acquisition module 10 is used to determine the maximum first relative height position and the minimum first relative height position of the first preset height region, and take the maximum or minimum first relative height position of the first preset height region as the starting shooting position, and take pictures at different first relative height positions in the first preset height region along the focusing direction to obtain the first image.
[0154] The standard image 200 is a high-quality image. Therefore, the first screening module 30 selects the image with the highest similarity to the standard image 200 of the reference area from multiple first images. After obtaining the reference height based on the initial reference height and the positional relationship between the reference area and the area 150R of the target 100 along the focusing direction, the reference height can be regarded as close to its focusing height, which facilitates multiple imaging operations near the reference height to obtain the final focusing height.
[0155] In this embodiment, the first filtering module 20 matches the standard image of the reference area with each of the first images to filter out the first image that has the highest similarity to the standard image 200 of the reference area.
[0156] The first filtering module 20 includes: a correlation score calculation unit, used to use a matching window of the same size as the standard image 200 to traverse each pixel of the first image and calculate the correlation score between the region where the matching window is located in the first image and the standard image 200 in the reference region; and a filtering unit, used to obtain the maximum value of the correlation score between the first image and the standard image 200 in the reference region as the similarity, wherein the correlation score is negatively correlated with the variance and standard deviation of the gray levels of each pixel of the matching window and the standard image 200.
[0157] Accordingly, in each first image, the region with the highest similarity to the standard image is used as the matching region.
[0158] As an example, the correlation score calculation unit is used to select a matching window in the first image that is the same size as the standard image 200, and slide the sliding match in the first image according to a preset sliding direction. After each slide, the correlation score between the standard image 200 and the area where the current matching window is located is calculated, thereby obtaining multiple correlation scores. Correspondingly, the first filtering unit is used to select the area where the matching window corresponding to the maximum correlation score is located as the matching area that matches the standard image 200 of the reference area.
[0159] It should be noted that the greater the similarity, the smaller the variance and standard deviation of pixel gray levels between each pixel in the matching region and each pixel in the standard image 200 of the reference region. Therefore, the correlation score is negatively correlated with the variance and standard deviation of pixel gray levels. The correlation score calculation unit uses the mean absolute difference algorithm, the absolute error sum algorithm, the error sum of squares algorithm, the mean error sum of squares algorithm, the normalized cross-correlation algorithm, the sequential similarity detection algorithm, or the Hadamard transform algorithm to calculate the correlation score with the standard image. In this embodiment, the normalized cross-correlation algorithm is used to calculate the correlation score with the standard image of the reference region.
[0160] In this embodiment, during the process of selecting the image with the highest similarity to the standard image 200 in the reference area from multiple first images, the first screening module 20 also determines the center position of the target 100 to be tested based on the standard image. Specifically, the center of the standard image 200 is mapped to the matching area to obtain the center position of the image of the target 100 to be tested.
[0161] The first screening module 20 further includes a reference height setting unit, which is used to take the first relative height corresponding to the selected first image as the initial reference height, and to obtain the reference height according to the initial reference height and the positional relationship between the reference area and the area to be tested of the target 100 along the focusing direction.
[0162] In this embodiment, the height of the second target graphic 120 is greater than the height of the first target graphic 110, and the absolute value of the height difference between the second target graphic 120 and the first target graphic 110 is used as a preset height offset. Correspondingly, when the second target graphic 120 has a test area 150R and the first target graphic 110 has a reference area, the reference height setting unit is used to obtain the height by adding the preset height offset to the initial reference height as the reference height.
[0163] Since there is a height difference between the second target image 120 and the first target image 110, when performing the second image acquisition process, if the focus object needs to be changed, a preset height offset needs to be added to the initial reference height to obtain the reference height.
[0164] In other embodiments, the first target graphic has a test area and the second target graphic has a reference area; correspondingly, the standard image is an image of the reference area obtained at the focusing height of the second target graphic; correspondingly, the reference height setting unit is used to obtain the height obtained by subtracting a preset height offset from the initial reference height as the reference height. In other embodiments, the second target graphic has a test area and a reference area, or the first target graphic has a test area and a reference area, and the distance between the test area and the reference area along the focusing direction is zero; correspondingly, the standard image is an image of the reference area obtained at the focusing height of the reference area; correspondingly, the reference height setting unit is used to use the initial reference height as the reference height.
[0165] In this embodiment, the focusing system further includes: a first inspection module 21, used to obtain the sorting results of multiple first images according to the order of the first relative height, and to determine whether the sorting value of the first image with the highest similarity to the standard image 200 of the reference area 150R is located within a first preset sorting interval. The first preset sorting interval has a first boundary value and a second boundary value. The first relative height corresponding to the first boundary value is less than the first relative height corresponding to the second boundary value, and the first boundary value is greater than or equal to the minimum sorting value of the first image, and the second boundary value is less than or equal to the maximum sorting value of the first image.
[0166] By determining whether the ranking value of the first image with the highest similarity to the standard image 200 in the reference area 150R is within the first preset ranking interval, the currently selected first image is checked, which helps to ensure the accuracy of the reference height.
[0167] In this embodiment, the focusing system further includes a region movement processing module 22, used to perform region movement processing on the first preset height region along the focusing direction.
[0168] If the ranking value of the first image with the highest similarity to the standard image 200 of the reference area 150R is within the first preset ranking interval, the first relative height corresponding to the first image with the highest similarity to the standard image 200 of the reference area 150R is taken as the reference height.
[0169] If the ranking value of the first image with the highest similarity to the standard image 200 of the reference area 150R is less than or equal to the first boundary value, the region movement processing module 32 performs region movement processing along the focusing direction on the first preset height region to reduce the first relative height corresponding to the first preset height region. If the ranking value of the first image with the highest similarity to the standard image of the reference area 150R is greater than or equal to the second boundary value, the region movement processing module 32 performs region movement processing along the focusing direction on the first preset height region to increase the first relative height corresponding to the first preset height region.
[0170] In this embodiment, the first image acquisition module 10 performs the first image acquisition process again based on the first preset height region after the region movement processing. Based on the foregoing analysis, when the ranking value of the first image with the highest similarity to the standard image 200 of the reference region 150R is not within the first preset ranking interval, the first image acquisition process needs to be performed again to acquire more first images, thereby obtaining the image with the highest similarity to the standard image 200 of the reference region 150R through iteration.
[0171] In this embodiment, the first preset height regions before and after the region shifting process are connected, which helps to avoid repeatedly acquiring the same image and allows for the acquisition of more information through the subsequent first image acquisition process, thereby avoiding resource waste and improving focusing speed. In other embodiments, the first preset height regions before and after the region shifting process may also partially overlap.
[0172] In this embodiment, the first boundary value is any integer from 1 to 4, and the absolute value of the difference between the second boundary value and the number of first images corresponding to the current first image acquisition and processing is any integer from 0 to 4.
[0173] It should be noted that in other embodiments, the focusing system may not include the first inspection module 21 and the area movement processing module 22.
[0174] In this embodiment, the focusing system further includes an adjustment module 23, which is used to adjust the relative position of the target under test and the first imaging system in the horizontal direction before performing the second image acquisition processing, so that the center position of the target under test is located at the center of the field of view of the first imaging system.
[0175] Using the second image acquisition module 30, second images 300 of the target under test at different second relative height positions are acquired within a second preset height region near the reference height. This allows for the subsequent selection of the image with the highest focus parameter in the target area from multiple second images. The selected second image 300 is then used to obtain a focused image, and the relative height corresponding to the focused image is taken as the focus height. Therefore, in this embodiment, after acquiring the reference height closest to the standard image of the reference area 150R, since this reference height is already closer to the focus height of the target under test, it is easy to obtain an accurate focus height by performing multiple imaging operations at different heights near the reference height. This also reduces the number of second images 300 processed in the second image acquisition process, thereby improving both focusing accuracy and focusing speed simultaneously.
[0176] Specifically, the second image acquisition module 30 is used to adjust the second relative height between the first imaging system and the target 100 within a second preset height region, with a second step size smaller than the first step size. Using a fixed second step size for multiple imaging operations allows for a regular change in the shooting height, simplifying the focusing complexity. Furthermore, since the second step size is smaller than the first step size, compared to the second image acquisition process, the second image acquisition process uses a smaller second step size to re-image the target at different second relative height positions, meaning the height change between adjacent images is smaller. This allows for more accurate acquisition of the second image 300 near the reference height, further improving focusing accuracy.
[0177] In this embodiment, the product of the second step length and the number of second images 300 is greater than the first step length. Specifically, the product of the second step length and the number of second images 300 is greater than or equal to twice the first step length.
[0178] In this embodiment, to improve both focusing accuracy and focusing speed, the second step size is 30 nanometers to 80 nanometers, and the number of the second images 300 is 10 to 20. It should be noted that in actual shooting, the second step size and the number of the second images 300 should be reasonably set and coordinated to balance focusing accuracy and focusing speed.
[0179] Specifically, the second image acquisition module 30 includes: a second signal triggering unit for triggering and controlling the acquisition signal of the first imaging system through hard triggering; a second image acquisition unit for controlling the imaging system to acquire images in an asynchronous manner; and a second image processing unit for image processing using a GPU.
[0180] In this embodiment, in order to reduce the complexity of the second image acquisition process, the third image acquisition module 40 is used to determine the maximum second relative height position and the minimum second relative height position of the second preset height region, and take the maximum or minimum second relative height position of the second preset height region as the starting shooting position, and take pictures at different second relative height positions in the second preset height region along the focusing direction to obtain the second image 300.
[0181] When performing the second image acquisition process, the second target image 120 can be used as the focus object, or the first target image 110 can be used as the focus object. For example, Figure 4 (a) shows a second image 300 after the second target graphic 120 has been focused. Figure 4 (b) shows a second image 300 after the first target graphic 110 is in focus.
[0182] In this embodiment, the second target graphic 120 has a test area 150R and the first target graphic 110 has a reference area as an example. Therefore, the second target graphic 120 is used as the focus object.
[0183] In some other embodiments, the first target graphic has a test area and the second target graphic has a reference area, then the second image acquisition process uses the first target graphic as the focus object.
[0184] In other embodiments, the second target image has a test area and a reference area, or the first target image has a test area and a reference area. Correspondingly, the focus objects of the first image acquisition process and the second image acquisition process are the same. Fixing a single focus object helps reduce the complexity of the focusing method and avoids errors caused by changing the focus object.
[0185] In this embodiment, the reference height is located at the middle position of the second preset height region.
[0186] In this embodiment, the second filtering module 40 is used to select the second image with the highest focus parameter of the 150R region to be tested as the focused image from multiple second images. Specifically, the second filtering module 50 includes: a focus parameter acquisition unit for acquiring the focus parameter of the image; and a third filtering unit for selecting the second image with the highest focus parameter as the focused image.
[0187] The focus parameter acquisition unit includes: a subunit for determining the image to be evaluated, used to determine the image corresponding to the target graphic 150 of the test area 150R in the second image 300 as the image to be evaluated 310; and a subunit for determining the image of interest, used to obtain the image of the test area 150R in the image to be evaluated 310 as the image of interest 350 based on the position information of the test area 150R in the target graphic 150. Figure 5 (Image within the dashed box); A first data processing subunit is used to add or average the pixel values of one or more pixels in the image of interest 350 along a first direction to obtain a projection value, and to obtain the correspondence between each pixel and the projection value in the image of interest 350 along a second direction to obtain one-dimensional projection data, wherein the second direction is perpendicular to the first direction; A second data processing subunit is used to obtain the differential energy in the image of interest 350 using the one-dimensional projection data; A third data processing subunit is used to calculate the average value of each differential energy in the image of interest 350 as the focus parameter of the second image 300 in the area to be tested 150R.
[0188] Specifically, in this embodiment, since the second target graphic 120 has a test area 150R and the first target graphic 110 has a reference area, the image corresponding to the second target graphic 120 is used as the image to be evaluated 310.
[0189] In other embodiments, depending on actual needs, the second screening module may further include: a fitting unit, used to fit the focus parameter of the second image in the area to be tested with the corresponding second relative height to obtain a fitting curve of the focus parameter changing with the second relative height, wherein the fitting curve is a Gaussian distribution curve; correspondingly, the third screening unit selects the relative height corresponding to the peak of the Gaussian distribution curve as the focus height; the focusing system also includes: a fourth image acquisition module, used to acquire the image of the target to be tested at the focus height position as the focused image.
[0190] For example, in conjunction with reference Figure 7 , Figure 7 This is a fitted curve of contrast score and second relative height in one embodiment. The horizontal axis represents the second relative height, and the vertical axis represents the contrast score. The Gaussian distribution curve has a peak value, which corresponds to a relative height z0. Therefore, the image taken at the relative height z0 position has the highest contrast score (i.e., the lowest defocus). By fitting the curve, the focus height can be easily obtained from the relative height corresponding to the peak value of the Gaussian distribution curve, which helps to improve the accuracy of the obtained focus height and thus improve the focusing precision. It is understood that since this focus height is obtained through the Gaussian distribution curve, it is necessary to additionally take a picture of the target under test at this focus height to obtain a focused image of the target under test at the focus height position.
[0191] It should be noted that the focusing system further includes a second verification module 41, used to obtain the sorting result of the focused image among multiple second images according to the size order of the second relative height, and to determine whether the sorting value of the focused image is within a second preset sorting interval. The second preset sorting interval has a third boundary value and a fourth boundary value. The second relative height corresponding to the third boundary value is less than the second relative height corresponding to the fourth boundary value, and the third boundary value is greater than or equal to the minimum sorting value of the second image, while the fourth boundary value is less than or equal to the maximum sorting value of the second image. In this embodiment, the third boundary value is any integer from 1 to 4, and the absolute value of the difference between the fourth boundary value and the number of second images is any integer from 0 to 4.
[0192] By determining whether the sorting value of the focused image is within the second preset sorting interval, the obtained focus height can be verified, which helps to ensure the accuracy of the reference height.
[0193] In this embodiment, focusing is completed when the sort value of the focused image is within the second preset sorting interval.
[0194] In this embodiment, the focusing system further includes: a fifth image acquisition module 42, used to acquire third images at different third relative height positions by decreasing the height by a third step based on the second relative height corresponding to the focused image when the sorting value of the focused image is less than or equal to the third boundary value; or, used to acquire third images at different third relative height positions by increasing the height by a third step based on the second relative height corresponding to the focused image when the sorting value of the focused image is greater than or equal to the fourth boundary value; and a third verification module 43, used to determine whether the focus parameters of multiple third images decrease in the order of shooting.
[0195] The third relative height is changed based on the third step length to increase the number of sampled images, thereby using the third image to verify whether the currently acquired focus height is the true focus height. As the previous analysis shows, based on the true focus height, increasing or decreasing the relative height will worsen the focus parameters of the resulting images, and the further away from the true focus height, the worse the focus parameters. Therefore, it is necessary to determine whether the focus parameters of multiple third images decrease in the order of shooting.
[0196] In this embodiment, focusing is completed when the focus parameters of multiple third images decrease sequentially according to the shooting order, which means that the focus height obtained at this time is the true focus height.
[0197] In this embodiment, the focusing system further includes a replacement module 44, used to perform focused image replacement processing from multiple third images when the focus parameters of multiple third images do not meet the requirement of decreasing in the shooting order. The module replaces the original focused image with the third image having the highest focus parameter, and uses the third relative height corresponding to the third image with the highest focus parameter as the focus height. In this embodiment, the third step length is 10 nanometers to 30 nanometers, and the number of third images is 2 to 4.
[0198] It should be noted that in other embodiments, depending on actual needs, the focusing system may omit the second inspection module 41, the fifth image acquisition module 42, the third inspection module 43, and the replacement module 44.
[0199] This invention also provides a device that can implement the focusing method provided by this invention by loading a program in the form of the above-described focusing method.
[0200] refer to Figure 9 The diagram illustrates the hardware structure of a device according to an embodiment of the present invention. The device in this embodiment includes: at least one processor 01, at least one communication interface 02, at least one memory 03, and at least one communication bus 04.
[0201] In this embodiment, the number of processor 01, communication interface 02, memory 03 and communication bus 04 is at least one, and the processor 01, communication interface 02 and memory 03 communicate with each other through the communication bus 04.
[0202] The communication interface 02 can be an interface for a communication module used for network communication, such as the interface of a GSM module. The processor 01 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the focusing method described in this embodiment. The memory 03 may include high-speed RAM and may also include non-volatile memory, such as at least one disk storage device.
[0203] The memory 03 stores one or more computer instructions, which are executed by the processor 01 to implement the focusing method provided in the foregoing embodiments.
[0204] It should be noted that the aforementioned terminal device may also include other devices (not shown) that may not be essential to understanding the content disclosed in the embodiments of the present invention; given that these other devices may not be essential for understanding the content disclosed in the embodiments of the present invention, the embodiments of the present invention will not describe them one by one.
[0205] This invention also provides a storage medium storing one or more computer instructions for implementing the focusing method provided in the foregoing embodiments.
[0206] In the focusing method of this invention, a first image acquisition process is first performed to acquire first images of the target under test at different first relative height positions within a first preset height region. The image with the highest similarity to a standard image in a reference region is selected from multiple first images, and a reference height is obtained using the first relative height corresponding to the selected first image. Then, a second image acquisition process is performed based on the reference height to acquire second images of the target under test at different second relative height positions within a second preset height region near the reference height. The image with the highest focusing parameter in the target region is selected from multiple second images, and a focused image is obtained using the selected second image. The second relative height corresponding to the focused image is used as the focusing height. In this invention, after multiple imaging operations on the target under test at different first relative height positions to obtain a reference height closest to the standard image in the reference region, since this reference height is already closer to the focusing height of the target under test, it is easy to obtain a precise focusing height by performing multiple imaging operations on the target under test at different second relative heights near the reference height. This also reduces the number of images processed in the second image acquisition process, thereby improving both focusing accuracy and focusing speed simultaneously.
[0207] The embodiments of the present invention described above are combinations of elements and features of the present invention. Unless otherwise stated, the elements or features described are optional. Individual elements or features may be practiced without combination with other elements or features. Furthermore, embodiments of the present invention may be constructed by combining some elements and / or features. The order of operations described in the embodiments of the present invention may be rearranged. Some constructions of any embodiment may be included in another embodiment and may be replaced by corresponding constructions of another embodiment. It will be apparent to those skilled in the art that claims in the appended claims that are not expressly referenced to each other may be combined to form embodiments of the present invention, or may be included as new claims in amendments made after the filing of this application.
[0208] Embodiments of the present invention can be implemented by various means, such as hardware, firmware, software, or combinations thereof. In a hardware configuration, the method according to an exemplary embodiment of the present invention can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, etc.
[0209] In firmware or software configuration, embodiments of the present invention can be implemented in the form of modules, processes, functions, etc. Software code can be stored in a memory unit and executed by a processor. The memory unit is located inside or outside the processor and can send data to and receive data from the processor via various known means.
[0210] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is accorded the widest scope consistent with the principles and novel features disclosed herein.
[0211] 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 focusing method for a target to be measured, characterized in that, The target to be tested includes a reference area and a test area, and the focusing method includes: Perform a first image acquisition process, which includes: along the focusing direction, within a first preset height region where the first relative height between the first imaging system and the target under test is within the first imaging system, acquiring first images of the target under test at different first relative height positions through the first imaging system; The image with the highest similarity to the standard image of the reference area is selected from multiple first images, and the first relative height corresponding to the selected first image is used as the initial reference height. The reference height is obtained according to the initial reference height and the positional relationship between the reference area and the area to be tested of the target along the focusing direction. Perform a second image acquisition process, which includes: along the focusing direction, when the second relative height between the first imaging system and the target to be tested is within a second preset height region, acquire second images of the area to be tested in the target to be tested at different second relative height positions through the first imaging system, and the reference height is within the second preset height region; The image with the highest focus parameter in the test area is selected from multiple second images, and a focused image is obtained using the selected second image. The second relative height corresponding to the focused image is used as the focus height, and the focus parameter is used to characterize the focus quality. The target to be tested includes a multi-layered target pattern, and the multi-layered target pattern has different heights along the focusing direction; The standard image is an image of a reference area obtained from the focus height of one layer of the target graphic; or, the standard image is an image of a reference area obtained from the common focus height of the multiple target graphics, wherein the common focus height includes the average value, median value, or weighted value of the focus height of the multiple target graphics.
2. The focusing method as described in claim 1, characterized in that, Before performing the second image acquisition process, the method further includes: acquiring the sorting results of multiple first images according to the order of the first relative height, and determining whether the sorting value of the first image with the highest similarity to the standard image of the reference area is located within a first preset sorting interval. The first preset sorting interval has a first boundary value and a second boundary value. The first relative height corresponding to the first boundary value is less than the first relative height corresponding to the second boundary value, and the first boundary value is greater than or equal to the minimum sorting value of the first image, while the second boundary value is less than or equal to the maximum sorting value of the first image. If the sorting value of the first image with the highest similarity to the standard image of the reference area is within the first preset sorting interval, the first relative height corresponding to the first image with the highest similarity to the standard image of the reference area is taken as the initial reference height. If the ranking value of the first image with the highest similarity to the standard image of the reference area is less than or equal to the first boundary value, the first preset height region is moved along the focusing direction to reduce the first relative height corresponding to the first preset height region. If the ranking value of the first image with the highest similarity to the standard image of the reference area is greater than or equal to the second boundary value, the first preset height region is moved along the focusing direction to increase the first relative height corresponding to the first preset height region. Based on the first preset height region after the region moving process, the first image acquisition process is returned to execution. The first preset height regions before and after the region movement process partially overlap or connect.
3. The focusing method as described in claim 2, characterized in that, The first boundary value is any integer from 1 to 4, and the absolute value of the difference between the second boundary value and the number of first images corresponding to the current first image acquisition and processing is any integer from 0 to 4.
4. The focusing method as described in claim 1 or 2, characterized in that, The first image acquisition process includes: adjusting the first relative height between the first imaging system and the target under test within a first preset height region by a first step length; the second image acquisition process includes: adjusting the second relative height between the first imaging system and the target under test within a second preset height region by a second step length, wherein the second step length is less than the first step length.
5. The focusing method as described in claim 4, characterized in that, The first step has a length of 0.5 micrometers to 1 micrometer, and the number of the first images is 20 to 30; the second step has a length of 30 nanometers to 80 nanometers, and the number of the second images is 10 to 20.
6. The focusing method as described in claim 4, characterized in that, The product of the second step length and the number of the second images is greater than or equal to the first step length.
7. The focusing method as described in claim 6, characterized in that, The product of the second step length and the number of the second images is greater than or equal to twice the first step length.
8. The focusing method as described in claim 1, characterized in that, The multi-layer target graphic includes a first target graphic and a second target graphic, the height of the second target graphic is greater than the height of the first target graphic, and the absolute value of the height difference between the second target graphic and the first target graphic is used as a preset height offset. The second target image has the area to be tested and the reference area, or the first target image has the area to be tested and the reference area, wherein the distance between the area to be tested and the reference area along the focusing direction is zero; the standard image is an image of the reference area obtained at the focusing height of the reference area; Obtaining the reference height based on the initial reference height and the positional relationship between the reference area and the area to be measured along the focusing direction of the target includes: using the initial reference height as the reference height; or, The first target image has the area to be tested, and the second target image has the reference area; the standard image is an image of the reference area obtained at the focusing height of the second target image; obtaining the reference height based on the initial reference height and the positional relationship between the reference area and the area to be tested along the focusing direction of the target image includes: subtracting the preset height offset from the initial reference height as the reference height; or, The second target image has the area to be tested, and the first target image has the reference area; the standard image is an image of the reference area obtained at the focusing height of the first target image; obtaining the reference height based on the initial reference height and the positional relationship between the reference area and the area to be tested along the focusing direction of the target image includes: adding the preset height offset to the initial reference height to obtain the height as the reference height.
9. The focusing method as described in claim 1 or 8, characterized in that, The reference height is located at the middle position of the second preset height area.
10. The focusing method as described in claim 1, characterized in that, The step of obtaining a focused image using the selected second image includes: selecting the second image with the highest focus parameter as the focused image; or, The focus parameter of the second image in the area to be tested is fitted with the corresponding second relative height to obtain a fitting curve of the focus parameter changing with the second relative height between the first imaging system and the target to be tested. The fitting curve is a Gaussian distribution curve. The second relative height corresponding to the peak of the Gaussian distribution curve is selected as the focus height. The image of the target to be tested at the focus height position is obtained as the focused image.
11. The focusing method as described in claim 10, characterized in that, The second image with the highest focus parameter is selected as the focused image; After obtaining the focused image, the focusing method further includes: obtaining the sorting result of the focused image in multiple second images according to the size order of the second relative height, and determining whether the sorting value of the focused image is within a second preset sorting interval, wherein the second preset sorting interval has a third boundary value and a fourth boundary value, the second relative height corresponding to the third boundary value is less than the second relative height corresponding to the fourth boundary value, and the third boundary value is greater than or equal to the minimum sorting value of the second image, and the fourth boundary value is less than or equal to the maximum sorting value of the second image; Focusing is completed when the sort value of the focused image is within the second preset sorting range; If the sorting value of the focused image is less than or equal to the third boundary value, the height is decreased by a third step based on the second relative height corresponding to the focused image to obtain third images at different third relative height positions; or, if the sorting value of the focused image is greater than or equal to the fourth boundary value, the height is increased by a third step based on the second relative height corresponding to the focused image to obtain third images at different third relative height positions. Determine whether the focus parameters of the multiple third images decrease sequentially according to the shooting order; Focusing is completed when the focus parameters of multiple third images decrease sequentially according to the shooting order. If the focus parameters of multiple third images do not satisfy the condition of decreasing in the shooting order, a focus image replacement process is performed from the multiple third images. The original focus image is replaced by the third image with the highest focus parameter, and the third relative height corresponding to the third image with the highest focus parameter is taken as the focus height.
12. The focusing method as described in claim 11, characterized in that, The third boundary value is any integer from 1 to 4, and the absolute value of the difference between the fourth boundary value and the number of the second images is any integer from 0 to 4; the third step size is 10 nanometers to 30 nanometers, and the number of the third images is 2 to 4.
13. The focusing method as described in claim 1, characterized in that, The focus parameters include image sharpness, image contrast, image clarity, image center distance, image curvature, image autocorrelation, or the Gaussian derivative of the image.
14. The focusing method as described in claim 1, characterized in that, The target to be tested includes a target graphic, and the target graphic has the area to be tested. Selecting the image with the highest focus parameter in the test area from multiple second images includes: obtaining the focus parameter of the second image, wherein obtaining the focus parameter of the second image includes: In the second image, the image corresponding to the target graphic of the area to be tested is determined as the image to be evaluated; Based on the location information of the area to be tested in the target image, the image of the area to be tested is obtained as the image of interest in the image to be evaluated; The projection value is obtained by adding or averaging the pixel values of one or more pixels in the image of interest along the first direction, and the correspondence between each pixel in the image of interest and the projection value is obtained to obtain one-dimensional projection data, wherein the second direction is perpendicular to the first direction; The differential energy in the image of interest is obtained using the one-dimensional projection data; The average value of each differential energy in the image of interest is calculated and used as the focus parameter of the second image in the area to be tested.
15. The focusing method as described in claim 1, characterized in that, Before performing the first image acquisition process, the method further includes: acquiring a standard image of the reference region of the target to be tested, wherein acquiring the standard image corresponding to the target to be tested includes: A theoretical model is provided to represent the relationship between the intensity distribution of the emitted light after the light interacts with the sample and the physical parameters of the sample; the physical parameters of the reference region are substituted into the theoretical model to obtain a simulated image, which serves as a standard image; Alternatively, a sample identical to the reference region can be acquired; images of the sample can be acquired at different fourth relative heights using a second imaging system different from the first imaging system, and the image of the sample when it is in focus can be selected as the standard image. Alternatively, a third imaging system with autofocus function can be used to obtain the autofocus height of the reference area of the target under test, and the image of the reference area of the target under test at the autofocus height can be obtained as a standard image.
16. The focusing method as described in claim 1, characterized in that, Selecting the image with the highest similarity to the standard image of the reference area from multiple first images includes: matching the standard image of the reference area with each of the first images to obtain the similarity of each first image; and selecting the first image with the highest similarity.
17. The focusing method as described in claim 16, characterized in that, The matching process includes: using a matching window of the same size as the standard image, traversing each pixel of the first image, calculating the correlation score between the region where the matching window is located in the first image and the standard image of the reference region, and obtaining the maximum value of the correlation score between the first image and the standard image of the reference region as the similarity. The correlation score is negatively correlated with the variance and standard deviation of the gray levels of each pixel of the matching window and the standard image of the reference region.
18. The focusing method as described in claim 17, characterized in that, The methods for calculating the correlation score between the region where the matching window is located in the first image and the standard image include the mean absolute difference algorithm, the sum of absolute errors algorithm, the sum of squared errors algorithm, the mean sum of squared errors algorithm, the normalized cross-correlation algorithm, the sequential similarity detection algorithm, or the Hadamard transform algorithm.
19. The focusing method as described in claim 1, characterized in that, In the process of selecting the image with the highest similarity to the standard image from multiple first images, the center position of the target to be tested is also determined based on the standard image; Before performing the second image acquisition process, the method further includes: adjusting the relative position of the target under test and the first imaging system in the horizontal direction so that the center position of the target under test is located at the center of the field of view of the first imaging system.
20. A focusing system for a target to be measured, characterized in that, The target to be tested includes a reference area and a test area, and the focusing system includes: The first image acquisition module is used to perform first image acquisition processing, which includes: along the focusing direction, when the relative height between the first imaging system and the target to be measured is within a first preset height region, acquiring first images of the target to be measured at different relative height positions through the first imaging system; The first filtering module is used to select the image with the highest similarity to the standard image of the reference area from multiple first images, and to take the relative height of the selected first image as the initial reference height, and to obtain the reference height according to the initial reference height and the positional relationship between the reference area and the area to be tested of the target along the focusing direction; The second image acquisition module is used to perform second image acquisition processing, which includes: along the focusing direction, when the relative height between the first imaging system and the target to be tested is within a second preset height region, acquiring second images of the area to be tested in the target to be tested at different relative height positions through the first imaging system, and the reference height is within the second preset height region; The second filtering module is used to select the image with the highest focus parameter in the test area from multiple second images, and to obtain a focused image using the selected second image, wherein the second relative height corresponding to the focused image is used as the focus height, and the focus parameter is used to characterize the focus quality. The target to be measured consists of multiple target images, and the multiple target images have different heights along the focusing direction; The standard image is an image of a reference area obtained at the focus height of one layer of the target graphic; or, the standard image is an image of a reference area obtained at a common focus height of multiple target graphics, where the common focus height includes the average, median, or weighted value of the focus heights of the multiple target graphics.
21. A device, characterized in that, It includes at least one memory and at least one processor, the memory storing one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the focusing method as described in any one of claims 1 to 19.
22. A storage medium, characterized in that, The storage medium stores one or more computer instructions for implementing the focusing method as described in any one of claims 1 to 19.
Citation Information
Patent Citations
Focusing method, focusing device, computer readable storage medium and electronic device
CN107613216A
Camera automatic focusing method and device, analysis instrument and storage medium
CN111010507A