Calibration method and related device
By acquiring multiple focal surface compensation values and updating the focal surface compensation values based on the detected image with the highest definition, the problem of focal surface drifting when the temperature changes is solved, and stronger follow-focusing capabilities and clearer image acquisition are achieved.
Patent Information
- Application Number
- CN202510207803.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2025-07-29
AI Technical Summary
When the ambient temperature of the automatic focusing device changes, the focal surface drift causes the focal surface compensation value to be unable to accurately compensate for the difference between the imaging focal surface and the focal surface of the automatic focusing device, resulting in inaccurate follow-focus and unclear image.
By acquiring multiple focal surface compensation values, the calibration module controls to enter the objective lens field of view, acquires multiple detected images, and determines and updates the focal surface compensation value based on the detected image with the highest definition, and updates the initial focal surface compensation value.
The following focus accuracy of the automatic focusing device is improved, and the detected images obtained are clearer, reducing follow-focus errors caused by temperature changes.
Smart Images

Figure CN120390144A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of detection technology, and in particular to a calibration method and related devices. Background Art
[0002] Depth of field is the distance range along the observation direction within which a clear image of the object under test can be obtained. When inspecting objects such as semiconductor wafers, as the magnification of the objective lens increases, the depth of field gradually decreases, and the difficulty of focusing increases. To obtain a clear image of the object under test, an autofocus device is often used to control the object plane to the imaging focal plane.
[0003] In the related art, due to reasons such as installation errors and chromatic aberration, there may be a difference between the actual focal plane of the autofocus device and the desired imaging focal plane, and the difference is compensated by a preset focal plane compensation value.
[0004] However, autofocus devices are highly sensitive to temperature. When the ambient temperature changes, the focal plane of the autofocus device will drift, that is, the focal plane of the autofocus device will produce floating deviations as the ambient temperature changes. In this case, using the original focal plane compensation value will be difficult to accurately compensate for the difference between the focal plane of the autofocus device and the imaging focal plane, resulting in inaccurate focus and unclear image. Summary of the Invention
[0005] To address the above issues, the present application provides a calibration method and related devices for ensuring that the focal plane compensation value can accurately compensate for the difference between the focal plane of the autofocus device and the imaging focal plane, thereby improving the accuracy of follow focus.
[0006] Based on this, this application discloses the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a calibration method, the method comprising:
[0008] Acquire a plurality of focal plane compensation values including an initial focal plane compensation value, where the initial focal plane compensation value is a focal plane compensation value currently used for detection and has not yet been updated;
[0009] In response to a calibration trigger condition being reached, controlling a calibration module to enter a field of view of the objective lens, the calibration module including a pattern for performing image calibration;
[0010] Acquiring a plurality of detection images corresponding to the calibration module according to the plurality of focal plane compensation values;
[0011] According to the sharpnesses respectively corresponding to the plurality of detection images, determining the focal plane compensation value corresponding to the detection image with the highest sharpness as the updated focal plane compensation value;
[0012] The initial focal plane compensation value is updated to the updated focal plane compensation value.
[0013] Optionally, determining the focal plane compensation value corresponding to the detection image with the highest sharpness as the updated focal plane compensation value according to the sharpness of the plurality of detection images respectively includes:
[0014] Determining the sharpness scores corresponding to the plurality of detection images respectively according to a sharpness algorithm;
[0015] Determining the focal plane compensation value corresponding to the detection image with the highest sharpness score as the updated focal plane compensation value.
[0016] Optionally, the sharpness algorithm includes a first algorithm and a second algorithm, and determining the sharpness scores corresponding to the plurality of detection images respectively according to the sharpness algorithm includes:
[0017] Determining the first sharpness scores corresponding to the plurality of detection images respectively according to the first algorithm;
[0018] Determining the second sharpness scores corresponding to the plurality of detection images respectively according to the second algorithm;
[0019] The determining the focal plane compensation value corresponding to the detection image with the highest sharpness score as the updated focal plane compensation value includes:
[0020] Determining the sharpness scores corresponding to the plurality of detection images respectively according to the first sharpness scores and the second sharpness scores corresponding to the plurality of detection images respectively;
[0021] Determining the focal plane compensation value corresponding to the detection image with the highest sharpness score as the updated focal plane compensation value.
[0022] Optionally, determining the focal plane compensation value corresponding to the detection image with the highest sharpness as the updated focal plane compensation value according to the sharpness of the plurality of detection images respectively includes:
[0023] Determining the image differences between the plurality of detection images and a target image respectively;
[0024] Determining the focal plane compensation value corresponding to the detection image with the smallest image difference as the updated focal plane compensation value, where the target image is an image with a sharpness greater than a sharpness threshold.
[0025] Optionally, the calibration trigger condition is achieved in the following manner:
[0026] Obtaining the working duration of the autofocus device, if the working duration is greater than a duration threshold, the calibration trigger condition is achieved; or,
[0027] Obtaining the optical mode of the detection device corresponding to the autofocus device, if the optical mode changes, the calibration trigger condition is achieved; or,
[0028] Obtain the environmental temperature change range within a preset duration. If the environmental temperature change range is greater than the range threshold, the calibration trigger condition is reached.
[0029] Optionally, the multiple focal plane compensation values are the multiple focal plane compensation values included in the compensation traversal range.
[0030] Optionally, the autofocus device performs detection according to a detection task, and the detection task includes multiple subtasks. After the calibration trigger condition is reached, the method further includes:
[0031] Obtain the detection task progress, where the detection task progress is used to indicate whether the target subtask is completed, and the target subtask is the subtask currently executed by the autofocus device;
[0032] If it is determined according to the detection task progress that the target subtask is completed, interrupt the detection task and execute the steps of controlling the calibration module to enter the objective lens field of view and subsequent steps.
[0033] Optionally, the autofocus device includes a coaxial autofocus device and an off-axis autofocus device. The coaxial autofocus device is an autofocus device through which the light beam generated by the light source illumination module passes through the objective lens, and the off-axis autofocus device is an autofocus device through which the light beam generated by the light source illumination module does not pass through the objective lens.
[0034] Optionally, the autofocus device includes a chuck for fixing the object to be measured, and the distance between the calibration module and the chuck is less than the distance threshold.
[0035] Optionally, the difference between the central density and the edge density corresponding to the pattern is greater than a preset threshold.
[0036] In a second aspect, an embodiment of the present application provides a calibration device, and the device includes: an acquisition unit, a control unit, an image unit, a determination unit, and an update unit;
[0037] The acquisition unit is configured to obtain multiple focal plane compensation values including an initial focal plane compensation value, where the initial focal plane compensation value is a focal plane compensation value that is currently used for detection and has not been updated;
[0038] The control unit is configured to control the calibration module to enter the objective lens field of view in response to reaching the calibration trigger condition, and the calibration module includes a pattern for image calibration;
[0039] The image unit is configured to obtain multiple detection images corresponding to the calibration module according to the multiple focal plane compensation values;
[0040] The determining unit is configured to determine the focal plane compensation value corresponding to the detection image with the highest sharpness as the updated focal plane compensation value according to the sharpness corresponding to each of the multiple detection images;
[0041] The updating unit is configured to update the initial focal plane compensation value to the updated focal plane compensation value.
[0042] As a possible implementation manner, the determining unit includes a fraction determining unit and a first compensation value determining unit:
[0043] The fraction determining unit is configured to determine the sharpness scores corresponding to each of the multiple detection images according to a sharpness algorithm;
[0044] The first compensation value determining unit is configured to determine the focal plane compensation value corresponding to the detection image with the highest sharpness score as the updated focal plane compensation value.
[0045] As a possible implementation manner, the sharpness algorithm includes a first algorithm and a second algorithm, and the fraction determining unit is specifically configured to:
[0046] Determine the first sharpness scores corresponding to each of the multiple detection images according to the first algorithm;
[0047] Determine the second sharpness scores corresponding to each of the multiple detection images according to the second algorithm;
[0048] The first compensation value determining unit is specifically configured to:
[0049] Determine the sharpness scores corresponding to each of the multiple detection images according to the first sharpness scores and the second sharpness scores corresponding to each of the multiple detection images;
[0050] Determine the focal plane compensation value corresponding to the detection image with the highest sharpness score as the updated focal plane compensation value.
[0051] As a possible implementation manner, the determining unit is specifically configured to:
[0052] Determine the image differences between each of the multiple detection images and a target image;
[0053] Determine the focal plane compensation value corresponding to the detection image with the smallest image difference as the updated focal plane compensation value, where the target image is an image with a sharpness greater than a sharpness threshold.
[0054] As a possible implementation manner, the apparatus further includes a first triggering unit, a second triggering unit, and a third triggering unit:
[0055] The first triggering unit is configured to obtain the working duration of the autofocus device. If the working duration is greater than a duration threshold, the calibration triggering condition is met.
[0056] The second triggering unit is configured to obtain the optical mode of the detection device corresponding to the autofocus device. If the optical mode changes, the calibration triggering condition is met.
[0057] The third triggering unit is configured to obtain the environmental temperature change range within a preset duration. If the environmental temperature change range is greater than a range threshold, the calibration triggering condition is met.
[0058] As a possible implementation, the multiple focal plane compensation values are the multiple focal plane compensation values included in the compensation traversal range.
[0059] As a possible implementation, the autofocus device performs detections according to a detection task, and the detection task includes multiple subtasks. After the calibration triggering condition is met, the device further includes an interruption unit, which is configured to:
[0060] Obtain the detection task progress, where the detection task progress is used to indicate whether the target subtask is completed, and the target subtask is the subtask currently executed by the autofocus device;
[0061] If it is determined according to the detection task progress that the target subtask is completed, interrupt the detection task and execute the steps of controlling the calibration module to enter the objective lens field of view and subsequent steps.
[0062] As a possible implementation, the autofocus device includes a coaxial autofocus device and an off-axis autofocus device. The coaxial autofocus device is an autofocus device through which the light beam generated by the light source illumination module passes through the objective lens, and the off-axis autofocus device is an autofocus device through which the light beam generated by the light source illumination module does not pass through the objective lens.
[0063] As a possible implementation, the autofocus device includes a chuck, and the chuck is used to fix the object to be measured, and the distance between the calibration module and the chuck is less than a distance threshold.
[0064] As a possible implementation, the difference between the central density and the edge density of the pattern is greater than a preset threshold.
[0065] In a third aspect, an embodiment of the present application provides a computer device, and the computer device includes a processor and a memory:
[0066] The memory is used to store a computer program and transmit the computer program to the processor;
[0067] The processor is configured to execute the method described in the above first aspect according to the computer program.
[0068] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, where the computer program is configured to execute the method described in the above first aspect.
[0069] In a fifth aspect, an embodiment of the present application provides a computer program product including a computer program, which, when running on a computer device, causes the computer device to execute the method described in the above first aspect.
[0070] From the above technical solutions, it can be seen that the present application has at least the following beneficial effects:
[0071] Obtain a plurality of focal plane compensation values including an initial focal plane compensation value, where the initial focal plane compensation value is the focal plane compensation value that is currently used for detection and has not been updated. In response to reaching the calibration trigger condition, control the calibration module to enter the objective lens field of view. The calibration module includes a pattern for image calibration. According to the plurality of focal plane compensation values, obtain a plurality of detection images corresponding to the calibration module. According to the sharpness corresponding to each of the plurality of detection images, determine the focal plane compensation value corresponding to the detection image with the highest sharpness as the updated focal plane compensation value. Update the initial focal plane compensation value to the updated focal plane compensation value. Thus, by calibrating the initial focal plane compensation value, an updated focal plane compensation value with a more accurate compensation difference is obtained, enabling the autofocus device to move the object plane to a more accurate position when applying the updated focal plane compensation value, having stronger focusing ability, and obtaining clearer detection images. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0073] Figure 1 It is a schematic flowchart of a calibration method provided by an embodiment of the present application;
[0074] Figure 2 It is a schematic diagram of a coaxial autofocus device provided by an embodiment of the present application;
[0075] Figure 3 It is a schematic diagram of an off-axis autofocus device provided by an embodiment of the present application;
[0076] Figure 4A flowchart of an application calibration method scenario provided by an embodiment of the present application;
[0077] Figure 5 A schematic structural diagram of a calibration device provided by an embodiment of the present application;
[0078] Figure 6 A schematic structural diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners
[0079] Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to more thoroughly and completely understand the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not used to limit the protection scope of the present application.
[0080] As mentioned in the background art, in the related art, a focal plane compensation value is used to compensate for the difference between the focal plane of an autofocus device and the imaging focal plane. Specifically: the focal plane of the autofocus device + the focal plane compensation value = the imaging focal plane, which is a compensation correspondence relationship under the ideal condition of constant ambient temperature. However, even with temperature control by control devices such as temperature controllers, it is difficult to maintain the temperature of the actual environment where the autofocus device is located at an absolutely constant temperature, and the autofocus device is highly sensitive to temperature. When the ambient temperature changes, the focal plane of the autofocus device will drift, and at the same time, the imaging focal plane will also drift. As a result, the difference between the two will change with temperature, and it is difficult to compensate for this temperature-varying difference with a fixed focal plane compensation value, resulting in inaccurate focusing and difficulty in obtaining a clear image of the object to be measured.
[0081] Based on this, embodiments of the present application provide a calibration method and related device. After reaching the calibration trigger condition, the calibration module is controlled to enter the objective lens field of view, and multiple detection images corresponding to multiple calibration modules are obtained by traversing multiple focal plane compensation values. The focal plane compensation value corresponding to the detection image with the highest clarity is determined as the updated focal plane compensation value, and the initial focal plane compensation value is updated, so as to obtain a more accurate updated focal plane compensation value for compensating the difference. When the autofocus device applies the updated focal plane compensation value, the object plane can be moved to a more accurate position, the focusing ability is stronger, and the obtained detection image is clearer.
[0082] See Figure 1 , this figure is a flowchart of the calibration method provided by an embodiment of the present application. For ease of description, the following embodiments are described by taking the execution subject of this calibration method as an autofocus device as an example. As Figure 1 shown, this calibration method includes S101 - S104.
[0083] S101: Obtain multiple focal plane compensation values including an initial focal plane compensation value.
[0084] The initial focal plane compensation value is the focal plane compensation value that is currently used for detection and has not been updated yet. The focal plane compensation value is used to compensate for the difference between the focal plane of the autofocus device and the imaging focal plane. This difference is caused by factors such as chromatic aberration and alignment errors. For example, the heights of the focal plane of the autofocus device and the imaging focal plane are different, or there is a position misalignment. That is to say, before calibration, the autofocus device compensates for the difference between the focal plane of the autofocus device and the imaging focal plane through the initial focal plane compensation value.
[0085] However, since the operating temperature of the autofocus device may be affected by changes in the ambient temperature, the focal plane of the autofocus device and the imaging focal plane will deviate, resulting in an inconsistent difference. Therefore, a preset focal plane compensation value cannot be used to compensate for the difference between the two. Thus, in the embodiments of the present application, by traversing multiple focal plane compensation values, a more accurate focal plane compensation value is determined to solve the problem that a single and unchanging initial focal plane compensation value cannot adapt to the working conditions of the ambient temperature change of the autofocus device. Among them, the temperature of the environment where the autofocus device is located is the operating temperature that can be reflected when the autofocus device is not affected by internal factors such as working duration.
[0086] For a clearer explanation, the following takes the case where the focal plane compensation value is used to compensate for the height difference between the focal plane of the autofocus device and the imaging focal plane as an example for illustration.
[0087] S102: In response to reaching the calibration trigger condition, control the calibration module to enter the objective lens field of view.
[0088] The calibration trigger condition is the condition for triggering the autofocus device to perform calibration. When the calibration trigger condition is reached, the autofocus device is considered to need to update the initial focal plane compensation value. That is to say, reaching the calibration trigger condition indicates that the accuracy of the initial focal plane compensation value may decrease, and the focal plane compensation value of the autofocus device needs to be calibrated. The calibration module is a test object for performing image calibration and includes a pattern for performing image calibration.
[0089] In a possible implementation manner, the autofocus device includes a chuck. The chuck is a device for fixing the test object. The distance between the calibration module and the chuck is less than the distance threshold. When image calibration is required, the pattern corresponding to the calibration module does not need to be replaced and can quickly appear in the objective lens field of view, which is more convenient and fast.
[0090] The patterns included in the calibration module are used for clarity recognition, such as wheel-shaped patterns, grid-shaped patterns, etc. In a possible implementation, the difference between the central density and the edge density corresponding to the pattern is greater than a preset threshold. The density is used to reflect the density of the pattern elements. The more elements there are per unit area, the higher the density of that area. When the difference between the central density and the edge density corresponding to the pattern is greater than the preset threshold, it indicates that the density of the pattern elements is distributed differently at different positions and is rich in variation, which can enhance the clarity recognition ability of the autofocus device for the pattern, thereby improving the accuracy of the updated focal plane compensation value obtained by calibration.
[0091] The objective lens field of view is the area where the objective lens can form a clear image. Controlling the calibration module to enter the objective lens field of view means that the calibration module will be used as a test object for detection in order to perform subsequent operations for updating the focal plane compensation value. In response to reaching the calibration trigger condition, the autofocus device can move the calibration module into the objective lens field of view through the mobile device so as to be able to capture a detection image of the pattern included in the calibration module.
[0092] The embodiments of the present application do not specifically limit how to reach the calibration trigger condition. Here, three cases are taken as examples for illustration:
[0093] Case 1: Obtain the working duration of the autofocus device. If the working duration is greater than the duration threshold, the calibration trigger condition is reached.
[0094] The working duration is the duration of continuous operation of the autofocus device, which can be obtained through a built-in timer or an external management system. The duration threshold is a preset boundary for determining whether the working duration is too long. For example, the duration threshold can be 1 hour.
[0095] If the working duration is greater than the duration threshold, it means that the continuous working duration of the autofocus device is too long, and the internal working temperature rises, which may cause focal plane drift, so that the initial focal plane compensation value may no longer be applicable. In this case, the calibration trigger condition is reached, thereby reducing the focusing error caused by the change of the internal working temperature during long-term detection work.
[0096] Case 2: Obtain the optical mode of the autofocus device corresponding to the detection device. If the optical mode changes, the calibration trigger condition is reached.
[0097] The optical mode is the detection method of the detection device corresponding to the autofocus device for the test object. The autofocus device provides the autofocus function for the detection device. For example, for detecting wafers with different wavelengths, different optical modes correspond respectively. The signals corresponding to different optical modes can be captured through a software interface to determine whether the optical mode has changed.
[0098] If the optical mode changes, it may cause changes in the object surface. To meet the imaging requirements of the new optical mode, it is necessary to calibrate the initial focal plane compensation value to reach the calibration trigger condition.
[0099] Case 3: Obtain the environmental temperature change range within a preset duration. If the environmental temperature change range is greater than the range threshold, the calibration trigger condition is reached.
[0100] The preset duration is a preset duration value. For example, the preset duration can be 1 hour, and the range threshold is a preset environmental temperature fluctuation limit. For example, the range threshold can be 0.5 °C. The environmental temperature change range is the change amplitude of the temperature of the environment where the autofocus device is located. If the environmental temperature change range is greater than the range threshold, it means that the environmental temperature fluctuates too much within the preset duration, and the focal plane of the autofocus device and the imaging focal plane may drift, resulting in the initial focal plane compensation value being inaccurate, thus reaching the calibration trigger condition.
[0101] By reaching the calibration trigger condition through multiple situations, internal factors such as the rise of the internal working temperature and the change of the optical mode can be captured, and external factors such as the change of the environmental temperature can also be captured, so that the initial focal plane compensation value can be calibrated in time to maintain the continuous accuracy of the focal plane compensation value.
[0102] The autofocus device performs detection according to the detection task. After reaching the calibration trigger condition, it is necessary to interrupt the detection task to reduce the impact on the current detection task of the autofocus device. The embodiment of the present application also provides an implementation method for determining the interruption time of the detection task. Specifically:
[0103] The detection task includes multiple subtasks. Obtain the detection task progress, and the detection task progress is used to indicate whether the target subtask is completed. The target subtask is the subtask currently executed by the autofocus device. If it is determined according to the detection task progress that the target subtask is completed, interrupt the detection task and execute the steps of controlling the calibration module to enter the objective lens field of view and subsequent steps.
[0104] For example, there is a detection task including five subtasks (A, B, C, D, E). When the calibration trigger condition is reached, if the currently executed subtask is C and the detection task progress indicates that the subtask is not completed, no interruption is made. Once the detection task progress indicates that subtask C is completed, before preparing to enter the next subtask D, interrupt the detection task, control the calibration module to enter the objective lens field of view and perform the calibration process. After calibration is completed, reconnect to the original detection task and continue to execute the remaining detection tasks starting from subtask D according to the updated focal plane compensation value.
[0105] Thus, while reducing the impact on the target subtask, the interruption timing can be determined more flexibly, improving the continuity of the detection task execution. At the same time, the time waste and resource consumption caused by frequent interruptions are reduced, making device management and maintenance more efficient and reasonable.
[0106] S103: Obtain multiple detection images corresponding to the calibration module according to multiple focal plane compensation values.
[0107] The detection images are images obtained by the detection device corresponding to the autofocus device by photographing the object to be measured. By compensating the autofocus device with multiple focal plane compensation values, and then respectively obtaining multiple detection images corresponding to the calibration module under the compensation of different focal plane compensation values. That is, the compensation effects of different focal plane compensation values are different, and the focus tracking accuracy brought is also different. Different focal plane compensation values correspond to different detection images, and the clarity of different detection images is also different.
[0108] In a possible implementation, the multiple focal plane compensation values are the multiple focal plane compensation values included in the compensation traversal range, and the compensation traversal range is the preset traversal range of the focal plane compensation values. Those skilled in the art can set it according to the time-consuming of calibrating to obtain the compensation change relationship. For example, the compensation traversal range can be ±1 / 4DOF (Depth of Field).
[0109] Thus, by traversing multiple focal plane compensation values included in the compensation traversal range (such as ±1 / 4DOF), the traversal times can be reduced, the calibration duration can be shortened, and the efficiency of calibrating to obtain the compensation change relationship can be improved.
[0110] S104: Determine the focal plane compensation value corresponding to the detection image with the highest clarity as the updated focal plane compensation value according to the clarity corresponding to each of the multiple detection images.
[0111] The updated focal plane compensation value is the focal plane compensation value with higher compensation accuracy among the multiple focal plane compensation values.
[0112] For the multiple detection images corresponding to the multiple focal plane compensation values, by determining the clarity corresponding to each of the multiple detection images, such as the first clarity corresponding to the first detection image, the second clarity corresponding to the second detection image, etc., determine the focal plane compensation value corresponding to the detection image with the highest clarity as the updated focal plane compensation value. That is, the focal plane compensation value corresponding to the clearest detection image is the focal plane compensation value with more accurate compensation among the multiple focal plane compensation values, and determine the focal plane compensation value with more accurate compensation as the updated focal plane compensation value.
[0113] This application does not limit how to determine the clarity of the detection image. The following takes two determination methods as examples for illustration.
[0114] Determination method 1: Determine the clarity scores corresponding to multiple detection images according to the clarity algorithm. Determine the focal plane compensation value corresponding to the detection image with the highest clarity score as the updated focal plane compensation value.
[0115] The clarity score is an index reflecting the clarity of the detection image, and the clarity algorithm is an algorithm used to determine the clarity score of the detection image. For example:
[0116] (1) Gradient Operator method: Common gradient operators include Sobel, Prewitt, and Roberts, etc. Calculate the difference between each pixel in the image and its neighboring pixels through the gradient operator to measure the edge strength of the image. Determine the clarity of the detection image by comparing the edge strength differences between the detection image and the target image, and determine the detection image with the smallest edge strength difference as the detection image with the highest clarity.
[0117] (2) Laplacian Operator: The Laplacian operator is a second-order differential operator used to detect rapid brightness changes in the image. The Laplacian operator highlights the edges and other high-frequency components in the image through convolution operations on the image. The clearer the image, the larger the result after its Laplace transform. Determine the detection image with the largest result after the Laplace transform as the detection image with the highest clarity.
[0118] The embodiment of the present application also provides a method for determining the updated focal plane compensation value through cross-validation. The clarity algorithm includes a first algorithm and a second algorithm. Determine the first clarity scores corresponding to multiple detection images according to the first algorithm. Determine the second clarity scores corresponding to multiple detection images according to the second algorithm.
[0119] According to the first clarity scores and the second clarity scores corresponding to multiple detection images, determine the clarity scores corresponding to multiple detection images. For example, an average value operation can be performed on the first clarity score and the second clarity score to obtain the average clarity score corresponding to each focal plane compensation value. Determine the focal plane compensation value with the highest average clarity score as the focal plane compensation value with the highest clarity score by comparison. Finally, determine the focal plane compensation value with the highest clarity score as the updated focal plane compensation value.
[0120] Different clarity algorithms focus on different aspects when calculating the image differences. For example, the Gradient Operator method focuses on edge strength, and the Laplacian operator focuses on brightness changes. By using multiple clarity algorithms to determine the clarity of the detection image, the comprehensiveness and accuracy of clarity recognition can be improved, so that the clarity score of the detection image can be calculated more accurately, and a more accurate updated focal plane compensation value can be obtained.
[0121] Determination method 2: Determine the image differences between multiple detection images and the target image respectively. Determine the focal plane compensation value corresponding to the detection image with the smallest image difference as the updated focal plane compensation value, where the target image is an image with sharpness greater than the sharpness threshold.
[0122] The target image is an image of the calibration tool with sharpness greater than the sharpness threshold. The image difference between the detection image and the target image can reflect the sharpness of the detection image. The greater the difference between the detection image and the target image, the lower the sharpness.
[0123] For multiple detection images corresponding to multiple focal plane compensation values, by determining the image differences between multiple detection images and the target image respectively, such as the first image difference corresponding to the first detection image, the second image difference corresponding to the second detection image, etc., the focal plane compensation value corresponding to the detection image with the smallest image difference can be determined as the updated focal plane compensation value. That is, the focal plane compensation value corresponding to the clearest detection image is the more accurately compensated focal plane compensation value among multiple focal plane compensation values. Determine the more accurately compensated focal plane compensation value as the updated focal plane compensation value.
[0124] S105: Update the initial focal plane compensation value to the updated focal plane compensation value.
[0125] It can be seen from the above technical solutions that multiple focal plane compensation values including the initial focal plane compensation value are obtained, and the initial focal plane compensation value is the currently used and unupdated focal plane compensation value. In response to reaching the calibration trigger condition, control the calibration module to enter the objective lens field of view. The calibration module includes a pattern for image calibration. According to multiple focal plane compensation values, multiple detection images corresponding to the calibration module are obtained. According to the sharpness corresponding to multiple detection images respectively, determine the focal plane compensation value corresponding to the detection image with the highest sharpness as the updated focal plane compensation value. Update the initial focal plane compensation value to the updated focal plane compensation value. Thus, by calibrating the initial focal plane compensation value, an updated focal plane compensation value with a more accurate compensation for height difference is obtained, enabling the autofocus device to move the object plane to a more accurate position when applying the updated focal plane compensation value, having stronger focusing ability and obtaining clearer detection images.
[0126] The embodiments of the present application do not limit the type of the autofocus device, that is, the above calibration process can cover various types of autofocus devices. For example, the autofocus device can include a coaxial autofocus device and an off-axis autofocus device. Refer to Figure 2 , Figure 2 is a schematic diagram of a coaxial autofocus device provided by an embodiment of the present application. The coaxial autofocus device is coupled to the objective lens, and the beam generated by its light source illumination module passes through the objective lens. Refer to Figure 3 , Figure 3Schematic diagram of an off-axis autofocus device provided by an embodiment of the present application. The off-axis autofocus device is not coupled to the objective lens, and the light beam generated by its light source illumination module does not pass through the objective lens.
[0127] See Figure 4 , Figure 4 Schematic flow diagram of a scenario of an application calibration method provided by an embodiment of the present application.
[0128] The system applied to the autofocus device starts to run. After a period of time (e.g., 60 minutes), or after changing the optical mode, the current work is interrupted, and the calibration module is moved below the objective lens. The calibration module can be installed beside the chuck for convenient calibration at any time. The real-time focal plane compensation value is set to zero. The focal plane compensation value is used to correct the deviation (height difference) between the focal plane of the autofocus device and the imaging focal plane, playing the role of moving the focal plane. Different focal plane compensation values are traversed, and multiple detection images corresponding to different focal plane compensation values in the case of following focus are taken. The focal plane compensation value corresponding to the detection image with the highest clarity is obtained by comparison, and the focal plane compensation value corresponding to the detection image with the highest clarity is determined as the updated focal plane compensation value, and the original real-time focal plane compensation value is updated. The updated focal plane compensation value is applied to the system, and then the normal operation of the system is restored.
[0129] See Figure 5 , Figure 5 A calibration device provided by an embodiment of the present application, applied to an autofocus device. The device 500 includes: an acquisition unit 501, a control unit 502, an image unit 503, a determination unit 504, and an update unit 505;
[0130] The acquisition unit 501 is configured to acquire a plurality of focal plane compensation values including an initial focal plane compensation value, where the initial focal plane compensation value is the currently used and not yet updated focal plane compensation value;
[0131] The control unit 502 is configured to control the calibration module to enter the field of view of the objective lens in response to reaching a calibration trigger condition. The calibration module includes a pattern for image calibration;
[0132] The image unit 503 is configured to acquire a plurality of detection images corresponding to the calibration module according to the plurality of focal plane compensation values;
[0133] The determination unit 504 is configured to determine the focal plane compensation value corresponding to the detection image with the highest clarity as the updated focal plane compensation value according to the clarity corresponding to the plurality of detection images;
[0134] The update unit 505 is configured to update the initial focal plane compensation value to the updated focal plane compensation value.
[0135] As can be seen from the above technical solutions, the calibration device provided in the embodiments of the present application includes an acquisition unit, a control unit, an image unit, a determination unit, and an update unit. According to the acquisition unit, a plurality of focal plane compensation values including an initial focal plane compensation value are acquired, and the initial focal plane compensation value is the focal plane compensation value that is currently used for detection and has not been updated yet. In response to reaching the calibration trigger condition, according to the control unit, the calibration module is controlled to enter the objective lens field of view, and the calibration module includes a pattern for performing image calibration. According to the plurality of focal plane compensation values, the image unit acquires a plurality of detection images corresponding to the calibration module. According to the determination unit, based on the sharpness corresponding to the plurality of detection images respectively, the focal plane compensation value corresponding to the detection image with the highest sharpness is determined as the updated focal plane compensation value. According to the update unit, the initial focal plane compensation value is updated to the updated focal plane compensation value. Thus, by calibrating the initial focal plane compensation value, an updated focal plane compensation value with a more accurate compensation difference is obtained, so that when the autofocus device applies the updated focal plane compensation value, the object plane can be moved to a more accurate position, the focusing ability is stronger, and the acquired detection images are clearer.
[0136] As a possible implementation manner, the determination unit includes a fraction determination unit and a first compensation value determination unit:
[0137] The fraction determination unit is configured to determine the sharpness scores corresponding to the plurality of detection images respectively according to a sharpness algorithm;
[0138] The first compensation value determination unit is configured to determine the focal plane compensation value corresponding to the detection image with the highest sharpness score as the updated focal plane compensation value.
[0139] As a possible implementation manner, the sharpness algorithm includes a first algorithm and a second algorithm, and the fraction determination unit is specifically configured to:
[0140] Determine the first sharpness scores corresponding to the plurality of detection images respectively according to the first algorithm;
[0141] Determine the second sharpness scores corresponding to the plurality of detection images respectively according to the second algorithm;
[0142] The first compensation value determination unit is specifically configured to:
[0143] Determine the sharpness scores corresponding to the plurality of detection images respectively according to the first sharpness scores and the second sharpness scores corresponding to the plurality of detection images respectively;
[0144] Determine the focal plane compensation value corresponding to the detection image with the highest sharpness score as the updated focal plane compensation value.
[0145] As a possible implementation manner, the determination unit is specifically configured to:
[0146] Determine the image differences between the multiple detected images and the target image respectively;
[0147] Determine the focal plane compensation value corresponding to the detected image with the smallest image difference as the updated focal plane compensation value, where the target image is an image with a sharpness greater than the sharpness threshold.
[0148] As a possible implementation, the device further includes a first trigger unit, a second trigger unit, and a third trigger unit:
[0149] The first trigger unit is used to obtain the working duration of the autofocus device. If the working duration is greater than the duration threshold, the calibration trigger condition is reached;
[0150] The second trigger unit is used to obtain the optical mode of the detection device corresponding to the autofocus device. If the optical mode changes, the calibration trigger condition is reached;
[0151] The third trigger unit is used to obtain the environmental temperature change range within a preset duration. If the environmental temperature change range is greater than the range threshold, the calibration trigger condition is reached.
[0152] As a possible implementation, the multiple focal plane compensation values are the multiple focal plane compensation values included in the compensation traversal range.
[0153] As a possible implementation, the autofocus device performs detections according to a detection task, and the detection task includes multiple subtasks. After the calibration trigger condition is reached, the device further includes an interruption unit, which is used for:
[0154] Obtain the detection task progress, where the detection task progress is used to indicate whether the target subtask is completed, and the target subtask is the subtask currently executed by the autofocus device;
[0155] If it is determined according to the detection task progress that the target subtask is completed, interrupt the detection task and execute the steps of controlling the calibration module to enter the objective lens field of view and subsequent steps.
[0156] As a possible implementation, the autofocus device includes a coaxial autofocus device and an off-axis autofocus device. The coaxial autofocus device is an autofocus device through which the light beam generated by the light source illumination module passes through the objective lens, and the off-axis autofocus device is an autofocus device through which the light beam generated by the light source illumination module does not pass through the objective lens.
[0157] As a possible implementation, the autofocus device includes a chuck, and the chuck is used to fix the object to be measured, and the distance between the calibration module and the chuck is less than the distance threshold.
[0158] As a possible implementation, the difference between the central density and the edge density corresponding to the pattern is greater than a preset threshold.
[0159] See Figure 6 , an embodiment of the present application further provides a computer device, which includes a memory 601 and a processor 602:
[0160] The memory is used to store a computer program and transmit the computer program to the processor;
[0161] The processor is used to execute the method of the above method embodiment according to the computer program.
[0162] An embodiment of the present application further provides a computer-readable storage medium, which is characterized in that the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method of the above method embodiment.
[0163] An embodiment of the present application further provides a computer program product including a computer program. When it runs on a computer device, it causes the computer device to execute the method of the above method embodiment.
[0164] It should be noted that the embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the systems or devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0165] The term "including" and its variants used herein are open-ended, that is, "including but not limited to". The term "based on" is "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0166] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and both A and B exist at the same time. Among them, A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one (one) of the following" or its similar expression refers to any combination of these items, including any combination of single item (one) or plural items (ones). For example, at least one (one) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0167] It should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the said element.
[0168] The steps of the methods or algorithms described in connection with the embodiments disclosed herein can be implemented directly in hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0169] The above description of the disclosed embodiments enables those skilled in the art to implement or use this application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A calibration method, characterized in that, Applied to an autofocus device, the method includes: Obtaining a plurality of focal plane compensation values including an initial focal plane compensation value, where the initial focal plane compensation value is the focal plane compensation value currently used for detection and has not been updated yet; In response to reaching a calibration trigger condition, controlling a calibration module to enter the objective lens field of view, where the calibration module includes a pattern for image calibration; Obtaining a plurality of detection images corresponding to the calibration module according to the plurality of focal plane compensation values; Determining the focal plane compensation value corresponding to the detection image with the highest sharpness as the updated focal plane compensation value according to the sharpness corresponding to each of the plurality of detection images; Updating the initial focal plane compensation value to the updated focal plane compensation value.
2. The method according to claim 1, characterized in that The step of determining the focal plane compensation value corresponding to the detection image with the highest sharpness as the updated focal plane compensation value according to the sharpness corresponding to each of the plurality of detection images includes: Determining the sharpness scores corresponding to each of the plurality of detection images according to a sharpness algorithm; Determining the focal plane compensation value corresponding to the detection image with the highest sharpness score as the updated focal plane compensation value.
3. The method according to claim 2, wherein The sharpness algorithm includes a first algorithm and a second algorithm. The step of determining the sharpness scores corresponding to each of the plurality of detection images according to the sharpness algorithm includes: Determining the first sharpness scores corresponding to each of the plurality of detection images according to the first algorithm; Determining the second sharpness scores corresponding to each of the plurality of detection images according to the second algorithm; The step of determining the focal plane compensation value corresponding to the detection image with the highest sharpness score as the updated focal plane compensation value includes: Determining the sharpness scores corresponding to each of the plurality of detection images according to the first sharpness scores and the second sharpness scores corresponding to each of the plurality of detection images; Determining the focal plane compensation value corresponding to the detection image with the highest sharpness score as the updated focal plane compensation value.
4. The method according to claim 1, wherein The step of determining the focal plane compensation value corresponding to the detection image with the highest sharpness as the updated focal plane compensation value according to the sharpness corresponding to each of the plurality of detection images includes: Determining the image differences between each of the plurality of detection images and a target image; Determining the focal plane compensation value corresponding to the detection image with the smallest image difference as the updated focal plane compensation value, where the target image is an image with sharpness greater than a sharpness threshold.
5. The method according to claim 1, wherein The calibration trigger condition is reached in the following manner: Obtaining the working duration of the autofocus device. If the working duration is greater than a duration threshold, the calibration trigger condition is reached; or, Obtaining the optical mode of the detection device corresponding to the autofocus device. If the optical mode changes, the calibration trigger condition is reached; or, Obtaining the range of environmental temperature change within a preset duration. If the range of environmental temperature change is greater than a range threshold, the calibration trigger condition is reached.
6. The method according to claim 1, characterized in that, The plurality of focal plane compensation values are the plurality of focal plane compensation values included in the compensation traversal range.
7. The method according to claim 6, characterized in that, The autofocus device performs detections according to a detection task, and the detection task includes a plurality of subtasks. After reaching the calibration trigger condition, the method further includes: Obtaining the detection task progress, where the detection task progress is used to indicate whether a target subtask is completed, and the target subtask is the subtask currently being executed by the autofocus device; If it is determined that the target subtask is completed according to the progress of the detection task, interrupt the detection task, and execute the steps of controlling the calibration module to enter the field of view of the objective lens and subsequent steps.
8. The method according to claim 1, wherein The autofocus device includes a coaxial autofocus device and an off-axis autofocus device. The coaxial autofocus device is an autofocus device through which the light beam generated by the light source illumination module passes through the objective lens, and the off-axis autofocus device is an autofocus device through which the light beam generated by the light source illumination module does not pass through the objective lens.
9. The method according to claim 1, wherein The autofocus device includes a chuck for fixing the object to be measured, and the distance between the calibration module and the chuck is less than a distance threshold.
10. The method according to claim 1, characterized in that, The difference between the central density and the edge density corresponding to the pattern is greater than a preset threshold.
11. A calibration device, characterized in that, Applied to an autofocus device, the device includes: an acquisition unit, a control unit, an image unit, a determination unit, and an update unit; The acquisition unit is configured to acquire a plurality of focal plane compensation values including an initial focal plane compensation value, where the initial focal plane compensation value is the focal plane compensation value currently used for detection and has not been updated; The control unit is configured to control the calibration module to enter the field of view of the objective lens in response to reaching a calibration trigger condition. The calibration module includes a pattern for image calibration; The image unit is configured to acquire a plurality of detection images corresponding to the calibration module according to the plurality of focal plane compensation values; The determination unit is configured to determine the focal plane compensation value corresponding to the detection image with the highest clarity as the updated focal plane compensation value according to the clarity of the plurality of detection images respectively; The update unit is configured to update the initial focal plane compensation value to the updated focal plane compensation value.
12. The device according to claim 11, characterized in that, The determination unit includes a score determination unit and a first compensation value determination unit: The score determination unit is configured to determine the clarity scores corresponding to the plurality of detection images respectively according to a clarity algorithm; The first compensation value determination unit is configured to determine the focal plane compensation value corresponding to the detection image with the highest clarity score as the updated focal plane compensation value.
13. The device according to claim 12, wherein The clarity algorithm includes a first algorithm and a second algorithm. Specifically, the score determination unit is configured to: Determine the first clarity scores corresponding to the plurality of detection images respectively according to the first algorithm; Determine the second clarity scores corresponding to the plurality of detection images respectively according to the second algorithm; Specifically, the first compensation value determination unit is configured to: Determine the clarity scores corresponding to the plurality of detection images respectively according to the first clarity scores and the second clarity scores corresponding to the plurality of detection images; Determine the focal plane compensation value corresponding to the detection image with the highest clarity score as the updated focal plane compensation value.
14. The device according to claim 11, characterized in that, Specifically, the determination unit is configured to: Determine the image differences between the plurality of detection images and a target image respectively; Determine the focal plane compensation value corresponding to the detection image with the smallest image difference as the updated focal plane compensation value, where the target image is an image with a clarity greater than a clarity threshold.
15. The device according to claim 11, characterized in that, The device further includes a first trigger unit, a second trigger unit, and a third trigger unit: The first trigger unit is configured to acquire the working duration of the autofocus device. If the working duration is greater than a duration threshold, the calibration trigger condition is reached; The second triggering unit is configured to obtain the optical mode of the autofocus device corresponding to the detection device, and if the optical mode changes, the calibration triggering condition is met; The third triggering unit is configured to obtain the environmental temperature change range within a preset time period, and if the environmental temperature change range is greater than the range threshold, the calibration triggering condition is met.