Active and passive combined microscope automatic focusing method, system and device
By adopting an active-passive combination of automatic focus method in the microscope, the focus range is reduced by active focus, and then precise focus is achieved through passive focus, the problem of microscope autofocus accuracy and long time is solved, and the focus efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411938678.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-02-25
AI Technical Summary
In microscopes, especially at high magnifications, there are problems in the process of autofocusing that high accuracy requirements, long focus time, and difficulty in reaching clear focus at the beginning of extreme positions.
The automatic and passive microscope automatic focus method is adopted to reduce the focus position through active focus, and then achieve precise focus through passive focus. The specific steps include obtaining the working distance of the microscope and the encoded value data of the zoom motor, calculating the theoretical encoded value of the zoom motor, driving the zoom motor to quickly reach the near the theoretical encoded value, and scanning within a small range to calculate the FV value until the maximum value of the FV is found.
This method significantly reduces focus time, improves focus accuracy, and avoids blurring problems at the beginning of extreme positions, improving user experience.
Smart Images

Figure CN119511519A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of microscope focusing technology, and in particular to an active and passive combined microscope automatic focusing method, system and device. Background Art
[0002] The first camera was born in 1839, and manual focus was the only way to shoot with a camera for the next hundred years. When shooting, you need to rotate the focus ring on the lens and judge whether the focus is accurate based on the image clarity in the viewfinder. This method is cumbersome to operate and requires high skills and experience from the photographer.
[0003] Photography technology has been developing and improving since its birth. From the initial film photography to the later digital photography, the advancement of technology has made photography more convenient and efficient. In this process, focusing technology, as an important part of photography technology, has also been significantly improved and developed. The development of focusing technology is precisely due to people's continuous pursuit of photography technology and the need to improve shooting efficiency.
[0004] During the shooting process, the accuracy of focus directly affects the clarity and shooting efficiency of the photo. The traditional active focus method requires the photographer to adjust the focus position by rotating the focus ring, which requires certain skills and experience. Moreover, in the case of dim light or fast moving objects, active focus often cannot accurately and quickly complete the focus. Therefore, people began to seek more efficient and accurate focusing methods, and passive focus technology came into being.
[0005] The birth of passive focus technology is an important milestone in the development of photography technology. Passive focus technology enables the camera to automatically identify and accurately focus on the subject through built-in focus detection components and focus motors. The emergence of passive focus technology has greatly improved shooting efficiency and focus accuracy, and more focus on shooting elements such as composition and light, thereby taking better photos.
[0006] In microscopy, there is no large depth of field like in most camera photography scenes, especially at high magnification, the depth of field is smaller, and the accuracy requirement is higher when the autofocus motor drives the objective lens focal length adjustment; and relying solely on passive autofocus, the algorithm can only use a relatively slow focusing speed to scan each frame and calculate the clarity value FV to find the clearest position. In order to prevent the clear FV peak from being missed due to too fast an adjustment speed, the motor speed is often kept within a relatively slow range, which needs to comply with the Nyquist sampling theorem. The focusing time is often longer, and at high magnification, if the autofocus starts at an extreme position, it will scan back and forth at a relatively blurred position and will never be able to focus clearly. Because within these ranges, the trend of the FV value is relatively flat, and the calculated image clarity FV values are often similar, but there are fluctuations, resulting in finding the wrong trend; and using active autofocus alone has problems such as interference under high-intensity light in the field of microscopy. Summary of the invention
[0007] The technical problem to be solved by the present invention is to design an active and passive combined microscope autofocus method, system and device. The active and passive combined microscope autofocus method is adopted, which can first narrow the focus position through active focusing, and then achieve precise focusing through passive focusing, thereby reducing the focusing time and increasing the focusing accuracy, thereby solving the existing technical problems.
[0008] In order to solve the above technical problems, the present invention provides an active and passive combined microscope autofocus method, which specifically comprises the following steps:
[0009] Step S1: performing auto-focusing.
[0010] Step S2: Obtain the microscope working distance y and the zoom motor encoding value data x.
[0011] Step S3: Calculate the zoom motor theoretical code value z, the calculation formula of z is: z = z0 + ax + by + cx 2 +dy 2 +fxy, where x is the zoom motor encoding value, y is the microscope working distance, and z0, a, b, c, d, and f are parameters.
[0012] Step S4: Drive the zoom motor to quickly reach the vicinity of the theoretical encoding value, then reduce the zoom motor speed to scan within a small range, and calculate the FV value at the same time.
[0013] Step S5: Determine whether the maximum value of FV is found, if not, return to step S4; if yes, the focusing is completed.
[0014] Furthermore, in step S1, auto-focusing is performed by the HiSilicon SS928V100 embedded main control board.
[0015] Furthermore, in step S2, the microscope working distance y is measured by a high-precision infrared distance measurement module, and the high-precision infrared distance measurement module is equipped with an infrared filter.
[0016] Further, in step S3, the parameters z0, a, b, c, d, and f are obtained by fitting the collected data, which specifically includes the following steps:
[0017] Step S31: Collecting data, specifically including:
[0018] Step (a): Divide the effective working distance of the microscope into N special working distances.
[0019] Step (b): Divide the zoom motor encoding value into P equal parts.
[0020] Step (c): Each time a special working distance is selected, and data is collected at P different magnifications. The zoom motor is adjusted to make the image appear clearer. The subjective judgment combined with the FV value is used to determine whether the changed zoom position is a clear image position, and the encoding value of the position is recorded, thereby collecting P sets of data.
[0021] Step (d): Repeat step (c) to collect P sets of data at all special working distances, and obtain a total of P*N sets of data.
[0022] Step S32: The P*N pieces of data collected in step S31 are converted using the function z=z0+ax+by+cx 2 +dy 2 +fxy is fitted, where z is the zoom motor encoding value, x is the zoom motor encoding value, y is the current working distance of the microscope, z0, a, b, c, d, and f are the parameters to be determined. These parameter values are obtained through fitting, and the relationship function is finally determined.
[0023] Further, in step S4, the zoom motor is first driven to V f The speed reaches the specified position encoding value p target -p Δ The position of the post-coded value, where p target is the target encoding value position of the zoom motor, p Δ is the distance p target The encoder value position is the encoder value distance; then the zoom motor speed is reduced to V s , after scanning p Δ *2Encoding value range.
[0024] Furthermore, in step S4, the motor drive adopts an incremental PID algorithm, and the incremental PID formula is:
[0025] Δu x=K p *(e x -e x-1 )+K i *e x +K d *(e x -2*e x-1 +e x-2 );
[0026] u x To control the output, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient, e x is the deviation between the actual value and the target value of e(t) at the point x in discrete time. x -e x-1 )for The difference between the front and rear deviations in discrete time can be adjusted by adjusting the three coefficient values of PID to allow the motor to reach a stable state with fast response speed and uniform running speed.
[0027] Furthermore, in step S4, the speed loop and the position loop are combined for closed-loop control. By giving a target encoding value, the motor reaches the position of the encoding value at a specified speed. During initialization, the speed of the motor after reaching the stall position is 0 within a certain time t to determine whether the minimum position has been reached, and the position encoding value is initialized to 0.
[0028] The present invention also provides an active and passive combined microscope autofocus system, comprising:
[0029] The control module is used to control the ranging module and the driving module, and to complete autofocus.
[0030] The driving module is used to drive the zoom motor and the magnification motor to the specified encoding value position.
[0031] Distance measurement module, used to measure the working distance of the microscope.
[0032] Zoom motor, used to adjust the magnification of the microscope.
[0033] The zoom motor is used to adjust the focal length of the microscope to make the image appear clear.
[0034] The data processing module is used to obtain the microscope working distance and the zoom motor coding value, and calculate the zoom motor coding value.
[0035] Furthermore, the control module adopts the HiSilicon SS928V100 embedded main control board, the HiSilicon SS928V100 embedded main control board obtains the image clarity value FV by analyzing the image features, and the statistical module adopts the squ mode.
[0036] The present invention also provides an active and passive combined microscope autofocus device, comprising:
[0037] at least one processor; and
[0038] at least one memory in communication with the processor;
[0039] The memory stores instructions that can be executed by the processor, and the instructions are executed by the processor to enable the device to perform the aforementioned active and passive combined microscope autofocus method.
[0040] Beneficial effects of the present invention:
[0041] The present invention adopts a microscope autofocus method combining active and passive focusing, which reduces the range of active focusing of the camera by fitting, reduces the focusing time of passive focusing, and improves the focusing accuracy. Compared with the prior art, the technical solution of the present invention has the following advantages:
[0042] (1) Because of the active addition, the preliminary calculation can obtain the approximate target code value, so the entire focusing process will not have the problem of the motor turning to the extreme position without finding the clear point and then continuing to search in the reverse direction, or even searching back and forth continuously, which improves the user experience.
[0043] (2) The focusing speed is fast and the accuracy is higher. The total time taken, including the time it takes for the motor to accelerate from the initial speed 0 to the specified speed due to the load, will not exceed 6 seconds. For other common positions, the focusing time is even shorter, basically around 3 seconds, while other methods generally take an average of about 8 to 10 seconds. Moreover, within the range of 100,000 code values before and after the approximate position, since the squ mode is used in the FV value calculation, the trend is steeper and there is basically no pseudo-extreme value, so the focusing is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The specific implementation of the present invention will be further explained below in conjunction with the accompanying drawings.
[0045] Figure 1 It is a flow chart of the active and passive combined microscope autofocus method of the present invention;
[0046] Figure 2 Schematic diagram of FV curves in different modes in the HiSilicon embedded motherboard autofocus module of the present invention;
[0047] Figure 3 It is a schematic diagram of the fitting surface of the working distance, the coding value of the variable magnification motor and the coding value of the zoom motor in the present invention;
[0048] Figure 4It is a system block diagram of the PID algorithm in the present invention;
[0049] Figure 5 The system block diagram of the active and passive combined microscope autofocus system of the present invention. DETAILED DESCRIPTION
[0050] Example 1
[0051] Combination Figure 1 The active and passive combined microscope autofocus method of this embodiment specifically includes the following steps:
[0052] Step S1: performing auto-focusing.
[0053] Preferably, in this embodiment, in step S1, auto-focusing is performed by a HiSilicon SS928V100 embedded main control board.
[0054] Specifically, in this embodiment, the autofocus module of the HiSilicon SS928V100 embedded main control board is a passive autofocus module, which obtains the image clarity value FV (Focus Value) by analyzing the image features and adjusts the focus to the optimal position by driving the focus motor. There are some mode settings in the statistics module:
[0055] Square squ mode: When set to squ mode, the filter output will be normalized and then squared before statistics are taken. The FV curve of the square mode will be steeper near the focus.
[0056] Linear mode: When set to linear mode, the filter output value will not be squared.
[0057] like Figure 2 As shown, the squ mode is adopted in this embodiment. After squaring, the trend of the position with high clarity is steeper. There is basically no local optimal solution in the left and right range of the highest point position, which is easy to judge.
[0058] Step S2: Obtain the microscope working distance y and the zoom motor encoding value data x.
[0059] Preferably, in this embodiment, in step S2, the microscope working distance y is measured by a high-precision infrared distance measurement module, and the high-precision infrared distance measurement module is equipped with an infrared filter.
[0060] Specifically, in this embodiment, an infrared rangefinder is used to measure the working distance y. Since the illumination of the light source of the microscope is generally as high as 100,000 lux, which will interfere with the measured data, an infrared filter is added in this embodiment according to the wavelength of the light emitted by the infrared rangefinder, which can effectively shield ultraviolet light and visible light.
[0061] Step S3: Calculate the zoom motor theoretical code value z, the calculation formula of z is: z = z0 + ax + by + cx 2 +dy 2 +fxy, where x is the zoom motor encoding value, y is the microscope working distance, and z0, a, b, c, d, and f are parameters.
[0062] In this embodiment, preferably, in step S3, the parameters z0, a, b, c, d, and f are obtained by fitting the collected data, which specifically includes the following steps:
[0063] Step S31: Collecting data, specifically including:
[0064] Step (a): Divide the effective working distance of the microscope into N special working distances.
[0065] Step (b): Divide the zoom motor encoding value into P equal parts.
[0066] Step (c): Each time a special working distance is selected, and data is collected at P different magnifications. The zoom motor is adjusted to make the image appear clearer. The subjective judgment combined with the FV value is used to determine whether the changed zoom position is a clear image position, and the encoding value of the position is recorded, thereby collecting P sets of data.
[0067] Step (d): Repeat step (c) to collect P sets of data at all special working distances, and obtain a total of P*N sets of data.
[0068] Step S32: The P*N pieces of data collected in step S31 are converted using the function z=z0+ax+by+cx 2 +by 2 +fxy is fitted, where z is the zoom motor encoding value, x is the zoom motor encoding value, y is the current working distance of the microscope, z0, a, b, c, d, and f are the parameters to be determined. These parameter values are obtained through fitting, and the relationship function is finally determined.
[0069] Specifically in this embodiment, the data collection and fitting relationship function are as follows:
[0070] 1. Confirmation of relevant parameters
[0071] (a) The effective working distance of the microscope used in this embodiment is 250-550 mm. The microscope is provided with an infrared distance measurement module, and the infrared distance measurement reading is accurate to mm.
[0072] (b) The encoding value calculation formula for the zoom motor and the zoom motor is: encode = ppr*f*rate, where encode is the encoding value of the motor per rotation, ppr is the number of line pairs, f is the frequency division number, and rate is the reduction ratio.
[0073] Specifically in this embodiment, the number of line pairs of the zoom motor is 512, the statistical coding value is 4-frequency division, and the reduction ratio is 22, so the coding value for one rotation is 512*4*22=45056; the number of line pairs of the zoom motor is 512, the statistical coding value is 4-frequency division, and the reduction ratio is 105, so the coding value for one rotation is 512*4*105=215040.
[0074] 2. Collect data
[0075] Based on the above steps, the current code values of the zoom motor and the current code values of the zoom motor, as well as the distance data of the infrared distance measurement, can be obtained. In this embodiment, the following acquisition scheme is specified for data acquisition:
[0076] (a) First, the effective working distance is divided into 60 special working distances in units of 5 mm.
[0077] (b) Divide the variable power body code value into 20 equal parts, and take the code value interval as 2140;
[0078] (c) Each time a special working distance is selected, data is collected at 20 different magnifications, and the zoom motor is adjusted to make the image display clearer. The zoom position is determined by subjective judgment combined with the FV value to determine whether the image is clear. If so, the code value of the position is recorded. In this way, 20 sets of data can be collected at each special working distance;
[0079] (d) Repeat step (c) above to collect 20 sets of data at all special working distances, a total of 1200 sets of data.
[0080] 3. Data fitting
[0081] Based on the collected data, a nonlinear surface fitting method is used to fit the relationship function. In this embodiment, nonlinear surface fitting in Origin is used, using the Poly2D function: z = z0 + ax + by + cx 2 +dy 2 +fxy,, the fitted surface in this embodiment is as follows Figure 3 As shown, z is the zoom motor encoding value, x is the zoom motor encoding value, and y is the current working distance of the microscope. z0, a, b, c, d, and f are obtained by fitting, and the relationship function is finally determined.
[0082] Step S4: Drive the zoom motor to quickly reach the vicinity of the theoretical encoding value, then reduce the zoom motor speed to scan within a small range, and calculate the FV value at the same time.
[0083] In this embodiment, preferably, in step S4, the zoom motor is first driven to V f The speed reaches the specified position encoding value p target -p ΔThe position of the post-coded value, where p taget is the target encoding value position of the zoom motor, p Δ is the distance p target The encoder value position is the encoder value distance; then the zoom motor speed is reduced to V s , after scanning p Δ *2Encoding value range.
[0084] Specifically in this embodiment, p Δ Take 50000 and calculate according to the speed formula: Where m is the encoder value that has been rotated, M is the total encoder value for one revolution, 60 is used to convert r / s to the commonly used r / min, and n is the calculated speed in r / min.
[0085] According to the corresponding parameter calculation in this embodiment, V f =120r / min speed rotation, 120 / 60*215040=430080, it only takes about 3.6s to complete the whole process. In this embodiment, the change of the code value is counted once per unit time of 10ms, so the change of the code value in 10ms is 4300.8.
[0086] Then the motor speed is reduced to V s , after scanning p Δ *2 Coding value range, this embodiment uses V s =12r / min speed rotation scan 12 / 60*215040=43008, scanning the 100000 code value range takes about 2.3s, but it takes almost half the time to find the FV peak, so on average, the scanning time for this part is 1.5s.
[0087] In this embodiment, preferably, in step S4, the motor drive adopts an incremental PID algorithm, and the incremental PID formula is:
[0088] Δu x =K p *(e x -e x-1 )+K i *e x +K d *(e x -2*e x-1 +e x-2 );
[0089] u x To control the output, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient, e xis the deviation between the actual value and the target value of e(t) at the point x in discrete time. x -e x-1 )for The difference between the front and rear deviations in discrete time can be adjusted by adjusting the three coefficient values of PID to allow the motor to reach a stable state with fast response speed and uniform running speed.
[0090] like Figure 4 As shown, the PID algorithm is a commonly used algorithm for closed-loop motor drive, P (Proportion), I (Integral), D (Differential). This embodiment uses an incremental PID algorithm with a small amount of calculation, which is derived from the continuous PID algorithm. The PID formula under continuous time is:
[0091]
[0092] Among them, u(t) is the control output, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient, e(t) is the deviation between the actual value and the target value, is the cumulative integral of the deviation, is the differential of the deviation at that moment.
[0093] In this embodiment, the discrete type is used in the calculation, and the discrete PID formula is:
[0094]
[0095] Among them, u x To control the output, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient, e x It is the deviation between the actual value and the target value of e(t) at the point x in discrete time. for The deviation and (e x -e x-1 )for The gap between the before and after deviations in discrete time.
[0096] The PID formula for the previous state is:
[0097]
[0098] Then by Δu x =u x -u x-1, subtract the two formulas, and we get the incremental PID formula:
[0099] Δu x =K p *(e x -e x-1 )+K i *e x +K d *(e x -2*e x-1 +e x-2 );
[0100] By adjusting the three coefficient values of PID, the motor can reach a stable state with fast response speed and uniform running speed.
[0101] In this embodiment, preferably, in step S4, closed-loop control is performed by combining the speed loop and the position loop. By giving a target encoding value, the motor reaches the position of the encoding value at a specified speed. During initialization, the speed of the motor after reaching the stall position is 0 within a certain time t. In this embodiment, t is 50ms, to determine whether the minimum position is reached, and initialize the position encoding value to 0.
[0102] Step S5: Determine whether the maximum value of FV is found, if not, return to step S4; if yes, the focusing is completed.
[0103] Example 2
[0104] Combination Figure 5 As shown, the active and passive combined microscope autofocus system of this embodiment includes the following modules:
[0105] The control module is used to control the ranging module and the driving module, and to complete autofocus.
[0106] The driving module is used to drive the zoom motor and the magnification motor to the specified encoding value position.
[0107] Distance measurement module, used to measure the working distance of the microscope.
[0108] Zoom motor, used to adjust the magnification of the microscope.
[0109] The zoom motor is used to adjust the focal length of the microscope to make the image appear clear.
[0110] The data processing module is used to obtain the microscope working distance and the zoom motor coding value, and calculate the zoom motor coding value.
[0111] In this embodiment, the control module preferably adopts HiSilicon SS928V100 embedded main control board, which obtains the image clarity value FV by analyzing the image features, and the statistical module adopts squ mode. The control module controls the driving module, the ranging module and the data processing module to perform relevant steps according to the active and passive combined microscope autofocus method in Example 1.
[0112] Example 3
[0113] The active and passive combined microscope autofocus device of this embodiment comprises:
[0114] at least one processor; and
[0115] at least one memory in communication with the processor;
[0116] The memory stores instructions executable by the processor, and the instructions are executed by the processor so that the device performs the active and passive combined microscope autofocus method in Example 1.
[0117] Many specific details are described in the above description to facilitate a full understanding of the present invention. However, the above description is only a preferred embodiment of the present invention. The present invention can be implemented in many other ways different from those described herein, so the present invention is not limited to the specific implementation disclosed above. At the same time, any person familiar with the art can make many possible changes and modifications to the technical solution of the present invention using the methods and technical contents disclosed above without departing from the scope of the technical solution of the present invention, or modify it into an equivalent embodiment of equivalent changes. Any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of protection of the technical solution of the present invention.
Claims
1. An active and passive combined microscope autofocus method, characterized in that: The steps include: Step S1: performing automatic focusing; Step S2: Obtain microscope working distance y and zoom motor encoding value data x; Step S3: Calculate the zoom motor theoretical code value z, the calculation formula of z is: z = z0 + ax + by + cx 2 +dy 2 +fxy, where x is the zoom motor encoding value, y is the microscope working distance, and z0, a, b, c, d, and f are parameters; Step S4: driving the zoom motor to quickly reach the vicinity of the theoretical encoding value, then reducing the zoom motor speed to scan within a small range, and calculating the FV value at the same time; Step S5: Determine whether the maximum value of FV is found, if not, return to step S4; if yes, the focusing is completed.
2. The active-passive combined microscope autofocus method according to claim 1, characterized in that: In step S1, auto-focus is performed through the HiSilicon SS928V100 embedded main control board.
3. The active-passive combined microscope autofocus method according to claim 1, characterized in that: In step S2, the microscope working distance y is measured by a high-precision infrared distance measurement module, and the high-precision infrared distance measurement module is equipped with an infrared filter.
4. The active-passive combined microscope autofocus method according to claim 1, characterized in that: In step S3, the parameters z0, a, b, c, d, and f are obtained by fitting the collected data, which specifically includes the following steps: Step S31: Collecting data, specifically including: Step (a): Divide the effective working distance of the microscope into N special working distances; Step (b): Divide the zoom motor code value into P equal parts; Step (c): Each time a special working distance is selected, data is collected at P different magnifications, and the zoom motor is adjusted to make the image display clearer. Whether the zoom position is a clear image position is determined by subjective judgment combined with the FV value, and the encoding value of the position is recorded, thereby collecting P sets of data; Step (d): Repeat step (c) to collect P sets of data at all special working distances, and obtain a total of P*N sets of data; Step S32: The P*N pieces of data collected in step S31 are converted using the function z=z0+ax+by+cx 2 +dy 2 +fxy is fitted, where z is the zoom motor encoding value, x is the zoom motor encoding value, y is the current working distance of the microscope, z0, a, b, c, d, and f are the parameters to be determined. These parameter values are obtained through fitting, and the relationship function is finally determined.
5. The active-passive combined microscope autofocus method according to claim 1, characterized in that: In step S4, the zoom motor is first driven to V f The speed reaches the specified position encoding value p target -p Δ The position of the post-coded value, where p target is the target encoding value position of the zoom motor, p Δ is the distance p target The encoder value position is the encoder value distance; then the zoom motor speed is reduced to V s , after scanning p Δ *2Encoding value range.
6. The active-passive combined microscope autofocus method according to claim 1, characterized in that: In step S4, the motor drive adopts an incremental PID algorithm, and the incremental PID formula is: Δu x =K p *(and x -and x-1 )+K i *and x +K d *(and x -2*e x-1 +and x-2 ); u x To control the output, K p is the proportionality coefficient, K i is the integration coefficient, K d is the differential coefficient, e x is the deviation between the actual value and the target value of e(t) at the point x in discrete time. x -e x-1 )for The difference between the front and rear deviations in discrete time can be adjusted by adjusting the three coefficient values of PID to allow the motor to reach a stable state with fast response speed and uniform running speed.
7. The active-passive combined microscope autofocus method according to claim 1, characterized in that: In step S4, closed-loop control is performed by combining the speed loop and the position loop. By giving a target encoding value, the motor reaches the position of the encoding value at a specified speed. During initialization, the speed of the motor after reaching the stall position is 0 within a certain time t to determine whether the minimum position has been reached, and the position encoding value is initialized to 0.
8. An active and passive combined microscope autofocus system, characterized in that: include: A control module, used to control the ranging module and the driving module, and to complete autofocus; A driving module, used to drive the zoom motor and the magnification motor to reach the specified coding value position; Distance measurement module, used to measure the working distance of the microscope; A zoom motor, used to adjust the magnification of the microscope; Zoom motor, used to adjust the focal length of the microscope to make the image appear clear; The data processing module is used to obtain the microscope working distance and the zoom motor coding value, and calculate the zoom motor coding value.
9. The active-passive combined microscope autofocus method according to claim 8, characterized in that: The control module adopts the HiSilicon SS928V100 embedded main control board, which obtains the image clarity value FV by analyzing the image features, and the statistical module adopts the squ mode.
10. An active and passive combined microscope autofocus device, characterized in that: include: at least one processor; as well as at least one memory in communication with the processor; Wherein, the memory stores instructions executable by the processor, and the instructions are executed by the processor to enable the device to perform the active and passive combined microscope autofocus method described in any one of claims 1-7.