Automatic leveling method and device for stage, equipment and storage medium
Through the automatic leveling method of the carrier platform, the initial Z-axis coordinates and focus information of the points to be measured are used to calculate the deviation parameters and operation focus coordinates, and the automatic leveling of the carrier platform is solved, which solves the problems of low manual adjustment efficiency and low accuracy of the carrier platform in the prior art, and improves the detection accuracy.
Patent Information
- Application Number
- CN202211170234.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-09-22
AI Technical Summary
The existing material-carrying platform has low efficiency and low accuracy, resulting in unclear imaging of the optical imaging detection device, affecting detection accuracy.
The automatic leveling method of the stage is adopted. By obtaining the initial Z-axis coordinates of the measured points distributed between the intervals on the object to be measured, the objective lens is controlled to focus each point to be measured, the deviation parameters and operation focus coordinates are calculated, and the stage is driven to move to the target coordinates to achieve automatic leveling.
Improve the leveling efficiency and accuracy of the stage, ensure the level of the load plane, and improve the detection accuracy.
Smart Images

Figure CN115453738B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of optical imaging detection, and in particular relates to a method and device for automatic leveling of a stage, equipment, and storage medium. Background Art
[0002] In the field of precision instruments, especially optical imaging detection devices (such as gene sequencers), the loading platform on which the object to be tested (such as a biochip) is placed needs to maintain a normal vertical relationship with the imaging device, or the loading platform is required to remain horizontal so that the imaging device can capture the object to be tested and form a clear image.
[0003] The depth of field of a precision microscope system is less than 5μm. In addition, due to production and assembly errors, as well as thermal expansion and contraction of materials, the perpendicularity of the loading platform and the incident light path of the microscope imaging device needs to be constantly checked during each experiment, even during the experiment itself.
[0004] However, existing loading platforms are usually adjusted manually, which is time-consuming and inefficient, resulting in low adjustment accuracy. As a result, the imaging device may not have clear images, affecting the subsequent detection accuracy of the gene sequencer. Summary of the invention
[0005] The object of the present invention is to provide a method and device, equipment and storage medium for automatic leveling of a stage, which can automatically level the stage, improve the leveling efficiency and adjustment accuracy, and thus improve the detection accuracy.
[0006] The first aspect of the present invention discloses an automatic leveling method for a stage, which is applied to a detection device, wherein the detection device comprises an objective lens and a stage, the stage carries an object to be detected, and at least two drive members are arranged below the stage and are spaced apart, and the drive members are used to drive the stage to move in the Z-axis direction; the method comprises:
[0007] Obtaining initial Z-axis coordinates of at least two points to be measured that are spaced apart on the object to be measured;
[0008] Controlling the objective lens to focus on each of the points to be measured, respectively, to obtain the first focal coordinates of the objective lens corresponding to each of the points to be measured;
[0009] Control any driving member to move a specified height along the Z-axis direction so that the plane where the stage is located is offset to the first plane;
[0010] Obtaining a first Z-axis coordinate of each of the points to be measured on the first plane;
[0011] Calculating the deviation parameter of each of the points to be measured according to the distance between the initial Z-axis coordinate and the first Z-axis coordinate of each of the points to be measured;
[0012] Calculating and obtaining the computational focus coordinates of the objective lens corresponding to each of the points to be measured according to the deviation parameter, the first focus coordinates and a preset leveling coefficient;
[0013] Control the driving member to drive the stage to move in the Z-axis direction until each of the points to be measured is located at the target coordinates; wherein the distance between the target coordinates of each of the points to be measured and the corresponding computational focus coordinates is the actual working distance, and the actual working distance is the distance between the initial Z-axis coordinates of each of the points to be measured and the corresponding first focus coordinates.
[0014] The second aspect of the present invention discloses an automatic leveling device for a stage, which is applied to a detection device, wherein the detection device comprises an objective lens and a stage, wherein the stage carries an object to be detected, and at least two drive members are arranged below the stage and are spaced apart from each other, wherein the drive members are used to drive the stage to move in the Z-axis direction; the automatic leveling device comprises:
[0015] A first positioning unit, used to obtain initial Z-axis coordinates of at least two points to be measured that are spaced apart on the object to be measured;
[0016] A first focusing unit, used for controlling the objective lens to focus on each of the points to be measured, to obtain a first focal point coordinate of the objective lens corresponding to each of the points to be measured;
[0017] A driving unit, used for controlling any driving member to move a specified height along the Z-axis direction, so that the plane where the stage is located is offset to the first plane;
[0018] A second positioning unit, used for obtaining a first Z-axis coordinate of each of the points to be measured on the first plane;
[0019] A deviation calculation unit, used for calculating the deviation parameter of each of the points to be measured according to the distance between the initial Z-axis coordinate and the first Z-axis coordinate of each of the points to be measured;
[0020] A focus calculation unit, configured to calculate the computational focus coordinates of the objective lens corresponding to each of the points to be measured according to the deviation parameter, the first focus coordinates and a preset leveling coefficient;
[0021] The driving unit is also used to control the driving member to drive the stage to move in the Z-axis direction until each of the points to be measured is located at the target coordinates; wherein the distance between the target coordinates of each of the points to be measured and the corresponding computational focus coordinates is the actual working distance, and the actual working distance is the distance between the initial Z-axis coordinate of each of the points to be measured and its corresponding first focus coordinates.
[0022] The third aspect of the present invention discloses an electronic device, comprising a memory storing executable program code and a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the automatic leveling method of the worktable disclosed in the first aspect.
[0023] A fourth aspect of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the automatic leveling method for a worktable disclosed in the first aspect.
[0024] The beneficial effects of the present invention are that the provided automatic leveling method and device, equipment, and storage medium for the stage obtain the initial Z-axis coordinates of at least two points to be measured that are spaced apart on the object to be measured; at the same time, the objective lens is controlled to focus on each point to be measured respectively, and the first focal coordinate of the objective lens corresponding to each point to be measured is obtained; the distance between the first focal coordinate and the initial Z-axis coordinate is determined as the actual working distance; then any driving member is controlled to move a specified height along the Z-axis direction to offset the plane where the stage is located, and its deviation parameter is determined based on the two Z-axis coordinates before and after the offset of each point to be measured; and the computational focal coordinate of the objective lens corresponding to each point to be measured is calculated according to the deviation parameter, the first focal coordinate, and a preset leveling coefficient; finally, according to the computational focal coordinate and the actual working distance, the position coordinate to which each point to be measured needs to be moved is determined, and the driving member is controlled to drive the stage to move in the Z-axis direction until each point to be measured is located at the target coordinate, so that the stage can be automatically leveled, and the loading plane of the stage can be quickly located on the horizontal plane, which can improve the leveling efficiency and adjustment accuracy, thereby improving the detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The accompanying drawings herein show specific examples of the technical solutions described in the present invention, and together with the specific implementation methods, constitute a part of the specification, and are used to explain the technical solutions, principles and effects of the present invention.
[0026] Unless otherwise specified or defined, the same reference numerals in different drawings represent the same or similar technical features, and the same or similar technical features may also be represented by different reference numerals.
[0027] Figure 1 It is a partial structural schematic diagram of an optical imaging detection device disclosed in an embodiment of the present invention;
[0028] Figure 2 is a schematic top view of the positional relationship of three driving components of the stage disclosed in the embodiment of the present invention;
[0029] Figure 3 It is a flow chart of a method for automatic leveling of a stage disclosed in an embodiment of the present invention;
[0030] Figure 4 is a schematic diagram of selecting points to be tested on a biochip disclosed in an embodiment of the present invention;
[0031] Figure 5 It is a structural schematic diagram of an automatic leveling device for a stage disclosed in an embodiment of the present invention;
[0032] Figure 6 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present invention.
[0033] Description of reference numerals:
[0034] 11. First driving member; 12. Second driving member; 13. Third driving member; 14. XY moving platform; 2. Stage; 3. Biochip; 31. First point to be tested; 33. Second point to be tested; 32. Third point to be tested; 34. Fourth point to be tested; 35. Flow tank; 36. Midpoint of width; 37. Line to be tested; 4. Microscope system; 501. First positioning unit; 502. First focusing unit; 503. Driving unit; 504. Second positioning unit; 505. Deviation calculation unit; 506. Focus calculation unit; 601. Memory; 602. Processor. DETAILED DESCRIPTION
[0035] Unless otherwise specified or defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art. In the case of combining the technical solution of the present invention with realistic scenarios, all technical and scientific terms used herein may also have meanings corresponding to the purpose of implementing the technical solution of the present invention. The "first, second..." used herein is only used to distinguish the names and does not represent a specific quantity or order. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0036] It should be noted that when a component is considered to be "fixed to" another component, it can be directly fixed to the other component or there can be a central component; when an component is considered to be "connected to" another component, it can be directly connected to the other component or there can be a central component at the same time; when an component is considered to be "installed on" another component, it can be directly installed on the other component or there can be a central component at the same time. When an component is considered to be "set on" another component, it can be directly set on the other component or there can be a central component at the same time.
[0037] Unless otherwise specified or defined, the “said” and “the” used in this document refer to the technical features or technical contents mentioned or described before the corresponding position, and the technical features or technical contents may be the same as or similar to the technical features or technical contents mentioned therein.
[0038] Undoubtedly, technical contents or technical features that are contrary to the purpose of the present invention or are obviously contradictory should be excluded.
[0039] In order to facilitate the understanding of the present invention, specific embodiments of the present invention will be described in more detail below with reference to the accompanying drawings.
[0040] like Figure 1 As shown, an embodiment of the present invention discloses an optical imaging detection device (hereinafter referred to as the detection device, such as a gene sequencer), including a driving component, a stage 2, a biochip 3 and a microscope system 4, wherein the driving component is arranged below the stage 2, the stage 2 is driven to move by the driving component, the stage 2 is used to carry an object to be detected, namely the biochip 3 (such as a gene sequencing chip), the microscope system 4 is spaced apart from the stage 2, and the microscope system 4 is located above the stage 2, and the microscope system 4 is used to focus and image each point to be detected in the biochip 3.
[0041] The microscope system 4 includes an objective lens, a light source, a motor and a camera. The motor drives the objective lens to move along the Z-axis direction to adjust the distance between the objective lens and the stage 2. The light source emits laser light to the biochip 3 placed on the stage 2. During the sequencing process, the base at the position of the test point in the biochip 3 will emit fluorescence under the excitation of the laser. The objective lens is set in front of the camera's shooting direction. The camera focuses on the test point in the biochip 3 through the objective lens and takes an image.
[0042] The driving assembly includes at least two driving members and an XY moving platform 14 that are spaced apart. The bottom ends of all driving members are fixed to the top of the XY moving platform 14, and the top ends of all driving members are movably connected to the bottom of the stage 2. The XY moving platform 14 is used to drive the stage 2 and all driving members to move in the X and Y axis (i.e. horizontal) directions, and the driving members are used to drive the stage 2 to move in the Z axis (i.e. height) direction. That is, when any one of the driving members is activated, the angle of the loading plane of the stage 2 can be driven to change.
[0043] Generally speaking, there are two driving members, and a support member can be set between the XY moving platform 14 and the stage 2. The support member only plays a supporting role and cannot drive the stage 2 to move in the Z-axis (i.e., height) direction. The support member and the two driving members are not colinear. In this way, according to the geometric principle that three points determine a plane, when any driving member pushes the stage 2 up and down, the loading plane of the stage 2 can swing around the supporting point of the support member, so as to achieve the effect of adjusting the angle of the loading plane, and finally achieve the purpose of adjusting the level of the loading plane, so as to facilitate the subsequent sequencing process. Preferably, the driving member can be specifically set as a motor, and the support member can be set as a universal wheel, so that the loading plane of the stage 2 can swing more flexibly around the supporting point of the support member.
[0044] In this embodiment, the number of driving members is set to three. When leveling the loading plane, any one of the driving members can be controlled to remain stationary. The stationary driving member acts as a supporting member, and the other two driving members can move. Figure 1 As shown, the three driving members are a first driving member 11, a second driving member 12 and a third driving member 13. Preferably, in this embodiment, as shown in FIG. Figure 2 As shown, the positions between the three driving members are distributed in the shape of an equilateral triangle. Alternatively, in some other possible embodiments, the positions between the three driving members may also be distributed in the shape of an unequal-sided triangle, for example, the positions between the three driving members are distributed in the shape of an isosceles triangle, in which case the driving members located at the vertices of the "isosceles triangle" may be controlled to remain stationary when leveling the loading plane.
[0045] like Figure 3 As shown, the embodiment of the present invention discloses a method for automatically leveling a stage, which is applied to Figure 1 The detection device shown in the figure generally carries an object to be detected on a stage during leveling; the automatic leveling method specifically includes the following steps S10 to S90:
[0046] S10, obtaining initial Z-axis coordinates of at least two points to be measured that are spaced apart on the object to be measured.
[0047] First, it is necessary to determine at least two test points that are spaced apart on the object to be tested. The object to be tested may be provided with multiple flow slots, each of which has multiple test points. Therefore, at least two test points can be determined in advance from multiple test points in multiple flow slots for automatic leveling of the stage. It should be noted that there should be intervals between the test points selected for leveling, and the distance between any two test points should not be less than the specified distance. The larger the distance between the test points, the more reference significance it has for the leveling of the stage.
[0048] Then, the initial Z-axis coordinate of each point to be measured is obtained, specifically by obtaining the Z-axis coordinate of each point to be measured on the initial plane where the stage is located as its initial Z-axis coordinate, wherein the initial plane refers to the plane where the stage is located before the stage is automatically leveled.
[0049] For example, if the object to be tested is a biochip 3, Figure 4 As shown, two flow slots 35 that are farthest apart in the biochip 3 can be selected, and the width midpoints 36 at both ends of the two flow slots 35 in the length direction can be located respectively. The line where the width midpoints 36 at both ends of each flow slot 35 are located is defined as a test line 37. Two test points are selected from each test line 37. The test points on the same test line 37 should be close to both ends of the flow slot 35, and the test points are defined as a first test point 31, a second test point 33, a third test point 32, and a fourth test point 34. Finally, the initial position of the front edge of the objective lens is taken as the Z-axis origin, and the initial Z-axis coordinates of the four test points are determined in sequence.
[0050] S20, controlling the objective lens to focus on each point to be measured, and obtaining the first focal point coordinates of the objective lens corresponding to each point to be measured.
[0051] Step S20 can also be performed on the initial plane where the stage is located. Therefore, there is no particular order between step S20 and step S10. In this embodiment, step S10 is performed first, and then step S20. However, in some other possible embodiments, step S20 can be performed first, and then step S10, or both can be performed at the same time, and the present invention does not make specific limitations on this.
[0052] Wherein, on the initial plane where the stage is located, a focusing process can be performed for each point to be measured to obtain the first focal coordinate of the objective lens corresponding to each point to be measured. The focusing process includes the following steps S201 to S208:
[0053] S201, controlling the objective lens to perform an initial focusing process on the point to be measured to determine the best shooting position;
[0054] The initial focusing process may include a coarse focusing step, a medium focusing step and a fine focusing step;
[0055] A. The coarse focusing step includes: determining a theoretical position of the objective lens that satisfies the theoretical working distance, starting from a first starting point located above the theoretical position, controlling the objective lens to move downward once at a first specified step length, capturing a sample image, and scoring the clarity of the sample image until the clarity score of the sample image is equal to the ideal score S for coarse focusing. A The proximity measurement value meets the preset conditions; according to the clarity scores of multiple sample images obtained during the coarse focusing process, the first position of the objective lens with the highest time score during the coarse focusing process is determined.
[0056] The distance between the first starting point and the theoretical position is the first distance, which can be X1 mm; the first specified step size can be Y1 micron; the proximity metric value refers to the degree of closeness between the clarity score of the sample image and the ideal score of coarse focus. When the proximity metric value meets the preset conditions, it means that the two are close enough. The clarity score S of the sample image can be used. 样 With coarse focus ideal score S A The ratio or difference between the two refers to the proximity metric value; if S A / S 样 To refer to the proximity metric value, a specified threshold value S can be determined A / 0.95, when S A / S 样 Less than or equal to S A / 0.95, it is determined that the proximity metric value meets the preset conditions; if S 样 / S A To refer to the proximity metric value, a specified threshold can be determined as 0.95 / S A , when S 样 / S A Greater than or equal to 0.95 / S A When , it is determined that the proximity metric value meets the preset condition; for example, assuming S A =1, S 样 =0.96, 0.96 is greater than 0.95, so the proximity metric value meets the preset condition.
[0057] B. The middle focusing step includes: starting from a second starting point located above the first position, controlling the objective lens to move downward once at a second specified step length, photographing a sample image, and scoring the clarity of the sample image until the clarity score of the sample image reaches S. 样 With medium focus ideal rating S B The proximity measurement value meets the preset conditions; according to the clarity scores of multiple sample images obtained during the mid-focusing process, the second position of the objective lens with the highest time score during the mid-focusing process is determined.
[0058] The second designated step may be Y2 microns, Y2<Y1, the distance between the second starting point and the first position is a second distance, and the second distance may be X2 microns, which is smaller than the first distance, so that medium focusing, which is finer than coarse focusing, can be performed.
[0059] C. The fine focusing step includes: starting from a third starting point located above the second position, controlling the objective lens to move downward once at a third specified step length, photographing a sample image, and scoring the clarity of the sample image until the clarity score of the sample image reaches S. 样 With fine focus ideal rating S CThe proximity measurement value meets the preset conditions; according to the clarity scores of multiple sample images obtained during the fine focusing process, the third position of the objective lens with the highest time sharing during the fine focusing process is determined; the third position is determined as the best shooting position; wherein the distance between the third starting point and the second position is the third distance.
[0060] The third designated step length may be Y3 micrometers, Y3<Y2, and the third distance may be X3 micrometers, which is less than the second distance. X1, X2, X3, Y1, Y2, and Y3 are values from 0 to 20, respectively.
[0061] Among them, S A <S B <S C , judge S 样 With medium focus ideal rating S B , Fine Focus Ideal Score C The method of determining whether the proximity metric value meets the preset conditions can refer to the above judgment S 样 With coarse focus ideal score S A The method of determining whether the proximity measurement value meets the preset conditions is not described here.
[0062] S202, controlling the objective lens to shoot the object to be measured at the best shooting position to obtain a target image;
[0063] S203, determining a plurality of fluorescent sample points in the target image;
[0064] Among them, the grayscale value of each pixel point of the target image can be calculated first; the pixel point whose grayscale value reaches the grayscale threshold is determined as the fluorescent pixel point; then it is determined whether the number of fluorescent pixel points in the nine-square grid domain centered on the fluorescent pixel point is at least two; if so, it is determined that all the fluorescent pixel points included in the nine-square grid domain are continuous and belong to the same fluorescent sample point; if not, the fluorescent pixel point is determined to be a boundary point of the fluorescent sample point; after traversing each fluorescent pixel point of the target image, multiple fluorescent sample points are obtained.
[0065] S204, dividing the multiple fluorescent sample points into clear sample points, fuzzy sample points and erroneous sample points;
[0066] Each fluorescent sample point can be projected onto the X-axis and the Y-axis to obtain projection data of each fluorescent sample point; then, based on the projection data, the number of fluorescent pixels on the side with the most fluorescent pixels is determined as the side length of the fluorescent sample point.
[0067] Furthermore, a clear threshold and a fuzzy threshold can be set to classify the fluorescent sample points, wherein the clear threshold refers to the pixel count threshold of the side length of the clear sample fluorescent point; the fuzzy threshold refers to the pixel count threshold of the side length of the fuzzy sample fluorescent point.
[0068] Based on this, if the side length of any fluorescent sample point is less than or equal to the clear threshold, the fluorescent sample point is judged to be a clear sample point; if the side length of any fluorescent sample point is greater than the clear threshold and less than or equal to the fuzzy threshold, the fluorescent sample point is judged to be a fuzzy sample point; if the side length of any fluorescent sample point is greater than the fuzzy threshold, the fluorescent sample point is judged to be an incorrect sample point.
[0069] S205, calculating a clarity score of the target image according to the number of clear sample points, blurred sample points and erroneous sample points and the gray value and side length of each fluorescent sample point;
[0070] Specifically, based on the clarity scoring model, the effective sample score can be calculated according to the number of clear sample points, the number of blurred sample points, and the number of erroneous sample points; the effective sample focus score can be calculated according to the number of clear sample points, the number of blurred sample points, the number of erroneous sample points, the side length of each fluorescent sample point, and the average grayscale value; the grayscale score can be calculated according to the maximum grayscale value and the average grayscale value of the fluorescent sample point; the effective sample score, the effective sample focus score, and the grayscale score are multiplied to calculate the clarity score of the target image. In this way, by classifying the fluorescent sample points and combining the number of clear sample points, the number of blurred sample points, and the number of erroneous sample points for clarity scoring, the accuracy of the clarity scoring can be improved.
[0071] S206, determining whether the clarity score of the target image is greater than or equal to the score threshold; if so, executing step S207; otherwise, executing step S208.
[0072] The clarity score of the target image is recorded as S, and the score threshold is S0. If S≥S0, the focusing is determined to be completed, and the best shooting position after focusing can be determined to be the first focal coordinate of the objective lens corresponding to the point to be measured; if S<S0, a refocusing process is required.
[0073] S207: If the clarity score of the target image is greater than or equal to the score threshold, determine the coordinates of the best shooting position as the first focal coordinates of the objective lens corresponding to the point to be measured.
[0074] S208: If the clarity score of the target image is less than the score threshold, the objective lens is controlled to perform a refocusing process to redetermine the best shooting position, and then the process goes to steps S202 to S206. This cycle is repeated until the clarity score of the target image is greater than or equal to the score threshold, and the focusing is determined to be complete; wherein the refocusing process includes all or part of the steps of the initial focusing process.
[0075] That is, the refocusing process may include only a fine focusing step, or may include a medium focusing step and a fine focusing step, or may include a coarse focusing process, a medium focusing step and a fine focusing step. Specifically, which focusing steps are included in the refocusing process may be determined based on the clarity score of the target image. Therefore, step S208 may include:
[0076] If the clarity score is less than the score threshold and greater than the fine focus ideal score, S C <S<S0, control the objective lens to move upward from the current position by a third distance (X3 microns), and perform the above-mentioned fine focusing step;
[0077] If the clarity score is less than or equal to the ideal score for fine focus and greater than the ideal score for medium focus, then S B <S≤S C , control the objective lens to move upward from the current position by a second distance (X2 microns), and perform a medium focusing step and a fine focusing step;
[0078] If the clarity score is less than or equal to the ideal score for mid-focus, that is, S≤S B , control the objective lens to move upward from the current position a first distance (X1 mm), and perform a coarse focusing process, a medium focusing step, and a fine focusing step.
[0079] The focusing method of implementing steps S201 to S208 is a combination of software and hardware, which mainly uses software algorithm recognition and supplemented by motor adjustment of the objective lens working distance. The method has low cost, accurate recognition, high flexibility, and can be applied to biochips of different thicknesses, dyes with different luminous efficiencies, and magnetic beads of different sizes. The recognition algorithm can even be designed according to the occasion, so it can be applied to different application occasions without changing the hardware. Since the best shooting position is obtained by comparing the image clarity score, factors such as interference from ambient light, differences in dyes, and changes in device performance caused by long-term operation of the instrument will not affect the final result, and the clearest focal plane can be found automatically and accurately, so real-time automatic focusing can be achieved, and clear images can be captured all the time, and bases can be more accurately identified, thereby improving the speed and accuracy of automatic focusing.
[0080] S30, determining the distance between the initial Z-axis coordinate of each point to be measured and its corresponding first focal point coordinate as the actual working distance.
[0081] In the embodiment of the present invention, the theoretical working distance refers to the working distance marked when describing the objective lens in the product manual; and the actual working distance refers to the distance between the front edge of the objective lens and the point to be measured when the objective lens is adjusted to focus. By focusing each point to be measured on the initial plane, the actual working distance corresponding to each point to be measured can be determined. At this time, the position of the objective lens is defined as the first focal coordinate F i, the first focal coordinate can also be the Z-axis coordinate of the front edge of the objective lens.
[0082] S40, controlling any driving member to move a specified height along the Z-axis direction, so that the plane where the stage is located is offset to the first plane.
[0083] Due to the spacing between the driving components, when any one of the driving components is controlled to move a specified height along the Z-axis direction, the plane where the stage is located will begin to shift from the initial plane. The shifted plane is defined as the first plane, which intersects with the initial plane and is not parallel to the initial plane.
[0084] For example, when the first driving member moves N1mm upward along the Z-axis direction and the second driving member and the third driving member are kept stationary, the plane where the stage is located is tilted upward relative to the initial plane to form a first plane. An angle can be formed between the first plane and the original initial plane, so that the biochip 3 is also tilted upward. Therefore, the stage 2 can be driven to move in the X, Y, and Z axis directions respectively through the cooperation of the XY moving platform 14 and the driving member to accurately adjust the position of the stage's loading plane, that is, to adjust the horizontality of the plane where the stage is located.
[0085] S50, obtaining a first Z-axis coordinate of each point to be measured on the first plane.
[0086] The Z-axis coordinates of the four points to be measured on the first plane are determined respectively and defined as first Z-axis coordinates.
[0087] S60 , calculating a deviation parameter of each point to be measured according to the distance between the initial Z-axis coordinate and the first Z-axis coordinate of each point to be measured.
[0088] Among them, the distance between the initial Z-axis coordinate and the first Z-axis coordinate of each point to be measured can be determined respectively, and the distance can be directly defined as the deviation parameter of each point to be measured, or the product / ratio of the distance and the specified coefficient can be defined as the deviation parameter of each point to be measured. Alternatively, in some other possible embodiments, the deviation parameter of the point to be measured can also be calculated according to other deformation formulas, and the present invention does not limit this, but the deviation parameter should be positively correlated with the distance between the initial Z-axis coordinate and the first Z-axis coordinate of the point to be measured, that is, the greater the distance between the two, the greater the deviation parameter, and vice versa.
[0089] Based on the above example, the distance between the initial Z-axis coordinate and the first Z-axis coordinate of the point to be measured is determined and directly defined as the deviation parameter d i .
[0090] S70, calculating and obtaining the computational focus coordinates of the objective lens corresponding to each point to be measured according to the deviation parameter, the first focus coordinates and the preset leveling coefficient.
[0091] If two points to be measured are selected in some embodiments, that is, at least two points to be measured include a first point to be measured and a second point to be measured; then the implementation method of step S70 includes: calculating the operational focus coordinates of the objective lens corresponding to the first point to be measured according to the deviation parameters of the first point to be measured and the second point to be measured, the first focus coordinates corresponding to the first point to be measured and the preset leveling coefficient; and calculating the operational focus coordinates of the objective lens corresponding to the second point to be measured according to the deviation parameters of the first point to be measured and the second point to be measured, the first focus coordinates corresponding to the second point to be measured and the preset leveling coefficient.
[0092] Alternatively, in some embodiments, four test points are selected, that is, at least two test points also include a third test point and a fourth test point; then the implementation method of step S70 also includes: calculating the operational focus coordinates of the objective lens corresponding to the third test point according to the deviation parameters of the third test point and the fourth test point, the first focus coordinates corresponding to the third test point, and the preset leveling coefficient; and calculating the operational focus coordinates of the objective lens corresponding to the fourth test point according to the deviation parameters of the third test point and the fourth test point, the first focus coordinates corresponding to the fourth test point, and the preset leveling coefficient.
[0093] It can be understood that if the at least two test points include four test points, the four test points can be divided into two groups, each group including two test points; then the implementation of step S70 specifically includes:
[0094] The focus coordinates of the objective lens corresponding to each point to be measured are calculated by using the focus coordinate calculation model, such as the following formula (1):
[0095] F' i =F i -d i±2 ×p1-(d i +d i±2 )×p2 (1)
[0096] Among them, p1 and p2 are preset leveling coefficients, and their values are empirical values obtained by training the focus coordinate calculation model multiple times. i Represents the first focal coordinate corresponding to the i-th point to be measured, F' i represents the coordinates of the computation focus corresponding to the i-th point to be measured, d i Represents the deviation coefficient of the i-th test point, d i±2 Represents the deviation coefficient of another test point in the same group as the i-th test point.
[0097] It can be understood that the value range of i is [1, 4]. From formula (1), it can be seen that if the deviation coefficients of the four test points are d1, d2, d3, and d4, the two test points with deviation coefficients d1 and d3 are a group, and the two test points with deviation coefficients d2 and d4 are a group.
[0098] That is, based on the above example, the deviation coefficients of the first to-be-measured point 31 , the second to-be-measured point 33 , the third to-be-measured point 32 and the fourth to-be-measured point 34 correspond to d1 , d3 , d2 and d4 , respectively.
[0099] Correspondingly, the first focal point coordinates corresponding to the first to-be-measured point 31 , the second to-be-measured point 33 , the third to-be-measured point 32 and the fourth to-be-measured point 34 are F1 , F3 , F2 and F4 , respectively.
[0100] Correspondingly, the calculation focus coordinates corresponding to the first test point 31, the second test point 33, the third test point 32 and the fourth test point 34 are F'1, F'3, F'2 and F'4 respectively. From the above formula (1), we can get:
[0101] The calculation focus coordinates of the first point to be measured 31 are F'1=F1-d3×p1-(d1+d3)×p2;
[0102] The calculation focus coordinates of the second point to be measured 33 are F'3=F3-d1×p1-(d3+d1)×p2;
[0103] The calculation focus coordinates of the third point to be measured 32 are F'2=F2-d4×p1-(d2+d4)×p2;
[0104] The calculation focus coordinate F′4 of the fourth point to be measured 34 is F4−d2×p1−(d4+d2)×p2.
[0105] S80, calculating the target coordinates of each point to be measured according to the calculation focus coordinates and the actual working distance corresponding to each point to be measured.
[0106] After determining the computational focus coordinates of the objective lens corresponding to each point to be measured, the target coordinates of each point to be measured can be further determined, and the target coordinates are regarded as the position coordinates to which each point to be measured needs to be moved due to leveling the stage. The target coordinates of each point to be measured can be obtained by subtracting the corresponding actual working distance from the computational focus coordinates corresponding to each point to be measured.
[0107] S90, controlling the driving component to drive the stage to move in the Z-axis direction until each point to be measured is located at the target coordinate.
[0108] After step S90 is completed, the plane where the stage is located is defined as the second plane, and the target coordinates of each point to be measured on the second plane are the actual Z-axis coordinates.
[0109] Further preferably, after executing step S90 to control the driving member to drive the stage to move in the Z-axis direction until each point to be measured is located at the target coordinate, the stage leveling effect can also be verified, specifically by executing the following steps S91 to S94:
[0110] S91, controlling the objective lens to move to the calculation focus coordinates corresponding to each point to be measured in sequence, refocusing each point to be measured, and obtaining the second focus coordinates of the objective lens corresponding to each point to be measured.
[0111] The focusing process is performed again on each point to be measured on the second plane to determine each second focal point coordinate of the objective lens.
[0112] S92, determine whether the difference between the second focal coordinates and the calculated focal coordinates corresponding to all the points to be measured does not exceed the preset tolerance. If so, execute step S93; otherwise, execute step S94.
[0113] Among them, the preset tolerance can be set to 4μm. If the difference between the second focus coordinates corresponding to all the measured points and the calculated focus coordinates is ≤4μm, the error is considered to be within the acceptable range; otherwise, if the difference between the second focus coordinates corresponding to any measured point and the calculated focus coordinates is greater than 4μm, the automatic leveling is considered to have failed.
[0114] S93: Determine that the automatic leveling of the stage is successful, and end this process.
[0115] S94: Determine that the automatic leveling of the stage fails, and go to steps S10 to S91. Re-execute the automatic leveling steps until the difference between the second focal coordinates corresponding to each point to be measured and the calculated focal coordinates does not exceed the preset tolerance.
[0116] In summary, by implementing the embodiments of the present invention, the actual working distance of each point to be measured and the first focal coordinate of the corresponding objective lens are determined through automatic focusing, and the deviation parameter of each point to be measured is determined according to the two Z-axis coordinates before and after the offset. Then, the computational focal coordinates of the objective lens corresponding to each point to be measured are calculated according to the deviation parameter, the first focal coordinates and the preset leveling coefficient. Finally, according to the computational focal coordinates and the actual working distance, the position coordinates to which each point to be measured needs to be moved are determined. In this way, the stage can be automatically leveled, and the loading plane of the stage can be quickly located on a horizontal plane, which can improve the leveling efficiency and adjustment accuracy, thereby improving the detection accuracy.
[0117] In addition, by using image clarity score comparison to obtain the best shooting position, the automatic focusing method ensures that factors such as interference from ambient light, differences in dyes, and changes in device performance caused by long-term operation of the instrument will not affect the final result. The clearest focal plane can be found automatically and accurately, thereby achieving real-time autofocus and ensuring that clear images are always captured, identifying bases more accurately, and thus improving the speed and accuracy of autofocus.
[0118] like Figure 5As shown, an embodiment of the present invention discloses an automatic leveling device for a stage, which is applied to a detection device. The detection device includes an objective lens and a stage. The stage carries an object to be detected. At least two drive members are arranged below the stage and are spaced apart. The drive members are used to drive the stage to move in the Z-axis direction. The automatic leveling device includes a first positioning unit 501, a first focusing unit 502, a drive unit 503, a second positioning unit 504, a deviation calculation unit 505, and a focus calculation unit 506, wherein:
[0119] The first positioning unit 501 is used to obtain the initial Z-axis coordinates of at least two points to be measured that are spaced apart on the object to be measured;
[0120] The first focusing unit 502 is used to control the objective lens to focus on each point to be measured, and obtain the first focal point coordinate of the objective lens corresponding to each point to be measured;
[0121] A driving unit 503, used for controlling any driving member to move a specified height along the Z-axis direction, so that the plane where the stage is located is offset to the first plane;
[0122] The second positioning unit 504 is used to obtain the first Z-axis coordinate of each point to be measured on the first plane;
[0123] The deviation calculation unit 505 is used to calculate the deviation parameter of each point to be measured according to the distance between the initial Z-axis coordinate and the first Z-axis coordinate of each point to be measured;
[0124] A focus calculation unit 506, configured to calculate the computational focus coordinates of the objective lens corresponding to each point to be measured according to the deviation parameter, the first focus coordinates and the preset leveling coefficient;
[0125] The above-mentioned driving unit 503 is also used to control the driving member to drive the stage to move in the Z-axis direction until each point to be measured is located at the target coordinate; wherein, the distance between the target coordinate of each point to be measured and the corresponding calculation focus coordinate is the actual working distance, and the actual working distance is the distance between the initial Z-axis coordinate of each point to be measured and its corresponding first focus coordinate.
[0126] In some embodiments, the at least two points to be measured include a first point to be measured and a second point to be measured; the focus calculation unit 506 may include the following sub-units not shown in the figure:
[0127] A first calculation subunit is used to calculate the computational focus coordinates of the objective lens corresponding to the first point to be measured according to the deviation parameters of the first point to be measured and the second point to be measured, the first focus coordinates corresponding to the first point to be measured, and a preset leveling coefficient;
[0128] The second calculation subunit is used to calculate the computational focus coordinates of the objective lens corresponding to the second measured point according to the deviation parameters of the first measured point and the second measured point, the first focus coordinates corresponding to the second measured point and the preset leveling coefficient.
[0129] In some embodiments, the at least two points to be measured further include a third point to be measured and a fourth point to be measured; the focus calculation unit 506 may further include the following sub-units not shown in the figure:
[0130] A third calculation subunit is used to calculate the computational focus coordinates of the objective lens corresponding to the third point to be measured according to the deviation parameters of the third point to be measured and the fourth point to be measured, the first focus coordinates corresponding to the third point to be measured, and a preset leveling coefficient;
[0131] The fourth calculation subunit is used to calculate the computational focus coordinates of the objective lens corresponding to the fourth point to be measured according to the deviation parameters of the third point to be measured and the fourth point to be measured, the first focus coordinates corresponding to the fourth point to be measured and the preset leveling coefficient.
[0132] As an optional implementation, Figure 5 The automatic leveling device for the stage shown may further include the following second focusing unit 507 and determination unit 508:
[0133] The second focusing unit 507 is used to control the objective lens to move to the calculation focus coordinates corresponding to each point to be measured in sequence after the driving unit 503 controls the driving member to drive the stage to move in the Z-axis direction until each point to be measured is located at the target coordinate, and to focus each point to be measured again to obtain the second focus coordinates of the objective lens corresponding to each point to be measured;
[0134] The determination unit 508 is used to determine that the automatic leveling of the stage is successful when the differences between the second focus coordinates and the calculation focus coordinates corresponding to all the points to be measured do not exceed the preset tolerance; and when the difference between the second focus coordinates and the calculation focus coordinates corresponding to any point to be measured exceeds the preset tolerance, trigger the first positioning unit 501 to execute the operation of obtaining the initial Z-axis coordinates of at least two points to be measured that are spaced apart on the object to be measured, until the difference between the second focus coordinates and the calculation focus coordinates corresponding to each point to be measured does not exceed the preset tolerance.
[0135] like Figure 6 As shown, an embodiment of the present invention discloses an electronic device, including a memory 601 storing executable program code and a processor 602 coupled to the memory 601; wherein the processor 602 calls the executable program code stored in the memory 601 to execute the automatic leveling method of the worktable described in the above embodiments.
[0136] An embodiment of the present invention further discloses a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the automatic leveling method for a stage described in the above embodiments.
[0137] The purpose of the above embodiments is to exemplarily reproduce and deduce the technical solution of the present invention, and to fully describe the technical solution, purpose and effect of the present invention. Its purpose is to make the public understand the disclosed content of the present invention more thoroughly and comprehensively, and it does not limit the scope of protection of the present invention.
[0138] The above embodiments are not exhaustive enumerations of the present invention, and there may be multiple other implementations not listed. Any replacement and improvement made without violating the concept of the present invention shall fall within the protection scope of the present invention.
Claims
1. The method for automatically leveling a stage is characterized in that: Applied to a detection device, the detection device comprises an objective lens and a stage, the stage carries an object to be detected, at least two drive members are arranged below the stage and are spaced apart, the drive members are used to drive the stage to move in the Z-axis direction; the method comprises: Obtaining initial Z-axis coordinates of at least two points to be measured that are spaced apart on the object to be measured; Controlling the objective lens to focus on each of the points to be measured, respectively, to obtain the first focal coordinates of the objective lens corresponding to each of the points to be measured; Control any driving member to move a specified height along the Z-axis direction so that the plane where the stage is located is offset to the first plane; Obtaining a first Z-axis coordinate of each of the points to be measured on the first plane; Calculating the deviation parameter of each of the points to be measured according to the distance between the initial Z-axis coordinate and the first Z-axis coordinate of each of the points to be measured; Calculating and obtaining the computational focus coordinates of the objective lens corresponding to each of the points to be measured according to the deviation parameter, the first focus coordinates and a preset leveling coefficient; Control the driving member to drive the stage to move in the Z-axis direction until each of the points to be measured is located at the target coordinates; wherein the distance between the target coordinates of each of the points to be measured and the corresponding computational focus coordinates is the actual working distance, and the actual working distance is the distance between the initial Z-axis coordinates of each of the points to be measured and the corresponding first focus coordinates.
2. The automatic leveling method for a stage according to claim 1, characterized in that: The at least two points to be measured include a first point to be measured and a second point to be measured; Calculating and obtaining the computational focus coordinates of the objective lens corresponding to each of the points to be measured according to the deviation parameter, the first focus coordinates, and a preset leveling coefficient, includes: Calculate and obtain the computational focus coordinates of the objective lens corresponding to the first point to be measured according to the deviation parameters of the first point to be measured and the second point to be measured, the first focus coordinates corresponding to the first point to be measured, and the preset leveling coefficient; The computational focus coordinates of the objective lens corresponding to the second point to be measured are obtained by calculation according to the deviation parameters of the first point to be measured, the second point to be measured, the first focus coordinates corresponding to the second point to be measured, and a preset leveling coefficient.
3. The automatic leveling method for a stage according to claim 2, characterized in that: The at least two points to be tested further include a third point to be tested and a fourth point to be tested; Calculating the computational focus coordinates of the objective lens corresponding to each of the points to be measured according to the deviation parameter, the first focus coordinates and the preset leveling coefficient, further comprising: Calculate and obtain the computational focus coordinates of the objective lens corresponding to the third point to be measured according to the deviation parameters of the third point to be measured and the fourth point to be measured, the first focus coordinates corresponding to the third point to be measured, and the preset leveling coefficient; The computational focus coordinates of the objective lens corresponding to the fourth point to be measured are obtained by calculation according to the deviation parameters of the third point to be measured, the fourth point to be measured, the first focus coordinates corresponding to the fourth point to be measured, and the preset leveling coefficient.
4. The automatic leveling method for a stage according to claim 3, characterized in that: At least two of the points to be tested include four points to be tested, and the four points to be tested are divided into two groups; Calculating and obtaining the computational focus coordinates of the objective lens corresponding to each of the points to be measured according to the deviation parameter, the first focus coordinates, and a preset leveling coefficient, includes: The computational focus coordinates of the objective lens corresponding to each of the points to be measured are calculated using the following formula: F′ i =F i -d i±2 ×p1-(d i +d i±2 )×p2 Among them, p1 and p2 are preset leveling coefficients, F i Represents the first focal coordinate corresponding to the i-th point to be measured, F′ i represents the coordinates of the computational focus corresponding to the i-th point to be measured, d i Represents the deviation coefficient of the i-th test point, d i±2 Represents the deviation coefficient of another test point in the same group as the i-th test point.
5. The automatic leveling method for a stage according to any one of claims 1 to 4, characterized in that: After controlling the driving member to drive the stage to move in the Z-axis direction until each of the points to be measured is located at the target coordinates, the method further includes: Controlling the objective lens to move to the calculation focus coordinates corresponding to each of the points to be measured in sequence, refocusing each of the points to be measured, and obtaining the second focus coordinates of the objective lens corresponding to each of the points to be measured; If the difference between the second focal coordinates corresponding to any point to be measured and the calculated focal coordinates exceeds the preset tolerance, the step of obtaining the initial Z-axis coordinates of at least two points to be measured that are spaced apart on the object to be measured is performed until the difference between the second focal coordinates corresponding to each point to be measured and the calculated focal coordinates does not exceed the preset tolerance.
6. The automatic leveling method for a stage according to claim 5, characterized in that: Controlling the objective lens to focus on each of the points to be measured, respectively, to obtain the first focal coordinates of the objective lens corresponding to each of the points to be measured, comprising: Controlling the objective lens to perform an initial focusing process on each of the points to be measured to determine the best shooting position; Controlling the objective lens to photograph the object to be measured at the optimal photographing position to obtain a target image; determining a plurality of fluorescent sample points in the target image; Dividing the plurality of fluorescent sample points into clear sample points, blurry sample points and erroneous sample points; Calculate the clarity score of the target image according to the number of the clear sample points, the blurred sample points and the erroneous sample points and the grayscale value and the side length of each of the fluorescent sample points; If the clarity score of the target image is greater than or equal to the score threshold, the coordinates of the best shooting position are determined to be the first focal coordinates of the objective lens corresponding to the point to be measured.
7. The automatic leveling method for a stage according to claim 6, characterized in that: Also includes: If the clarity score of the target image is less than the score threshold, the objective lens is controlled to perform a refocusing process on each of the points to be tested to redetermine the optimal shooting position, and the step of controlling the objective lens to shoot the object to be tested at the optimal shooting position to obtain the target image is repeated until the clarity score of the target image is greater than or equal to the score threshold; wherein the refocusing process includes all or part of the steps of the initial focusing process.
8. The automatic leveling device for the stage is characterized by: Applied to a detection device, the detection device comprises an objective lens and a stage, the stage carries an object to be detected, at least two drive members are arranged below the stage and are spaced apart, the drive members are used to drive the stage to move in the Z-axis direction; The automatic leveling device comprises: A first positioning unit, used to obtain initial Z-axis coordinates of at least two points to be measured that are spaced apart on the object to be measured; A first focusing unit, used for controlling the objective lens to focus on each of the points to be measured, to obtain a first focal point coordinate of the objective lens corresponding to each of the points to be measured; A driving unit, used for controlling any driving member to move a specified height along the Z-axis direction, so that the plane where the stage is located is offset to the first plane; A second positioning unit, used for obtaining a first Z-axis coordinate of each of the points to be measured on the first plane; A deviation calculation unit, used for calculating the deviation parameter of each of the points to be measured according to the distance between the initial Z-axis coordinate and the first Z-axis coordinate of each of the points to be measured; A focus calculation unit, configured to calculate the computational focus coordinates of the objective lens corresponding to each of the points to be measured according to the deviation parameter, the first focus coordinates and a preset leveling coefficient; The driving unit is also used to control the driving member to drive the stage to move in the Z-axis direction until each of the points to be measured is located at the target coordinates; wherein the distance between the target coordinates of each of the points to be measured and the corresponding computational focus coordinates is the actual working distance, and the actual working distance is the distance between the initial Z-axis coordinate of each of the points to be measured and its corresponding first focus coordinates.
9. The automatic leveling device for a stage according to claim 8, characterized in that: At least two of the points to be measured include a first point to be measured and a second point to be measured; the focus calculation unit includes: A first calculation subunit is used to calculate and obtain the computational focus coordinates of the objective lens corresponding to the first point to be measured according to the deviation parameters of the first point to be measured and the second point to be measured, the first focus coordinates corresponding to the first point to be measured, and a preset leveling coefficient; The second calculation subunit is used to calculate the computational focus coordinates of the objective lens corresponding to the second point to be measured according to the deviation parameters of the first point to be measured, the second point to be measured, the first focus coordinates corresponding to the second point to be measured, and a preset leveling coefficient.
10. The automatic leveling device for a stage according to claim 8 or 9, characterized in that: Also includes: A second focusing unit is used for controlling the objective lens to move to the calculation focus coordinates corresponding to each of the points to be measured in sequence after the driving unit controls the driving member to drive the stage to move in the Z-axis direction until each of the points to be measured is located at the target coordinates, and focusing each of the points to be measured again to obtain the second focus coordinates of the objective lens corresponding to each of the points to be measured; A determination unit is used to trigger the first positioning unit to execute the operation of obtaining the initial Z-axis coordinates of at least two test points spaced apart on the test object when the difference between the second focus coordinates corresponding to any test point and the calculated focus coordinates exceeds a preset tolerance, until the difference between the second focus coordinates corresponding to each of the test points and the calculated focus coordinates does not exceed the preset tolerance.
11. An electronic device, characterized in that It comprises a memory storing executable program code and a processor coupled to the memory; the processor calls the executable program code stored in the memory to execute the automatic leveling method for a stage according to any one of claims 1 to 7.
12. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program enables a computer to execute the automatic leveling method for a stage according to any one of claims 1 to 7.
Citation Information
Patent Citations
Microscope
CN101416093A
Device and method for detecting flatness
CN104236487A