Automatic focusing objective lens driving method and system and medium

By dynamically adjusting the rate of change of defocus and the speed of objective lens movement, the contradiction between computational burden and image quality in dynamic scenes of the autofocus system is resolved, achieving efficient and accurate focusing.

CN121541359AActive Publication Date: 2026-02-17HEFEI I TEK OPTOELECTRONICS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202610081962.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-21
Publication Date
2026-02-17
Estimated Expiration
2046-01-21

AI Technical Summary

Technical Problem

In dynamic scenes, autofocus systems struggle to balance the computational burden and image quality issues caused by high sampling frequencies, leading to a trade-off between response speed and image blur. Existing technologies cannot adapt to the complex and ever-changing needs of these scenarios.

Method used

By calculating the rate of change of defocus and the dynamic adjustment of objective lens movement speed, and combining the defocus threshold and speed adjustment model, the sampling interval and objective lens movement speed are dynamically adjusted to balance focusing speed and computational resource consumption.

Benefits of technology

It achieves improved efficiency and accuracy in the focusing process while ensuring image quality, reduces data processing burden, avoids bokeh and image trailing phenomena, and meets the focusing needs of different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121541359A_ABST
    Figure CN121541359A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic focusing objective lens driving method and system and a medium, and the method comprises the steps: obtaining the defocusing amount of the position of an objective lens at a current moment and a previous moment, and calculating the defocusing amount change rate of two adjacent moments; based on the relationship between the absolute value of the defocusing amount at the current moment and a set defocusing amount threshold value, screening a corresponding defocusing amount change rate threshold value, and calculating the offset of the defocusing amount change rate at two adjacent moments; and extracting the moving speed of the current objective lens along the z axis, and dynamically adjusting the moving speed of the objective lens at the next moment by adopting the offset of the defocusing amount change rate, the moving speed of the objective lens and the threshold value of the defocusing amount change rate. According to the invention, the moving speed of the objective lens can be dynamically adjusted, so that the sampling interval of the objective lens along the Z axis at two adjacent moments is adjusted, the data processing burden is reduced, the focusing demand and the consumption of computing resources are balanced, and the efficiency and accuracy of the focusing process are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of automatic focusing, and relates to an objective lens driving method, system and medium for automatic focusing. BACKGROUND

[0002] The automatic focusing coefficient collects a light spot image through a sensor, calculates a defocus amount according to the light spot image, and drives the objective lens to move to realize focusing. In a dynamic scene, it is necessary to quickly respond to changes in the scene to ensure that the image is clear, and therefore, the sampling frequency is an important factor affecting the performance of the system. A higher sampling frequency can more accurately capture rapidly changing signals, improve focusing speed and accuracy, and in particular, in a continuous focusing mode, the system needs to track moving objects in real time, and therefore, the requirement for the sampling frequency is higher. However, a high sampling frequency significantly increases the computational burden of the system, leading to tight processing resources and rising power consumption.

[0003] On the other hand, in order to reduce the sampling frequency, the system needs to prolong the time of a single focusing calculation to obtain an image with sufficient signal-to-noise ratio to determine the focusing state, and by increasing the exposure time, the quality of the light spot image is ensured, however, long exposure time will introduce motion blur problems, especially in dynamic scenes, the light spot image is prone to trailing phenomenon, thereby affecting the accuracy of the defocus amount calculation. The automatic focusing system faces challenges between dynamic response and image quality: high sampling frequency can improve response speed but increase computational cost, and low sampling frequency can reduce computational burden but cause image blur and reduce focusing reliability.

[0004] At present, the automatic focusing system often adopts a fixed sampling frequency or exposure parameter, which is difficult to adapt to the needs of complex and variable scenes, and cannot simultaneously consider focusing speed, computational load and image quality. Therefore, it is urgent to balance the focusing speed and computational load under the premise of ensuring image quality. SUMMARY

[0005] The application aims to overcome the above problems in the prior art and provides an objective lens driving method, system and medium for automatic focusing.

[0006] To achieve the above technical purposes and effects, the application realizes the following technical solutions: An objective lens driving method for automatic focusing, comprising: obtaining a defocus amount of the objective lens at a current time and a previous time, and calculating a defocus amount change rate of adjacent two times; selecting a corresponding defocus amount change rate threshold value based on a relationship between an absolute value of a defocus amount at the current moment and a set defocus amount threshold value, and calculating a defocus amount change rate offset value of adjacent two moments, the defocus amount change rate offset value being a difference value between the defocus amount change rate of adjacent two moments and the set defocus amount change rate threshold value; extracting a movement speed of the current objective lens along the z-axis, and dynamically adjusting the objective lens movement speed at the next moment by using the defocus amount change rate offset value, the objective lens movement speed, and the defocus amount change rate threshold value, so as to balance the focusing speed and the defocus amount calculation consumption.

[0007] Further, if the absolute value of the defocus amount at the current moment is greater than the set defocus amount threshold value, the objective lens movement speed is accelerated; if the absolute value of the defocus amount at the current moment is not greater than the set defocus amount threshold value, the objective lens movement speed is decelerated.

[0008] Further, the defocus amount change rate threshold value includes a first threshold value and a second threshold value, the first threshold value is greater than the second threshold value, a defocus amount change rate corresponding to an initial first movement speed of the objective lens along the z-axis is taken as the first threshold value, and a defocus amount change rate corresponding to an initial second movement speed of the objective lens along the z-axis is taken as the second threshold value. The initial first movement speed is greater than the initial second movement speed.

[0009] Further, based on whether the direction of the position change amount of the light spot on the sensor caused by the movement direction of the objective lens along the z-axis and the movement direction of the measured object along the x-axis is the same, the sum of the position change amount of the light spot on the sensor caused by the movement of the objective lens along the z-axis and the position change amount of the sensor caused by the movement of the measured object along the x-axis in the same direction is used to select the maximum movement speed of the objective lens, and the maximum movement speed of the objective lens is greater than the initial first movement speed.

[0010] Further, based on the defocus amount at the position of the objective lens at the current moment, a corresponding defocus amount change rate threshold value is selected, the relationship between the absolute value of the defocus amount at the current moment and the set defocus amount threshold value and the defocus amount change rate offset value are combined, and the adjusted movement speed of the objective lens along the z-axis at the next moment is calculated by using a speed adjustment model according to the movement speed of the current objective lens along the z-axis.

[0011] Further, the movement speed of the objective lens along the z-axis is dynamically controlled, and the dynamic control method of the objective lens movement speed includes: extracting the defocus amount change rate corresponding to the movement of the objective lens along the z-axis at the current adjacent two moments, and calculating the defocus amount change rate offset value; analyzing the defocus amount change rate at different positions of the measured object during the movement of the measured object along the x-axis direction; The defocus amount change rate of the position of the objective lens is corrected based on the defocus amount change rate of different positions of the to-be-measured object at two adjacent time points, and the defocus amount change rate after correction is used to analyze the moving speed of the objective lens at the next two adjacent time points. The corresponding defocus amount change rate range is determined based on the relationship between the absolute value of the defocus amount at the current time and the set defocus amount threshold, and it is judged whether the predicted defocus amount change rate at the next two adjacent time points is within the corresponding defocus amount change rate range. If it is not within the corresponding defocus amount change rate range, the focusing is performed at the current moving speed of the objective lens; if it is within the corresponding defocus amount change rate range, the offset of the predicted defocus amount change rate is calculated, and the moving speed of the objective lens at the next time is calculated in combination with the moving speed of the objective lens at the current time and the defocus amount change rate threshold. The speed adjustment model is determined by the moving speed of the objective lens at the current time, the offset of the defocus amount change rate at the current two adjacent time points, and the defocus amount change rate threshold corresponding to the defocus amount change rate.

[0012] Further, based on the set displacement threshold, the moving speed of the to-be-measured object along the horizontal direction, the magnification of the objective lens, and the exposure time of the sensor, a relationship between the moving speed of the objective lens along the z-axis and the moving speed of the to-be-measured object along the horizontal direction is established, and the maximum moving speed of the objective lens along the z-axis is determined.

[0013] Further, based on the positions of the objective lens on the z-axis at different time points, the moving distance of the objective lens along the z-axis at two adjacent time points is obtained, and in combination with the defocus amount change rate of the objective lens along the z-axis at the same time at two adjacent time points, the height change amount of the surface of the to-be-measured object at two adjacent time points is obtained.

[0014] An objective lens driving system for automatic focusing, applied to any of the above-mentioned methods, comprising: A data processing module is used to obtain the defocus amount of the position of the objective lens at the current time and the previous time, and calculate the defocus amount change rate at two adjacent time points. An offset data analysis module is used to filter the corresponding defocus amount change rate threshold based on the relationship between the absolute value of the defocus amount at the current time and the set defocus amount threshold, and calculate the offset of the defocus amount change rate at two adjacent time points, which is the difference between the defocus amount change rate at two adjacent time points and the set defocus amount change rate threshold. A driving speed adjustment module is used to extract the moving speed of the objective lens along the z-axis, and dynamically adjust the moving speed of the objective lens at the next time by using the offset of the defocus amount change rate, the moving speed of the objective lens, and the defocus amount change rate threshold, so as to balance the focusing speed and the consumption of defocus amount calculation.

[0015] A computer readable storage medium, the computer readable storage medium has a computer program stored therein, the computer program is executed by a processor to implement the automatic focusing objective lens driving method of any one of the above.

[0016] The beneficial effects of the present application are: The present application filters the corresponding defocus amount change rate threshold value through the relationship between the absolute value of the defocus amount at the current time and the set defocus amount threshold value, calculates the offset of the defocus amount change rate of the adjacent two times, combines the objective lens moving speed, obtains the objective lens moving speed at the next time, adjusts the objective lens moving speed according to the position of the objective lens, thereby obtaining the sampling interval of the objective lens along the Z axis at the adjacent two times, reduces the data processing burden, balances the focusing demand and the consumption of computing resources, and improves the efficiency and accuracy of the focusing process.

[0017] The present application can divide the two cases of greater than the set defocus amount threshold value and not greater than the set defocus amount threshold value through the set defocus amount threshold value, and select the corresponding speed adjustment strategy, so that the objective lens moving speed is large when the defocus amount at the current time is greater than the set defocus amount threshold value, and vice versa, the objective lens moving speed is small, realize the real-time dynamic adjustment of the moving speed, and improve the focusing efficiency of the moving test object.

[0018] The present application determines the speed adjustment coefficient through the relationship between the defocus amount change rate of the adjacent two times and the defocus amount change rate threshold value and the relationship between the absolute value of the defocus amount at the current time and the set defocus amount threshold value, so as to control the adjustment amplitude of the objective lens moving speed at the next time according to the objective lens moving speed at the current time, can perform real-time dynamic adjustment according to the distance between the focal plane of the objective lens and the surface of the test object, and meet the speed adjustment demand.

[0019] The present application adopts the set displacement threshold value corresponding to the situation that the spot image does not occur blur, and constrains the sum of the position change amount of the spot on the sensor caused by the movement of the objective lens along the z axis and the movement of the test object along the x axis direction, so as to limit the relationship between the movement speed of the objective lens along the z axis and the movement speed of the test object along the x axis, and limit the maximum movement speed of the objective lens along the z axis, under the constraint condition, while meeting the adjustment of different test object movement speeds, the quality of the spot image can be guaranteed without trailing phenomenon.

[0020] The present application can determine the height change amount of the test object surface in the adjacent two times by analyzing the defocus amount change rate of the test object moving along the x axis direction by using the objective lens in the static state, and further determines the height change amount of the test object surface at different positions by using polynomial fitting, calculates the offset of the corrected defocus amount change rate, and further corrects the objective lens moving speed at the next time, thereby improving the accuracy of speed adjustment and reducing the influence of the height change of the test object surface on speed adjustment. Attached Figure Description

[0021] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings: Figure 1 This is a flowchart of the autofocus objective lens driving method in this invention; Figure 2 This is a flowchart of the dynamic control method for the objective lens movement speed in this invention; Figure 3 This is a schematic diagram of the height change of the surface of the object under test at two adjacent moments in this invention; Figure 4 This is a schematic diagram of the autofocus objective lens drive system of the present invention. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] In a laser autofocus system, a sensor acquires a spot image, calculates the defocus amount based on the spot image, and then drives the objective lens to move along the Z-axis to achieve focusing. The sampling frequency of the sensor acquiring the spot image is affected by the exposure time. To ensure the quality of the spot image, a long exposure time is required at a low sampling frequency, but a long exposure time increases the image ghosting phenomenon. Currently, the amount of movement of the objective lens along the Z-axis is the same in each sampling cycle, making it impossible to dynamically adjust the sampling interval according to the defocus amount.

[0024] With the sensor's sampling frequency and exposure time remaining constant, the sampling interval can be dynamically adjusted by changing the moving speed of the objective lens along the Z-axis. This allows for the adjustment of the sampling interval between two adjacent light spot images along the Z-axis, reducing the data processing burden and balancing the focusing requirements with the consumption of computing resources, thus ensuring the efficiency and accuracy of the focusing process.

[0025] In response to the above technical problems, such as Figure 1 As shown, this application specifically provides an autofocus objective lens driving method for dynamically driving and controlling the movement speed of the objective lens along the z-axis to balance the consumption of focusing speed and defocus calculation. The autofocus objective lens driving method includes: Obtain the defocus amount at the current and previous objective lens positions, and calculate the rate of change of defocus amount between two adjacent time points. The defocus amount change rate threshold value is selected according to the relationship between the absolute value of the defocus amount at the current moment and the set defocus amount threshold value, and the defocus amount change rate offset value is calculated, which is the difference between the defocus amount change rate at the adjacent two moments and the set defocus amount change rate threshold value. The defocus amount change rate is the defocus amount change in unit time. The defocus amount change rate offset value, the objective lens movement speed, and the defocus amount change rate threshold value are used to dynamically adjust the objective lens movement speed at the next moment to balance the focusing speed and the defocus amount calculation.

[0026] The defocus amount change rate reflects the speed of defocus amount change in unit time. As the defocus amount change rate changes, the position change rate of the objective lens along the z-axis also changes. The greater the defocus amount change rate, the faster the movement speed of the objective lens along the z-axis. Conversely, the smaller the defocus amount change rate, the slower the movement speed of the objective lens along the z-axis. In order to balance the focusing speed of the objective lens and the defocus amount calculation, according to the relationship between the current defocus amount of the objective lens and the set defocus amount threshold value, the sampling interval of the adjacent two frames of spot images is controlled while keeping the sampling frequency unchanged. When the defocus amount is greater than the set defocus amount threshold value, a large sampling interval is used to shorten the focusing time and reduce the defocus amount calculation. When the defocus amount is less than the set defocus amount threshold value, a small sampling interval is used to improve the focusing accuracy.

[0027] The defocus amount change rate offset value can reflect whether the sampling interval along the z-axis at the adjacent two moments is less than the sampling interval corresponding to the defocus amount change rate threshold value during the movement of the objective lens along the z-axis. This facilitates driving speed adjustment of the objective lens movement speed at the next moment based on the defocus amount change rate offset value and the current movement speed of the objective lens to balance the focusing speed and the defocus amount calculation.

[0028] In this application, the defocus amount change rate threshold value includes a first threshold value and a second threshold value, the first threshold value is greater than the second threshold value, the defocus amount change rate corresponding to the initial first movement speed of the objective lens along the z-axis is taken as the first threshold value, and the defocus amount change rate corresponding to the initial second movement speed of the objective lens along the z-axis is taken as the second threshold value, wherein the initial first movement speed is greater than the second movement speed.

[0029] The initial first movement speed is the minimum movement speed of the objective lens along the z-axis when the defocus amount is greater than the set defocus amount threshold value, and the second movement speed is the maximum movement speed of the objective lens along the z-axis when the defocus amount is not greater than the set defocus amount threshold value.

[0030] In the case that the absolute value of the defocus amount at the current time is greater than the set defocus amount threshold, if the defocus amount change rate of the adjacent two times is less than the first threshold, the defocus amount change rate offset is less than 0, the moving speed of the objective lens needs to be adjusted, so that the adjusted moving speed of the objective lens is greater than the current moving speed of the objective lens along the z-axis, so that the sampling interval of the adjacent two times of the objective lens moving along the z-axis is increased.

[0031] In the case that the absolute value of the defocus amount at the current time is not greater than the set defocus amount threshold, if the defocus amount change rate is greater than the second threshold, the defocus amount change rate offset is greater than 0, the moving speed of the objective lens needs to be adjusted, so that the adjusted moving speed of the objective lens is less than the current moving speed of the objective lens along the z-axis, so that the sampling interval of the adjacent two times of the objective lens moving along the z-axis is increased.

[0032] In order to realize the dynamic adjustment of the moving speed of the objective lens, based on the defocus amount at the current time, the corresponding defocus amount change rate threshold is selected, if the absolute value of the defocus amount at the current time is greater than the set defocus amount threshold, the first threshold in the defocus amount change rate threshold is selected, if the absolute value of the defocus amount at the current time is not greater than the set defocus amount threshold, the second threshold in the defocus amount change rate threshold is selected.

[0033] According to the selected defocus amount change rate threshold, the defocus amount change rate offset corresponding to the defocus amount at the current time is calculated, and the defocus amount change rate offset and the defocus amount change rate threshold are used to dynamically drive and adjust the moving speed of the current objective lens.

[0034] If the absolute value of the defocus amount at the current time is greater than the set defocus amount threshold, the moving speed of the objective lens is adjusted to increase; if the absolute value of the defocus amount at the current time is not greater than the set defocus amount threshold, the moving speed of the objective lens is adjusted to decrease.

[0035] Based on the defocus amount of the position of the objective lens at the current time, the corresponding defocus amount change rate threshold is selected, combined with the relationship between the absolute value of the defocus amount at the current time and the set defocus amount threshold and the defocus amount change rate offset, according to the moving speed of the objective lens along the z-axis at the current time, the moving speed of the objective lens along the z-axis at the next time after adjustment is calculated by using a speed adjustment model, wherein the speed adjustment model is determined by the moving speed of the objective lens at the current time, the defocus amount change rate offset of the adjacent two times at the current time and the defocus amount change rate threshold corresponding to the defocus amount change rate.

[0036] Wherein, the speed adjustment model of the objective lens moving along the z-axis: ; Indicates the moving speed of the objective lens along the z-axis at the next time after adjustment, Indicates the moving speed of the objective lens along the z-axis at the current time, pv a shift of the defocus amount representing a rate of change of the defocus amount, a defocus amount change rate threshold corresponding to a defocus amount at a current time point, the value of the coefficient K being determined according to a relationship between an absolute value of the defocus amount at the current time point and a set defocus amount threshold and a relationship between defocus amount change rates at adjacent two time points and the first threshold and the second threshold.

[0037] In a case where the absolute value of the defocus amount at the current time point is greater than the set defocus amount threshold, if the defocus amount change rates at the adjacent two time points are less than the first threshold, K is-1 at this time, and if the defocus amount change rates at the adjacent two time points are greater than the first threshold, K is 0 at this time; in a case where the absolute value of the defocus amount at the current time point is not greater than the set defocus amount threshold, if the defocus amount change rates at the adjacent two time points are greater than the second threshold, K is-1 at this time, and if the defocus amount change rates at the adjacent two time points are less than the second threshold, K is 0 at this time.

[0038] By the above relationship between the absolute value of the defocus amount at the current time point and the set defocus amount threshold, the shift of the defocus amount change rate and the corresponding defocus amount change rate threshold, the movement speed of the objective lens at the next time point can be adjusted according to the movement speed of the objective lens at the current time point, so as to control the adjustment amplitude of the movement speed at the next time point according to the current position of the objective lens, and the movement speed of the objective lens at the next time point can be dynamically adjusted in real time according to the distance between the focal plane of the objective lens at the current position and the surface of the object to be measured, so as to meet the speed adjustment requirement.

[0039] In the process of moving the objective lens along the z-axis, the sensor collects the light spot image of the object to be measured moving along the x-axis. Since the objective lens moves along the z-axis and the object to be measured moves along the x-axis, both will cause the light spot to shift on the sensor. If the shift of the light spot on the sensor is greater than the set displacement threshold, the quality of the light spot image will be affected, causing the phenomenon of trailing.

[0040] The set displacement threshold is determined by the focusing accuracy allowed by the autofocus system, and can be selected as 2 pixels, 1 pixel or 0.5 pixel length, etc. The higher the focusing accuracy requirement, the smaller the set displacement threshold, which is set according to the accuracy requirement.

[0041] Based on whether the direction of the change in position of the light spot on the sensor caused by the movement direction of the objective lens along the z-axis and the movement direction of the object to be measured along the x-axis is the same, the sum of the change in position of the light spot on the sensor caused by the movement of the objective lens along the z-axis and the change in position of the sensor caused by the movement of the object to be measured along the x-axis in the same direction is used, and the maximum movement speed allowed by the objective lens is selected, which is greater than the initial first movement speed.

[0042] Based on the moving direction and speed of the objective lens along the z-axis, the displacement variation and direction of the light spot on the sensor caused by the moving direction and speed of the objective lens along the z-axis can be determined, and assuming that the position of the objective lens remains unchanged, the displacement variation and direction of the light spot on the sensor caused by the moving direction and speed of the object along the x-axis can be determined.

[0043] If the direction of the position variation of the light spot on the sensor caused by the objective lens moving along the z-axis is the same as the direction of the position variation of the light spot on the sensor caused by the object moving along the x-axis, at this time, the sum of the position variations caused by the objective lens moving along the z-axis and the object moving along the x-axis needs to be limited to be less than the set displacement threshold; if the direction of the position variation of the light spot on the sensor caused by the objective lens moving along the z-axis is opposite to the direction of the position variation of the light spot on the sensor caused by the object moving along the x-axis, at this time, the absolute value of the difference between the position variations caused by the objective lens moving along the z-axis and the object moving along the x-axis needs to be limited to be less than the set displacement threshold, so as to avoid the problem of smearing of the light spot image.

[0044] Based on the set displacement threshold, the moving speed of the object along the horizontal direction, the magnification of the objective lens, and the exposure time of the sensor, a relationship between the moving speed of the objective lens along the z-axis and the moving speed of the object along the horizontal direction is established, and the maximum moving speed of the objective lens along the z-axis is determined.

[0045] For the object moving along the x-axis, the objective lens moves along the z-axis to focus, so as to realize follow-up focusing. In this process, the relationship between the moving speed of the objective lens along the z-axis and the moving speed of the object along the horizontal direction perpendicular to the z-axis (x-axis) is limited by the moving speed of the objective lens along the z-axis and the moving speed of the object along the horizontal direction perpendicular to the z-axis (x-axis), and the relationship is as follows: Vx represents the moving speed of the object along the x-axis, Vz represents the moving speed of the objective lens along the z-axis, x max represents the distance from the point on the object located at the edge of the field of view to the Z-axis, d represents the distance from the current objective lens to the surface of the object along the z-axis, D img represents the set displacement threshold, the set displacement threshold is the maximum light spot displacement allowed when the light spot image does not occur smearing, M represents the magnification of the objective lens, and T represents the single exposure time of the sensor.

[0046] The relationship between the moving speed of the objective lens along the z-axis and the moving speed of the object along the x-axis is that, if the direction of the position variation of the light spot on the sensor caused by the objective lens moving along the z-axis is the same as the direction of the position variation of the light spot on the sensor caused by the object moving along the x-axis, according to the moving speed of the object along the x-axis, the maximum moving speed Vz1 max of the objective lens along the z-axis within the minimum range can be determined.

[0047] Similarly, if the direction of the change in position of the light spot on the sensor caused by the movement of the objective lens along the z-axis is opposite to the direction of the change in position of the light spot on the sensor caused by the movement of the object under test along the x-axis, then the maximum moving speed Vz2 of the objective lens moving along the z-axis within its maximum range can be determined. max The maximum moving speed Vz2 within the maximum range max The maximum moving speed Vz1 is greater than the minimum range. max .

[0048] Maximum movement speed Vz1 within the minimum range max : ; Maximum displacement velocity Vz2 within the maximum range max : .

[0049] Based on the relationship between the objective lens’s moving speed along the z-axis and the object under test’s moving speed along the horizontal direction, when the object under test’s moving speed and direction along the horizontal direction are fixed, the range of the objective lens’s moving speed along the z-axis can be determined according to the objective lens’s moving direction. Once the objective lens’s moving speed along the z-axis exceeds the maximum displacement speed within the current range, there will be a ghosting effect in the spot image.

[0050] By determining the moving speed of the object under test and whether the direction of the change in the position of the light spot on the sensor caused by the moving direction of the objective lens along the z-axis is the same as or opposite to that of the moving direction of the object under test, the maximum moving speed within the allowable speed range of the objective lens can be determined. This is to prevent the moving speed of the objective lens in the moving direction from exceeding the maximum allowable moving speed and to ensure the quality of the light spot image.

[0051] As the objective lens moves along the z-axis, all light spots on the entire image sensor plane simultaneously increase or decrease in size, and the energy center of the light spots should remain in place or move in the same direction. During this process, in order to ensure the consistency of image quality and avoid image ghosting, the maximum moving speed is selected when the direction of the objective lens's movement along the z-axis is the same as the direction of the change in the position of the light spots on the sensor caused by the movement of the object under test. This moving speed limits the moving speed of the objective lens along the z-axis.

[0052] To ensure the quality of the light spot image, the objective lens's movement speed along the z-axis at the next moment, as adjusted in the speed adjustment model, must be less than the maximum allowable movement speed Vz1 of the objective lens in the movement direction. max When using a speed adjustment model, based on the current objective lens movement speed along the z-axis, the adjusted objective lens movement speed along the z-axis at the next moment is determined to be greater than the maximum allowable movement speed Vz1 of the objective lens in the direction of movement. maxAt the maximum moving speed Vz1 max This refers to the objective lens movement speed at the next moment.

[0053] Based on the relationship between the absolute value of the current defocus amount and the set defocus amount threshold, the objective lens movement speed can be dynamically controlled in real time according to the offset of the current defocus amount change rate. Alternatively, the objective lens movement speed can be increased only when the absolute value of the current defocus amount is greater than the set defocus amount threshold, and vice versa.

[0054] When the absolute value of the defocus amount at the current moment is not greater than the set defocus amount threshold, the second threshold among the corresponding defocus amount change rate thresholds is selected, and the offset of the defocus change rate at the current moment is calculated. When the absolute value of the defocus amount at the current moment is not greater than the set defocus amount threshold, the first threshold among the corresponding defocus amount change rate thresholds is selected, and the offset of the defocus change rate at the current moment is calculated. Based on this, the moving speed of the objective lens along the z-axis is dynamically controlled, such as... Figure 2 As shown, the dynamic control method for the objective lens movement speed includes: Step 1: Extract the rate of defocus change corresponding to the objective lens movement along the z-axis at two adjacent time points, and calculate the offset of the rate of defocus change. Step 2: Analyze the rate of change of defocus at different positions of the test object as it moves along the x-axis. This embodiment is used to exclude the rate of defocus change caused by the movement of the objective lens along the z-axis, and to limit the objective lens to a relatively stationary state in order to analyze the rate of defocus change caused by the movement of the test object only along the x-axis.

[0055] With the objective lens kept relatively stationary (i.e., the z-axis position coordinate of the objective lens remains unchanged), only the object under test moves along the x-axis. The change in defocus at different times is analyzed, and the rate of change of defocus is calculated based on the change in defocus between the current time and the previous time when the object under test moves along the x-axis. In this process, taking a certain position of the object under test as the starting point, the object under test moves along the x-axis at a fixed moving speed. By combining the defocus amount corresponding to the objective lens at different times, the change in defocus amount of the object under test at the corresponding position at two adjacent times can be obtained. Then, the rate of change of defocus amount of the object under test at different positions can be obtained. In this process, based on the moving speed of the object under test and the duration corresponding to two adjacent times, the distance that the object under test moves along the x-axis at two adjacent times can be determined.

[0056] Since the objective lens is in a relatively stationary state, polynomial fitting is used to obtain the defocusing rate curve between different positions on the surface of the object under test at two adjacent times based on the rate of defocusing change at different positions. The relative change of the height of the object under test can be reflected by the rate of defocusing change between different positions on the surface of the object under test, thereby obtaining the relative height of the object under test surface.

[0057] Since the moving speed of the object under test is fixed (uniform movement), the moving speed of the object under test and the duration between two adjacent moments are used to obtain the amount of movement X of the object under test along the x-axis between two adjacent moments. Combined with the rate of change of defocus at two adjacent positions, the change in the height of the object under test surface under the amount of movement X along the x-axis can be determined.

[0058] Step 3: Based on the rate of defocus change at different positions of the object under test in two adjacent time intervals, correct the rate of defocus change at the position of the objective lens, and use the corrected rate of defocus change to analyze the moving speed of the objective lens in the next two adjacent time intervals. Based on the moving speed of the objective lens along the z-axis, and combined with the defocusing rate curves at different positions on the surface of the object under test when the objective lens is relatively stationary, the defocusing rate corresponding to the objective lens movement in the next two adjacent moments can be predicted. This can eliminate the influence of the change in the height of the object under test on the defocusing rate caused by the objective lens movement along the z-axis in the next two adjacent moments.

[0059] Step 4: Based on the relationship between the absolute value of the defocus amount at the current moment and the set defocus amount threshold, determine the corresponding range of the defocus amount change rate, and judge whether the predicted defocus amount change rate in the next two adjacent moments is within the corresponding range of the defocus amount change rate. Step 5: If the defocusing rate is not within the corresponding range, focus is performed using the objective lens moving speed at the current moment; if it is within the corresponding range, the predicted defocusing rate of change is calculated, and the objective lens moving speed at the next moment is calculated by combining the objective lens moving speed at the current moment and the defocusing rate of change threshold.

[0060] The lower limit of the defocus change rate is the defocus change rate corresponding to the minimum allowable movement speed of the objective lens along the z-axis; the upper limit of the defocus change rate is the defocus change rate corresponding to the maximum allowable movement speed of the objective lens along the z-axis.

[0061] The defocus amount change rate range includes a first range and a second range. Specifically, if the absolute value of the defocus amount at the current moment is greater than the set defocus amount threshold, the defocus amount change rate range corresponding to the absolute value of the defocus amount being greater than the set defocus amount threshold is determined by the defocus amount change rate threshold and the upper limit of the defocus amount change rate, and this range is taken as the first range. If the absolute value of the defocus amount at the current moment is not greater than the set defocus amount threshold, the defocus amount change rate range corresponding to the absolute value of the defocus amount not being greater than the set defocus amount threshold is determined by the lower limit of the defocus amount change rate and the defocus amount change rate threshold, and this range is taken as the second range. Among them, the upper limit of the defocus change rate > the threshold of the defocus change rate > the lower limit of the defocus change rate.

[0062] The threshold for the rate of change of defocus amount corresponding to the first range is the first threshold, and the threshold for the rate of change of defocus amount corresponding to the second range is the second threshold.

[0063] If the absolute value of the defocus amount at the current moment is greater than the set defocus amount threshold, determine whether the predicted rate of change of defocus amount in the next two adjacent moments is within the first range. If it is within the first range, calculate the offset of the predicted rate of change of defocus amount based on the predicted rate of change of defocus amount in the next two adjacent moments, and use the speed adjustment model to calculate the objective lens movement speed at the next moment. If it is not within the first range, continue to focus at the current objective lens movement speed along the z-axis.

[0064] If the absolute value of the defocus amount at the current moment is not greater than the set defocus amount threshold, determine whether the predicted rate of change of defocus amount in the next two adjacent moments is within the second range. If it is within the second range, calculate the offset of the predicted rate of change of defocus amount based on the predicted rate of change of defocus amount in the next two adjacent moments, and use the speed adjustment model to calculate the objective lens movement speed at the next moment. If it is not within the second range, continue focusing at the current objective lens movement speed along the z-axis.

[0065] By determining the range of the defocus rate of change by comparing the absolute value of the current defocus amount with the set defocus threshold, and combining this with the relationship between the predicted defocus rate of change in the next two adjacent moments and the corresponding range of defocus rate of change, the objective lens's moving speed during focusing is further determined. This enables dynamic adjustment of the objective lens's moving speed. By combining the current defocus amount and the defocus rate of change with the upper and lower limits of speed adjustment, the problem of continuously adjusting the moving speed based on the predicted defocus rate of change in the next moment, which could lead to the objective lens moving too slowly or too slowly along the z-axis, is avoided. This balances focusing efficiency and the computational complexity of defocus amount calculation.

[0066] Since the rate of change of defocus is affected by both the moving speed of the objective lens and the distance between the objective lens and the surface of the object under test, it is difficult to effectively identify whether the rate of change of defocus exceeds the threshold simply by relying on the relationship between the rate of change of defocus and the threshold.

[0067] For a stationary object, the objective lens moves at a constant speed V along the z-axis. The defocus amount at the objective lens position at two different times is extracted, the change in defocus amount is calculated, and the rate of change of defocus amount during the objective lens movement is calculated based on the change in defocus amount.

[0068] For a stationary object, the rate of change of defocus corresponding to the objective lens moving along the z-axis is: , , According to the above formula, we can know that Where V represents the velocity corresponding to the objective lens moving at a constant speed along the z-axis. Δd represents the rate of defocus change when the objective lens moves at a speed of V along the z-axis. Δd represents the change in defocus at the objective lens position at two times (t1 and t2). d1 and d2 represent the defocus at the objective lens position at times t1 and t2, respectively.

[0069] A stationary object is focused by selecting an objective lens to move along the z-axis at a certain speed. The moving speed of the objective lens along the z-axis is used as the defocusing rate threshold at that moving speed. At this time, the defocusing rate threshold is not affected by the height change of the surface of the object.

[0070] In this embodiment, for a stationary test object, since the focal plane position is fixed, the change in distance between the objective lens and the focal plane is only caused by the movement of the objective lens. Therefore, for a stationary test object, during the focusing process of the objective lens moving along the z-axis, the rate of change of defocus is equal to the moving speed of the objective lens. However, for a moving test object, since the test object moves along the x-axis, the z-axis position corresponding to the surface of the test object changes, so the rate of change of defocus is not necessarily equal to the moving speed of the objective lens.

[0071] For a moving object under test, the rate of change of defocus corresponding to the objective lens moving along the z-axis is as follows: ; According to the above formula, we can know that , This represents the rate of change of defocus along the z-axis for a moving object under test. Δd1 represents the change of defocus at the objective lens position from time t3 to t4, Δd2 represents the change of the object's surface height along the z-axis from time t3 to t4, d11 and d12 represent the defocus at the objective lens position at time t3 and t4 respectively, and d21 and d22 represent the z-axis height of the object's surface at time t3 and t4 respectively. V S This represents the rate of change of the height of the object under test along the z-axis from time t3 to time t4.

[0072] The objective lens focuses on the moving object under test. The direction and speed of the object's movement affect the change in the z-axis height of the object's surface, thus making the rate of defocus change greater or less than the speed at which the objective lens moves along the z-axis.

[0073] When the object under test moves, the change in the surface of the object under test causes a change in the focal plane. The autofocus system needs to track the position of the surface of the object under test in real time to ensure that the objective lens is always aligned with the focal plane. Therefore, based on the offset of the defocus change rate of the objective lens at two adjacent moments, the system adjusts the moving speed of the objective lens along the z-axis at the current defocus change rate to achieve dynamic adjustment of the objective lens moving speed.

[0074] In this embodiment, based on the position of the objective lens on the z-axis at different times, the distance the objective lens moves along the z-axis at two adjacent times can be obtained. Combined with the rate of change of defocusing amount of the objective lens moving along the z-axis at two adjacent times at the same time, the change in height of the object surface under test at two adjacent times can be obtained.

[0075] like Figure 3 As shown, the change in height of the object's surface at two consecutive time points: ; △T represents the time difference between any two adjacent moments, △z represents the distance the objective lens moves along the z-axis between two adjacent moments, and △h represents the height difference of the surface of the object under test along the z-axis between two adjacent moments.

[0076] Based on the height change of the test surface at two adjacent moments, the relative height change of the test surface determined by the rate of defocus change between different positions on the test surface is corrected.

[0077] Based on the height change at different positions on the surface of the object under test, the defocus amount during the movement of the objective lens along the z-axis is corrected to obtain the corrected rate of change of defocus amount, and then the offset of the corrected rate of change of defocus amount is obtained. Using the speed adjustment model of the objective lens moving along the z-axis, the objective lens movement speed at the next moment after correction is obtained.

[0078] like Figure 4As shown, a second aspect of the present invention also provides an autofocus objective lens driving system, comprising: The data processing module is used to obtain the defocus amount of the objective lens at the current and previous time points, and to calculate the rate of change of defocus amount between two adjacent time points. The offset data analysis module, based on the relationship between the absolute value of the defocus amount at the current moment and the set defocus amount threshold, filters the corresponding defocus amount change rate threshold, and calculates the offset of the defocus amount change rate between two adjacent moments. The offset of the defocus amount change rate is the difference between the defocus amount change rate between two adjacent moments and the set defocus amount change rate threshold. The drive speed adjustment module is used to extract the current objective lens movement speed along the z-axis. It uses the offset of the defocus change rate, the objective lens movement speed, and the defocus change rate threshold to dynamically adjust the objective lens movement speed at the next moment, so as to balance the consumption of focusing speed and defocus calculation.

[0079] The specific implementation of the autofocus objective lens driving system provided in this application can be referred to the above-described autofocus objective lens driving method, and will not be repeated here.

[0080] In another embodiment, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements any of the above-described autofocus objective lens driving methods.

[0081] In the description of this specification, references to terms such as "an embodiment," "example," and "specific example" indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0082] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.

Claims

1. A method for driving an autofocus objective lens, characterized in that, include: Obtain the defocus amount at the current and previous objective lens positions, and calculate the rate of change of defocus amount between two adjacent time points. Based on the relationship between the absolute value of the defocus amount at the current moment and the set defocus amount threshold, the corresponding defocus amount change rate threshold is selected, and the offset of the defocus amount change rate between two adjacent moments is calculated. The offset of the defocus amount change rate is the difference between the defocus amount change rate between two adjacent moments and the set defocus amount change rate threshold. Extract the current objective lens's moving speed along the z-axis. Using the offset of the defocusing rate of change, the objective lens moving speed, and the defocusing rate of change threshold, dynamically adjust the objective lens moving speed for the next moment to balance the consumption of focusing speed and defocusing calculation.

2. The method for driving an autofocus objective lens according to claim 1, characterized in that, If the absolute value of the defocus amount at the current moment is greater than the set defocus amount threshold, the objective lens movement speed is increased; if the absolute value of the defocus amount at the current moment is not greater than the set defocus amount threshold, the objective lens movement speed is decreased.

3. The method for driving an autofocus objective lens according to claim 1, characterized in that, The defocus change rate threshold includes a first threshold and a second threshold. The first threshold is greater than the second threshold. The defocus change rate corresponding to the objective lens moving along the z-axis at an initial first moving speed is used as the first threshold, and the defocus change rate corresponding to the objective lens moving along the z-axis at an initial second moving speed is used as the second threshold. The initial first moving speed is greater than the initial second moving speed.

4. The method for driving an autofocus objective lens according to claim 3, characterized in that, Based on whether the direction of the change in the position of the light spot on the sensor caused by the movement of the objective lens along the z-axis is the same as the direction of the movement of the object under test along the x-axis, the maximum allowable movement speed of the objective lens is selected by the sum of the change in the position of the light spot on the sensor caused by the movement of the objective lens along the z-axis and the change in the position of the object under test on the sensor caused by the movement of the object under test along the x-axis. The maximum allowable movement speed of the objective lens is greater than the initial first movement speed.

5. The method for driving an autofocus objective lens according to claim 3, characterized in that, Based on the defocus amount at the current objective lens position, the corresponding defocus amount change rate threshold is selected. Combining the relationship between the absolute value of the current defocus amount and the set defocus amount threshold, as well as the offset of the defocus amount change rate, the speed adjustment model is used to calculate the adjusted speed of the objective lens along the z-axis at the next moment, according to the current moving speed of the objective lens along the z-axis. The speed adjustment model is determined by the objective lens moving speed at the current moment, the offset of the defocus change rate between two adjacent moments, and the defocus change rate threshold corresponding to the defocus change rate.

6. The method for driving an autofocus objective lens according to claim 5, characterized in that, The method for dynamically controlling the movement speed of the objective lens along the z-axis includes: Extract the rate of defocus change corresponding to the movement of the objective lens along the z-axis between two adjacent time points, and calculate the offset of the rate of defocus change. Analyze the rate of change of defocusing at different positions of the test object as it moves along the x-axis; Based on the rate of defocus change at different positions of the object under test in two adjacent time intervals, the rate of defocus change at the position of the objective lens is corrected, and the moving speed of the objective lens in the next two adjacent time intervals is analyzed using the corrected rate of defocus change. Based on the relationship between the absolute value of the defocus amount at the current moment and the set defocus amount threshold, the corresponding range of the defocus amount change rate is determined, and it is judged whether the predicted defocus amount change rate in the next two adjacent moments is within the corresponding range of the defocus amount change rate. If the defocusing rate is not within the corresponding range, focus is performed using the objective lens moving speed at the current moment; if it is within the corresponding range, the predicted defocusing rate of change is calculated, and combined with the objective lens moving speed at the current moment and the defocusing rate of change threshold, the objective lens moving speed at the next moment is calculated.

7. The method for driving an autofocus objective lens according to claim 4, characterized in that, Based on the set displacement threshold, the horizontal movement speed of the object under test, the magnification of the objective lens, and the exposure time of the sensor, a relationship is established between the movement speed of the objective lens along the z-axis and the horizontal movement speed of the object under test, and the maximum allowable movement speed of the objective lens along the z-axis is determined.

8. The method for driving an autofocus objective lens according to claim 1, characterized in that, Based on the position of the objective lens on the z-axis at different times, the distance the objective lens moves along the z-axis at two adjacent times is obtained. Combined with the rate of change of defocusing of the objective lens along the z-axis at two adjacent times at the same time, the change in height of the object surface at two adjacent times is obtained.

9. An autofocus objective lens driving system, applied to the method described in any one of claims 1-8, characterized in that, include: The data processing module is used to obtain the defocus amount of the objective lens at the current and previous time points, and to calculate the rate of change of defocus amount between two adjacent time points. The offset data analysis module, based on the relationship between the absolute value of the defocus amount at the current moment and the set defocus amount threshold, filters the corresponding defocus amount change rate threshold, and calculates the offset of the defocus amount change rate between two adjacent moments. The offset of the defocus amount change rate is the difference between the defocus amount change rate between two adjacent moments and the set defocus amount change rate threshold. The drive speed adjustment module is used to extract the current objective lens movement speed along the z-axis. It uses the offset of the defocus change rate, the objective lens movement speed, and the defocus change rate threshold to dynamically adjust the objective lens movement speed at the next moment, so as to balance the consumption of focusing speed and defocus calculation.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the autofocus objective lens driving method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Imaging apparatus, control method thereof, and storage medium

    CN112153277A

  • AI-based mobile focusing method and device

    CN116095474A

  • Focus control device, method for operating focus control device, storage medium, computer program product, and imaging device

    CN120669376A

  • Automatic focusing defocusing amount processing method and system and medium

    CN121069613A

  • Automatic focusing device

    US5587762A