Focusing method and system
Patent Information
- Application Number
- CN202380080741.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-08
- Publication Date
- 2025-07-04
AI Technical Summary
Existing autofocus methods are slow and cannot focus in real time, especially when processing large-area samples, and have low accuracy for uneven tissues.
The photodetector captures the electrical signal of the light spot reflected on the surface of the object to be measured, calculates the sum signal, and determines the speed of the objective lens according to the preset relationship for motion focusing to achieve real-time autofocus. The photodetector includes first and second pixels, calculates their sum signal, difference signal and division signal, determines the amount of defocus and controls the movement of the objective lens to ensure that the surface of the object to be measured is always on the focal plane of the objective lens.
It achieves fast and accurate focusing, ensuring the clarity and accuracy of imaging. It is suitable for scanning and imaging of large-size samples, especially when the sample surface has fluctuations, it can maintain the depth of field of the objective lens.
Smart Images

Figure CN120266030A_ABST
Abstract
Description
Focusing method and system Technical Field
[0001] The present application relates to the field of optical focusing technology, for example, to a focusing method and system. Background Art
[0002] The mainstream autofocus methods on the market are basically area arrays. Most methods require the objective lens to reach the focal position before taking a picture. However, this method is slow and takes a long time for samples with larger areas. In addition, most autofocus methods collect multiple images and process them through different algorithms to determine the focal position. However, this method is slow, computationally intensive, and cannot focus in real time. Alternatively, points are selected at different positions to determine the focal position, and then a focal plane is fitted to obtain a focal surface. The more points are selected at different positions, the more accurate the fitted focal surface. However, for relatively uneven tissues, the fitted focal surface and the actual focal surface may differ significantly, resulting in lower accuracy.
[0003] Summary of the Invention
[0004] The present application provides a focusing method and system to achieve real-time automatic focusing and simultaneous imaging while focusing, with high focusing accuracy.
[0005] According to the present application, a focusing method is provided, comprising: obtaining an electrical signal corresponding to a light spot reflected from the surface of an object to be measured and captured by a photodetector; wherein the photodetector comprises a first pixel and a second pixel, the electrical signal corresponding to the first pixel is a first electrical signal, and the electrical signal corresponding to the second pixel is a second electrical signal; calculating the sum of the first electrical signal and the second electrical signal as a sum signal; judging whether the sum signal is greater than or equal to a preset threshold, and in response to the sum signal being greater than or equal to the preset threshold, determining a current defocus amount according to a first preset relationship, and determining a speed of an objective lens corresponding to the current defocus amount according to a second preset relationship, so as to control the objective lens to move and focus at the speed; wherein the first preset relationship is a correspondence between a division signal and the current defocus amount, the second preset relationship is a correspondence between the current defocus amount and the speed of the objective lens, and the division signal is a ratio between a difference between the first electrical signal and the second electrical signal and the sum signal.
[0006] According to one embodiment of the present application, the method includes: in response to the sum signal being less than the preset threshold, obtaining the position coordinates of the surface of the object to be measured corresponding to the light spot, and controlling the objective lens to move to the preset plane position based on the correspondence between the position coordinates and the preset plane position.
[0007] According to one embodiment of the present application, the process of controlling the objective lens to perform motion focusing at the speed further includes: acquiring the difference between the first electrical signal and the second electrical signal in real time as a difference signal; judging whether the difference signal is 0, and in response to the difference signal being 0, the surface of the object to be measured is located on the focal plane of the objective lens, so as to control the imaging camera to image the surface of the object to be measured; and in response to the difference signal not being 0, continuing to control the objective lens to perform motion focusing at the speed.
[0008] According to one embodiment of the present application, after obtaining the difference signal, it also includes: obtaining the ratio of the difference signal to the sum signal as a division signal; judging whether the division signal is 0, in response to the division signal being 0, the surface of the object to be measured is located on the focal plane of the objective lens, so as to control the imaging camera to image the surface of the object to be measured; in response to the division signal not being 0, continuing to control the objective lens to move and focus at the speed.
[0009] According to one embodiment of the present application, determining the speed of the objective lens corresponding to the current defocus amount according to the second preset relationship includes: determining the speed gain and speed polarity corresponding to the current defocus amount according to the second preset relationship; the speed of the objective lens is the product of the current defocus amount, the speed gain and the speed polarity, wherein the speed polarity is the movement direction of the objective lens, and the speed gain is the gain coefficient of the acceleration of the moving axis that drives the objective lens to move.
[0010] According to one embodiment of the present application, the speed gain is positively correlated with the current defocus amount.
[0011] The present application also provides a focusing system for implementing the focusing method described in any embodiment of the present application, the focusing system comprising: a focusing optical path, an imaging optical path, a controller, and an objective lens driver; the focusing optical path comprises: a focusing light source, a photodetector, and a first beam shaping lens group, the focusing light source being configured to emit a focusing beam through the first beam shaping lens group to an object to be measured, the object to be measured reflecting the focusing beam through the first beam shaping lens group to the photodetector, wherein the photodetector comprises a first pixel and a second pixel, the first pixel and the second pixel being symmetrically arranged along an optical axis of the first beam shaping lens group; the imaging optical path comprises: an imaging light source, an imaging camera, and a second beam shaping lens group, the imaging light source being configured to emit an imaging beam through the second beam shaping lens group to the object to be measured, the object to be measured reflecting the imaging beam through the second beam shaping lens group to the imaging camera; the controller being electrically connected to the photodetector, the imaging camera, and the objective lens driver, respectively, and configured to execute the focusing method described in any embodiment of the present application and drive the objective lens driver to move and focus.
[0012] According to one embodiment of the present application, the first beam shaping lens group includes: a first dichroic mirror, a first lens, a filter, a second dichroic mirror and an objective lens arranged along the transmission direction of the focused beam; the first dichroic mirror is configured to reflect the focused beam and transmit the reflected beam of the focused beam; the second dichroic mirror is configured to transmit the focused beam and the reflected beam of the focused beam, and is also configured to reflect the imaging beam and the reflected beam of the imaging beam.
[0013] According to one embodiment of the present application, the second beam shaping lens group includes: a second lens, and a third dichroic mirror, a second dichroic mirror and an objective lens arranged in sequence along the direction of the imaging beam; the third dichroic mirror is configured to transmit the imaging beam and reflect the reflected beam of the imaging beam; the second lens is arranged between the third dichroic mirror and the imaging camera.
[0014] According to one embodiment of the present application, the imaging camera is an area array camera or a line array camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0016] FIG1 is a schematic diagram of the surface of an object to be measured in the related art;
[0017] FIG2 is a flow chart of a focusing method according to an embodiment of the present application;
[0018] FIG3 is a schematic diagram of a photodetector in a focusing method according to an embodiment of the present application;
[0019] FIG4 is a schematic diagram of a second preset relationship in a focusing method according to an embodiment of the present application;
[0020] FIG5 is an optical principle diagram of a focusing system according to an embodiment of the present application;
[0021] FIG6 is a schematic diagram of a partial structure of a focusing system according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to help those skilled in the art understand the present invention, the following describes the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] With the development of biotechnology, the requirements for microscopic imaging are becoming increasingly stringent, necessitating scanning and imaging of targets. However, high-magnification, high-numerical-aperture objectives have a very small depth of field, typically only a few microns. The fluctuations of the sample surface (as shown in Figure 1) significantly affect imaging. During the scanning and imaging process for large samples, the sample's concavity and convexity vary significantly (as shown in Figure 1), and rapid scanning and imaging are required. With area array scanning, regardless of the focusing method, the objective lens is essentially moved quickly to the focal position by a stage, and then the camera takes the image. With fast line scanning, the camera can simultaneously capture images while the objective lens moves. Consequently, for faster scanning speeds, line array cameras are used.
[0025] However, whether using area or line array scanning, when the sample surface fluctuates, it is necessary to ensure that the sample surface remains within the depth of field of the objective lens during the scanning process. Therefore, this application proposes a focusing method that can achieve fast and accurate focusing, ensuring that the sample surface remains in the focal plane of the objective lens during the focusing process without defocusing, thereby obtaining a clear image.
[0026] FIG2 is a flow chart of a focusing method proposed in an embodiment of the present application. As shown in FIG2 , the focusing method includes the following steps.
[0027] S101, obtaining an electrical signal corresponding to a light spot reflected from the surface of the object to be measured and captured by a photodetector; wherein the photodetector includes a first pixel and a second pixel, the electrical signal corresponding to the first pixel is a first electrical signal, and the electrical signal corresponding to the second pixel is a second electrical signal.
[0028] It can be understood that, as shown in Figure 3, the photodetector can be a photodetector including two pixels, wherein the first pixel 100 and the second pixel 200 are symmetrically distributed with the optical axis of the objective lens as the center. When the light spot 300 reflected from the surface of the object to be measured is incident on the photodetector, the first pixel 100 generates a first electrical signal according to the sensed light signal, and the second pixel 200 generates a second electrical signal according to the sensed light signal.
[0029] S102: Calculate the sum of the first electrical signal and the second electrical signal as a sum signal. S103: Determine whether the sum signal is greater than or equal to a preset threshold. If the sum signal is greater than or equal to the preset threshold, determine a current defocus amount according to a first preset relationship, and determine a speed of the objective lens corresponding to the current defocus amount according to a second preset relationship, so as to control the objective lens to move and focus at the speed. The first preset relationship is a corresponding relationship between the division signal and the current defocus amount, the second preset relationship is a corresponding relationship between the current defocus amount and the speed of the objective lens, and the division signal is a ratio of a difference between the first electrical signal and the second electrical signal to the sum signal.
[0030] The size of the sum signal detected by the photodetector is related to the distance of the object to be measured from the focal plane of the objective lens. When the object to be measured is farther from the focal plane of the objective lens, the sum signal detected by the photodetector is weaker. Conversely, when the object to be measured is closer to the focal plane of the objective lens, the sum signal detected by the photodetector is stronger. Furthermore, when the sum signal detected by the photodetector is weak, the current defocus amount cannot be determined through the first preset relationship, and thus, automatic focus cannot be achieved. Therefore, it is necessary to set the sum signal to be greater than or equal to a preset threshold. Only when this condition is met can automatic focus be achieved. The preset threshold can be 5-15% of the sum signal peak value, and the sum signal peak value is the signal when the object to be measured is in the focal plane.
[0031] Therefore, when the sum signal is greater than or equal to a preset threshold, the defocus amount can be determined according to a first preset relationship, wherein the first preset relationship is the relationship between the sum signal and the defocus amount, and the first preset relationship can be calibrated in advance.
[0032] Exemplarily, multiple defocus values can be calibrated in advance (for example, measured by a height sensor), and then the sum signal, difference signal and division signal of the photodetector are recorded at each different defocus value. Thereby, a corresponding relationship between the division signal and the defocus amount is formed, and through a related mathematical fitting algorithm, the corresponding relationship between the division signal and the defocus amount, that is, the first preset relationship, can be fitted. When applied, the division signal can be obtained in real time, and then the defocus amount can be obtained according to the first preset relationship. It is understandable that when the calibrated defocus amount exceeds a certain value, the photodetector may not be able to detect the sum signal of the light spot reflected by the object to be measured. Therefore, autofocus needs to be achieved within a certain range of the sum signal.
[0033] After obtaining the defocus amount, it is necessary to move the objective lens so that the surface of the object to be measured is located on the focal plane of the objective lens. If the defocus amount is large, the objective lens needs to be moved to the corresponding position at a higher speed to save time. If the defocus amount is small, the objective lens needs to be moved to the corresponding position at a lower speed to avoid the objective lens moving beyond the corresponding position and causing defocus again.
[0034] Thus, the speed of movement of the objective lens can be obtained according to the second preset relationship, and the objective lens can be controlled to move to the corresponding position at a varying speed, which is faster and more accurate.
[0035] According to one embodiment of the present application, determining the speed of the objective lens corresponding to the current defocus amount according to the second preset relationship includes: determining the speed gain and speed polarity corresponding to the current defocus amount according to the second preset relationship; the speed of the objective lens is the product of the current defocus amount, the speed gain and the speed polarity, wherein the speed polarity is the movement direction of the objective lens, and the speed gain is the gain coefficient of the acceleration of the moving axis that moves the objective lens.
[0036] According to one embodiment of the present application, the speed gain is positively correlated with the defocus amount.
[0037] The second preset relationship can also be calibrated in advance.
[0038] Exemplary, multiple defocus values can be calibrated in advance, polarity is calibrated according to the direction of motion of the object lens, and finally the original acceleration of the object lens is corrected so that the object lens can stop within a certain time (a certain time is at most the focusing time of scanning 0.5mm) at the defocus value, and the ratio of the acceleration of the object lens to the original acceleration in the process is recorded to obtain different acceleration gain coefficients. And the relationship between defocus value and acceleration gain coefficient is fitted according to the corresponding mathematical fitting method (as shown in Figure 4). In actual application, defocus value can be obtained, and the gain coefficient of the acceleration of the current mobile object lens is obtained according to the second preset relationship, i.e., speed gain, and automatic focusing is performed with accurate, fast and stable speed gain. That is, when ensuring that defocus value is large, the corresponding position can be reached in a short time, and when defocus value is small, the object lens can be prevented from going beyond the corresponding position, and focusing accuracy is improved.
[0039] Velocity polarity is the relationship between the direction of movement of the objective lens and the calibration direction. When the calibrated objective lens moves in the direction of the object to be measured with positive polarity, the objective lens moves in the direction away from the object to be measured with negative polarity. Conversely, when the calibrated objective lens moves in the direction of the object to be measured with negative polarity, the objective lens moves in the direction away from the object to be measured with positive polarity. In practical applications, for example, if the defocus amount is +5um, and the objective lens is required to move in the direction of the object to be measured with negative polarity, then the defocus amount needs to be multiplied by -1 to become -5um, so that the moving axis with the objective lens moves in the negative direction. Conversely, if the defocus amount is -5um, then the defocus amount needs to be multiplied by -1 to become +5um, so that the moving axis with the objective lens moves in the positive direction. Since different z-axis translation stages have different moving directions, in order to be compatible with different translation stages, a direction parameter is set so that the control program can move in the correct direction.
[0040] According to one embodiment of the present application, the method includes: if the sum signal is less than a preset threshold, obtaining the position coordinates of the surface of the object to be measured corresponding to the light spot, and controlling the objective lens to move to the preset plane position based on the correspondence between the position coordinates and the preset plane position.
[0041] It is understandable that if the sum signal is less than the preset threshold, it means that the defocus amount exceeds the detection range. At this time, this situation is generally the initial focusing process of the objective lens from the edge of the object to be measured to the center of the surface of the object to be measured. Therefore, a point can be taken at the edge of the object to be measured in advance, and the preset plane position of the objective lens corresponding to this point can be obtained in advance through the height sensor. These corresponding relationships are stored in the controller. After obtaining the position coordinates of the point, the objective lens can be directly controlled to move to the preset plane corresponding to the position coordinates of the point. This method can be used to focus on all points on the edge of the object to be measured (for simplicity, only a few points can be selected for fitting). In addition, if there is a part with a large defocus amount in the center of the surface of the object to be measured, this method can also be used to focus.
[0042] As the objective lens moves, the translation stage carrying the object to be measured can record the coordinate position of the object to be measured in real time. Furthermore, the coordinate position and the corresponding preset plane can be stored in the controller in advance. When the coordinate position is detected, the objective lens can be controlled to move to the preset plane based on the pre-stored relationship between the preset plane and the coordinate position.
[0043] Therefore, this focusing method is used for the edge of the object to be measured, and the defocus value is obtained for the center of the surface of the object to be measured. The speed of the objective lens is obtained according to the defocus value to control the movement of the objective lens so that the surface of the object to be measured is in the focal plane of the objective lens. The movement speed is fast and the accuracy is high.
[0044] According to one embodiment of the present application, the process of controlling the objective lens to move and focus at a speed also includes: acquiring the difference between the first electrical signal and the second electrical signal in real time as a difference signal; judging whether the difference signal is 0, if the difference signal is 0, the surface of the object to be measured is located on the focal plane of the objective lens, so as to control the imaging camera to image the surface of the object to be measured; if the difference signal is not 0, continuing to control the objective lens to move and focus at a speed.
[0045] It can be understood that when the surface of the object to be measured is located on the focal plane of the objective lens, the light spot is located at the center of the photodetector, the first electrical signal is the same as the second electrical signal, and then, when the difference between the first electrical signal and the second electrical signal is 0, it means that the surface of the object to be measured is located on the focal plane of the objective lens and is not defocused, and the imaging camera can be controlled to image the surface of the object to be measured.
[0046] According to one embodiment of the present application, after obtaining the difference signal, it also includes: obtaining the ratio of the difference signal to the sum signal as a division signal; judging whether the division signal is 0, if the division signal is 0, the surface of the object to be measured is located on the focal plane of the objective lens, so as to control the imaging camera to image the surface of the object to be measured; if the division signal is not 0, continuing to control the objective lens to move and focus at a speed.
[0047] Likewise, the sensitivity of detection can be increased by using a signal divider.
[0048] FIG5 is a schematic diagram of the structure of the focusing system proposed in an embodiment of the present application. The focusing system is used to implement the focusing method of any embodiment of the present application. As shown in FIG5, the focusing system includes: a focusing optical path a, an imaging optical path b, a controller 400, and an objective lens driver 500; the focusing optical path a includes: a focusing light source 1, a photodetector 8, and a first beam shaping lens group. The focusing light source 1 is configured to emit a focusing beam through the first beam shaping lens group to the object to be measured 7, and the object to be measured 7 reflects the focusing beam through the first beam shaping lens group to the photodetector 8, wherein the photodetector 8 includes a first pixel 100 and a second pixel 200, and the first pixel 100 is a pixel of the first pixel 100. 0 and the second pixel 200 are symmetrically arranged along the optical axis of the first beam shaping lens group; the imaging optical path b includes: an imaging light source 10, an imaging camera 12 and a second beam shaping lens group, the imaging light source 10 is configured to emit an imaging light beam through the second beam shaping lens group to the object to be measured 7, and the object to be measured 7 reflects the imaging light beam through the second beam shaping lens group to the imaging camera 12; the controller 400 is electrically connected to the photodetector 8, the imaging camera 12 and the objective lens driver 500 respectively, and is configured to execute the focusing method of any embodiment of the present application, and drive the objective lens driver 500 to move and focus.
[0049] According to one embodiment of the present application, as shown in Figure 5, the first beam shaping lens group includes: a first dichroic mirror 2, a first lens 3, a filter 4, a second dichroic mirror 5 and an objective lens 6 arranged along the transmission direction of the focused beam; the first dichroic mirror 2 is configured to reflect the focused beam and transmit the reflected beam of the focused beam; the second dichroic mirror 5 is configured to transmit the focused beam and the reflected beam of the focused beam, and is also used to reflect the imaging beam and the reflected beam of the imaging beam.
[0050] According to one embodiment of the present application, as shown in Figure 5, the second beam shaping lens group includes: a second lens 11, and a third dichroic mirror 9, a second dichroic mirror 5 and an objective lens 6 arranged in sequence along the direction of the imaging beam; the third dichroic mirror 9 is configured to transmit the imaging beam and reflect the reflected beam of the imaging beam; the second lens 11 is located between the third dichroic mirror 9 and the imaging camera 12.
[0051] According to one embodiment of the present application, the imaging camera 12 is an area array camera or a line array camera.
[0052] It should be noted that, in conjunction with Figures 5 and 6, during focusing, a focusing light beam emitted by a focusing light source 1 is reflected by the first dichroic mirror 2, then reflected to the first lens 3, then filtered by the filter 4 to remove stray light, and then reaches the second dichroic mirror 5. After being transmitted through the second dichroic mirror 5, it reaches the objective lens 6, passes through the objective lens 6 to reach the surface of the object to be measured 7, and is reflected by the object to be measured 7 to form a reflected beam of the focusing light beam. The reflected beam of the focusing light beam passes through the objective lens 6, the second dichroic mirror 5, the filter 4, and the first lens 3 in sequence, and then reaches the first dichroic mirror 2. The first dichroic mirror 2 transmits the detected electrical signal to the controller 400. The controller 400 selects a focusing mode based on the size of the sum signal and a preset threshold. When the sum signal is greater than the preset threshold, the controller selects autofocus. When the sum signal is less than the preset threshold, the controller selects to move the objective lens to a preset plane. During the focusing process, the moving speed of the objective lens is corrected in real time, and whether the objective lens has reached the corresponding position is detected. When the objective lens reaches the corresponding position, the imaging camera 12 captures an image of the surface of the object to be measured. The imaging light source 10 emits an imaging light beam, which is transmitted through the third dichroic mirror 9 to reach the second dichroic mirror 5, and is reflected by the second dichroic mirror 5 to the objective lens 6, and finally reaches the object to be measured 7. The object to be measured 7 reflects the imaging light beam, and the reflected light beam of the imaging light beam is then reflected by the objective lens 6, the second dichroic mirror 5, and the third dichroic mirror 9 to the second lens 11. After passing through the second lens 11, it reaches the imaging camera 12, at which point the imaging camera captures an image of the surface of the object to be measured 7. The focusing light source 1 can be a near-infrared light-emitting diode (LED) light source, and the imaging light source 10 can be a fluorescent light source.
[0053] It is understood that in FIG6 , the objective lens 6 can scan in the row direction. After scanning one row, it can move in the column direction and then scan in the second row direction, and so on until the scanning is completed. Other scanning methods can also be used, and this application does not limit this. During the scanning process, the autofocus device obtains the defocus amount in real time and obtains the moving speed of the objective lens through calculation. This time is in the microsecond level and can be considered to be obtained in real time. The objective lens is driven to move according to the obtained moving speed. Although the platform is constantly moving, the autofocus device obtains the defocus amount in real time. During the scanning process, by detecting the defocus amount, the objective lens is driven to approach the focal position of the sample.
[0054] The above method can ensure that the surface of the object to be measured is always in the focal plane of the objective lens, and the imaging camera can obtain a clear image of the surface of the object to be measured, thereby avoiding the situation in which the surface of the object to be measured is not always in the focal plane position of the objective lens due to the unevenness of the sample during the scanning imaging process, that is, the surface of the object to be measured is above or below the focal plane of the objective lens, thereby obtaining a blurred image.
[0055] In summary, according to the focusing method and system proposed in the embodiments of the present application, the focusing method includes: obtaining an electrical signal corresponding to a light spot reflected from the surface of the object to be measured and captured by a photodetector; wherein the photodetector includes a first pixel and a second pixel, the electrical signal corresponding to the first pixel is a first electrical signal, and the electrical signal corresponding to the second pixel is a second electrical signal; calculating the sum of the first electrical signal and the second electrical signal as a sum signal; judging whether the sum signal is greater than or equal to a preset threshold value, if the sum signal is greater than or equal to the preset threshold value, determining the current defocus amount according to the first preset relationship, and determining the speed of the objective lens corresponding to the current defocus amount according to the second preset relationship, so as to control the objective lens to move and focus at a speed; wherein the first preset relationship is the correspondence between the defocus signal and the current defocus amount, the second preset relationship is the correspondence between the current defocus amount and the speed of the objective lens, and the defocus signal is the ratio between the difference between the first electrical signal and the second electrical signal and the sum signal. Therefore, automatic focusing can be achieved through the above-mentioned focusing method, and the speed of the objective lens can be controlled during the focusing process. When the defocus amount is small, the objective lens will not pass through the focal plane. When the defocus amount is large, the objective lens will move to the focal plane at a faster speed.
[0056] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the multiple steps described in this application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of this application can be achieved. This is not limited herein.
Claims
1. A focusing method, include: Acquire an electrical signal corresponding to a light spot reflected from the surface of the object to be tested and captured by a photodetector; wherein the photodetector includes a first pixel and a second pixel, the electrical signal corresponding to the first pixel is a first electrical signal, and the electrical signal corresponding to the second pixel is a second electrical signal; Calculating a sum of the first electrical signal and the second electrical signal as a sum signal; Determine whether the sum signal is greater than or equal to a preset threshold value, and in response to the sum signal being greater than or equal to the preset threshold value, determine the current defocus amount according to a first preset relationship, and determine the speed of the objective lens corresponding to the current defocus amount according to a second preset relationship, so as to control the objective lens to move and focus at the speed; wherein the first preset relationship is the corresponding relationship between the division signal and the current defocus amount, the second preset relationship is the corresponding relationship between the current defocus amount and the speed of the objective lens, and the division signal is the ratio between the difference between the first electrical signal and the second electrical signal and the sum signal.
2. The focusing method according to claim 1, include: In response to the sum signal being less than the preset threshold, the position coordinates of the surface of the object to be measured corresponding to the light spot are acquired, and according to the corresponding relationship between the position coordinates and the preset plane position, the objective lens is controlled to move to the preset plane position.
3. The focusing method according to claim 1, wherein during the process of controlling the objective lens to move at the speed for focusing, include: acquiring in real time a difference between the first electrical signal and the second electrical signal as a difference signal; Determining whether the difference signal is 0, in response to the difference signal being 0, the surface of the object to be measured is located on the focal plane of the objective lens, so as to control the imaging camera to image the surface of the object to be measured; In response to the difference signal being not 0, the objective lens continues to be controlled to perform movement focusing at the speed.
4. The focusing method according to claim 3, after obtaining the difference signal, further comprising: include: Obtaining a ratio of the difference signal to the sum signal as the division signal; Determining whether the division signal is 0, in response to the division signal being 0, the surface of the object to be measured is located on the focal plane of the objective lens, so as to control the imaging camera to image the surface of the object to be measured; In response to the division signal being not 0, the objective lens continues to be controlled to perform movement focusing at the speed.
5. The focusing method according to claim 1, in, Determining the speed of the objective lens corresponding to the current defocus amount according to the second preset relationship comprises: Determining a speed gain and a speed polarity corresponding to the current defocus amount according to the second preset relationship; The speed of the objective lens is the product of the current defocus amount, the speed gain and the speed polarity. In the embodiment, the velocity polarity is the moving direction of the objective lens, and the velocity gain is the gain coefficient of the acceleration of the moving axis that drives the objective lens to move.
6. The focusing method according to claim 5, in, The speed gain is positively correlated with the current defocus amount.
7. A focusing system, used to implement the focusing method according to any one of claims 1 to 6, include: Focusing optical path, imaging optical path, controller and objective lens driver; The focusing optical path comprises: a focusing light source, a photodetector and a first beam shaping lens group, wherein the focusing light source is configured to emit a focusing light beam through the first beam shaping lens group to the object to be measured, and the object to be measured reflects the focusing light beam through the first beam shaping lens group to the photodetector, wherein the photodetector comprises a first pixel and a second pixel, and the first pixel and the second pixel are symmetrically arranged along the optical axis of the first beam shaping lens group; The imaging optical path comprises: an imaging light source, an imaging camera and a second beam shaping lens group, wherein the imaging light source is configured to emit an imaging light beam through the second beam shaping lens group to the object to be measured, and the object to be measured reflects the imaging light beam through the second beam shaping lens group to the imaging camera; The controller is electrically connected to the photodetector, the imaging camera and the objective lens driver respectively, and is configured to execute the focusing method according to any one of claims 1 to 6, and drive the objective lens driver to move and focus.
8. The focusing system according to claim 7, in, The first beam shaping lens group includes: a first dichroic mirror, a first lens, a filter, a second dichroic mirror and an objective lens arranged along the transmission direction of the focused beam; the first dichroic mirror is arranged to reflect the focused beam and transmit the reflected beam of the focused beam; the second dichroic mirror is arranged to transmit the focused beam and the reflected beam of the focused beam, and is also arranged to reflect the imaging beam and the reflected beam of the imaging beam.
9. The focusing system according to claim 7, in, The second beam shaping lens group includes: a second lens, and a third dichroic mirror, a second dichroic mirror and an objective lens arranged in sequence along the imaging beam direction; The third dichroic mirror is configured to transmit the imaging light beam and reflect a reflected light beam of the imaging light beam; and the second lens is located between the third dichroic mirror and the imaging camera.
10. The focusing system according to claim 7, in, The imaging camera is an area array camera or a line array camera.
Citation Information
Cited By
Automatic focusing control method and system and medium
CN121541358A
An auto focus control method, system and medium
CN121541358B