Laser autofocus method, system, apparatus, and medium for multiple height planes
By dividing the laser spot image into continuous pixel columns of plane reflections at different heights and calculating the defocus amount by combining the width correspondence, the accuracy problem of laser autofocus on multi-height planes is solved, and precise focusing of the objective lens and the surface of the object under test is achieved.
Patent Information
- Application Number
- CN202511271869.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-09-08
AI Technical Summary
Existing autofocus technology cannot achieve precise focusing on multi-height planes. The laser spot image contains signals reflected back from planes at different heights, resulting in inaccurate calculation of the defocus amount.
By acquiring laser spot images, continuous pixel columns formed by reflections from planes at different heights are divided according to the gray values of each column of pixels. The defocusing amount of the plane to be focused is determined by the width correspondence, and the focusing accuracy is improved by adjusting the objective lens height and calculating the defocusing amount.
It improves the accuracy of autofocus, avoids the adverse effects of light spots reflected from planes at different heights, and ensures accurate focusing between the objective lens and the surface of the object under test.
Smart Images

Figure CN120742519B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of automatic focusing, and particularly relates to a laser automatic focusing method, system, device and medium for multiple height planes. BACKGROUND
[0002] The automatic focusing technology based on laser spot emits laser spot to the object to be measured, collects the laser spot image reflected by the object to be measured. Then, the defocus amount is calculated by using the topography of the laser spot, and the motor is driven to move the objective lens to the in-focus position to realize laser automatic focusing. Wherein, the laser spot topography formed at different defocus positions is different, as shown in the figure, the farther the distance, the larger the fan shape, on the other hand, the fan shape is different at different positions above and below the focusing plane, and the defocus amount is calculated by using the characteristics of the laser spot. Figure 1
[0003] However, the existing automatic focusing technology can only process materials with a single height focusing plane. When the object surface has different height parts and only one plane belongs to the focusing plane, the laser spot image contains signals reflected by different height planes. The defocus amount calculated directly from the image is not accurate, and the accurate automatic focusing of any height plane cannot be completed.
[0004] Therefore, there is an urgent need for an automatic focusing method to solve the above problems. SUMMARY
[0005] The present application provides a laser automatic focusing method, system, device and medium for multiple height planes, which realizes accurate focusing of any height plane by using laser spot image in multiple height planes.
[0006] To achieve the above object, the present application provides the following technical solutions:
[0007] In the first aspect of the present application, a laser automatic focusing method for multiple height planes is provided, comprising:
[0008] Obtaining a laser spot image;
[0009] According to the gray value of each column of pixel points in the laser spot image, the continuous pixel columns reflected from different height planes are divided;
[0010] Based on the width of the focusing plane and the width corresponding relationship, the continuous pixel column reflected from the focusing plane is determined as the first pixel column; wherein, the width corresponding relationship represents the corresponding relationship between the width of the continuous pixel column and the width of the different height planes;
[0011] Based on the first pixel column, the first defocus amount of the focusing plane is calculated.
[0012] Optionally, after the laser spot image is acquired, the method further comprises:
[0013] Based on the laser spot image, the defocus amount of the plane to be focused is calculated as a second defocus amount.
[0014] It is judged whether the absolute value of the second defocus amount is greater than a preset near focus threshold value; if yes, the height of the objective lens is adjusted based on the second defocus amount, and the second defocus amount is recalculated until the absolute value of the calculated second defocus amount is less than the near focus threshold value; if no, according to the gray value of each column of pixel points in the laser spot image, continuous pixel columns formed by reflection from different height planes are divided.
[0015] Optionally, after the laser spot image is acquired, the method further comprises:
[0016] The laser spot image is divided into multiple segment spot images along the horizontal direction.
[0017] The defocus amount corresponding to each segment spot image is calculated as a third defocus amount.
[0018] Based on a preset numerical range, the third defocus amount outside the numerical range is screened.
[0019] The mean value of the third defocus amount outside the numerical range is calculated, and it is judged whether the absolute value of the mean value is greater than a preset near focus threshold value; if yes, the height of the objective lens is adjusted based on the mean value, and the mean value is recalculated until the absolute value of the calculated mean value is less than the near focus threshold value; if no, according to the gray value of each column of pixel points in the laser spot image, continuous pixel columns formed by reflection from different height planes are divided.
[0020] Optionally, the continuous pixel columns formed by reflection from different height planes are divided according to the gray value of each column of pixel points in the laser spot image, comprising:
[0021] The gray value of each column of pixel points is binarized based on a first preset threshold value, so that the gray value higher than the first preset threshold value is 1, and the gray value lower than the first preset threshold value is 0, to obtain a binarized image;
[0022] The binarized image is subjected to morphological opening operation to obtain a processed image as an opening operation image.
[0023] The sum of the gray values of each column of pixel points in the opening operation image is counted as a first gray value sum.
[0024] The method further includes: based on the preset multiple pixel value range intervals, screening the continuous pixel column with the second gray value sum in the same pixel value range interval as the continuous pixel column reflected from the height plane corresponding to the pixel value range interval; and the pixel value range interval is one-to-one corresponding to the height plane.
[0025] Optionally, the dividing the continuous pixel column reflected from the different height planes according to the gray value of each column pixel point in the laser spot image includes:
[0026] The method further includes: counting the gray value sum of each column pixel point in the laser spot image as a second gray value sum;
[0027] The method further includes: based on the preset multiple pixel value range intervals, screening the continuous pixel column with the second gray value sum in the same pixel value range interval as the continuous pixel column reflected from the height plane corresponding to the pixel value range interval; and the pixel value range interval is one-to-one corresponding to the height plane.
[0028] Optionally, before the laser spot image is acquired, the method further includes:
[0029] The method further includes: calibrating the height difference between any one of the multiple height planes and the plane to be focused, and determining the defocus amount difference value between the two planes based on the height difference.
[0030] Optionally, after the continuous pixel column reflected from the plane to be focused is determined as the first pixel column based on the width of the plane to be focused and the width corresponding relationship, the method further includes:
[0031] The method further includes: based on the width of each height plane other than the plane to be focused and the width corresponding relationship, determining the continuous pixel column reflected from each height plane as a second continuous pixel column;
[0032] The method further includes: based on the second continuous pixel column, calculating the defocus amount of the height plane corresponding to the second continuous pixel column;
[0033] The method further includes: based on the defocus amount difference value between the plane to be focused and each height plane other than the plane to be focused, compensating the defocus amount of each height plane other than the plane to be focused, and determining the defocus amount of the plane to be focused based on the compensated defocus amount and the first defocus amount.
[0034] In a second aspect of the present application, a laser automatic focusing system for multiple height planes is provided, including:
[0035] An image acquisition module is configured to acquire a laser spot image.
[0036] A pixel column division module is configured to divide the continuous pixel column reflected from the different height planes according to the gray value of each column pixel point in the laser spot image.
[0037] a pixel column determination module configured to determine, based on a width of the plane to be focused and a width correspondence relationship, a continuous pixel column formed by reflection of the plane to be focused as a first pixel column, wherein the width correspondence relationship represents a correspondence relationship between widths of the continuous pixel columns and widths of different height planes;
[0038] a defocus amount calculation module configured to calculate, based on the first pixel column, a first defocus amount of the plane to be focused.
[0039] In a third aspect of the present application, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
[0040] the memory is configured to store a computer program;
[0041] the processor is configured to execute the program stored on the memory, and implement the laser automatic focusing method of any one of the first aspect.
[0042] In a fourth aspect of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the laser automatic focusing method of any one of the first aspect.
[0043] The present application has the following beneficial effects:
[0044] The present application provides a laser automatic focusing method for multiple height planes, comprising:
[0045] obtaining a laser spot image; dividing continuous pixel columns formed by reflection of different height planes according to gray values of each column of pixel points in the laser spot image; determining, based on a width of the plane to be focused and a width correspondence relationship, a continuous pixel column formed by reflection of the plane to be focused as a first pixel column; wherein the width correspondence relationship represents a correspondence relationship between widths of the continuous pixel columns and widths of different height planes; and calculating, based on the first pixel column, a first defocus amount of the plane to be focused.
[0046] Based on the above processing, the present application considers that pixel values of laser spots reflected by planes at different heights are different, and then utilizes gray values of each column of pixel points in the spot image to divide continuous pixel columns reflected by different height planes. Then, according to widths between each height plane and a correspondence relationship between the plane width and the continuous pixel column, a first pixel column formed by reflection of the plane to be focused is determined, and then a defocus amount of the plane to be focused is calculated according to the first pixel column, thereby avoiding adverse effects of reflection spots of the remaining height planes, and improving the accuracy of automatic focusing. BRIEF DESCRIPTION OF DRAWINGS
[0047] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
[0048] Figure 1 is a schematic diagram of laser spots at different heights provided by the present application;
[0049] Figure 2 is a flowchart of a laser auto-focusing method provided by the present application;
[0050] Figure 3 is a flowchart of another laser auto-focusing method provided by the present application;
[0051] Figure 4 is an experimental result verification diagram provided by the present application;
[0052] Figure 5 is a flowchart of continuous pixel column recognition provided by the present application;
[0053] Figure 6 is an experimental result diagram of continuous pixel column recognition provided by the present application;
[0054] Figure 7 is another experimental result diagram of continuous pixel column recognition provided by the present application;
[0055] Figure 8 is another experimental result diagram of continuous pixel column recognition provided by the present application;
[0056] Figure 9 is a flowchart of another laser auto-focusing method provided by the present application;
[0057] Figure 10 is a structural diagram of a laser auto-focusing system provided by the present application;
[0058] Figure 11 is a structural diagram of an electronic device provided by the present application. DETAILED DESCRIPTION
[0059] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application.
[0060] The existing laser automatic focusing method often assumes that the surface of the object irradiated by the laser is at the same height, and then calculates the defocus amount and completes automatic focusing by using the geometric characteristics of the laser spot image reflected by the object surface. Specifically, the laser automatic focusing method provided by the present application is a microscopic automatic focusing scheme based on a laser spot, which belongs to the active focusing technology. The defocus amount of the object to be measured is obtained by calculating the shape of the laser spot (including the centroid, radius, and curvature, etc.), and the moving direction and distance of the objective lens are controlled according to the defocus amount, so that the distance between the objective lens and the surface of the object to be measured is within the depth of field of the objective lens, thereby achieving the purpose of automatic focusing of the objective lens.
[0061] For example, in the line laser microscopic automatic focusing scheme provided in Chinese patents CN118584643A or CN114994896A, the defocus amount is obtained by calculating the offset between the real-time centroid of the laser spot and the reference centroid, thereby achieving the purpose of automatic focusing of the objective lens. The automatic focusing system structure and processing process involved in the operation process (such as the generation of the laser spot image and the adjustment of the objective lens based on the defocus amount) of the present application scheme can be referred to in patent CN114994896A, which will not be described in detail here.
[0062] However, since the material with multiple height planes has different height surfaces (for example, in the field of wafer detection, the wafer surface has different height components or cutting channels), the laser spot image generated by the existing automatic focusing system contains signals reflected by different height planes, and the accuracy of the directly calculated defocus amount is low.
[0063] To solve the above problems, the present application provides a laser automatic focusing method for multiple height planes, as shown in Figure 2 The method comprises the following steps:
[0064] S1, obtaining a laser spot image.
[0065] S2, dividing the continuous pixel columns formed by reflection from different height planes according to the gray value of each column of pixel points in the laser spot image.
[0066] S3, determining the continuous pixel column formed by reflection from the plane to be focused as the first pixel column based on the width of the plane to be focused and the width corresponding relationship. The width corresponding relationship represents the corresponding relationship between the width of the continuous pixel column and the width of the different height planes.
[0067] S4, calculating the first defocus amount of the plane to be focused based on the first pixel column.
[0068] Based on the above processing, the application considers that the pixel values of the plane reflected back to the laser spot are different at different heights, and then uses the gray value of each column of pixel points in the spot image to divide the continuous pixel columns reflected back from different height planes. Then, according to the width between each height plane and the corresponding relationship between the plane width and the continuous pixel columns, the first pixel column formed by reflection from the plane to be focused is determined, and then the defocus amount of the plane to be focused is calculated according to the first pixel column, avoiding the adverse effects of the reflection spot of the remaining height planes, thereby improving the accuracy of automatic focusing.
[0069] In the existing laser automatic focusing technology, according to the characteristics of the reflected laser, it can be divided into three types: point laser, multi-point laser and line laser. Because the point laser and the multi-point laser cover a small area of the measured object in the near focus, they cannot cover every height plane, and there is a risk that the plane to be focused cannot be automatically focused. Therefore, in the laser automatic focusing scheme provided in the application, a line laser is used. In addition, in the multi-height plane scene applicable to the application, the plane width of different height planes is not the same, that is, the plane width of each height plane is different.
[0070] The length of the line laser projected onto the multi-height plane in the horizontal direction in the application is usually higher than the sum of the widths of all types of height planes in the horizontal direction, that is, the horizontal length of the laser spot in the application completely covers all types of height planes. When the length of the line laser is lower than the sum of the widths of all height planes, the spot images generated by the focusing sensor at two or more adjacent exposure times can be spliced, and the spliced spot image can be used as the laser spot image obtained in step S1 to ensure that the line laser can cover every height plane.
[0071] In some embodiments, after step S1 and before S2, the laser automatic focusing method provided by the application further includes the following steps:
[0072] S5, calculate a second defocus amount corresponding to the laser spot image.
[0073] S6, determine whether the second defocus amount is higher than a preset near focus threshold, if yes, go to step S7; if no, go to step S2.
[0074] S7, adjust the height of the objective lens based on the second defocus amount, and recalculate the second defocus amount until the calculated second defocus amount is lower than the near focus threshold.
[0075] For step S5, the calculation process of the second defocus amount can be: first, directly calculating the centroid of the overall laser spot image, then calculating the centroid offset between the centroid and the focusing reference centroid when calibrating the plane to be focused, and finally obtaining the second defocus amount according to the centroid offset and the focusing sensitivity of the objective lens. The specific calculation method can also refer to the description in patent CN118584643A.
[0076] Note that the defocus amounts (such as the first defocus amount, the second defocus amount, and the third defocus amount) calculated in the present application all retain the sign of their numerical values. The sign of the defocus amount can be used to indicate the moving direction of the objective lens along the Z-axis (i.e., the vertical direction), and the absolute value of the defocus amount represents the length of the movement distance of the objective lens. Specifically, when the focal point (which can also be referred to as the focal plane) of the objective lens is above the plane to be focused, the calculated defocus amount is positive, and in the subsequent autofocus process, the objective lens needs to move downward along the Z-axis, and the downward movement distance is the numerical value of the defocus amount. When the focal point of the objective lens is below the plane to be focused, the calculated defocus amount is negative, and the objective lens needs to move upward along the Z-axis, and the upward movement distance is the absolute value of the defocus amount. In addition, in the scheme provided in the present application, the defocus amount can also be set to negative when the objective lens needs to move downward along the Z-axis, and the defocus amount can be set to positive when the objective lens needs to move upward along the Z-axis, and the absolute value represents the movement distance of the objective lens.
[0077] For step S6, the near focus threshold is a threshold set in advance, which is used to measure the distance between the focal point of the objective lens and the plane to be focused. In actual work, the near focus threshold is related to the depth of field of the objective lens, and is usually 5 to 10 times the depth of field of the objective lens. For example, the near focus threshold can be set to 10 um, and the specific value can also be adjusted according to the material characteristics of multiple height planes.
[0078] When the absolute value of the second defocus amount is greater than the near focus threshold, it indicates that the distance between the focal point of the objective lens and the plane to be focused exceeds the threshold set in advance, and the deviation between the two is large. At this time, the processing of automatic focusing can only focus on the moving direction of automatic focusing and ignore the accuracy of the defocus amount value to improve the efficiency of automatic focusing. Note that although the defocus amount calculated directly from the laser spot image has an error in the numerical value compared with the actual defocus amount of the plane to be focused, when it is greater than the near focus threshold, the moving direction of automatic focusing is accurate, so in order to improve the efficiency of automatic focusing, step S7 can be directly executed when the second defocus amount is greater than the preset near focus threshold.
[0079] When the absolute value of the second defocus amount is less than the near focus threshold, it indicates that the distance between the focus of the objective lens and the plane to be focused does not exceed the threshold set in advance, and the deviation degree of the two is small. At this time, the automatic focusing process not only needs to pay attention to the moving direction of the automatic focusing, but also needs to pay attention to the accuracy of the defocus amount value. Therefore, when the second defocus amount is less than the preset near focus threshold, step S2 is executed.
[0080] Based on the above processing, when the distance between the objective lens and the plane to be focused is high, the adjustment of the height of the objective lens according to the second defocus amount improves the efficiency of the automatic focusing on the basis of ensuring the accuracy of the moving direction of the objective lens. At the same time, when the distance between the objective lens and the plane to be focused is low, the first defocus amount is calculated to ensure the accuracy of the automatic focusing.
[0081] In order to achieve the same technical effect as described above, in some embodiments, the laser automatic focusing method provided by the present application further comprises the following steps after step S1 and before step S2:
[0082] S8, dividing the laser spot image into multiple segment spot images along the horizontal direction.
[0083] S9, calculating the defocus amount corresponding to each segment spot image as a third defocus amount respectively.
[0084] S10, screening the third defocus amount outside the preset numerical range based on the preset numerical range. The preset numerical range is used to represent the allowed defocus amount error when the measured plane is within the focusing range (i.e. the depth of field range) of the objective lens. For example, the numerical range can be -0.5um to +0.5um. The third defocus amount outside the numerical range indicates the defocus amount value outside the focusing range (i.e. at the far focus or near focus).
[0085] S11, calculating the mean value of the third defocus amount outside the numerical range, and judging whether the absolute value of the mean value is greater than the preset near focus threshold; if yes, go to step S12; if no, go to step S2. The mean value is obtained by dividing the sum of the third defocus amounts outside the numerical range by the number of the third defocus amounts outside the numerical range. For example, after the laser spot image is divided into 5 segments, 5 third defocus amounts are calculated, and if there are 3 third defocus amounts outside the numerical range, the mean value is the average value of the 3 third defocus amounts.
[0086] S12, adjusting the height of the objective lens based on the mean value, and recalculating the mean value until the absolute value of the calculated mean value is less than the near focus threshold.
[0087] Based on the above processing, the defocus amount of the segmented light spot is calculated, the distance between the objective lens and the plane to be focused is determined by the mean value, and then the method of adjusting the objective lens according to the mean value or recalculating the defocus amount is selected according to the distance. The method can not only improve the efficiency of automatic focusing, but also ensure the accuracy of automatic focusing when the distance between the objective lens and the plane to be focused is low.
[0088] In some embodiments, as shown in FIG. 2, step S2 includes the following contents. Figure 3
[0089] S201, performing binaryzation processing on the gray value of each column of pixels based on a first preset threshold, so that the gray value higher than the first preset threshold is 1, and the gray value lower than the first preset threshold is 0, to obtain a binaryzation image.
[0090] S202, performing morphological opening operation on the binaryzation image to obtain a processed image as an opening operation image.
[0091] S203, counting the sum of the gray values of each column of pixels in the opening operation image as a first gray value sum.
[0092] S204, based on a plurality of preset gray value range intervals, screening continuous pixel columns with the first gray value sum in the same gray value range interval as continuous pixel columns formed by reflection from a height plane corresponding to the gray value range interval; wherein the gray value range interval corresponds to the height plane one by one.
[0093] For step S202, the binaryzation image is subjected to morphological opening operation by using a template (or called a structure element), that is, first erosion operation and then expansion operation, so that the difference between the circular spot and the long line segment in the laser spot image can be highlighted, and the interference of some fine spots can be suppressed.
[0094] The erosion and expansion operations on the binaryzation image are described in detail. First, both erosion and expansion belong to morphological operation. For the foregoing binaryzation image (with values only 0 and 1), the process of erosion operation is to use a structure element to slide on the image. If there is a pixel with value 0 in the local window corresponding to the structure element, the center position of the structure element is revalued as 0, and the effect is to reduce the foreground area. The process of expansion operation is to use a structure element to slide on the image. If there is a pixel with value 1 in the local window corresponding to the structure element, the center position of the structure element is revalued as 1, and the effect is to expand the foreground area.
[0095] Since the morphological opening operation is to erode first and then dilate, its effect is to remove some small range of light spots in the image (i.e., it can be understood that some fine light spots are eroded) and to disconnect some slightly adhered light spots. In the present scheme, there is usually a certain gap (in the horizontal direction) visually between the connection of two light spots of different reflectivity. After binarization, the link between the two regions is cut off by erosion, and the subsequent dilation cannot reconstruct the link, thus achieving the purpose of separating the light spots reflected by different height planes in the horizontal direction.
[0096] As shown in Figure 4 , the erosion and dilation operation process of the binarized image is described. The topmost laser image represents the laser light spot image obtained in step S1. The middle horizontal maximum curve represents the maximum gray value of each column of pixels in the upper laser image. The horizontal coordinate in the image represents the order of the pixel column in the horizontal direction. The bottommost binarized laser image corresponds to the opening operation image after step S2. Among them, Figure 4 The light spot image in Figure 4 is generated for the wafer detection with two height planes. As shown in the bottommost binarized laser image, the light spot regions of two different height planes are "cut off" in the horizontal direction.
[0097] For step S203, the sum of the first gray values in the opening operation image is also used as a horizontal direction distribution mask. It can be understood that calculating the sum of the first gray values in each column of pixels in the binarized image is equivalent to obtaining the width in the vertical direction of the binarized image. In the present application, the horizontal direction represents the horizontal pixel point direction in the laser light spot image, corresponding to the length direction when the laser light spot is linear, or can be understood as the major axis direction of the semi-elliptical laser light spot, also corresponding to the motion direction of the object (multi-height plane) during the detection process. The vertical direction represents the direction of the pixel column in the laser light spot image.
[0098] For step S204, for a plurality of gray value range intervals, any two gray value range intervals do not overlap, and adjacent gray value range intervals have a common endpoint. The number of gray value range intervals is the same as the number of height planes. In actual work, n gray value range intervals are usually composed of n-1 threshold values that are different in value, and an adjacent threshold value forms a gray value range interval. The range greater than the maximum threshold value and the range lower than the minimum threshold value also form a gray value range interval, thereby obtaining n gray value range intervals.
[0099] For example, when the number of different height planes is 2, a second preset threshold is used to extract the horizontal direction response mask of the horizontal distribution mask, that is, the first gray value sum is distinguished by using the second preset threshold, and the pixel column with the first gray value sum greater than or equal to the second preset threshold Th2 is set to 1, and the pixel column with the first gray value sum less than the second preset threshold Th2 is set to 0. The value of the second preset threshold Th2 can be adjusted according to the height of the laser spot in the image (or according to the value of the last defocusing amount) to be able to distinguish the first gray value sum corresponding to different height planes.
[0100] Then, the horizontal response mask is searched, and the length of the continuous pixel column with 1 is judged. If the length is greater than or equal to a third preset threshold Th3, it is indicated that the continuous pixel column with 1 corresponds to the height plane with the longest horizontal width in the two height planes. If the length is less than the third preset threshold Th3, it is indicated that the continuous pixel column with 1 corresponds to the height plane with the shortest horizontal width in the two height planes. In addition, a fourth preset threshold Th4 less than the third preset threshold Th3 can also be added in the length judgment process, and if the length of the continuous pixel column with 1 is less than the fourth preset threshold Th4, it is indicated that the part of the pixel column belongs to a fine spot, and the part of the pixel column can be all assigned to 0 for response suppression.
[0101] In actual work, if the length of the continuous part is less than or equal to Th4, it is indicated that it belongs to a fine spot, and the values of the segment are all assigned to 0 for response suppression; if the length is greater than or equal to the maximum threshold Th3, it is indicated that it belongs to a long line segment, and the values of the segment are all assigned to -1; if the length is less than Th3 and greater than Th4, it is indicated that it belongs to a short line segment, and the values of the segment are all assigned to 1.
[0102] The above embodiment is for a wafer or screen material with two different heights, different reflectivities and different widths between height planes. By dividing the length into three intervals, greater than Th3 is marked as -1, usually a long spot belongs to a base material; less than Th4 is considered as a fine spot, and marked as 0 to be ignored; between Th3 and Th4 is marked as 1, usually such a spot corresponds to a component on the wafer or screen. Then, the final response mask is output as a position indicating feature result. 1 represents a spot area formed by a dot matrix, -1 represents a long line segment area formed by a background or a cutting path, and 0 represents that the laser reflection energy is very low and cannot be judged. The process of identifying the continuous pixel column of the two different height planes is as shown in Figure 5 The image change process in actual work is as shown in Figure 6 , Figure 7 and Figure 8 .
[0103] It is to be further explained that the laser automatic focusing scheme provided in the application utilizes the characteristic that the width difference in different height planes affects the laser spot appearance, thereby determining the continuous pixel columns corresponding to different height planes. Since the reflectivity of the measured object surface does not affect the laser spot appearance, the technical scheme provided in the application can be applied to the measured object with the same material (same reflectivity) and different materials (different reflectivity) in each plane of the multiple height planes.
[0104] In some embodiments, step S2 can also include the following steps:
[0105] Step a, counting the total sum of the gray value of each column of pixels in the laser spot image as the second total sum of gray value.
[0106] Step b, based on the preset multiple pixel value range intervals, screening the continuous pixel columns with the second total sum of gray value in the same pixel value range interval as the continuous pixel columns reflected from the height plane corresponding to the pixel value range interval. The pixel value range interval corresponds to the height plane one by one.
[0107] In step b, the number of the multiple pixel value range intervals is the same as the number of the height planes, and any two gray value range intervals do not overlap, and the adjacent gray value range intervals have a common endpoint. At the same time, the n pixel value range intervals can also be composed of n-1 threshold values with different values. Since the screening of the second total sum of gray value is completed in step b, compared with step S204, the threshold value used to form the pixel value range interval is larger, and the remaining processing process remains the same.
[0108] The laser automatic focusing method provided in the application is applied to multiple height planes, and the width of any two height planes is different. For step S3, the multiple height planes are sorted according to the width in advance, and the continuous pixel columns obtained in step S2 are classified according to the width of the pixel column and sorted according to the width, thereby obtaining the width corresponding relationship according to the one-to-one correspondence relationship of the two from large to small or from small to large order. Then, according to the order of the width of the plane to be focused in all height planes, combined with the width corresponding relationship, the first pixel column is obtained.
[0109] In which, the number of the width categories of the continuous pixel columns is consistent with the number of the width categories of the height planes. Or, the number of the width categories of the continuous pixel columns is higher than the number of the width categories of the height planes, but after the continuous pixel columns are sorted according to the width, it is necessary to delete the number higher than the number of the height plane categories in the order from small to large, so that the number of the two is consistent, to ensure that the width corresponding relationship is one-to-one.
[0110] The laser automatic focusing scheme provided by the application can be applied to a to-be-measured object having multiple different height planes and each plane having inconsistent width. Taking two different height planes as an example, according to the size of the width, the long and short order is divided, and according to the foregoing description of step S2, it can be known that the continuous pixel column can be divided into three types according to the first gray value sum or the second gray value sum in each column of pixels. Then, according to the pixel width of each type of continuous pixel column, the continuous pixel column corresponding to the short height plane and the continuous pixel column corresponding to the long height plane are sequentially divided from small to large.
[0111] For step S4, after determining the first pixel column corresponding to the to-be-focused plane, the center of mass of the laser spot image can be calculated only according to the first pixel column, and the center of mass offset of the two is calculated in combination with the focusing reference center of mass of the to-be-focused plane which has been calibrated in advance, and finally the first defocus amount is obtained according to the center of mass offset and the focusing sensitivity of the objective lens, which is used to control the moving direction and moving distance of the objective lens on the Z axis.
[0112] Considering that the first pixel column only belongs to a part of the overall laser spot image and has a small coverage, if the first defocus amount of the to-be-focused plane is calculated only by the first pixel column, the stability of the calculation result is low. Since the application adopts line laser projection, the coverage of the overall laser spot image is large, and the laser spot image contains not only the spot reflected by the to-be-focused plane but also the spot reflected by the remaining planes except the to-be-focused plane. Therefore, the defocus amount calculated for the remaining planes can be corrected according to the height difference between the to-be-focused plane and the remaining planes, and then the defocus amount of the to-be-focused plane is determined according to the corrected overall defocus amount, so as to improve the stability of the calculation result of the first defocus amount and further ensure the accuracy of automatic focusing.
[0113] In order to achieve the above effect, before step S1, the laser automatic focusing method provided by the application further comprises the following steps:
[0114] Step one, calibrate the height difference between any one height plane in the multiple height planes and the to-be-focused plane, and determine the defocus amount difference between the two planes based on the height difference. Taking a to-be-measured object having two different height planes as an example, in the calibration process, the Z axis height of the objective lens is manually adjusted, and the to-be-focused plane and the remaining planes are focused respectively, and the absolute positions Z1 and Z2 of the remaining planes and the to-be-focused plane on the Z axis are recorded, then the position Z1 corresponding to the to-be-focused plane is subtracted by the position Z2 corresponding to the remaining planes, and the displacement offset d of the two planes is obtained Z =Z1-Z2. Correspondingly, the displacement offset corresponds to the defocus amount difference between different planes.
[0115] In some embodiments, after completing the division of the continuous pixel column in step S2, the laser automatic focusing method provided by the application further comprises the following steps:
[0116] Step two, based on the width of each height plane and the width corresponding relationship except the plane to be focused, determine the continuous pixel column formed by the reflection of each height plane as the second continuous pixel column. Wherein, the second continuous pixel column represents the continuous pixel column corresponding to the remaining planes except the plane to be focused.
[0117] Step three, based on the second continuous pixel column, calculate the defocus amount of the height plane corresponding to the second continuous pixel column. Wherein, the determination of the continuous pixel column and the calculation of the defocus amount are consistent with the foregoing steps S2 and S3, and refer to the foregoing processing process.
[0118] Step four, based on the defocus amount difference between the plane to be focused and each height plane, compensate the defocus amount of each height plane, and based on the compensated defocus amount and the first defocus amount, determine the defocus amount of the plane to be focused.
[0119] Wherein, the compensation process of the defocus amount of each height plane can add the defocus amount of the height plane to the displacement offset d Z .
[0120] In some embodiments, before step four, the laser automatic focusing method provided by the application further comprises:
[0121] Step five, divide the laser spot image into multiple segment spot images along the horizontal direction, and determine the plane to be focused and the remaining planes corresponding to each segment spot image according to the continuous pixel column in each segment spot image.
[0122] Step six, judge whether the total number of segment spot images corresponding to the plane to be focused is higher than the preset segment number threshold, if yes, calculate the first defocus amount based on the multiple segment spot images corresponding to the plane to be focused. If not, calculate the defocus amount of each segment spot image corresponding to the remaining planes, and after compensating and correcting the defocus amount, calculate the first defocus amount based on the corrected defocus amount or in combination with the defocus amount corresponding to the plane to be focused.
[0123] Referring to the foregoing embodiments, in the wafer detection mark process with two height planes, the spot area formed by the dot matrix is marked as 1, the long line segment area formed by the background or cutting path is marked as -1, the area with very low laser reflection energy and cannot be judged is marked as 0, and the laser spot image is divided into 7 segments.
[0124] The calculation process of the first defocus amount is as follows: first, the centroid of each image segment is calculated by the centroid calculation formula, and the defocus amount corresponding to each laser image segment is calculated. Then, according to the marks in each spot image, the corresponding focusing plane and the remaining plane of each spot image are determined, and the total number of spot segments N1 corresponding to the focusing plane and the total number of spot segments N2 corresponding to the focusing plane are counted. Specifically, each spot image is searched one by one. If there is a mark 1 in the spot image, it means that the spot image corresponds to the focusing plane; if there is no mark 1 but there is a mark -1, it means that the spot image corresponds to the remaining plane; if there is only a mark 0 in the spot image, it means that the spot image is composed of only fine spots, which is ignored in the subsequent calculation process of the first defocus amount.
[0125] Subsequently, if N1≥3 and N2≥2, the defocus amount of the remaining plane is corrected, and the first defocus amount is calculated based on the defocus amount of the focusing plane and the corrected defocus amount of the remaining plane. If N1≥3 and N2<2, the first defocus amount is calculated based on the defocus amount of the focusing plane alone. If N1<3, the first defocus amount of the focusing plane is calculated based on the corrected defocus amount of the remaining plane.
[0126] After the laser spot image is divided into multiple segments and the defocus amount of each segment is calculated, the displacement offset d between the focusing plane and the remaining plane is calculated according to the displacement offset d between the focusing plane and the remaining plane. Z The defocus amount of the remaining plane in each spot image is compensated and corrected. After compensation and correction, one of the following defocus amount calculation strategies is selected to complete the final defocus amount calculation and obtain the first defocus amount.
[0127] Among them, the strategy for synthesizing the defocus amount of different segments (i.e., the segmented spot image) to obtain the final defocus amount is as follows:
[0128] Strategy 1: use the mean value of the defocus amount of all segments as the final defocus amount; Strategy 2: remove the maximum and minimum values from the defocus amount, and use the mean value of the remaining segments as the final defocus amount; Strategy 3: select the three segments in the middle position, and calculate the mean value as the final defocus amount.
[0129] Strategy 4: use the defocus amount of the segment with the maximum laser energy as the final defocus amount; Strategy 5: use the defocus amount of the segment with the minimum laser energy as the final defocus amount; Strategy 6: use the mean value of the three segments including the segment with the maximum laser energy and its left and right adjacent segments as the final defocus amount; Strategy 7: use the mean value of the three segments including the segment with the minimum laser energy and its left and right adjacent segments as the final defocus amount.
[0130] Wherein, the specific processing procedure for strategy 4-7 is as follows: the laser spot image is denoted as I(h, w), the height and width of the image are H and W respectively, h is the index value of pixel row, between 0 and H-1; w is the index value of pixel column, between 0 and W-1. And it is divided into 7 segments in horizontal direction, each segment is denoted as I s (h, w), s = 0,..., 6.
[0131] Then, the mean value in horizontal direction is calculated for each partition to obtain the row mean curve:
[0132] .
[0133] The mean value of each segment row mean curve, i.e. the centroid C, is calculated:
[0134] .
[0135] Then, the sum of gray value of each segment is calculated, which represents the energy E s :
[0136] .
[0137] For strategy 4, the centroid C of the segment with maximum energy is selected to calculate the defocus amount; for strategy 6, the mean value of the centroid of the segment with maximum energy and the centroid of the segment on the left and right of the segment with maximum energy is selected to calculate the defocus amount; for strategy 5 and 7, similar operations are performed.
[0138] Finally, the defocus amount d l is calculated according to the preset defocus amount calculation formula d l =-m×(C-C0), wherein m is a conversion coefficient of relative centroid and defocus amount, which is related to the focusing sensitivity of the objective lens; C0 is the focusing reference centroid when the to-be-focused plane is calibrated.
[0139] Strategy 8 uses the segment with maximum gray value to calculate the final defocus amount; strategy 9 uses the mean value of the segment with maximum gray value and the segments on the left and right of the segment with maximum gray value to calculate the final defocus amount.
[0140] Strategy 10 uses the segment with minimum standard deviation of laser line to calculate the final defocus amount; strategy 11 uses the mean value of the segment with minimum standard deviation of laser line and the segments on the left and right of the segment with minimum standard deviation of laser line to calculate the final defocus amount; strategy 12 uses the mean value of the three segments with minimum standard deviation of laser line to calculate the final defocus amount.
[0141] In the specific processing procedure of strategies 10 to 12, the image segmentation, the calculation of row mean curve and the mean value calculation can refer to the procedures of strategies 4 to 7.
[0142] Then, the standard deviation σ of each segmented row mean curve is calculated as:
[0143] .
[0144] For strategy 10, the centroid C corresponding to the partition with the smallest standard deviation in the 7 segments is selected to calculate the final defocus amount. For strategy 11, the centroids of the segment with the smallest standard deviation and the segments to the left and right of it, a total of three segments, are selected to calculate the mean value, and then the final defocus amount is calculated. For strategy 12, the centroids of the three segments with the smallest standard deviation are selected to calculate the mean value, and then the final defocus amount is calculated. The final defocus amount calculation formula is consistent with the processing process of strategies 4 to 7.
[0145] The actual working process is shown in Figure 9 , first, the absolute position of the Z axis of the objective lens is recorded when manually focusing on the interested surface (i.e., the focusing plane in the present application) of the measured object in a stationary state, and the absolute position of the Z axis of the objective lens is recorded when manually focusing on the non-interested surface (i.e., the remaining planes in the present application), and then the zero offset (i.e., the displacement offset in the present application) between the two is measured. Then, the laser spot image under the motion state of the measured object is collected, and the defocus amount is calculated by segmenting the laser spot image. Next, whether to directly drive the motor to move the objective lens for automatic focusing according to the defocus amount is determined according to the mean value of the defocus amount. If the mean value is less than or equal to the near focus threshold, the first final defocus amount is obtained by compensating the defocus amount of the non-interested surface, thereby completing the automatic focusing. If the mean value is greater than the near focus threshold, the automatic focusing is directly performed according to the mean value.
[0146] In some embodiments, as Figure 10 shown, the present application also provides a laser automatic focusing system for multiple height planes, comprising:
[0147] An image acquisition module 1001 is configured to acquire a laser spot image.
[0148] A pixel column division module 1002 is configured to divide continuous pixel columns reflected from different height planes according to the gray value of each column of pixel points in the laser spot image.
[0149] A pixel column determination module 1003 is configured to determine the continuous pixel column reflected from the focusing plane as the first pixel column based on the width of the focusing plane and a width correspondence relationship. The width correspondence relationship represents the correspondence relationship between the width of the continuous pixel column and the width of the different height planes.
[0150] A defocus amount calculation module 1004 is configured to calculate the first defocus amount of the focusing plane based on the first pixel column.
[0151] The present application also provides an electronic device, asFigure 11 As shown, the electronic device includes a processor 1101, a communication interface 1102, a memory 1103, and a communication bus 1104, wherein the processor 1101, the communication interface 1102, and the memory 1103 communicate with each other through the communication bus 1104,
[0152] The memory 1103 is configured to store a computer program.
[0153] The processor 1101 is configured to execute the program stored in the memory 1103, so as to implement any of the above laser automatic focusing methods.
[0154] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0155] The communication interface is configured to communicate between the above electronic device and other devices.
[0156] The memory can include a Random Access Memory (RAM) and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the above processor.
[0157] The above processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0158] In a further embodiment provided in the present application, a computer readable storage medium is also provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of any of the above laser auto-focusing methods.
[0159] In a further embodiment provided in the present application, a computer program product containing instructions is also provided, and when the computer program product is run on a computer, the computer is caused to perform the steps of any of the laser auto-focusing methods in the above embodiments.
[0160] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A laser autofocus method for multi-height planes, characterized in that, include: Acquire laser spot images; Based on the grayscale value of each column of pixels in the laser spot image, continuous pixel columns formed by reflections from planes at different heights are divided; wherein, the width of the planes at different heights is different; Based on the width of the plane to be focused and the width correspondence, a continuous pixel column formed by reflection from the plane to be focused is determined as the first pixel column; wherein, the width correspondence represents the correspondence between the width of the continuous pixel column and the width of the planes at different heights; Based on the first pixel column, the first defocus amount of the plane to be focused is calculated; After acquiring the laser spot image, the method further includes: Based on the laser spot image, the defocusing amount of the plane to be focused is calculated and used as the second defocusing amount; Determine whether the absolute value of the second defocus amount is greater than a preset near-focus threshold; if so, adjust the height of the objective lens based on the second defocus amount and recalculate the second defocus amount until the absolute value of the calculated second defocus amount is less than the near-focus threshold; if not, divide the continuous pixel columns formed by reflection from planes at different heights according to the gray values of each column of pixels in the laser spot image.
2. The laser autofocus method according to claim 1, characterized in that, After acquiring the laser spot image, the method further includes: The laser spot image is divided into multiple spot images along the horizontal direction; Calculate the defocus amount corresponding to each segment of the light spot image, and use them as the third defocus amount; Based on a preset numerical range, filter out the third defocus amount that is outside the preset numerical range; Calculate the average of the third defocus amount outside the numerical range, and determine whether the absolute value of the average is greater than a preset near-focus threshold; if so, adjust the height of the objective lens based on the average, and recalculate the average until the absolute value of the calculated average is less than the near-focus threshold; if not, divide the continuous pixel columns formed by reflection from planes at different heights according to the gray values of each column of pixels in the laser spot image.
3. The laser autofocus method according to claim 1, characterized in that, The step of dividing the continuous pixel columns formed by reflections from planes at different heights based on the grayscale values of each column of pixels in the laser spot image includes: The gray values of each column of pixels are binarized based on a first preset threshold so that gray values above the first preset threshold are 1 and gray values below the first preset threshold are 0, thus obtaining a binarized image. A morphological opening operation is performed on the binarized image to obtain the processed image, which is used as the opening operation image. The sum of the gray values of each column of pixels in the opening operation image is calculated and used as the first gray value sum. Based on multiple preset grayscale value ranges, a continuous pixel column whose sum of the first grayscale value is within the same grayscale value range is selected as a continuous pixel column formed by reflection from the height plane corresponding to the grayscale value range; wherein, the grayscale value ranges correspond one-to-one with the height plane.
4. The laser autofocus method according to claim 1, characterized in that, The step of dividing the continuous pixel columns formed by reflections from planes at different heights based on the grayscale values of each column of pixels in the laser spot image includes: The sum of the gray values of each column of pixels in the laser spot image is calculated as the second gray value sum. Based on multiple preset pixel value ranges, consecutive pixel columns whose sum of second gray values falls within the same pixel value range are selected as consecutive pixel columns formed by reflection from the height plane corresponding to the pixel value range; wherein, the pixel value ranges correspond one-to-one with the height planes.
5. The laser autofocus method according to claim 1, characterized in that, Prior to acquiring the laser spot image, the method further includes: The height difference between any one of the multiple height planes and the plane to be focused is calibrated, and the defocusing difference between the two planes is determined based on the height difference.
6. The laser autofocus method according to claim 5, characterized in that, After determining a continuous column of pixels formed by reflection from the plane to be focused, based on the width and width correspondence of the plane to be focused, as the first column of pixels, the method further includes: Based on the width and width correspondence of each height plane except the plane to be focused, a continuous pixel column formed by reflection from each height plane is determined as the second continuous pixel column; Based on the second consecutive pixel column, calculate the defocus amount of the height plane corresponding to the second consecutive pixel column; Based on the defocus difference between the plane to be focused and each of the other height planes, the defocus of each of the other height planes is compensated, and based on the compensated defocus and the first defocus, the defocus of the plane to be focused is determined.
7. A laser autofocus system for multi-height planes, characterized in that, include: The image acquisition module is used to acquire images of the laser spot. The pixel column division module is used to divide the continuous pixel columns formed by reflection from planes at different heights based on the gray values of each column of pixels in the laser spot image; wherein the plane widths at different heights are all different. A pixel column determination module is used to determine a continuous pixel column formed by reflection from the plane to be focused, based on the width of the plane to be focused and the width correspondence, as the first pixel column; wherein, the width correspondence represents the correspondence between the width of the continuous pixel column and the width of the planes at different heights; The defocusing amount calculation module is used to calculate the first defocusing amount of the plane to be focused based on the first pixel column; After acquiring the laser spot image, the image acquisition module further includes: calculating the defocusing amount of the plane to be focused based on the laser spot image, as a second defocusing amount; Determine whether the absolute value of the second defocus amount is greater than a preset near-focus threshold; if so, adjust the height of the objective lens based on the second defocus amount and recalculate the second defocus amount until the absolute value of the calculated second defocus amount is less than the near-focus threshold; if not, the pixel column division module divides the continuous pixel columns formed by reflection from planes at different heights according to the gray values of each column of pixels in the laser spot image.
8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in a memory, implements the laser autofocus method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program that, when executed by a processor, implements the laser autofocus method according to any one of claims 1-6.
Citation Information
Patent Citations
Automatic laser focusing device and method, electronic equipment and storage medium
CN118584643A
Microscope automatic focusing system for micro-nano step sample and focusing method thereof
CN114994896A
Defocusing amount acquisition system, method and device in microscopic image definition automatic optimization
CN119960161A