Automatic focusing method for electron microscope
Through the automatic focus method of electron microscope, the clarity value and rate of change are used to make coarse and fine adjustments, which solves the problem of long focus time in routine blood microscopy, realizes a fast and automatic focusing process, and improves observation efficiency.
Patent Information
- Application Number
- CN202011396905.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-03
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2040-12-03
AI Technical Summary
In the prior art, the focusing process of routine blood microscopy takes a long time, and the operator may not be able to find the optimal focal length, which affects the observation efficiency.
Using the autofocus method of electron microscope, through the two steps of coarse adjustment and fine adjustment, the sharpness value and sharpness change rate of the image are used to perform automatic focus. The rough adjustment determines the approximate range of the focus, and the fine adjustment hovers around the point of this position to achieve fast focus. .
A fast and automatic focusing process is achieved, observation efficiency is improved, human intervention is reduced, and focus efficiency is significantly improved.
Smart Images

Figure CN112525909B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of cell microscopy, and in particular to an automatic focusing method of an electron microscope. Background Art
[0002] Microscopic examination is the abbreviation of microscopic examination, which is to take samples of the specimens to be examined, prepare slides, observe, analyze and judge under a microscope. Human excrement, secretions, shed cells or human tissues, animal tissues, and even plant cells can be used as objects for microscopic examination.
[0003] When performing routine blood microscopy, the most important factor affecting observation efficiency is focus. Since the image can only be seen within a short distance near the focal length of blood cells, and the focal lengths of different blood cells are different, the existing focusing method requires manual prediction of the focal length, and then repeated adjustments near the predicted value to find the best focal length. If the operator is inexperienced, the focal length may not be found, which greatly affects the observation efficiency.
[0004] In view of this, it is necessary to propose a new technical solution to solve the above technical problems. Summary of the invention
[0005] The object of the present invention is to provide an automatic focusing method for an electron microscope, so as to solve the problem of a long focusing process in the above-mentioned prior art and improve observation efficiency.
[0006] To achieve the above purpose, the present invention adopts the following technical means:
[0007] An automatic focusing method for an electron microscope comprises the following steps:
[0008] Coarse adjustment: Move the lens along the Z axis in the first step, capture the image at each position and calculate the corresponding clarity value and clarity change rate of the image; the calculation formula for the clarity value is D(F)=∑x∑y|f(x+2,y)-f(x,y)| 2 , the calculation formula of the clarity change rate is Bn=(Dn+1-Dn) / Dn+1;
[0009] Set the first threshold value Y1, when Bn>Y1, keep the direction unchanged and continue the coarse adjustment;
[0010] When Bn≤Y1 and Dn+1>Dn, keep the direction unchanged and enter fine adjustment; when Bn≤Y1 and Dn+1<Dn, enter fine adjustment in the opposite direction;
[0011] Fine adjustment: Move the lens along the Z axis by the second number of steps, take images at each position point and calculate the clarity value and clarity change rate corresponding to the image; the calculation formula for the clarity value and clarity change rate is the same as that for coarse adjustment;
[0012] Set the second threshold value Y2. When Bn>Y2, keep the direction unchanged and continue fine-tuning.
[0013] When Bn≤Y2, fine adjustment is terminated;
[0014] Wherein, the first step number is greater than the second step number.
[0015] As an improved technical solution, the lens is driven by a stepping motor;
[0016] The number of steps taken by the stepping motor each time includes any two of 5 steps, 15 steps, 35 steps, 125 steps or 200 steps.
[0017] As an improved technical solution, during coarse adjustment, the first step number is selected as 125 steps each time or 200 steps each time; during fine adjustment, the second step number is selected as 5 steps each time or 15 steps each time.
[0018] As an improved technical solution, the first threshold value Y1 = 0.15, and the second threshold value Y2 = 0.05.
[0019] As an improved technical solution, it also includes displaying the clarity value and / or clarity change rate corresponding to each position point in a visual manner.
[0020] As an improved technical solution, the visualization method includes a chart, a curve graph or a discrete graph.
[0021] Compared with the prior art, the present invention brings the following technical effects:
[0022] The automatic focusing method of the electron microscope includes two major steps, namely, coarse adjustment and fine adjustment. The variables selected in the adjustment step are the clarity value and the clarity change rate of the image. The variable features are clear and easy to calculate. The coarse adjustment step can speed up the adjustment speed and quickly determine the approximate range of the focus. After determining the approximate range, the fine adjustment step is used to hover around the position point, thereby quickly achieving the focusing purpose. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A flow chart of an automatic focusing method for an electron microscope of the present invention is shown;
[0025] Figure 2A curve diagram showing the change of the clarity value with the position point during the focusing process of the present invention is shown (wherein the abscissa is the distance of the lens on the Z axis and the ordinate is the clarity value of the shooting position point). DETAILED DESCRIPTION
[0026] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0027] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.
[0028] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0029] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0030] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0031] Example
[0032] A preferred embodiment of the present invention provides an electron microscope, which includes a frame, a stage, a lens and a control system.
[0033] The sample to be tested is placed on the stage, and the lens is controlled by a stepper motor to move up and down in the Z-axis direction. The control system is electrically connected to the stepper motor and is used to set the parameters of the stepper motor and control the operation of the stepper motor. The control system is connected to the lens, and during the focusing process, the lens captures the image of the sample to be tested in real time, transmits the image to the control system, and then displays it on the display screen of the control system.
[0034] See also Figure 1 In one embodiment, the automatic focusing method of an electron microscope comprises the following steps:
[0035] S1. Coarse adjustment: Move the lens along the Z axis by the first step, capture the image at each position and calculate the corresponding clarity value and clarity change rate of the image; the calculation formula of the clarity value is D(F)=∑x∑y|f(x+2,y)-f(x,y)| 2 The calculation formula for the clarity change rate is Bn=(Dn+1-Dn) / Dn+1.
[0036] Among them, f(x, y) is the grayscale value of the image pixel x, y, and the specific calculation method is: R*0.299+G*0.587+B*0.114, R, G, B are the hexadecimal indexes of the red, green and blue of the pixel respectively; D(F) is the Brenner gradient algorithm in the no-reference image clarity algorithm, which is a prior art and will not be repeated here.
[0037] Set the first threshold value Y1, when Bn>Y1, keep the direction unchanged and continue the coarse adjustment;
[0038] When Bn≤Y1 and Dn+1>Dn, keep the direction unchanged and enter fine adjustment; when Bn≤Y1 and Dn+1<Dn, enter fine adjustment in the opposite direction.
[0039] There are two ways to move the lens along the Z-axis direction, taking the sample to be tested as a reference, one is to move from far to near, and the other is to move from near to far.
[0040] In one embodiment, the operation from far to near is as follows: first move the lens to a position far away from the sample to be tested, and then move the lens slowly closer to the sample to be tested.
[0041] In another embodiment, the operation from near to far is as follows: first move the lens to a position closest to the sample to be tested, and then move the lens slowly away from the sample to be tested.
[0042] Both of the above two moving modes can achieve the purpose of the present invention.
[0043] The first threshold value Y1 is obtained by:
[0044] Take multiple samples with known focus, move the lens to the focal distance to take a picture, move the lens by the first step, calculate the Bn value of each sample, and take the average of the Bn values of multiple samples. The average value is Y1.
[0045] For example, in this embodiment, Y1=0.15.
[0046] See also Figure 2 , taking the moving method from far to near as an example, during the coarse adjustment process, the first step is set to 125 steps, that is, the number of steps taken by the stepper motor each time is 125 steps:
[0047] 1. At the beginning, the lens is far away from the focus. As the lens approaches the sample, the clarity value shows an increasing trend. At this time, Bn>Y1, and it continues to move forward. It should be noted that the clarity value of the image corresponding to the focus position is the highest. As the lens approaches the focus from the far end, the clarity value shows an increasing trend; as the lens moves away from the focus, the clarity value shows a decreasing trend.
[0048] 2. When Bn is less than or equal to Y1 for the first time, at this time, if Dn+1>Dn, keep the direction unchanged and enter fine adjustment; if Dn+1<Dn, enter fine adjustment in the opposite direction.
[0049] For example, in one embodiment, Bn=0.12, and Dn+1>Dn, the direction is kept unchanged and fine adjustment is performed.
[0050] For example, in another embodiment, Bn=0.12, and Dn+1<Dn, then fine adjustment is performed in the reverse direction.
[0051] S2, fine adjustment: move the lens along the Z axis by the second number of steps, take an image at each position point and calculate the clarity value and clarity change rate corresponding to the image; the calculation formula of the clarity value and clarity change rate is the same as that of the coarse adjustment;
[0052] Set the second threshold value Y2. When Bn>Y2, keep the direction unchanged and continue fine-tuning.
[0053] When Bn≤Y2, fine adjustment is terminated;
[0054] Wherein, the first step number is greater than the second step number.
[0055] Specifically in this embodiment, the second number of steps is 15 steps, that is, the stepper motor takes 15 steps each time.
[0056] The second threshold is obtained in the following manner: take multiple samples with known focus, move the lens to the focus distance to take a picture, move the lens by a second number of steps, calculate the Bn value of each sample, and take the average value of the Bn values of multiple samples, which is Y2.
[0057] For example, in this embodiment, the second threshold = 0.05.
[0058] 1. During the fine adjustment process, if the lens position does not pass (or exceed) the focal position, then Bn>Y2, and the direction remains unchanged and the fine adjustment continues;
[0059] 2. Once Bn≤Y2, it means that the lens is at or has just passed the focus position. At this time, fine adjustment is terminated and this position can be used as the focus position.
[0060] It should be noted that the first step number and the second step number in the above embodiment are 125 steps and 15 steps respectively. According to the purpose of the present invention, the number of steps taken by the stepper motor each time is not limited to the situation in the above embodiment, for example, it can also include any two of 5 steps, 15 steps, 35 steps, 125 steps or 200 steps.
[0061] In order to highlight the difference between coarse adjustment and fine adjustment, the first step number is selected as 5 steps or 15 steps, and the second step number is selected as 125 or 200 steps.
[0062] Of course, in other embodiments, the number of steps taken by the stepper motor each time is not limited to the above 5 steps, 15 steps, 35 steps, 125 steps or 200 steps.
[0063] The electron microscope of this embodiment, in addition to calculating the clarity value and clarity change rate of each position point according to a preset program, also includes visually displaying the clarity value and / or clarity change rate corresponding to each position point; the visualization method includes a chart, a curve chart or a discrete chart. This setting allows the operator to observe and control the focusing process more concretely, thereby improving the focusing efficiency.
[0064] In addition, the values of the first threshold value Y1 and the second threshold value Y2 are related to specific cell samples. For example, the present embodiment corresponds to red blood cells, while in other embodiments, such as platelets, white blood cells or other tiny objects, the corresponding first threshold value Y1 and the second threshold value Y2 will become another set of values.
[0065] In summary, the present invention brings the following beneficial effects:
[0066] The automatic focusing method of the electron microscope includes two steps: coarse adjustment and fine adjustment. The variables selected in the adjustment step are the clarity value and the clarity change rate of the image. The variable features are clear and easy to calculate. The coarse adjustment step can speed up the adjustment speed and quickly determine the approximate range of the focus. After determining the approximate range, the fine adjustment step is used to hover around the position point, so as to quickly achieve the focusing purpose. The focusing method can realize fully automatic adjustment without human intervention, thereby improving the focusing efficiency of the electron microscope.
[0067] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0068] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. An automatic focusing method for an electron microscope, characterized in that: The following steps are involved: Coarse adjustment: Move the lens along the Z axis by the first step, take an image at each position and calculate the corresponding clarity value and clarity change rate of the image; The calculation formula of the clarity value is D(F)=∑x∑y|f(x+2,y)-f(x,y)| 2 , the calculation formula of the clarity change rate is Bn=(Dn+1-Dn) / Dn+1; Set the first threshold value Y1, when Bn>Y1, keep the direction unchanged and continue the coarse adjustment; When Bn≤Y1 and Dn+1>Dn, keep the direction unchanged and enter fine adjustment; when Bn≤Y1 and Dn+1<Dn, enter fine adjustment in the opposite direction; Fine adjustment: Move the lens along the Z axis by the second number of steps, take an image at each position point and calculate the corresponding clarity value and clarity change rate of the image; The calculation formulas for clarity value and clarity change rate are the same as those for coarse adjustment; Set the second threshold value Y2. When Bn>Y2, keep the direction unchanged and continue fine-tuning. When Bn≤Y2, fine adjustment is terminated; Wherein, the first step number is greater than the second step number.
2. The automatic focusing method according to claim 1, wherein: The lens is driven by a stepping motor; The number of steps taken by the stepping motor each time includes any two of 5 steps, 15 steps, 35 steps, 125 steps or 200 steps.
3. The automatic focusing method according to claim 2, wherein: During coarse adjustment, the first step number is selected as 125 steps each time or 200 steps each time; during fine adjustment, the second step number is selected as 5 steps each time or 15 steps each time.
4. The automatic focusing method according to claim 1, wherein: The first threshold value Y1=0.15, and the second threshold value Y2=0.
05.
5. The automatic focusing method according to claim 1, wherein: The method further includes displaying the clarity value and / or clarity change rate corresponding to each position point in a visual manner.
6. The automatic focusing method according to claim 5, wherein: The above-mentioned visualization methods include charts, graphs or scatter plots.
Citation Information
Patent Citations
Contrast detection autofocus using adaptive step
CN108780261A