Automatic focusing method, optical detection system and readable storage medium

By adaptively adjusting the focusing signal, the problem of high computational cost and long time in existing optical detection systems is solved, realizing an efficient and stable autofocus process, which is applicable to gene sequencing systems and optical microscopy systems.

CN122072389APending Publication Date: 2026-05-22MGI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411686443.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

In existing optical inspection systems, focusing methods based on hill-climbing search algorithms and deep learning algorithms suffer from high computational costs, large training data requirements, and long computation times, leading to increased system usage costs or extended testing time.

Method used

An adaptive adjustment method for the focus signal is adopted. By moving the biochip to the initial position, the gain of the initial focus position is obtained, and the focus signal is collected in real time along the preset trajectory. The gain is adjusted to control the signal within the threshold range. Automatic focusing is achieved by combining the drive module and the control module.

Benefits of technology

It improves the working efficiency of optical inspection systems, reduces wasted time, and takes into account the practicality and stability of the system, making it more widely applicable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122072389A_ABST
    Figure CN122072389A_ABST
Patent Text Reader

Abstract

The invention provides an automatic focusing method which is applied to optical detection equipment, the optical detection equipment comprises an objective lens, a chip carrying table and an automatic focusing device, the chip carrying table is used for carrying a biological chip, and the biological chip is movably arranged relative to the objective lens; the automatic focusing method comprises the following steps: moving a biochip to an initial position relative to an objective lens, and acquiring an automatic focusing signal at the initial position by an automatic focusing device through the objective lens; adjusting the biochip to move relative to the objective lens to an initial focusing position along the optical axis of the objective lens based on the automatic focusing signal; obtaining the initial gain of the automatic focusing device at the initial focusing position; and moving the biochip along a preset track relative to the objective lens along a preset direction perpendicular to the optical axis of the objective lens, collecting a focusing signal in real time in the moving process along the preset track, and feeding back and adjusting the gain of the automatic focusing device in real time so as to control the variable quantity of the focusing signal in the moving process to be within a preset threshold range. The invention further provides optical detection equipment and a readable storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of optical inspection technology, and in particular to an autofocus method, an optical inspection system using the autofocus method, and a readable storage medium. Background Technology

[0002] The optical inspection system uses a real-time focusing lens to ensure inspection accuracy.

[0003] One focusing method involves directly calculating the image gradient values ​​and using a hill-climbing search algorithm to obtain the local optimal focal plane position. This method, relying on the hill-climbing search algorithm, places very high demands on the evaluation function and motor drive. The evaluation function needs to have absolute unimodality and extremely high sensitivity; otherwise, the algorithm may mistake local extrema of the evaluation function for the optimal focal plane position, leading to focusing failure. Alternatively, the evaluation function may flatten out in the out-of-focus area, causing the motor to fail to receive the reversing signal for an extended period, ultimately resulting in an infinite loop. Another focusing method utilizes deep learning algorithms. This method requires a large amount of training data and relatively good labeled data, increasing computational costs.

[0004] Therefore, the two methods mentioned above increase the overall cost of using the optical inspection system or the testing time to some extent. Summary of the Invention

[0005] A first aspect of this application provides an optical inspection device, the optical inspection device including an objective lens, a chip stage, and an autofocuser, the chip stage being used to support a biochip, the biochip being movably disposed relative to the objective lens; the autofocusing method includes: moving the biochip relative to the objective lens to an initial position, the autofocuser acquiring an autofocus signal at the initial position via the objective lens; adjusting the movement of the biochip relative to the objective lens along the optical axis of the objective lens to the initial focus position based on the autofocus signal; obtaining the initial gain of the autofocuser at the initial focus position; moving the biochip relative to the objective lens along a preset trajectory in a preset direction perpendicular to the optical axis of the objective lens, acquiring the focus signal in real time during the movement along the preset trajectory and providing real-time feedback to adjust the gain of the autofocuser, so as to control the change in the focus signal during the movement along the preset trajectory to be within a preset threshold range.

[0006] A second aspect of this application provides an optical detection device, comprising: a chip stage for supporting a biochip; an objective lens located on one side of the chip stage supporting the biochip; an autofocus for emitting a focusing beam toward the biochip and receiving a detection beam reflected by the biochip; a drive module connected to the chip stage and the objective lens respectively, for driving the chip stage and / or the objective lens to move; and a control module electrically connected to the autofocus and the drive module respectively, the control module including a memory and a processor, the memory storing a computer program, and the processor controlling the optical detection device to perform the steps of the autofocus method described above when reading the computer program.

[0007] A third aspect of this application provides a readable storage medium storing a computer program that, when read by a processor, can implement the steps of the autofocus method described above.

[0008] The aforementioned autofocus method, optical detection system, and readable storage medium, based on adaptive adjustment of the focus signal, improve work efficiency and reduce wasted time, while also taking into account the needs of practicality and system stability, and have a wider range of applications. Attached Figure Description

[0009] Figure 1 This is a schematic diagram of the module structure of the optical inspection device according to an embodiment of this application.

[0010] Figure 2 This is a flowchart illustrating the steps of the autofocus method according to an embodiment of this application.

[0011] Figure 3 for Figure 2 Another step in the autofocus method is shown in the flowchart.

[0012] Figure 4 for Figure 2 The flowchart of step S2.

[0013] Figure 5 for Figure 2 The flowchart for step S3.

[0014] Figure 6 for Figure 2 The flowchart for another step in step S3.

[0015] Explanation of main component symbols Optical inspection equipment: 1 Optical inspection module: 10 Autofocus: 20 Driver module: 30 Objective lens: 40 Chip platform: 50 Control module: 60 Biochips: 2 Steps: S1, S2, S3, S11, S12, S13, S21, S22, S23, S24, S25, S26, S27, S28, S31, S32, S321, S322, S323 The following detailed description, in conjunction with the accompanying drawings, will further illustrate this application. Detailed Implementation

[0016] This application provides an autofocus method and an optical inspection device. The aforementioned autofocus method is based on adaptive adjustment of the focus signal, which improves work efficiency and reduces wasted time, while also taking into account the requirements of practicality and system stability, and has a wider range of applications.

[0017] Please see Figure 1 The optical inspection device 1 of this application embodiment includes an optical inspection module 10, an autofocus unit 20, a drive module 30, an objective lens 40, a chip stage 50, and a control module 60. The control module 60 is electrically connected to the optical inspection module 10, the autofocus unit 20, and the drive module 30. The drive module 30 is connected to the objective lens 40 and the chip stage 50.

[0018] The stage 50 is used to support the biochip 2. The biochip 2 can be used to hold biological samples (not shown). The optical detection module 10 includes an excitation light that emits a specified wavelength. The objective lens 40 focuses this excitation light onto the biological sample on the biochip 2, and the biological sample is excited to generate a fluorescence signal of a specific wavelength under the illumination of the excitation light. The drive module 30 is used to drive the objective lens 40 and / or the stage 50 to move, so that the excitation light illuminates the biological sample at different positions on the biochip 2. The fluorescence signal generated by the biological sample is collected by the objective lens 40 and transmitted to the optical detection module 10. The optical detection module 10 acquires the fluorescence signal and generates an image. The control module 60 is used to control the emission of excitation light by the optical detection module 10 and to analyze and process the image generated by the optical detection module 10, thereby obtaining the feature information of the biological sample. The control module 60 is also used to control the displacement process of the objective lens 40 and / or the stage 50 driven by the drive module 30.

[0019] In this embodiment, the optical detection device 1 can be a gene sequencing system, an optical microscope system, etc. The optical detection module 10 includes a laser source that emits excitation light. The biological sample 3 is a nucleic acid fragment to be tested carrying a fluorescent dye. The driving module 30 is used to drive the chip stage 50 to translate along the X and Y directions and rotate around the T axis, and to drive the objective lens 40 to translate along the Z direction. The X, Y, and Z directions are perpendicular to each other. In this embodiment, the Z direction and the T axis are vertical directions and parallel to the optical axis of the objective lens 40. During the operation of the optical detection device 1, the objective lens 40 is located above the chip stage 50. The driving module 30 drives the chip stage 50 to move along the X and Y directions, so that the excitation light and the biochip 2 are relatively displaced. This process can be regarded as the excitation light scanning the biochip 2 along a preset trajectory. The excitation light traverses the biochip 2, thus completing the optical detection of the biological sample on the biochip 2.

[0020] In this embodiment, the optical detection module 10 may include a light source (e.g., a laser), light modulation / guiding elements (e.g., gratings, mirrors, beam splitters, lenses), and imaging elements (CCD, etc.). The driving module 30 may include a driving circuit, a motor, etc. The control module 60 may include a computing chip, a processor, a memory, etc. The control module 60 may also be a control function unit of a terminal device.

[0021] During the optical inspection process of the optical inspection device 1, in order to ensure that the optical inspection module 10 obtains high-quality images, it is necessary to keep the surface of the biochip 2 carrying the biological sample always located at the focal plane of the objective lens 40. This position of the objective lens 40 is called the optimal focal plane position. Therefore, in this embodiment, an autofocus device 20 is set to automatically focus the objective lens 40 in real time to ensure the imaging quality of the optical inspection device 1.

[0022] In this embodiment, the control module 60 is used to control both the optical detection process and the autofocus process. In other embodiments of this application, the control module 60 may include two independent control units for controlling the optical detection process and the autofocus process respectively. In this embodiment, the autofocus unit 20 may include a light source, a light modulation / guiding element, a photoelectric sensing element, and a control circuit (not shown).

[0023] This application also provides an autofocus method applied to the optical inspection device 1 described above. Please refer to... Figure 2 The autofocus method includes the following steps: Step S1: Move the biochip 2 relative to the objective lens 40 to the initial position, and the autofocus unit 20 collects the autofocus signal at the initial position through the objective lens 40; Step S2: Based on the autofocus signal, adjust the biochip 2 to move relative to the objective lens 40 along the optical axis of the objective lens 40 to the initial focus position; Step S3: Obtain the initial gain of the autofocus at the initial focusing position; Step S4: Move the biochip 2 along a preset trajectory relative to the objective lens 40 in a preset direction perpendicular to the optical axis of the objective lens 40. During the movement along the preset trajectory, collect the focusing signal in real time and adjust the gain of the autofocus 20 in real time to control the change of the focusing signal during the movement along the preset trajectory within a preset threshold range.

[0024] Please see Figure 3 In this embodiment, step S1 includes: Step S11: Drive the biochip 2 to move relative to the objective lens 40 to the initial position; Step S12: A focusing beam is emitted toward the biochip 2, and the detection beam reflected by the biochip 2 is collected by the autofocus 20. The photoelectric sensor of the autofocus 20 collects the detection beam and generates a corresponding autofocus signal. Step S13: Determine whether the sum of the first sensing signal and the second sensing signal is greater than or equal to a preset SUM threshold.

[0025] In step S11, the control module 60 controls the drive module 30 to drive the objective lens 40 to perform a zero-return action on the Z-axis, and drives the chip stage 50 to perform a zero-return action in the XY direction and the T-axis. Then, the objective lens 40 is driven to the initial coordinate point of the Z-axis, and the chip stage 50 is driven to the initial coordinate point of the XY direction and the T-axis, which is the aforementioned initial position.

[0026] In step S12, the focusing light source in the autofocus 20 is controlled to emit a focusing beam to the biochip 2 and receives the detection beam reflected by the biochip 2 based on the focusing beam. The photoelectric sensor in the autofocus 20 is a two-pixel photodiode, which generates a first sensing signal S10 and a second sensing signal S20 respectively based on the detection beam in step S12.

[0027] In step S12, the control module 60 sums the first sensing signal S10 and the second sensing signal S20 to obtain a summation value, SUM=M*(S10+S20).

[0028] The control module 60 stores a preset SUM threshold. If, in step S13, the summation value SUM is greater than or equal to this SUM threshold, it is considered that the current focus is within the working range, and the autofocus process in subsequent step S2 can continue. If, in step S13, the summation value SUM is less than this SUM threshold, it is considered that the current focus is not within the working range, and the control module 60 controls the drive module 30 to re-drive the objective lens 40 and the chip stage 50 to the initial coordinate point, and step S11 is executed again.

[0029] In this embodiment, step S2 includes: driving the biochip 2 to move relative to the objective lens 40 along a direction perpendicular to the optical axis to at least two detection positions different from the initial position at the initial focusing position; acquiring the corresponding autofocus signal at each of the at least two detection positions; and adjusting the initial focusing position based on the at least two detection positions and the autofocus signal corresponding to the initial position. The at least two different detection positions are not collinear with the initial position.

[0030] In step S2, the control module 60 controls the drive module 30 to translate the chip stage 50 in a direction perpendicular to the optical axis of the objective lens 40 at the previously determined initial focusing position. This causes the chip stage 50 to move the biochip 2 relative to the objective lens 40 to at least two detection positions different from the initial position. That is, in step S2, the control module 60 controls the drive module 30 to translate the chip stage 50 in the XY plane at the previously determined initial focusing position. This causes the biochip 2 to be positioned successively at at least two different detection positions that are not collinear with the initial position.

[0031] During the aforementioned translation process, the relative positional relationship between the objective lens 40 and the biochip 2 changes. At each detection position, the control module 60 controls the autofocus unit 20 to acquire an autofocus signal. That is, at different detection positions, the objective lens 40 focuses the focusing beam onto different locations on the surface of the biochip 2. By driving the stage 50 at least twice to translate the biochip 2 in the XY direction, the relative positional relationship between the objective lens 40 and the biochip 2 can be switched at least twice, allowing the focusing beam to be projected sequentially onto at least two different detection positions on the biochip 2. These at least two detection positions can reflect the detection beam sequentially based on the focusing beam, and the objective lens 40 collects the detection beam into the autofocus unit 20. The autofocus unit 20 generates a corresponding sensing signal based on the detection beam. The control module 60 can calculate the focusing adjustment distance at the at least two detection positions based on this sensing signal and adjust the flatness of the stage 50 based on this focusing adjustment distance.

[0032] In step S2 of this embodiment, three non-collinear detection positions (including the initial position) on the biochip 2 are selected to perform three-point leveling on the chip stage 50.

[0033] The following combination Figure 4 An example is given for step S2.

[0034] In step S21, the detection position A (the initial position) on the biochip 2 is located on the focusing optical path; that is, the autofocuser 20 includes a focusing light source, and the focusing beam emitted by the focusing light source is focused at the detection position A after exiting through the objective lens 40; the autofocus sub-process is executed (emitting the focusing beam and receiving the detection beam reflected from the detection position A of the biochip 2).

[0035] When the autofocus sub-process is successfully executed in step S21, step S22 is executed to record the Z-axis position information ZPOSO of the current objective lens 40.

[0036] In step S23, the drive module 30 drives the chip stage 50 to translate in the X or Y direction, so that the detection position B on the biochip 2 is located in the optical path of the focusing beam, that is, the focusing beam emitted from the objective lens 40 can be focused on the detection position B; execute the autofocus sub-process (emit the focusing beam and receive the detection beam reflected from the detection position B of the biochip 2).

[0037] When the autofocus sub-process is successfully executed in step S23, step S24 is executed to record the Z-axis position information ZPOSO1 of the current objective lens 40.

[0038] In step S25, the drive module 30 drives the chip stage 50 to translate in the X or Y direction, so that the detection position C on the biochip 2 is located in the optical path of the focusing beam, that is, the focusing beam emitted from the objective lens 40 can be focused on the detection position C; execute the autofocus process (emit the focusing beam and receive the detection beam reflected from the detection position C of the biochip 2).

[0039] When the autofocus sub-process is successfully executed in step S25, step S26 is executed to record the Z-axis position information ZPOSO2 of the current objective lens 40.

[0040] Step S27: Based on the detection positions A, B, C and position information ZPOSO, ZPOSO1, ZPOSO2, calculate the deviation angle between the biochip 2 and the target horizontal plane (perpendicular to the optical axis of the objective lens 40), and adjust the three leveling mechanisms of the chip stage 50 based on the deviation angle; keep the focusing process running during the leveling process until the flatness of the chip stage 50 meets the preset requirements and the focusing is completed.

[0041] In this embodiment, in step S23, the driving module 30 drives the chip stage 50 to translate in the X direction, and in step S25, the driving module 30 drives the chip stage 50 to translate in the Y direction (or in step S23, it translates in the Y direction and in step S25, it translates in the X direction), so that the above detection positions A, B, and C are three non-collinear detection positions.

[0042] If any of the autofocus sub-processes in steps S21, S23, and S25 fails, the diagonal leveling is terminated, and step S21 is re-executed.

[0043] In this embodiment, after adjusting the flatness of the chip stage 50, it is also necessary to check the flatness of the chip stage 50. Therefore, in this embodiment, step S2 further includes step S28: the light source of the autofocus 20 emits a focusing beam, and the objective lens 40 focuses the focusing beam onto the biochip 2; the drive module 30 drives the chip stage 50 to move in the XY direction, during which time the autofocus 20 continuously emits the focusing beam, so that the focusing beam scans the biochip 2 along a preset trajectory; during the scanning, the autofocus 20 continuously receives the detection beam reflected by the biochip 2 according to the focusing beam and generates a test electrical signal; the test electrical signal includes a first sensing signal S10 and a second sensing signal S20. In step S2, the control module 60 calculates the defocus amount DIV value based on the first sensing signal S10 and the second sensing signal S20.

[0044] If the defocus amount DIV value obtained during the entire scanning process fluctuates within a small preset range, the system is considered to have entered a stable state and can proceed with the subsequent focusing process. If the defocus amount DIV value exceeds the preset range during the scanning process, it indicates that the system is unstable and needs to be retested.

[0045] Please see Figure 5 In this embodiment, step S3 includes: Step S31: The focusing beam is emitted to scan the biochip along a preset trajectory; the focusing beam reflected sequentially from multiple points on the preset trajectory by the biochip 2 is received; and the autofocus signal is generated. Step S32: Based on the changes in the autofocus signal at different points, adjust the focus ratio gain accordingly.

[0046] Please see Figure 6 Step S32 specifically includes: Step S321: Obtain the range values ​​corresponding to the multiple autofocus signals during the scanning process of the biochip 2; Step S322: Determine whether the range value is within the preset threshold range; If the determination is yes, that is, when the range value is less than or equal to the preset threshold, autofocus is completed; If the determination is negative, that is, when the range value is greater than the preset threshold, step S323 is executed to adjust the focus ratio gain.

[0047] In this embodiment, the focus ratio gain in step S31 is the loop gain of the drive circuit in the drive module 30.

[0048] In step S32, the process of scanning the biochip 2 with the focusing beam is equivalent to performing a focusing process on multiple points on the biochip 2 located on a preset trajectory, successively emitting focusing beams to the multiple points and successively receiving the detection beams reflected by the multiple points.

[0049] In step S32 of this embodiment, the control module 60 adjusts the focus ratio gain based on the difference between the fluctuation amplitude of the autofocus signal corresponding to the plurality of points and the preset threshold.

[0050] The trajectory of the focusing beam scanning the biochip 2 is consistent with the trajectory of the excitation light scanning the biochip 2 during optical detection. Furthermore, since the system may be affected by external vibrations and other factors, causing fluctuations in the focusing signal, in order to improve anti-interference capability, in this embodiment, the biochip 2 is repeatedly scanned along this trajectory in step S32, extending the scanning time. This ensures that focusing can only be determined as complete when the fluctuation of the focusing signal remains small over a longer period in step S33.

[0051] A focus signal amplitude fluctuation curve is plotted with the scanning point as the horizontal axis and the focus signal amplitude as the vertical axis. In this embodiment, during the scanning of the biochip 2 by the focusing beam, the focus signal fluctuation curve resembles a sine wave. The amplitude of the focus signal can be used to reflect the movement of the objective lens 40 along the Z-axis during the scanning focusing process. For example, when the focus signal corresponding to a certain point falls on the positive half of the vertical axis, it can indicate that the objective lens 40 moves upward along the Z-axis (with the scanning point as the horizontal axis and the focus signal amplitude as the vertical axis). Figure 1 Using orientation as a reference (i.e., the direction away from the chip stage 50), when the focusing signal corresponding to a certain point falls on the negative half of the vertical axis, it can be said that the objective lens 40 is displaced downward along the Z-axis (with the orientation as the reference). Figure 1 The orientation is the reference, that is, the displacement towards the chip stage 50. The absolute value of the focusing signal is proportional to (but not equal to) the displacement of the objective lens 40 along the Z-axis.

[0052] In step S321 of this embodiment, the control module 60 uses the range of multiple focus signals (i.e., the difference between the maximum and minimum values) obtained at each point during the scanning of the biochip 2 to provide feedback on the fluctuation amplitude of multiple focus signals, thereby adjusting the focus ratio gain.

[0053] The control module 60 has a preset threshold. In step S322, the relationship between the range values ​​of multiple focus signals and the preset threshold is determined. When the range values ​​of multiple focus signals are greater than the preset threshold during the scanning of the biochip 2, it is considered that the focus signal fluctuations are large during the scanning of the biochip 2, and the focusing completion condition is not met. At this time, step S323 is executed. In step S323 of this embodiment, based on the initial gain, the focus ratio gain is gradually reduced by a unit constant λ, and steps S321 and S322 are re-executed until the range values ​​of multiple focus signals during the scanning of the biochip 2 are less than or equal to the preset threshold.

[0054] When the range of multiple focus signals during the scanning of biochip 2 is less than or equal to the preset threshold, it is considered that the focus signal fluctuation is small during the scanning of biochip 2, and the system can maintain stable operation and complete automatic focusing during the scanning and detection of biochip 2.

[0055] In this embodiment, the aforementioned focusing signal may include information such as the defocus amount, focusing accuracy, and focusing direction generated by the photoelectric sensor in the autofocus system based on the detection beam. In this embodiment, the aforementioned range value is the difference between the maximum and minimum values ​​of the image sharpness evaluation function (such as contrast, sharpness, gradient, etc.) at different focusing distances during the autofocus process. It reflects the sensitivity of image sharpness to changes in focusing distance. In this embodiment, the range value is used to quantify the changes in the autofocus signal.

[0056] In at least one embodiment of this application, step S33 may further be based on the variance, average value, and slope of the fluctuation curve of multiple focus signals acquired at each point during the scanning of the biochip 2 to provide feedback on the fluctuation amplitude of multiple focus signals, thereby adjusting the focus ratio gain. In at least one embodiment of this application, the initial value of the focus ratio gain in step S31 is set to, for example, 1.5, and the unit constant λ in step S32 is set to, for example, 0.01.

[0057] In at least one embodiment of this application, the preset threshold may be set to 1, for example. The specific value of the preset threshold is related to the hardware parameters (including optical resolution) of the optical detection device 1.

[0058] Range and focus ratio gain are two interrelated but independent parameters in the autofocus process, jointly affecting the performance of the autofocus system. The autofocus method and optical inspection device 1 used in this application, by comprehensively considering these two parameters and adaptively adjusting the focus signal, can design a highly efficient autofocus system suitable for different application scenarios. Compared to traditional focusing methods based on hill-climbing search algorithms and deep learning algorithms, the autofocus method and optical inspection device 1 of this application improve work efficiency, reduce time waste, and simultaneously meet the requirements of practicality and system stability, with a wider range of applications.

[0059] This application also provides a non-volatile computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the above-described autofocus methods.

[0060] When the aforementioned autofocus method is implemented and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above-described embodiments can also be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable storage medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0061] The control module 60 of this application embodiment includes a memory and a processor. The memory stores a computer program, and when the processor reads the computer program, it controls the optical detection device to perform the steps of the autofocus method described above.

[0062] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the optical inspection equipment, connecting all parts of the equipment via various interfaces and lines.

[0063] The memory is used to store the computer programs and / or modules. The processor implements various functions of the optical detection device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0064] Those skilled in the art should recognize that the above embodiments are only used to illustrate this application and are not intended to limit this application. Any appropriate changes and variations made to the above embodiments within the essential spirit and scope of this application fall within the scope of protection claimed in this application.

Claims

1. An autofocusing method applied to an optical inspection device, the optical inspection device comprising an objective lens, a chip stage, and an autofocuser, wherein the chip stage is used to support a biochip, and the biochip is movable relative to the objective lens; Its features are, The autofocus method includes: The biochip is moved relative to the objective lens to an initial position, and the autofocuser acquires the autofocus signal at the initial position through the objective lens; Based on the autofocus signal, the biochip is adjusted to move relative to the objective lens along the optical axis of the objective lens to the initial focus position; Obtain the initial gain of the autofocus at the initial focus position; The biochip is moved relative to the objective lens along a preset trajectory in a preset direction perpendicular to the optical axis of the objective lens. During the movement along the preset trajectory, the focusing signal is collected in real time and the gain of the autofocus is adjusted in real time to control the change of the focusing signal during the movement to be within a preset threshold range.

2. The autofocus method according to claim 1, characterized in that, The step of adjusting the biochip relative to the objective lens along the optical axis of the objective lens to the initial focusing position based on the autofocus signal includes: The biochip is driven to move relative to the objective lens in a direction perpendicular to the optical axis at the initial focusing position to at least two detection positions different from the initial position. The corresponding autofocus signal is collected at each of the at least two detection positions. The initial focusing position is obtained by adjusting the autofocus signal based on the at least two detection positions and the autofocus signal corresponding to the initial position.

3. The autofocus method according to claim 2, characterized in that, The at least two different detection positions are not collinear with the initial position.

4. The autofocus method as described in claim 1, characterized in that, The autofocus unit acquires the autofocus signal at the initial position via the objective lens, including: A focusing beam is emitted toward the biochip, and the autofocus device collects the detection beam reflected by the biochip. The photoelectric sensor of the autofocus device collects the detection beam and generates a corresponding autofocus signal.

5. The autofocus method as described in claim 4, characterized in that, The process of moving the biochip relative to the objective lens along a preset trajectory in a preset direction perpendicular to the optical axis of the objective lens, and real-time acquisition of the focusing signal and real-time feedback adjustment of the gain of the autofocus during the movement along the preset trajectory, includes: The system emits the focusing beam to scan the biochip along a preset trajectory, receives the focusing beam reflected sequentially from multiple points on the preset trajectory by the biochip, and generates the autofocus signal; and The focus ratio gain is adjusted based on the changes in the autofocus signal at different points.

6. The autofocus method as described in claim 5, characterized in that, The feedback adjustment of the focus ratio gain includes: Based on the initial gain, the focus ratio gain is gradually varied by a unit constant.

7. The autofocus method as described in claim 5, characterized in that, The step of adjusting the focus ratio gain based on the changes in the autofocus signal at different points includes: The fluctuation amplitude of the autofocus signal corresponding to the multiple points is obtained, and the focus ratio gain is adjusted based on the difference between the fluctuation amplitude and the preset threshold.

8. The autofocus method as described in claim 7, characterized in that, The preset threshold includes the range threshold; The adjustment of the focus ratio gain based on the difference between the fluctuation amplitude and the preset threshold includes: The range values ​​of the autofocus signals corresponding to the multiple points are obtained, and the focus ratio gain is adjusted accordingly.

9. The autofocus method as described in claim 8, characterized in that, The step of obtaining the range values ​​corresponding to the autofocus signals at the multiple points and adjusting the focus ratio gain accordingly includes: Acquire the range values ​​corresponding to the multiple autofocus signals during the scanning of the biochip; When the range value is greater than the range value threshold, the focus ratio gain is reduced; When the range value is less than or equal to the range value threshold, autofocus is completed.

10. The autofocus method as described in claim 9, characterized in that, The range threshold is 1.

11. An optical inspection device, characterized in that, include: Chip carrier, used to hold biochips; An objective lens is located on the side of the chip stage used to support the biochip. An autofocus unit is used to emit a focusing beam to the biochip and receive a detection beam reflected by the biochip. A drive module is connected to the chip stage and the objective lens respectively, and is used to drive the chip stage and / or the objective lens to move. as well as A control module is electrically connected to the autofocus unit and the drive module, respectively. The control module includes a memory and a processor. The memory stores a computer program. When the processor reads the computer program, it controls the optical detection device to perform the steps of the autofocus method as described in any one of claims 1-10.

12. A readable storage medium, characterized in that, The device contains a computer program that, when read by a processor, can implement the steps of the autofocus method as described in any one of claims 1-10.