Automatic laser focusing method, system and equipment for multi-height plane and medium

By dividing the continuous pixel columns of the laser spot image on multi-height planes and calculating the defocus amount, the problem of inaccurate multi-height plane focusing in the existing technology is solved, and a more efficient and accurate autofocus effect is achieved.

CN120742519AActive Publication Date: 2025-10-03HEFEI I TEK OPTOELECTRONICS CO LTD

Patent Information

Application Number
CN202511271869.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-10-03
Estimated Expiration
2045-09-08

AI Technical Summary

Technical Problem

Existing autofocus technology cannot achieve precise focusing on multiple height planes. The laser spot image contains signals reflected from planes at different heights, resulting in inaccurate calculation of defocus.

Method used

By acquiring the laser spot image, the continuous pixel columns formed by reflection from planes at different heights are divided according to the grayscale value of each column of pixels. The first pixel column is determined based on the width-to-width correspondence of the plane to be focused, and the defocus amount is calculated. Combined with morphological opening operation and preset threshold processing, the accurate defocus amount is screened out.

Benefits of technology

The accuracy of autofocus is improved, ensuring accurate focus between the objective lens and the plane to be focused, and improving the efficiency and accuracy of autofocus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120742519A_ABST
    Figure CN120742519A_ABST
Patent Text Reader

Abstract

The invention discloses a laser automatic focusing method, system and device for a multi-height plane and a medium, and relates to the field of automatic focusing. The method comprises the following steps: acquiring a laser spot image; according to the gray value of each column of pixel points in the laser spot image, dividing continuous pixel columns formed by plane reflection from different heights; based on the width of the to-be-focused plane and the width corresponding relation, determining a continuous pixel column formed by reflection of the to-be-focused plane as a first pixel column; and calculating a first defocusing amount of the to-be-focused plane based on the first pixel column. On the basis of the above processing, in consideration of different pixel values of laser spots reflected by the planes at different heights, continuous pixel columns reflected by the planes at different heights are divided. According to the method, the first pixel column is determined according to the width and the width corresponding relation between the height planes, and then the defocusing amount of the to-be-focused plane is calculated, so that the adverse effect caused by light spots reflected by other height planes is avoided, and the accuracy of automatic focusing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of autofocus, and in particular relates to a laser autofocus method, system, equipment and medium for multi-height planes. Background Art

[0002] The laser spot autofocus technology based on laser spot emits a laser spot to the object to be measured and collects the laser spot image reflected by the object to be measured. Then, the defocus amount is calculated based on the morphology of the laser spot, and the motor is driven to move the objective lens to the focus position to achieve laser autofocus. Among them, the laser spot morphology formed at different defocus positions is different, such as Figure 1 As shown, the farther the distance, the larger the fan shape. On the other hand, the fan shape has different directions at different upper and lower positions on the focus plane. This characteristic of the laser spot is used to calculate the defocus amount.

[0003] However, existing autofocus technology can often only process materials with a single-height focus plane. When the object surface has parts at different heights and only one plane belongs to the plane to be focused, the laser spot image contains signals reflected back from planes at different heights. The defocus amount calculated directly based on this image is inaccurate, and it is impossible to achieve accurate autofocus on any height plane.

[0004] Therefore, an automatic focusing method is urgently needed to solve the above problems. Summary of the Invention

[0005] The present application proposes a laser autofocus method, system, device and medium for multiple height planes, which utilizes laser spot images to achieve precise focusing on any height plane in multiple height planes.

[0006] To achieve the above objectives, this application proposes the following technical solutions: In a first aspect of the present application, a laser autofocus method for multiple height planes is provided, comprising: Acquire laser spot image; Dividing continuous pixel columns formed by reflection from planes at different heights according to the grayscale value of each column of pixel points in the laser spot image; Based on the width of the plane to be focused and a width correspondence relationship, determining a continuous pixel column formed by reflection from the plane to be focused as a first pixel column; wherein the width correspondence relationship represents a correspondence between the width of the continuous pixel column and the widths of planes at different heights; A first defocus amount of the plane to be focused is calculated based on the first pixel column.

[0007] Optionally, after acquiring the laser spot image, the method further includes: Calculating a defocus amount of the plane to be focused based on the laser spot image as a second defocus 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 calculated absolute value of the second defocus amount is less than the near-focus threshold; if not, divide the continuous pixel columns formed by reflection from planes of different heights according to the grayscale value of each column of pixel points in the laser spot image.

[0008] Optionally, after acquiring the laser spot image, the method further includes: Dividing the laser spot image into multiple spot images along the horizontal direction; Calculate the defocus amount corresponding to each segment of the spot image as the third defocus amount; Based on a preset numerical range, screening a third defocus amount outside the numerical range; Calculate the average of the third defocus amounts 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 of different heights according to the grayscale value of each column of pixel points in the laser spot image.

[0009] Optionally, dividing the continuous pixel columns formed by reflection from planes at different heights according to the grayscale value of each column of pixel points in the laser spot image includes: Binarize the grayscale values ​​of each column of pixels based on a first preset threshold value, so that grayscale values ​​above the first preset threshold value are 1 and grayscale values ​​below the first preset threshold value are 0, thereby obtaining a binary image; Performing a morphological opening operation on the binary image to obtain a processed image as an opening operation image; Counting the sum of the grayscale values ​​of each column of pixels in the opening operation image as the first grayscale value sum; Based on a plurality of preset grayscale value range intervals, continuous pixel columns whose first grayscale value sum is within the same grayscale value range interval are screened as continuous pixel columns formed by reflection from a height plane corresponding to the grayscale value range interval; wherein the grayscale value range intervals correspond to the height planes one-to-one.

[0010] Optionally, dividing the continuous pixel columns formed by reflection from planes at different heights according to the grayscale value of each column of pixel points in the laser spot image includes: Counting the sum of the grayscale values ​​of each column of pixels in the laser spot image as the second grayscale value sum; Based on a plurality of preset pixel value range intervals, continuous pixel columns whose second grayscale value sum is within the same pixel value range interval are screened as continuous pixel columns formed by reflection from a height plane corresponding to the pixel value range interval; wherein the pixel value range intervals correspond one-to-one to the height planes.

[0011] Optionally, before 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 a defocus difference between the two planes is determined based on the height difference.

[0012] Optionally, after determining, based on the width of the plane to be focused and the width correspondence relationship, a continuous pixel column formed by reflection from the plane to be focused as the first pixel column, the method further includes: Based on the width-to-width correspondence of each height plane except the plane to be focused, determining a continuous pixel column formed by reflection from each height plane as a second continuous pixel column; Calculating, based on the second continuous pixel column, a defocus amount of a height plane corresponding to the second continuous pixel column; Based on the defocus difference between the plane to be focused and each of the remaining height planes, the defocus of each of the remaining height planes is compensated, and the defocus of the plane to be focused is determined based on the compensated defocus and the first defocus.

[0013] In a second aspect of the present application, a laser autofocus system for multiple height planes is provided, comprising: An image acquisition module, used for acquiring a laser spot image; A pixel column division module is used to divide the continuous pixel columns formed by reflection from planes of different heights according to the grayscale value of each column of pixel points in the laser spot image; a pixel column determination module, configured to determine, based on the width of the plane to be focused and a width correspondence relationship, a continuous pixel column formed by reflection from the plane to be focused, as a first pixel column; wherein the width correspondence relationship represents a correspondence between the width of the continuous pixel column and the widths of planes at different heights; A defocus amount calculation module is used to calculate a first defocus amount of the plane to be focused based on the first pixel column.

[0014] 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 communicate with each other via the communication bus; Memory for storing computer programs; The processor is configured to implement the laser autofocus method described in any one of the first aspects when executing a program stored in the memory.

[0015] In a fourth aspect of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the laser autofocus method described in any one of the first aspects is implemented.

[0016] The beneficial effects of this application are as follows: The present application provides a laser autofocus method for multiple height planes, comprising: Acquire a laser spot image; divide the continuous pixel columns formed by reflection from planes at different heights according to the grayscale value of each column of pixel points in the laser spot image; determine the continuous pixel columns 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 correspondence; wherein the width correspondence represents the correspondence between the width of the continuous pixel columns and the widths of planes at different heights; and calculate the first defocus amount of the plane to be focused based on the first pixel column.

[0017] Based on the above processing, this application takes into account the different pixel values ​​of the laser spot reflected back from planes at different heights, and then uses the grayscale value of each column of pixels in the spot image to divide the continuous pixel columns reflected from planes at different heights. Then, based on the width between each height plane and the correspondence between the plane width and the continuous pixel columns, the first pixel column formed by the reflection from the plane to be focused is determined, and then the defocus amount of the plane to be focused is calculated based on this first pixel column, avoiding the adverse effects of the light spots reflected from planes at other heights, thereby improving the accuracy of autofocus. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 This is a schematic diagram of a laser spot at different height planes provided by this application; Figure 2 This is a flow chart of a laser autofocus method provided by the present application; Figure 3 This is a flow chart of another laser autofocus method provided by the present application; Figure 4 This is an experimental result verification diagram provided by this application; Figure 5 This is a schematic diagram of a process for identifying a continuous pixel column provided by the present application; Figure 6 This is an experimental result diagram of continuous pixel column recognition provided by this application; Figure 7 This is another experimental result diagram of continuous pixel column recognition provided by this application; Figure 8 This is another experimental result diagram of continuous pixel column recognition provided by this application; Figure 9 is a flow chart of another laser autofocus method provided by the present application; Figure 10 This is a structural diagram of a laser autofocus system provided by this application; Figure 11 This is a structural diagram of an electronic device provided by this application. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.

[0020] Existing laser autofocus methods often assume that the surface of the object irradiated by the laser is at the same height, and then use the geometric characteristics of the laser spot image reflected back from the object surface to calculate the defocus amount and complete autofocus. Specifically, the laser autofocus method provided by this application is a microscopic autofocus solution based on laser spots, which belongs to active focusing technology. The defocus amount of the object to be measured is obtained by calculating the laser spot shape (including the center of mass, radius, and curvature, etc.), and the movement direction and movement 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 range of the objective lens, thereby achieving the purpose of automatic focusing of the objective lens.

[0021] For example, in the line laser microscopy autofocus solution provided in Chinese patents CN118584643A or CN114994896A, the defocus value is calculated by calculating the offset between the real-time center of mass of the laser spot and the reference center of mass, thereby achieving the purpose of automatic focusing of the objective lens. The autofocus system structure and processing involved in the operation of this application solution (such as the generation of the laser spot image and the adjustment of the objective lens based on the defocus value) can be referenced as shown in patent CN114994896A and will not be described in detail here.

[0022] However, since materials with multiple height planes have surfaces of different heights (for example, in the field of wafer inspection, there are components or cutting paths of different heights on the wafer surface), the laser spot image generated by the existing autofocus system contains signals reflected from planes of different heights, and the directly calculated defocus amount has low accuracy.

[0023] In order to solve the above problems, the present application provides a laser autofocus method for multiple height planes, such as Figure 2 As shown, the method includes the following steps: S1. Acquire a laser spot image.

[0024] S2. Divide the continuous pixel columns formed by reflection from planes at different heights according to the grayscale value of each column of pixel points in the laser spot image.

[0025] S3. Determine, 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 as a first pixel column, wherein the width correspondence represents a correspondence between the width of the continuous pixel column and the widths of planes at different heights.

[0026] S4. Calculate a first defocus amount of the plane to be focused based on the first pixel column.

[0027] Based on the above processing, this application takes into account the different pixel values ​​of the laser spot reflected back from planes at different heights, and then uses the grayscale value of each column of pixels in the spot image to divide the continuous pixel columns reflected from planes at different heights. Then, based on the width between each height plane and the correspondence between the plane width and the continuous pixel columns, the first pixel column formed by the reflection from the plane to be focused is determined, and then the defocus amount of the plane to be focused is calculated based on this first pixel column, avoiding the adverse effects of the light spots reflected from planes at other heights, thereby improving the accuracy of autofocus.

[0028] Existing laser autofocus technologies can be divided into three types based on the characteristics of the reflected laser: point laser, multi-point laser, and line laser. Since point laser and multi-point laser cover a small area of ​​the object to be measured when they are in close 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 autofocus solution provided in this application, a line laser is used. In addition, in the multi-height plane scenario to which this application is applicable, the plane widths at different height planes are different, that is, the plane widths of each height plane are different.

[0029] In this application, the horizontal length of the spot projected by the line laser onto multiple height planes is generally greater than the sum of the horizontal widths of all types of height planes, i.e., the horizontal length of the laser spot in this application completely covers all types of height planes. When the length of the line laser is less than the sum of the widths of all height planes, the spot images generated by the focus sensor at two or more adjacent exposure times can be spliced ​​together, 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.

[0030] In some embodiments, after step S1 and before step S2, the laser autofocus method provided by the present application further includes the following steps: S5. Calculate a second defocus amount corresponding to the laser spot image.

[0031] S6. Determine whether the second defocus amount is higher than a preset near-focus threshold. If so, go to step S7; if not, go to step S2.

[0032] 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.

[0033] For step S5, the calculation process of the second defocus amount can be: first directly calculate the center of mass of the overall laser spot image, and then calculate the center of mass offset between the center of mass and the focus reference center of mass when calibrating the plane to be focused, and finally obtain the second defocus amount based on the center of mass offset and the focus sensitivity of the objective lens. The specific calculation method can also be referred to the record in patent CN118584643A.

[0034] It should be noted that the defocus values ​​calculated in the present application (e.g., the first defocus value, the second defocus value, and the third defocus value) all retain the positive and negative signs of their values. The positive and negative signs of the defocus values ​​can be used to indicate the direction of movement of the objective lens along the Z axis (i.e., in the vertical direction), while the absolute value of the defocus value indicates the length of the distance the objective lens moves. Specifically, when the focus of the objective lens (which can also be expressed as the focal plane) is above the plane to be focused, the calculated defocus value is a positive value. In the subsequent autofocus process, the objective lens needs to move downward along the Z axis, and the distance of the downward movement is the value of the defocus value; when the focus of the objective lens is below the plane to be focused, the calculated defocus value is a negative value. The objective lens needs to move upward along the Z axis, and the distance of the upward movement is the absolute value of the defocus value. In addition, in the solution provided in the present application, it is also possible to set the defocus value to be a negative value, indicating that the objective lens needs to move downward along the Z axis, and when the defocus value is a positive value, indicating that the objective lens needs to move upward along the Z axis, and the absolute value indicates the distance the objective lens moves.

[0035] Regarding step S6, the near-focus threshold is a pre-set threshold used to measure the distance between the focal point of the objective lens and the plane to be focused. In practice, the near-focus threshold is related to the depth of field of the objective lens and is typically 5 to 10 times that depth. For example, the near-focus threshold can be set to 10 μm, and the specific value can also be adjusted based on the material characteristics of the multiple height planes.

[0036] When the absolute value of the second defocus value 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 a pre-set threshold, and the degree of deviation between the two is significant. In this case, the autofocus process can focus only on the direction of autofocus movement, ignoring the accuracy of the defocus value, to improve autofocus efficiency. It is noted that although the defocus value calculated directly from the laser spot image has a numerical error compared to the actual defocus value of the plane to be focused, when it is greater than the near-focus threshold, the autofocus movement direction is accurate. Therefore, to improve autofocus efficiency, step S7 can be directly executed when the second defocus value is greater than the preset near-focus threshold.

[0037] When the absolute value of the second defocus value is less than the near-focus threshold, it indicates that the distance between the focal point of the objective lens and the plane to be focused does not exceed the pre-set threshold, and the degree of deviation between the two is small. In this case, the autofocus process must pay attention not only to the direction of the autofocus movement but also to the accuracy of the defocus value. Therefore, when the second defocus value is less than the preset near-focus threshold, the process proceeds to step S2.

[0038] Based on the above processing, when the distance between the objective lens and the plane to be focused is large, the objective lens height is adjusted according to the second defocus amount, thereby improving the efficiency of autofocus while ensuring the accurate movement direction of the objective lens. At the same time, when the distance between the objective lens and the plane to be focused is small, the first defocus amount is used to ensure the accuracy of autofocus.

[0039] To achieve the same technical effects as above, in some embodiments, the laser autofocus method provided by the present application further includes the following steps after step S1 and before step S2: S8. Divide the laser spot image into multiple segments of spot images along the horizontal direction.

[0040] S9. Calculate the defocus amount corresponding to each segment of the spot image and use them as the third defocus amount.

[0041] S10. Based on a preset numerical range, filter out third defocus values ​​that are outside the range. The preset numerical range represents the allowable defocus error when the measured plane is within the focal range (i.e., depth of field range) of the objective lens. For example, the numerical range may be -0.5 μm to +0.5 μm. A third defocus value outside this numerical range indicates a defocus value outside the focal range (i.e., in far focus or near focus).

[0042] S11. Calculate the average of the third defocus values ​​outside the numerical range and determine whether the absolute value of the average is greater than a preset near-focus threshold; if so, proceed to step S12; if not, proceed to step S2. The average is calculated by dividing the sum of the third defocus values ​​outside the numerical range by the number of third defocus values ​​outside the numerical range. For example, if the laser spot image is divided into five segments and five third defocus values ​​are calculated, and if there are three third defocus values ​​outside the numerical range, the average is the average of the three third defocus values.

[0043] S12. Adjust the height of the objective lens based on the mean value, and recalculate the mean value until the absolute value of the calculated mean value is less than the near-focus threshold value.

[0044] Based on the above processing, the defocus amount calculation method of the segmented light spot is used, and the mean value is used to judge the distance between the objective lens and the plane to be focused. Then, according to the distance, a method of directly adjusting the objective lens according to the mean value or recalculating the defocus amount is selected. This not only improves the efficiency of autofocus, but also ensures the accuracy of autofocus when the distance between the objective lens and the plane to be focused is low.

[0045] In some embodiments, as Figure 3 As shown, step S2 includes the following contents: S201 , binarizing the grayscale values ​​of each column of pixels based on a first preset threshold value, so that grayscale values ​​above the first preset threshold value are 1 and grayscale values ​​below the first preset threshold value are 0, thereby obtaining a binary image.

[0046] S202 : Perform a morphological opening operation on the binary image to obtain a processed image as an opening operation image.

[0047] S203 , calculating the sum of the grayscale values ​​of each column of pixels in the open operation image as a first grayscale value sum.

[0048] S204. Based on a plurality of preset grayscale value ranges, select continuous pixel columns whose first grayscale value sums are within the same grayscale value range as continuous pixel columns formed by reflection from a height plane corresponding to the grayscale value range; wherein the grayscale value ranges correspond to the height planes in a one-to-one manner.

[0049] For step S202, a morphological opening operation is performed on the binary image using a template (or structural element), that is, an erosion operation is performed first, and then a dilation operation is performed. This not only highlights the difference between the circular spots and long line segments in the laser spot image, but also suppresses the interference of some fine spots.

[0050] The following describes the erosion and dilation operations for a binary image. Both erosion and dilation are morphological operations. For the aforementioned binary image (which can only take values ​​of 0 and 1), the erosion operation involves sliding a structuring element across the image. If a pixel within the local window corresponding to the structuring element has a value of 0, the center of the structuring element is reassigned to 0, effectively shrinking the foreground area. The dilation operation involves sliding a structuring element across the image. If a pixel within the local window of the structuring element has a value of 1, the center of the structuring element is reassigned to 1, effectively expanding the foreground area.

[0051] Since the morphological opening operation is an erosion followed by a dilation operation, its effect is to remove some small-scale light spots in the image (that is, it can be understood as some fine light spots being eroded) and disconnect some slightly adhered light spots. In this scheme, there is usually a certain visual gap (in the horizontal direction) at the connection between two light spots with different reflectivity. After binarization, the connection between the two areas will be cut off by erosion, and the subsequent dilation cannot reconstruct the connection, achieving the purpose of separating the light spots reflected back from planes at different heights in the horizontal direction.

[0052] like Figure 4 As shown in the figure, the erosion and expansion operation process of the binary image is explained. The top laser image represents the laser spot image obtained in step S1. The horizontal maximum value curve in the middle is used to represent the maximum grayscale value of each column of pixels in the upper laser image. The horizontal coordinates in the image represent the horizontal order of the pixel columns. The bottom binary laser image corresponds to the opening operation image processed by step S2. Among them, Figure 4 The spot image in the figure is generated for wafer inspection with two height planes. As shown in the binary laser image at the bottom, the reflected spot areas of the two different height planes are "cut off" in the horizontal direction.

[0053] For step S203, the sum of the first grayscale values ​​in the image is calculated and used as a distribution mask in the horizontal direction. It can be understood that calculating the sum of the first grayscale values ​​in each column of pixels in the binary image is equivalent to obtaining the width in the vertical direction of the binary image. In this application, the horizontal direction refers to the horizontal pixel direction in the laser spot image, which corresponds to the length direction when the laser spot is a straight line, or can be understood as the long axis direction in the semi-elliptical laser spot, which also corresponds to the movement direction of the object to be measured (multi-height plane) during the detection process. The vertical direction refers to the direction of the pixel column in the laser spot image.

[0054] For step S204, for the plurality of grayscale value range intervals, any two grayscale value range intervals do not overlap, and adjacent grayscale value range intervals have a common endpoint. The number of grayscale value range intervals is the same as the number of types of height planes. In actual work, n grayscale value range intervals are usually composed of n-1 threshold values ​​with different values, and each grayscale value range interval is formed between adjacent threshold values. The range greater than the maximum threshold value and the range below the minimum threshold value also constitute a grayscale value range interval, thereby obtaining n grayscale value range intervals.

[0055] For example, when there are two planes at different heights, a second preset threshold is used to extract a horizontal response mask from the horizontal distribution mask. Specifically, the second preset threshold is used to differentiate the first grayscale value sums. Pixel columns with first grayscale value sums greater than or equal to the second preset threshold Th2 are set to 1, and pixel columns with first grayscale value sums less than the second preset threshold Th2 are set to 0. The value of the second preset threshold Th2 can be adjusted based on the height of the laser spot in the image (or the value of the previous defocus value) to differentiate the first grayscale value sums corresponding to planes at different heights.

[0056] Then, the horizontal response mask is searched, and the length of the continuous pixel column that appears continuously as 1 is judged. If the length is greater than or equal to the third preset threshold value Th3, it means that the continuous pixel column that appears continuously as 1 corresponds to the height plane with the longest horizontal width in the two height planes. If the length is lower than the third preset threshold value Th3, it means that the continuous pixel column that appears continuously as 1 corresponds to the height plane with the shortest horizontal width in the two height planes. In addition, in the length judgment process, a fourth preset threshold value Th4 that is lower than the third preset threshold value Th3 can be added. If the length of the continuous pixel column that appears continuously as 1 is lower than the fourth preset threshold value Th4, it means that the part of the pixel column corresponds to a fragmented light spot, and all the pixels in this part can be assigned a value of 0 for response suppression.

[0057] In actual operation, if the length of the continuous part is less than or equal to Th4, it means that it is a fragmented light spot, and all the values ​​of this segment are assigned to 0 for response suppression; if the length is greater than or equal to the maximum threshold Th3, it means that it is a long line segment, and the values ​​of this segment are flipped and all are assigned to -1; if the length is less than Th3 and greater than Th4, it means that it is a short line segment, and all the values ​​of this segment are assigned to 1.

[0058] The above embodiment is aimed at wafers and screen materials with two different heights, different reflectivities, and different widths between height planes. By dividing the length into three intervals, those greater than Th3 are marked as -1, and usually the longer light spots belong to the base material; those less than Th4 are considered to be fine light spots, marked as 0 to indicate that they are ignored; those between Th3 and Th4 are marked as 1, and usually such light spots correspond to components on the wafer or on the screen. Afterwards, the final response mask is output as a position indication feature result. Among them, 1 represents the light spot area formed by the dot matrix, -1 represents the long line segment area formed by the background or cutting path, and 0 represents that the laser reflection energy is very low and cannot be judged. Among them, the process of identifying continuous pixel columns of two different height planes is as follows. Figure 5 As shown in the figure, the image change process in actual work is as follows Figure 6 、 Figure 7 and Figure 8 shown.

[0059] As a supplementary note, the laser autofocus solution provided in this application utilizes the characteristic that the width differences at different height planes affect the laser spot morphology, thereby determining the continuous pixel columns corresponding to different height planes. Because the reflectivity of the surface of the object being measured does not affect the laser spot morphology, the technical solution provided in this application is applicable to objects with both consistent materials (same reflectivity) and inconsistent materials (different reflectivities) across multiple height planes.

[0060] In some embodiments, step S2 may also include the following steps: Step a: Counting the sum of the grayscale values ​​of each column of pixels in the laser spot image as the second grayscale value sum.

[0061] Step b: Based on a plurality of preset pixel value ranges, select a continuous pixel column whose sum of the second grayscale values ​​is within the same pixel value range as a continuous pixel column formed by reflection from a height plane corresponding to the pixel value range, wherein the pixel value ranges correspond to the height planes in a one-to-one manner.

[0062] Among them, the number of the multiple pixel value range intervals in step b is the same as the number of types of height planes, and any two gray value range intervals do not overlap, and there is a common endpoint between adjacent gray value range intervals. At the same time, the n pixel value range intervals can also be composed of n-1 threshold values ​​with different numerical values. Since the screening for the sum of the second gray value is completed in step b, the threshold used to form the pixel value range interval is larger than that in step S204, and the rest of the processing process remains consistent.

[0063] The laser autofocus method provided in this application is applied to multiple height planes, where the widths of any two height planes are different. For step S3, the multiple height planes are pre-sorted by width, and the continuous pixel columns obtained in step S2 are sorted by their widths and sorted by width. Thus, a width correspondence is obtained based on a one-to-one correspondence between the two, either from large to small or from small to large. Then, the first pixel column is obtained based on the order of the widths of the plane to be focused across all height planes and the width correspondence.

[0064] The number of width types of the continuous pixel columns is consistent with the number of width types of the height plane. Alternatively, the number of width types of the continuous pixel columns is greater than the number of width types of the height plane, but after the types of the continuous pixel columns are sorted by width, the number of types greater than the height plane needs to be deleted in ascending order to make the two numbers consistent, so as to ensure a one-to-one correspondence between the widths.

[0065] The laser autofocus solution provided by this application can be applied to an object to be measured with multiple planes of different heights and inconsistent widths of each plane. Taking two planes of different heights as an example, they are sorted into long and short according to the size of the width. Combined with the description of the aforementioned step S2, it can be seen that continuous pixel columns can be divided into three types according to the sum of the first grayscale value or the sum of the second grayscale value in each column of pixels. Then, according to the pixel width of each type of continuous pixel column, they are divided into fine light spots, continuous pixel columns corresponding to short height planes, and continuous pixel columns corresponding to long height planes in order from small to large.

[0066] For step S4, after determining the first pixel column corresponding to the plane to be focused, the center of mass of the laser spot image can be calculated only based on the first pixel column, and combined with the focus reference center of mass that has been calibrated in advance for the plane to be focused, the center of mass offset of the two is calculated. Finally, based on the center of mass offset and the focusing sensitivity of the objective lens, the first defocus amount is obtained, which is used to control the moving direction and distance of the objective lens on the Z axis.

[0067] Considering that the first pixel column is only a part of the overall laser spot image and has a small coverage area, if the first defocus amount of the plane to be focused is calculated based on the first pixel column alone, the stability of the calculation result will be low. Since the present application adopts line laser projection, the coverage area of ​​the overall laser spot image is relatively large, and the laser spot image contains both the light spots reflected back by the plane to be focused and the light spots reflected back by the planes other than the plane to be focused. Therefore, the defocus amount calculated for the remaining planes can be corrected based on the height difference between the plane to be focused and the remaining planes, and then the defocus amount of the plane to be focused can be determined based on the corrected total defocus amount, so as to improve the stability of the first defocus amount calculation result and thus ensure the accuracy of autofocus.

[0068] In order to achieve the above effect, before step S1, the laser autofocus method provided by the present application further includes the following steps: Step 1: Calibrate the height difference between any one of the multiple height planes and the plane to be focused, and determine the defocus difference between the two planes based on the height difference. Taking the object to be measured with two different height planes as an example, during the calibration process, first manually adjust the Z-axis height of the objective lens, focus on the plane to be focused and the remaining planes respectively, record the Z-axis absolute positions Z1 and Z2 between the remaining planes and the plane to be focused, and then subtract the position Z1 corresponding to the plane to be focused from the position Z2 corresponding to the remaining planes to obtain the displacement offset d between the two planes. Z = Z1 - Z2. Accordingly, the displacement offset corresponds to the defocus difference between different planes.

[0069] In some embodiments, after the division of the continuous pixel columns is completed in step S2, the present application provides a laser autofocus method further comprising the following steps: Step 2: Based on the width-to-width correspondence of each height plane except the plane to be focused, determine a continuous pixel column formed by reflection from each height plane as a second continuous pixel column. The second continuous pixel column represents a continuous pixel column corresponding to the remaining planes except the plane to be focused.

[0070] Step 3: Based on the second continuous pixel column, calculate the defocus amount of the height plane corresponding to the second continuous pixel column. The process of determining the continuous pixel column and calculating the defocus amount is consistent with the above steps S2 and S3, and can be referred to the above processing process.

[0071] Step 4: Based on the defocus difference between the plane to be focused and each of the remaining height planes, the defocus of each of the remaining height planes is compensated, and the defocus of the plane to be focused is determined based on the compensated defocus and the first defocus.

[0072] In the compensation process of the defocus amount of each other height plane, the defocus amount of the height plane can be added to the displacement offset d obtained in the above step 1. Z .

[0073] In some embodiments, before step 4, the laser autofocus method provided by the present application further includes: Step 5: Divide the laser spot image into multiple spot images along the horizontal direction, and determine the plane to be focused and the remaining planes corresponding to each spot image segment based on the continuous pixel columns in each spot image segment.

[0074] Step 6: Determine whether the total number of spot image segments corresponding to the plane to be focused is greater than a preset segment threshold. If so, calculate a first defocus value based solely on the multiple spot image segments corresponding to the plane to be focused. If not, calculate the defocus value of each spot image segment corresponding to the remaining planes, compensate and correct the defocus value, and then calculate the first defocus value based on the corrected defocus value or in combination with the defocus value corresponding to the plane to be focused.

[0075] Referring to the above embodiment, in the wafer inspection and marking 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 where the laser reflection energy is very low and cannot be judged is marked as 0, and the laser spot image is divided into 7 segments.

[0076] The calculation process of the first defocus amount is as follows: First, the center of mass of each image segment is calculated by the center of mass calculation formula, and the corresponding defocus amount of each laser image segment is calculated. Then, according to the mark in each spot image segment, the to-be-focused plane and the remaining planes corresponding to each spot image segment are determined, and the total number of spot segments N1 corresponding to the to-be-focused plane and the total number of spot segments N2 corresponding to the to-be-focused plane are counted. Specifically, each spot image segment is searched one by one. If there is a mark 1 in the spot image segment, it means that the spot image segment corresponds to the to-be-focused plane; if there is no mark 1 but a mark -1 exists, it means that the spot image segment corresponds to the remaining planes; if there is only a mark 0 in the spot image segment, it means that the spot image segment is composed only of fine spots and is ignored in the subsequent calculation process of the first defocus amount.

[0077] Subsequently, if N1 ≥ 3 and N2 ≥ 2, the defocus amounts corresponding to the remaining planes are corrected and then combined with the defocus amount corresponding to the plane to be focused to calculate the first defocus amount. If N1 ≥ 3 and N2 < 2, the first defocus amount is calculated based solely on the defocus amount corresponding to the plane to be focused. If N1 < 3, the defocus amounts corresponding to the remaining planes are corrected and then the first defocus amount of the plane to be focused is calculated based on the corrected defocus amounts.

[0078] After dividing the laser spot image into multiple segments and calculating the defocus amount of each segment, the displacement offset d between the plane to be focused and the remaining planes is calculated. Z , the defocus amounts of the remaining planes in each segment of the spot image are compensated and corrected. After the compensation and correction, any one of the following defocus amount calculation strategies is selected to complete the calculation of the final defocus amount and obtain the first defocus amount.

[0079] The strategy for comprehensively calculating the defocus amounts of different segments (i.e., the segmented spot images) to obtain the final defocus amount is as follows: Strategy 1: Use the average of the defocus amounts of all segments as the final defocus amount; Strategy 2: Remove the maximum and minimum values ​​in the defocus amount, and use the defocus amounts of the remaining segments to calculate the average as the final defocus amount; Strategy 3: Select the three segments in the middle and calculate the average as the final defocus amount.

[0080] 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 average of the three segments, including the segment with the maximum laser energy and the adjacent segments on the left and right, as the final defocus amount; Strategy 7: Use the average of the three segments, including the segment with the minimum laser energy and the adjacent segments on the left and right, as the final defocus amount.

[0081] The specific processing process for strategies 4-7 is as follows: the laser spot image is denoted as I(h,w), where the height and width of the image are H and W respectively, h is the index value of the pixel row, ranging from 0 to H-1; w is the index value of the pixel column, ranging from 0 to W-1. It is divided into 7 segments in the horizontal direction, each segment is denoted as I s (h,w),s=0,...,6.

[0082] Then, the horizontal mean is calculated for each partition separately to obtain the row mean curve: .

[0083] Calculate the mean of each segmented row mean curve, that is, the centroid C: .

[0084] After that, the sum of the grayscale values ​​of each segment is calculated to represent the energy E s : .

[0085] For strategy 4, the centroid C of the segment with the maximum energy is selected to calculate the defocus amount; for strategy 6, the segment with the maximum energy and one on its left and right, a total of three centroids, are selected to calculate the defocus amount; similar to strategies 5 and 7.

[0086] Finally, according to the preset defocus calculation formula d l =-m×(C-C0), calculate the defocus amount d l Where m is the conversion factor between the relative center of mass and the defocus amount, which is related to the focus sensitivity of the objective lens; C0 is the focus reference center of mass when calibrating the focus plane.

[0087] Strategy 8: Use the segment defocus amount of the maximum grayscale value as the final defocus amount; Strategy 9: Use the segment with the maximum grayscale value plus the left and right adjacent segments, a total of three segments, as the final defocus amount.

[0088] Strategy 10: Use the segment defocus with the smallest laser line standard deviation to calculate the final defocus. Strategy 11: Use the segment with the smallest laser line standard deviation plus the left and right adjacent segments, and the average defocus of the three segments as the final defocus. Strategy 12: Use the average defocus of the three segments with the smallest laser line standard deviation to calculate the final defocus.

[0089] In the specific processing of strategies 10 to 12, for image segmentation, calculation of row mean curve and mean calculation, reference can be made to the processes of strategies 4 to 7 above.

[0090] Afterwards, the standard deviation σ of each segmented row mean curve is calculated as: .

[0091] For strategy 10, the centroid C corresponding to the partition with the smallest standard deviation among the seven segments is selected for the final defocus calculation. For strategy 11, the centroids of the segment with the smallest standard deviation and one segment to its left and right are selected, and the final defocus is calculated after calculating the average. For strategy 12, the three segments with the smallest standard deviation are selected, and the average of the centroids of the three segments is calculated before calculating the final defocus. The final defocus calculation formula is consistent with the processing process of strategies 4 to 7.

[0092] The actual working process is as follows Figure 9 As shown, first, when the object is stationary, manually focus on the surface of interest (i.e., the plane to be focused in this application) and record the Z-axis absolute position of the objective lens, and manually focus on the non-interested surface (i.e., the remaining planes in this application) and record the Z-axis position of the objective lens, and then measure the zero point offset between the two (i.e., the displacement offset in this application). Then, the laser spot image of the object in motion is collected, and the defocus amount of the laser spot image is segmented and calculated. Next, according to the mean value of the defocus amount, it is determined whether to directly drive the motor to move the objective lens for automatic focusing according to the defocus amount. If the mean value is less than or equal to the near-focus threshold, the defocus amount of the non-interested surface is compensated to obtain the final first defocus amount, thereby completing the automatic focusing. If the mean value is greater than the near-focus threshold, automatic focusing is performed directly according to the mean value.

[0093] In some embodiments, as Figure 10 As shown, the present application also provides a laser autofocus system for multiple height planes, comprising: The image acquisition module 1001 is used to acquire the laser spot image.

[0094] The pixel column division module 1002 is configured to divide the continuous pixel columns formed by reflection from planes at different heights according to the grayscale value of each column of pixel points in the laser spot image.

[0095] The pixel column determination module 1003 is configured to determine, based on the width of the plane to be focused and a width correspondence relationship, a continuous pixel column formed by reflection from the plane to be focused as a first pixel column, wherein the width correspondence relationship represents a correspondence between the width of the continuous pixel column and the widths of planes at different heights.

[0096] The defocus amount calculation module 1004 is configured to calculate a first defocus amount of the plane to be focused based on the first pixel column.

[0097] The present application also provides an electronic device, such as Figure 11 As shown, it 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. Memory 1103, used for storing computer programs; The processor 1101 is configured to implement any of the above-mentioned laser autofocus methods when executing the program stored in the memory 1103 .

[0098] The communication bus mentioned in the electronic devices mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industrial Standard Architecture (EISA) bus. This communication bus can be divided into address buses, data buses, and control buses. For ease of illustration, the figure uses only a single thick line, but this does not mean that there is only one bus or only one type of bus.

[0099] The communication interface is used for communication between the above electronic device and other devices.

[0100] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0101] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0102] In another embodiment provided in the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the above-mentioned laser autofocus method steps is implemented.

[0103] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any one of the steps of the laser autofocus method in the above embodiments.

[0104] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A laser autofocus method for multiple height planes, characterized in that: include: Acquire laser spot image; Dividing continuous pixel columns formed by reflection from planes at different heights according to the grayscale value of each column of pixel points in the laser spot image; Based on the width of the plane to be focused and a width correspondence relationship, determining a continuous pixel column formed by reflection from the plane to be focused as a first pixel column; wherein the width correspondence relationship represents a correspondence between the width of the continuous pixel column and the widths of planes at different heights; A first defocus amount of the plane to be focused is calculated based on the first pixel column.

2. The laser autofocus method according to claim 1, wherein: After acquiring the laser spot image, the method further includes: Calculating a defocus amount of the plane to be focused based on the laser spot image as a second defocus 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 calculated absolute value of the second defocus amount is less than the near-focus threshold; if not, divide the continuous pixel columns formed by reflection from planes of different heights according to the grayscale value of each column of pixel points in the laser spot image.

3. The laser autofocus method according to claim 1, wherein: After acquiring the laser spot image, the method further includes: Dividing the laser spot image into multiple spot images along the horizontal direction; Calculate the defocus amount corresponding to each segment of the spot image as the third defocus amount; Based on a preset numerical range, screening a third defocus amount outside the numerical range; Calculate the average of the third defocus amounts 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 of different heights according to the grayscale value of each column of pixel points in the laser spot image.

4. The laser autofocus method according to claim 1, wherein: The step of dividing the continuous pixel columns formed by reflection from planes at different heights according to the grayscale value of each column of pixel points in the laser spot image comprises: Binarize the grayscale values ​​of each column of pixels based on a first preset threshold value, so that grayscale values ​​above the first preset threshold value are 1 and grayscale values ​​below the first preset threshold value are 0, thereby obtaining a binary image; Performing a morphological opening operation on the binary image to obtain a processed image as an opening operation image; Counting the sum of the grayscale values ​​of each column of pixels in the opening operation image as the first grayscale value sum; Based on a plurality of preset grayscale value range intervals, continuous pixel columns whose first grayscale value sum is within the same grayscale value range interval are screened as continuous pixel columns formed by reflection from a height plane corresponding to the grayscale value range interval; wherein the grayscale value range intervals correspond to the height planes one-to-one.

5. The laser autofocus method according to claim 1, wherein: The step of dividing the continuous pixel columns formed by reflection from planes at different heights according to the grayscale value of each column of pixel points in the laser spot image comprises: Counting the sum of the grayscale values ​​of each column of pixels in the laser spot image as the second grayscale value sum; Based on a plurality of preset pixel value range intervals, continuous pixel columns whose second grayscale value sum is within the same pixel value range interval are screened as continuous pixel columns formed by reflection from a height plane corresponding to the pixel value range interval; wherein the pixel value range intervals correspond one-to-one to the height planes.

6. The laser autofocus method according to claim 1, wherein: Before 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 a defocus difference between the two planes is determined based on the height difference.

7. The laser autofocus method according to claim 6, wherein: After determining, based on the width of the plane to be focused and the width correspondence relationship, a continuous pixel column formed by reflection from the plane to be focused as the first pixel column, the method further includes: Based on the width-to-width correspondence of each height plane except the plane to be focused, determining a continuous pixel column formed by reflection from each height plane as a second continuous pixel column; Calculating, based on the second continuous pixel column, a defocus amount of a height plane corresponding to the second continuous pixel column; Based on the defocus difference between the plane to be focused and each of the remaining height planes, the defocus of each of the remaining height planes is compensated, and the defocus of the plane to be focused is determined based on the compensated defocus and the first defocus.

8. A laser autofocus system for multiple height planes, characterized in that: include: An image acquisition module, used for acquiring a laser spot image; A pixel column division module is used to divide the continuous pixel columns formed by reflection from planes of different heights according to the grayscale value of each column of pixel points in the laser spot image; a pixel column determination module, configured to determine, based on the width of the plane to be focused and a width correspondence relationship, a continuous pixel column formed by reflection from the plane to be focused, as a first pixel column; wherein the width correspondence relationship represents a correspondence between the width of the continuous pixel column and the widths of planes at different heights; A defocus amount calculation module is used to calculate a first defocus amount of the plane to be focused based on the first pixel column.

9. 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 via the communication bus; Memory for storing computer programs; The processor is configured to implement the laser autofocus method according to any one of claims 1 to 7 when executing a program stored in the memory.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the laser autofocus method according to any one of claims 1 to 7 is implemented.

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

  • Line laser focusing method and device, optical equipment and storage medium

    CN116088130A

  • Relay system for auto-focus sensor, sensor, system and method

    CN119148373A

  • Automatic focusing control circuit and control method

    CN119211721A

Cited By

  • Laser focusing method and device, laser marking machine and computer readable storage medium

    CN121010599A

  • Laser focusing method, device, laser marking machine and computer-readable storage medium

    CN121010599B

  • Defocusing amount calculation method, system and equipment based on line laser and medium

    CN121559703A