Microscope automatic focusing method and system based on image sharpness evaluation
Patent Information
- Application Number
- CN202310786132.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2043-06-29
AI Technical Summary
申请公布号为CN110531484A的专利描述了一种对焦模型可设定的显微镜自动对焦方法,该方法需要事先构建数学模型去描述成像系统,不能快速适应不同的载玻片与物镜
[0024]本发明的有益效果是:在本发明一种基于图像清晰度评估的显微镜自动对焦方法及系统中,在调节显微镜三轴载物平台的水平位置后,电子取图设备在调节三轴载物平台垂直位置的过程中从连续的大量成像位置拍摄样品的图像并对图像进行图像处理,以获得丰富的图像细节信息,然后计算细节描述值并进行拟合形成细节描述拟合曲线,当细节描述拟合曲线中出现极值且为极大值或预设极值时,表明电子取图设备拍摄地出现极大值或预设极值的图像最为清晰,因此三轴载物平台在所述极大值或所述预设极值对应图像的拍摄位置即为显微镜对焦成功位置;本发明无需事先构建用于描述成像系统的数学模型,可以快速适应不同的载玻片与物镜,且不受被测样品的影响;本发明是连续的拍摄大量图像,当拍摄到当前帧图像时就在上一帧的基础上进行拟合,可以实现细节描述值的实时拟合以即时获取极大值或预设极值,从而在出现极大值或预设极值时即时停止三轴载物平台在垂直方向上的移动,以获得较高的对焦精度。
Smart Images

Figure CN116931248B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of microscope focusing, and more specifically to a microscope autofocusing method and system based on image sharpness assessment. Background Technology
[0002] Optical microscopes are widely used in various disciplines. Generally, focusing and other operations on microscopes are adjusted by the operator's eye observing the target. However, unpredictable human factors, objective environmental factors, and mechanical vibrations can cause focus drift. This focusing process requires repetitive operations, which is time-consuming and labor-intensive. Therefore, applying autofocus technology to optical microscope focusing systems will better serve scientific experiments and industrial applications such as quality inspection.
[0003] Currently, autofocus methods for optical microscopes can be divided into active focusing and passive focusing. Patent application CN106772983A details an autofocus method based on hardware and auxiliary devices. This method requires improvements to the optical microscope system, resulting in a complex structure and high cost, and is rarely used in microscope applications. In practical applications of microscope autofocus, passive focusing methods are generally used. Patent application CN110531484A describes an autofocus method for microscopes with a settable focusing model. This method requires a pre-constructed mathematical model to describe the imaging system and cannot quickly adapt to different slides and objectives. Patent application CN112099217A describes an autofocus method that uses gradient calculation and averages to evaluate the sharpness of the entire image. This method is greatly affected by the object being measured, leading to significant deviations in focus position for the same slice location under different objectives. The patent application with publication number CN110865453A describes a method for automatic focusing by foreground region extraction, peak and rising edge and falling edge determination, parabolic fitting and four-point single-peak fitting. The focus position is calculated based on images obtained from a small number of imaging positions, and its accuracy is low. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a microscope autofocusing method and system based on image sharpness assessment, which can quickly adapt to microscope focusing with different objectives and slides, and has high focusing accuracy.
[0005] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A microscope autofocusing method based on image sharpness assessment, comprising the following steps,
[0006] S1, Adjust the position of the triaxial platform on the microscope in the X, Y, and Z axes to mechanically return the triaxial platform to zero;
[0007] S2, Adjust the position of the triaxial platform in the X and Y axes so that the area to be observed in the sample cartridge mounted on the triaxial platform is within the field of view of the electronic imaging device on the microscope;
[0008] S3, control the three-axis loading platform to move in the Z-axis direction toward the electronic image acquisition device to a preset position at a first speed;
[0009] S4, control the three-axis loading platform to move from the preset position toward the electronic mapping device in the Z-axis direction at a second speed less than the first speed;
[0010] While the triaxial platform moves at the second speed, the electronic imaging device is controlled to take pictures of the sample placed in the observation area of the sample box in real time at a preset frame rate to obtain images;
[0011] S5, the current frame image captured by the electronic image acquisition device is scaled to a preset pixel size to obtain a scaled image;
[0012] S6, perform image processing on the current frame scaled image to obtain image detail information of the current frame scaled image, and compare it with the image detail information of the previous frame scaled image to obtain detail description values of the current frame scaled image used to characterize the change law of image detail information;
[0013] S7: Fit the detail description values of all scaled images from the first frame to the current frame to obtain a detail description fitting curve. Determine whether an extreme value appears in the detail description fitting curve, and whether the extreme value is a maximum value or a preset extreme value. If yes, control the three-axis platform to stop moving in the Z-axis direction, and the shooting position of the three-axis platform at the maximum value or the preset extreme value is the microscope focusing position. If no, return to S4 and repeat the process.
[0014] Based on the above-mentioned microscope autofocus method based on image sharpness assessment, the present invention also provides a microscope autofocus system based on image sharpness assessment.
[0015] An autofocusing system for microscopes based on image sharpness assessment includes the following modules:
[0016] The mechanical zeroing module is used to adjust the position of the triaxial platform on the microscope in the X, Y, and Z axes, so that the triaxial platform mechanically returns to zero.
[0017] The horizontal position adjustment module is used to adjust the position of the triaxial platform in the X and Y axes so that the area to be observed in the sample cassette mounted on the triaxial platform is within the field of view of the electronic imaging device on the microscope.
[0018] The first vertical drive control module is used to control the three-axis loading platform to move in the Z-axis direction toward the electronic mapping device to a preset position at a first speed;
[0019] The second vertical drive control module is used to control the three-axis loading platform to move from the preset position toward the electronic mapping device in the Z-axis direction at a second speed less than the first speed.
[0020] The image acquisition control module is used to control the electronic image acquisition device to take pictures of the sample placed in the observation area of the sample box in real time at a preset frame rate while the triaxial platform moves at the second speed, so as to acquire images.
[0021] An image scaling processing module is used to scale the current frame image captured by the electronic image acquisition device to a preset pixel size to obtain a scaled image;
[0022] The detail description value calculation module is used to perform image processing on the current frame scaled image to obtain the image detail information of the current frame scaled image, and compare it with the image detail information of the previous frame scaled image to obtain the detail description value of the current frame scaled image, which is used to characterize the change law of image detail information.
[0023] The focusing module is used to fit the detail description values of all scaled images from the first frame to the current frame to obtain a detail description fitting curve. It determines whether an extreme value appears in the detail description fitting curve, and the extreme value is a maximum value or a preset extreme value. If so, it controls the three-axis platform to stop moving in the Z-axis direction, and the shooting position of the three-axis platform at the maximum value or the preset extreme value is the microscope focusing position. If not, it returns to the second vertical drive control module.
[0024] The beneficial effects of this invention are as follows: In the microscope autofocus method and system based on image sharpness evaluation, after adjusting the horizontal position of the microscope's triaxial platform, the electronic image acquisition device captures images of the sample from a continuous number of imaging positions while adjusting the vertical position of the triaxial platform. The images are then processed to obtain rich image detail information. Detail description values are calculated and fitted to form a detail description fitting curve. When an extreme value appears in the detail description fitting curve, and it is a maximum or a preset extreme value, it indicates that the image captured by the electronic image acquisition device at the location of the maximum or preset extreme value is the sharpest. Therefore, the image capture position corresponding to the maximum value or the preset extreme value of the triaxial platform is the successful focusing position of the microscope. This invention does not require the prior construction of a mathematical model to describe the imaging system, can quickly adapt to different slides and objectives, and is not affected by the sample being tested. This invention continuously captures a large number of images, and when the current frame image is captured, it is fitted based on the previous frame. This can achieve real-time fitting of detail description values to instantly obtain the maximum value or preset extreme value, thereby instantly stopping the movement of the triaxial platform in the vertical direction when the maximum value or preset extreme value is encountered, so as to obtain high focusing accuracy. Attached Figure Description
[0025] Figure 1 This is a flowchart of a microscope autofocusing method based on image sharpness assessment according to the present invention;
[0026] Figure 2 This is a schematic diagram of the microscope's structure;
[0027] Figure 3 A schematic diagram of the X or Y axis moving mechanism;
[0028] Figure 4 This is a structural block diagram of a microscope autofocus system based on image sharpness assessment according to the present invention.
[0029] The attached diagram lists the components represented by each number as follows:
[0030] 1. Objective lens;
[0031] 2. Electronic camera;
[0032] 3. Sample box;
[0033] 4. X-axis motor; 41. X-axis guide rail; 42. X-axis drive shaft; 43. X-axis negative photoelectric limit switch; 44. X-axis zero-point photoelectric limit switch; 45. X-axis positive photoelectric limit switch;
[0034] 5. Y-axis motor; 51. Y-axis guide rail; 52. Y-axis drive shaft; 53. Y-axis negative photoelectric limit switch; 54. Y-axis zero-point photoelectric limit switch; 55. Y-axis positive photoelectric limit switch;
[0035] 6. Z-axis motor; 61. Z-axis negative photoelectric limit switch; 62. Z-axis positive photoelectric limit switch. Detailed Implementation
[0036] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0037] like Figure 1 As shown, a microscope autofocusing method based on image sharpness assessment includes the following steps:
[0038] S1, Adjust the position of the triaxial platform on the microscope in the X, Y, and Z axes to mechanically return the triaxial platform to zero;
[0039] S2, Adjust the position of the triaxial platform in the X and Y axes so that the area to be observed in the sample cartridge mounted on the triaxial platform is within the field of view of the electronic imaging device on the microscope;
[0040] S3, control the three-axis loading platform to move in the Z-axis direction toward the electronic image acquisition device to a preset position at a first speed;
[0041] S4, control the three-axis loading platform to move from the preset position toward the electronic mapping device in the Z-axis direction at a second speed less than the first speed;
[0042] While the triaxial platform moves at the second speed, the electronic imaging device is controlled to take pictures of the sample placed in the observation area of the sample box in real time at a preset frame rate to obtain images;
[0043] S5, the current frame image captured by the electronic image acquisition device is scaled to a preset pixel size to obtain a scaled image;
[0044] S6, perform image processing on the current frame scaled image to obtain image detail information of the current frame scaled image, and compare it with the image detail information of the previous frame scaled image to obtain detail description values of the current frame scaled image used to characterize the change law of image detail information;
[0045] S7: Fit the detail description values of all scaled images from the first frame to the current frame to obtain a detail description fitting curve. Determine whether an extreme value appears in the detail description fitting curve, and whether the extreme value is a maximum value or a preset extreme value. If yes, control the three-axis platform to stop moving in the Z-axis direction, and the shooting position of the three-axis platform at the maximum value or the preset extreme value is the microscope focusing position. If no, return to S4 and repeat the process.
[0046] This invention does not require prior construction of a mathematical model to describe the imaging system, can quickly adapt to different slides and objectives, and is unaffected by the sample being tested. This invention continuously captures a large number of images, and when the current frame image is captured, it is fitted based on the previous frame. This enables real-time fitting of detail description values to instantly obtain maximum or preset extreme values, thereby instantly stopping the movement of the three-axis platform in the vertical direction when a maximum or preset extreme value is encountered, in order to obtain high focusing accuracy.
[0047] In this embodiment: the microscope is specifically an electric microscope, such as... Figure 2 As shown, the microscope includes a triaxial platform, a sample cassette 3 mounted on the triaxial platform, and an electronic imaging device suspended above the triaxial platform; the electronic imaging device includes an objective lens 1 and an electronic camera 2, and the triaxial platform is specifically an X, Y, Z three-axis moving mechanism driven by an X-axis motor 4, a Y-axis motor 5, and a Z-axis motor 6 respectively; wherein, as Figure 3 As shown, the X-axis moving mechanism includes an X-axis motor 4, an X-axis guide rail 41, and an X-axis drive shaft 42. The X-axis drive shaft 42 passes through the X-axis guide rail 41 and is shaft-connected to the X-axis motor 4 via a coupling. The X-axis guide rail 41 is equipped with an X-axis negative photoelectric limit switch 43, an X-axis zero-point photoelectric limit switch 44, and an X-axis positive photoelectric limit switch 45. An X-axis grating ruler is also mounted on the X-axis guide rail 41. The structure of the Y-axis moving mechanism is the same as that of the X-axis moving mechanism, as shown below. Figure 3 As shown, the Y-axis moving mechanism includes a Y-axis motor 5, a Y-axis guide rail 51, and a Y-axis drive shaft 52. The Y-axis drive shaft 52 passes through the Y-axis guide rail 51 and is connected to the Y-axis motor 5 via a coupling. The Y-axis guide rail 51 is equipped with a Y-axis negative photoelectric limit switch 53, a Y-axis zero-point photoelectric limit switch 54, and a Y-axis positive photoelectric limit switch 55. The Y-axis guide rail 51 is also equipped with a Y-axis grating ruler. The Z-axis moving mechanism includes a Z-axis motor 6, a Z-axis guide rail, and a Z-axis drive shaft. The Z-axis drive shaft passes through the Z-axis guide rail and is connected to the Z-axis motor 6 via a rigid coupling. The Z-axis guide rail is equipped with a Z-axis negative photoelectric limit switch 61 and a Z-axis positive photoelectric limit switch 62.
[0048] The Z-axis motor and the transmission components of the Z-axis moving mechanism are connected by a rigid coupling. Adjustment of the three-axis platform in the Z-axis direction is achieved directly through gear meshing, replacing manual adjustment. The rigid coupling also ensures that adjustments in the Z-axis direction are error-free. The negative and positive Z-axis photoelectric limit switches are located on the same adjustable fine-tuning platform, allowing for precise adjustment of their positions.
[0049] A photoelectric limit switch is a limit device that is divided into positive and negative directions. The movement of the motor is limited to the positions restricted by these two photoelectric limit switches, ensuring the safety of the overall machinery.
[0050] Based on the microscope with the above structure, the steps are explained in detail below.
[0051] S1:
[0052] Start the Z-axis motor to drive the three-axis loading platform to move towards the Z-axis negative photoelectric limit switch in the Z-axis direction. When the three-axis loading platform reaches the Z-axis negative photoelectric limit switch, stop the Z-axis motor and complete the Z-axis mechanical return to zero.
[0053] Start the X-axis motor to drive the three-axis loading platform to move towards the X-axis zero-point photoelectric limit switch in the X-axis direction. When the three-axis loading platform reaches the X-axis zero-point photoelectric limit switch, stop the X-axis motor and complete the X-axis mechanical return to zero.
[0054] Start the Y-axis motor to drive the three-axis loading platform to move towards the Y-axis zero-point photoelectric limit switch in the Y-axis direction. When the three-axis loading platform reaches the Y-axis zero-point photoelectric limit switch, stop the Y-axis motor and complete the Y-axis mechanical return to zero.
[0055] The mechanical zeroing of the three-axis loading platform is achieved when the mechanical zeroing of the Z-axis, X-axis, and Y-axis is completed.
[0056] S2:
[0057] Start the X-axis and Y-axis motors to drive the triaxial platform to move directly below the electronic imaging device on the microscope in the X and Y directions, so that the area to be observed in the sample cassette is within the field of view of the electronic imaging device; pause the X-axis and Y-axis motors when the area to be observed in the sample cassette is within the field of view of the electronic imaging device.
[0058] S3:
[0059] Start the Z-axis motor and adjust its operating speed so that the triaxial platform moves at a first speed toward the positive Z-axis photoelectric limit switch in the Z-axis direction until the objective lens focus of the electronic imaging device is located on the surface of the upper glass slide of the sample cassette; wherein, the preset position is the position of the triaxial platform when the objective lens focus of the electronic imaging device is located on the surface of the upper glass slide of the sample cassette;
[0060] The first speed is relatively high, which can reduce focusing time.
[0061] S4:
[0062] When the three-axis loading platform reaches the preset position, the operating speed of the Z-axis motor is reduced so that the three-axis loading platform continues to move from the preset position to the Z-axis positive photoelectric limit switch at a second speed in the Z-axis direction; the maximum distance that the three-axis loading platform continues to move from the preset position to the Z-axis positive photoelectric limit switch at the second speed in the Z-axis direction does not exceed the distance between the preset position and the Z-axis positive photoelectric limit switch;
[0063] While the triaxial platform continues to move from the preset position toward the positive photoelectric limit switch of the Z-axis in the Z-axis direction at a second speed, the electronic camera in the electronic imaging device is controlled to take pictures of the sample placed in the observation area of the sample box in real time at a preset frame rate (e.g., 22 frames or 30 frames) to obtain images.
[0064] The second speed is lower, which can result in better image processing. While the triaxial platform continues to move from the preset position to the positive photoelectric limit switch on the Z-axis at the second speed, the electronic camera in the electronic imaging device is controlled to continuously capture images of the sample placed in the observation area of the sample box at a preset frame rate in real time. Images are obtained from a large number of imaging positions to calculate the focus position, resulting in high focusing accuracy.
[0065] S5:
[0066] The current frame image captured by the electronic image acquisition device is scaled to a preset pixel size to obtain a scaled image.
[0067] S6:
[0068] The current frame scaled image is segmented into one or more scaled sub-images; each scaled sub-image in the current frame scaled image is processed separately to obtain image detail information of each scaled sub-image in the current frame scaled image.
[0069] The image detail information of the scaled sub-image of each region in the current frame scaled image is compared with the image detail information of the scaled sub-image of the same region in the previous frame scaled image to obtain the detail description value of the scaled sub-image of each region in the current frame scaled image;
[0070] The image detail information includes, but is not limited to, image feature points, image feature line segments, or image high-frequency information;
[0071] When the current frame scaled image is divided into scaled sub-images of a region, it is equivalent to not dividing the current frame scaled image at all. The scaled sub-image of that region is the whole current frame scaled image.
[0072] When the current frame scaled image is divided into scaled sub-images of multiple regions, the image detail information extracted during image processing is more even and more robust.
[0073] S7:
[0074] The detail description values of all scaled sub-images located in the same region in all scaled images from the first frame to the current frame are fitted to obtain the detail description fitting curve for each region. It is determined whether there is an extreme value in the detail description fitting curve of all regions, and the extreme value is a maximum value or a preset extreme value. If yes, the three-axis platform is controlled to stop moving in the Z-axis direction, and the shooting position of the three-axis platform in the image corresponding to the maximum value or the preset extreme value is the microscope focusing position. If no, the process returns to the S4 loop.
[0075] As the three-axis platform moves toward the positive photoelectric limit switch on the Z-axis, the detail description value (texture detail) of the captured image exhibits a characteristic of first rising and then falling. Therefore, when a maximum value or a preset extreme value appears in the detail description fitting curve, it indicates that the three-axis platform has reached the optimal position (i.e., the position where focus is successful).
[0076] Based on the above-mentioned microscope autofocus method based on image sharpness assessment, the present invention also provides a microscope autofocus system based on image sharpness assessment.
[0077] like Figure 4 As shown, a microscope autofocus system based on image sharpness assessment includes the following modules:
[0078] The mechanical zeroing module is used to adjust the position of the triaxial platform on the microscope in the X, Y, and Z axes, so that the triaxial platform mechanically returns to zero.
[0079] The horizontal position adjustment module is used to adjust the position of the triaxial platform in the X and Y axes so that the area to be observed in the sample cassette mounted on the triaxial platform is within the field of view of the electronic imaging device on the microscope.
[0080] The first vertical drive control module is used to control the three-axis loading platform to move in the Z-axis direction toward the electronic mapping device to a preset position at a first speed;
[0081] The second vertical drive control module is used to control the three-axis loading platform to move from the preset position toward the electronic mapping device in the Z-axis direction at a second speed less than the first speed.
[0082] The image acquisition control module is used to control the electronic image acquisition device to take pictures of the sample placed in the observation area of the sample box in real time at a preset frame rate while the triaxial platform moves at the second speed, so as to acquire images.
[0083] An image scaling processing module is used to scale the current frame image captured by the electronic image acquisition device to a preset pixel size to obtain a scaled image;
[0084] The detail description value calculation module is used to perform image processing on the current frame scaled image to obtain the image detail information of the current frame scaled image, and compare it with the image detail information of the previous frame scaled image to obtain the detail description value of the current frame scaled image, which is used to characterize the change law of image detail information.
[0085] The focusing module is used to fit the detail description values of all scaled images from the first frame to the current frame to obtain a detail description fitting curve. It determines whether an extreme value appears in the detail description fitting curve, and the extreme value is a maximum value or a preset extreme value. If so, it controls the three-axis platform to stop moving in the Z-axis direction, and the shooting position of the three-axis platform at the maximum value or the preset extreme value is the microscope focusing position. If not, it returns to the second vertical drive control module.
[0086] The specific functions of each module in the microscope autofocus system based on image sharpness assessment of this invention are described in the steps of the microscope autofocus method based on image sharpness assessment of this invention, and will not be repeated here.
[0087] In the microscope autofocus method and system based on image sharpness evaluation of this invention, after adjusting the horizontal position of the microscope's triaxial platform, the electronic image acquisition device captures images of the sample from a large number of continuous imaging positions while adjusting the vertical position of the triaxial platform. The images are then processed to obtain rich image detail information. Detail description values are calculated and fitted to form a detail description fitting curve. When an extreme value appears in the detail description fitting curve, and it is a maximum or a preset extreme value, it indicates that the image captured by the electronic image acquisition device at the maximum or preset extreme value is the clearest. Therefore, the position where the triaxial platform captures the image corresponding to the maximum or preset extreme value is the position where the microscope is successfully focused. This invention does not require prior construction of a mathematical model to describe the imaging system, can quickly adapt to different slides and objectives, and is unaffected by the sample being tested. This invention continuously captures a large number of images, and when the current frame image is captured, it performs fitting based on the previous frame, enabling real-time fitting of detail description values to instantly obtain maximum or preset extreme values. Thus, when a maximum or preset extreme value appears, the movement of the triaxial platform in the vertical direction is stopped immediately to obtain high focusing accuracy.
[0088] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A microscope autofocusing method based on image sharpness assessment, characterized in that: Includes the following steps, S1, Adjust the position of the triaxial platform on the microscope in the X, Y, and Z axes to mechanically return the triaxial platform to zero; S2, Adjust the position of the triaxial platform in the X and Y axes so that the area to be observed in the sample cartridge mounted on the triaxial platform is within the field of view of the electronic imaging device on the microscope; S3, control the three-axis loading platform to move in the Z-axis direction toward the electronic image acquisition device to a preset position at a first speed; S4, control the three-axis loading platform to move from the preset position toward the electronic mapping device in the Z-axis direction at a second speed less than the first speed; While the triaxial platform moves at the second speed, the electronic imaging device is controlled to take pictures of the sample placed in the observation area of the sample box in real time at a preset frame rate to obtain images; S5, the current frame image captured by the electronic image acquisition device is scaled to a preset pixel size to obtain a scaled image; S6, perform image processing on the current frame scaled image to obtain image detail information of the current frame scaled image, and compare it with the image detail information of the previous frame scaled image to obtain detail description values of the current frame scaled image used to characterize the change law of image detail information; S7: Fit the detail description values of all scaled images from the first frame to the current frame to obtain a detail description fitting curve. Determine whether an extreme value appears in the detail description fitting curve, and whether the extreme value is a maximum value or a preset extreme value. If yes, control the three-axis platform to stop moving in the Z-axis direction, and the shooting position of the three-axis platform at the maximum value or the preset extreme value is the microscope focusing position. If no, return to S4 and repeat the process.
2. The microscope autofocusing method based on image sharpness assessment according to claim 1, characterized in that: The three-axis loading platform is specifically an X, Y, Z three-axis moving mechanism driven by X, Y, and Z axis motors respectively. The X-axis moving mechanism is equipped with an X-axis negative photoelectric limit switch, an X-axis zero-point photoelectric limit switch, and an X-axis positive photoelectric limit switch. The Y-axis moving mechanism is equipped with a Y-axis negative photoelectric limit switch, a Y-axis zero-point photoelectric limit switch, and a Y-axis positive photoelectric limit switch. The Z-axis motor and the transmission component of the Z-axis moving mechanism are connected by a rigid coupling. The Z-axis moving mechanism is equipped with a Z-axis negative photoelectric limit switch and a Z-axis positive photoelectric limit switch, and the Z-axis negative photoelectric limit switch and the Z-axis positive photoelectric limit switch are located on the same adjustable fine-tuning platform.
3. The microscope autofocusing method based on image sharpness assessment according to claim 2, characterized in that: Specifically, S1 is, Start the Z-axis motor to drive the three-axis loading platform to move towards the Z-axis negative photoelectric limit switch in the Z-axis direction. When the three-axis loading platform reaches the Z-axis negative photoelectric limit switch, stop the Z-axis motor and complete the Z-axis mechanical return to zero. Start the X-axis motor to drive the three-axis loading platform to move towards the X-axis zero-point photoelectric limit switch in the X-axis direction. When the three-axis loading platform reaches the X-axis zero-point photoelectric limit switch, stop the X-axis motor and complete the X-axis mechanical return to zero. Start the Y-axis motor to drive the three-axis loading platform to move towards the Y-axis zero-point photoelectric limit switch in the Y-axis direction. When the three-axis loading platform reaches the Y-axis zero-point photoelectric limit switch, stop the Y-axis motor and complete the Y-axis mechanical return to zero. The mechanical zeroing of the three-axis loading platform is achieved when the mechanical zeroing of the Z-axis, X-axis, and Y-axis is completed.
4. The microscope autofocusing method based on image sharpness assessment according to claim 2, characterized in that: Specifically, S2 involves activating the X-axis and Y-axis motors to drive the triaxial platform to move directly below the electronic imaging device on the microscope in the X and Y axes, so that the area to be observed in the sample cassette is within the field of view of the electronic imaging device; and pausing the X-axis and Y-axis motors when the area to be observed in the sample cassette is within the field of view of the electronic imaging device.
5. The microscope autofocusing method based on image sharpness assessment according to claim 2, characterized in that: S3 specifically involves starting the Z-axis motor and adjusting its operating speed to move the triaxial platform at a first speed toward the positive Z-axis photoelectric limit switch in the Z-axis direction until the objective lens focus of the electronic imaging device is located on the surface of the upper glass slide of the sample cassette; wherein, the preset position is the position of the triaxial platform when the objective lens focus of the electronic imaging device is located on the surface of the upper glass slide of the sample cassette.
6. The microscope autofocusing method based on image sharpness assessment according to claim 5, characterized in that: Specifically, S4 involves reducing the operating speed of the Z-axis motor when the three-axis loading platform reaches the preset position, so that the three-axis loading platform continues to move from the preset position to the Z-axis positive photoelectric limit switch at a second speed in the Z-axis direction. The maximum distance that the three-axis loading platform can continue to move from the preset position toward the positive photoelectric limit switch of the Z-axis in the Z-axis direction at the second speed does not exceed the distance between the preset position and the positive photoelectric limit switch of the Z-axis. While the triaxial platform continues to move at a second speed in the Z-axis direction from the preset position toward the positive Z-axis photoelectric limit switch, the electronic camera in the electronic imaging device is controlled to take pictures of the sample placed in the observation area of the sample box in real time at a preset frame rate to obtain images.
7. The microscope autofocusing method based on image sharpness assessment according to claim 2, characterized in that: Specifically, S6 is... The current frame scaled image is segmented into one or more scaled sub-images; each scaled sub-image in the current frame scaled image is processed separately to obtain image detail information of each scaled sub-image in the current frame scaled image. The image detail information of the scaled sub-image of each region in the current frame scaled image is compared with the image detail information of the scaled sub-image of the same region in the previous frame scaled image to obtain the detail description value of the scaled sub-image of each region in the current frame scaled image.
8. The microscope autofocusing method based on image sharpness assessment according to claim 2, characterized in that: Specifically, S7 is... The detail description values of all scaled sub-images located in the same region in all scaled images from the first frame to the current frame are fitted to obtain the detail description fitting curve for each region. It is determined whether there is an extreme value in the detail description fitting curve of all regions, and the extreme value is a maximum value or a preset extreme value. If yes, the three-axis platform is controlled to stop moving in the Z-axis direction, and the shooting position of the three-axis platform in the image corresponding to the maximum value or the preset extreme value is the microscope focusing position. If no, the process returns to the S4 loop.
9. The microscope autofocusing method based on image sharpness assessment according to any one of claims 1 to 8, characterized in that: In step S6, the image detail information is image feature points, image feature line segments, or image high-frequency information.
10. A microscope autofocus system based on image sharpness assessment, characterized in that: Includes the following modules, The mechanical zeroing module is used to adjust the position of the triaxial platform on the microscope in the X, Y, and Z axes, so that the triaxial platform mechanically returns to zero. The horizontal position adjustment module is used to adjust the position of the triaxial platform in the X and Y axes so that the area to be observed in the sample cassette mounted on the triaxial platform is within the field of view of the electronic imaging device on the microscope. The first vertical drive control module is used to control the three-axis loading platform to move in the Z-axis direction toward the electronic mapping device to a preset position at a first speed; The second vertical drive control module is used to control the three-axis loading platform to move from the preset position toward the electronic mapping device in the Z-axis direction at a second speed less than the first speed. The image acquisition control module is used to control the electronic image acquisition device to take pictures of the sample placed in the observation area of the sample box in real time at a preset frame rate while the triaxial platform moves at the second speed, so as to acquire images. An image scaling processing module is used to scale the current frame image captured by the electronic image acquisition device to a preset pixel size to obtain a scaled image; The detail description value calculation module is used to perform image processing on the current frame scaled image to obtain the image detail information of the current frame scaled image, and compare it with the image detail information of the previous frame scaled image to obtain the detail description value of the current frame scaled image, which is used to characterize the change law of image detail information. The focusing module is used to fit the detail description values of all scaled images from the first frame to the current frame to obtain a detail description fitting curve. It determines whether an extreme value appears in the detail description fitting curve, and the extreme value is a maximum value or a preset extreme value. If so, it controls the three-axis platform to stop moving in the Z-axis direction, and the shooting position of the three-axis platform at the maximum value or the preset extreme value is the microscope focusing position. If not, it returns to the second vertical drive control module.
Citation Information
Patent Citations
Automatic focusing microscope
CN106772983A
Automatic microscope focusing method with settable focusing process model
CN110531484A
Automatic focusing method for automatic microscope
CN110865453A
Automatic focusing method of microscope
CN112099217A
Automatic focusing method and system based on TFT liquid crystal panel
CN111338051A
