Automatic focusing precision detection method and system for full-automatic microscopic imager
Through the focus technology and clarity curve analysis of the fully automatic microscope imager itself, the complex and cost-effective problems of traditional detection methods are solved, real-time and convenient focus accuracy detection on industrial production lines is achieved, and detection efficiency and accuracy are improved. .
Patent Information
- Application Number
- CN202411254156.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-09-09
AI Technical Summary
The traditional automatic focus accuracy detection method relies on high-precision measurement instruments, which are expensive and complex in operation, making it difficult to achieve immediate and convenient accuracy verification in actual working environments, especially in industrial production lines or on-site inspection tasks.
Using the focus technology of the fully automatic microscope imager itself, the focus accuracy is calculated through multiple focusing methods, and using focusing algorithms such as Canny, Tenengrad or the manufacturer's own algorithm, to obtain the clarity value curve, divide equal parts, and select both sides of the maximum value. Multiple autofocusing is performed in the interval, the focus position and average value are calculated, and the relative deviation and focus accuracy are calculated using the Bessel formula.
This enables rapid and easy detection and evaluation of the focus accuracy of fully automatic microscopes without the need for additional equipment, improving detection efficiency and accuracy.
Smart Images

Figure CN119043156A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of instrument detection, and more particularly to an automatic focusing accuracy detection method and system for a fully automatic microscopic imaging instrument. Background Art
[0002] With the rapid development of science and technology, fully automatic microscopic imagers have played an indispensable role in many fields of modern society, such as biomedical research, material science analysis, semiconductor testing, precision manufacturing, and military reconnaissance. Its core technology, autofocus technology, as an outstanding representative of optomechanical integration, has not only greatly improved the quality and efficiency of imaging, but also promoted the improvement of automation and intelligence levels. This technology achieves fast and accurate focusing on the target sample by precisely controlling the movement of the imaging device in the Z-axis direction and combining it with an efficient image clarity evaluation algorithm.
[0003] However, although autofocus technology has matured in theory and is widely used in various microscopic imaging systems, its real-time detection and evaluation mechanism of focus accuracy faces many challenges. Traditional detection methods often rely on high-precision measuring instruments, such as laser interferometers, high-precision translation stages, etc. These devices are not only expensive, but also complicated to operate, making it difficult to achieve instant and convenient accuracy verification in actual working environments. In addition, for industrial production lines or on-site inspection tasks that are far away from laboratory environments and require rapid response, it is obviously impractical to frequently use external detection instruments for focus accuracy verification.
[0004] Therefore, it is an urgent problem to be solved by those skilled in the art to provide a simple and efficient method and system for detecting the autofocus accuracy of a fully automatic microscopic imaging instrument. Summary of the invention
[0005] In view of this, the present invention provides an automatic focusing accuracy detection method and system for a fully automatic microscopic imager, which utilizes the focusing technology of the fully automatic microscopic imager itself (whether it is based on the built-in Opencv such as Canny, Tenengrad or other clarity evaluation algorithms, or the focusing algorithm / method developed by the manufacturer of the fully automatic microscopic imager itself) and adopts multiple focusing methods to calculate the focusing accuracy of the fully automatic microscopic imager without the need for additional focusing accuracy equipment.
[0006] In order to achieve the above object, the present invention adopts the following technical solution:
[0007] A method for detecting the autofocus accuracy of a fully automatic microscopic imager comprises the following steps:
[0008] Performing automatic focusing on the fully automatic microscopic imager to obtain a precise focusing range of the fully automatic microscopic imager;
[0009] Selecting a plurality of different step lengths to perform multiple autofocusing operations in the precise focus interval to obtain a plurality of focus positions;
[0010] Calculating the automatic focusing accuracy of the fully automatic microscopic imager according to the multiple focus positions;
[0011] Whether the fully automatic microscopic imager meets the standard is evaluated according to the autofocus accuracy, and the evaluation result is output.
[0012] Preferably, performing automatic focusing on the fully automatic microscopic imager once to obtain a precise focusing range of the fully automatic microscopic imager comprises:
[0013] Obtaining a clarity value curve within a focus range of a fully automatic microscopic imaging device;
[0014] Dividing the clarity value curve into a number of equal parts;
[0015] The clarity values of the equally divided positions are obtained, and several equally divided intervals adjacent to the maximum clarity value on both sides are selected to form a precise focus interval.
[0016] Preferably, obtaining a definition value curve within a focus range of a fully automatic microscopic imager includes:
[0017] Imaging is performed at a certain step length within the focus range of the fully automatic microscopic imager, and a clarity curve is generated according to the imaging position and the corresponding clarity value.
[0018] Preferably, calculating the automatic focusing accuracy of the fully automatic microscopic imager according to the multiple focus positions includes:
[0019] Calculate the average value of the Z-axis positions of the multiple focus positions
[0020]
[0021] Where n is the number of autofocus times; P i is the Z-axis position of the focus after the i-th autofocus;
[0022] The relative deviation S is calculated according to the Bessel formula:
[0023]
[0024] According to the average value of the Z-axis position The focusing accuracy CV of the automatic microscopic imager autofocus is calculated using the relative deviation S:
[0025]
[0026] In another aspect, the present invention provides an automatic focusing accuracy detection system for a fully automatic microscopic imaging instrument, comprising:
[0027] A focusing interval determination module, used to perform automatic focusing on the fully automatic microscopic imager once to obtain an accurate focusing interval of the fully automatic microscopic imager;
[0028] A focusing module, used for selecting a plurality of different step lengths to perform multiple auto-focusing in the precise focusing interval to obtain a plurality of focus positions;
[0029] A focusing accuracy calculation module, used for calculating the automatic focusing accuracy of the fully automatic microscopic imager according to a plurality of focal positions;
[0030] The output report module is used to evaluate whether the fully automatic microscopic imager meets the standards according to the autofocus accuracy and output the evaluation result.
[0031] Preferably, the focusing module comprises:
[0032] A clarity curve acquisition unit, used to obtain a clarity value curve within a focus range of a fully automatic microscopic imaging device;
[0033] An equal division unit, used for equally dividing the clarity value curve into a plurality of equal parts;
[0034] The interval selection unit is used to obtain the clarity value of the equally divided position, and select a number of equally divided intervals adjacent to the maximum clarity value on both sides to form a precise focus interval.
[0035] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a method and system for detecting the autofocus accuracy of a fully automatic microscopic imager, which uses multiple focusing methods to quickly find the focus of the camera, and calculates the focusing accuracy of the device by repeating the autofocus method multiple times. The present invention can automatically detect and evaluate the focusing accuracy of a fully automatic microscopic imager without the help of other instruments, but only with simple tools. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0037] Figure 1 A flow chart of the method provided by the present invention;
[0038] Figure 2 It is a clarity curve graph;
[0039] Figure 3 A schematic diagram of the structure provided by the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] The embodiment of the present invention discloses a method for detecting the autofocus accuracy of a fully automatic microscopic imaging device, such as Figure 1 As shown, the following steps are included:
[0042] Use commonly used stage rulers and other tools to place the tool on the stage of the fully automatic microscope imager, use the focusing algorithm / method of the fully automatic microscope imager itself to perform automatic focusing on the fully automatic microscope imager, and obtain the precise focusing range of the fully automatic microscope imager. The selected precise focusing range is the range that includes the focus and its vicinity.
[0043] Select multiple different step sizes to perform multiple autofocuses in the precise focus interval to obtain multiple focal positions. Specifically, the fully automatic microscope imager selects different step sizes within the autofocus interval (the step size can select different values according to the size of the precise focus interval), obtains the clarity value each time, and finally selects the maximum clarity value as the origin, selects multiple step sizes around the origin as the interval for refocusing, and then starts focusing. The above steps can be repeated multiple times, and finally the minimum step size of the fully automatic microscope imager is used for precise focusing, and the optimal clarity value position, that is, the focal position, can be located. In the above focusing process, the step size and the number of focusing times can be selected according to the Z-axis travel of the fully automatic microscope imager, so as to quickly find the focus.
[0044] The automatic focusing accuracy of the fully automatic microscope imager is calculated based on multiple focus positions. Under the same camera parameters and light intensity, the Z-axis position of the fully automatic microscope imager after autofocus is theoretically the same. In fact, under the same conditions, there is still a certain deviation in the focus position of the autofocus. Then the coefficient of variation of the focus data of the Z axis after autofocus is used as the accuracy of the autofocus. According to the above method, the autofocus is repeated n times, and the single Z-axis data obtained by the test is P i .
[0045] Whether the fully automatic microscopic imager meets the standards is evaluated according to the autofocus accuracy, and the evaluation result is output to realize the detection and evaluation of the fully automatic microscopic imager.
[0046] In this embodiment, the Z-axis travel of the device is 10,000 microns, and the minimum step is 1 micron. The secondary focusing method is used for automatic focusing. The first focus step is 60 microns. After moving 166 times, a maximum clarity value position is obtained. Two step positions are selected before and after this position, that is, the secondary focusing is performed within the range of 120 microns before and after. After moving 240 times, the best clear focus position is obtained. Repeat the above steps to calculate the average value and focusing accuracy of the Z axis after automatic focusing.
[0047] Specifically, the fully automatic microscopic imager is automatically focused once to obtain a precise focusing range of the fully automatic microscopic imager, including:
[0048] Obtain the clarity value curve within the focus range of the fully automatic microscopic imaging instrument; Figure 2 Shown is a clarity curve of the fully automatic microscope imager at the corresponding positions from the starting point of the Z axis to the end point of the Z axis. In the figure, the x-axis represents the Z-axis position data of the fully automatic microscope imager, and the y-axis represents the clarity value.
[0049] Divide the clarity value curve into several equal parts; there is a Z-axis position corresponding to the maximum value from the starting point to the end point of the Z-axis of the fully automatic microscope imager, and this position is called the focus of the imaging. From the above figure, it can be seen that if the starting point to the end point of the above figure is divided into several equal parts on the x-axis, and the values are taken at the equal-divided positions, the maximum value taken must be the position closest to the peak.
[0050] Get the clarity value of the equal-division position, select several equal-division intervals adjacent to the maximum clarity value on both sides to form a precise focus interval. Select multiple equal-division lengths on the left and right sides of the maximum value (generally select 2 equal-division lengths) to include the maximum value position, and then repeat the above operation in the above interval. Finally, the focus position corresponding to the value at the peak position can be obtained using the minimum accuracy of the Z axis of the fully automatic microscopic imaging instrument as the step length.
[0051] In another embodiment, obtaining a sharpness value curve within a focus range of a fully automatic microscopic imager includes:
[0052] Imaging is performed at a certain step length within the focus range of the fully automatic microscopic imager, and a clarity curve is generated according to the imaging position and the corresponding clarity value.
[0053] Specifically, the instrument's minimum step (usually 1um) is used to shoot from -1mm (starting point) of the focus to +1mm (end point), and a crosshair, C-shaped ruler or standard circle is used as an imaging display element. The imaging element is placed on the stage for imaging, and imaging is performed every 1um. The following figure is plotted according to the clarity value: Figure 2The clarity curve shown shows that there is no repeatability error because the Z-axis uses minimum stepping and continuous displacement.
[0054] Furthermore, the automatic focusing accuracy of the fully automatic microscopic imager is calculated according to the multiple focus positions, including:
[0055] Calculate the average Z-axis position of multiple focus positions
[0056]
[0057] Where n is the number of autofocus times; P i is the Z-axis position of the focus after the i-th autofocus;
[0058] The relative deviation S is calculated according to the Bessel formula:
[0059]
[0060] According to the average value of Z-axis position The focusing accuracy CV of the fully automatic microscopic imaging instrument is calculated by using the relative deviation S:
[0061]
[0062] On the other hand, Figure 3 As shown, the present invention provides an automatic focusing accuracy detection system for a fully automatic microscopic imager, comprising:
[0063] A focus interval determination module is used to perform automatic focusing on the fully automatic microscopic imager to obtain an accurate focus interval of the fully automatic microscopic imager;
[0064] A focusing module, used to select multiple different step lengths to perform multiple autofocuses in a precise focusing interval to obtain multiple focus positions;
[0065] A focusing accuracy calculation module, used for calculating the automatic focusing accuracy of the fully automatic microscopic imager according to multiple focus positions;
[0066] The output report module is used to evaluate whether the fully automatic microscopic imager meets the standards based on the autofocus accuracy and output the evaluation results.
[0067] Furthermore, the focusing module includes:
[0068] A clarity curve acquisition unit, used to obtain a clarity value curve within a focus range of a fully automatic microscopic imaging device;
[0069] An equal division unit is used to divide the clarity value curve into several equal parts;
[0070] The interval selection unit is used to obtain the clarity value of the equally divided position, and select a number of equally divided intervals adjacent to the maximum clarity value on both sides to form a precise focus interval.
[0071] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0072] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting the autofocus accuracy of a fully automatic microscopic imaging instrument, It is characterized in that The following steps are involved: Performing automatic focusing on the fully automatic microscopic imager to obtain a precise focusing range of the fully automatic microscopic imager; Selecting a plurality of different step lengths to perform multiple autofocusing operations in the precise focus interval to obtain a plurality of focus positions; Calculating the autofocus accuracy of the fully automatic microscopic imager according to the multiple focus positions; Whether the fully automatic microscopic imager meets the standard is evaluated according to the autofocus accuracy, and the evaluation result is output.
2. The method for detecting the autofocus accuracy of a fully automatic microscopic imager according to claim 1, It is characterized in that Performing an automatic focusing operation on the fully automatic microscopic imager to obtain a precise focusing range of the fully automatic microscopic imager includes: Obtaining a clarity value curve within a focus range of a fully automatic microscopic imaging device; Dividing the clarity value curve into a number of equal parts; The clarity values of the equally divided positions are obtained, and a number of equally divided intervals adjacent to the maximum clarity value on both sides are selected to form a precise focus interval.
3. The method for detecting the autofocus accuracy of a fully automatic microscopic imager according to claim 2, It is characterized in that Obtain the clarity value curve within the focus range of the fully automatic microscope imager, including: Imaging is performed at a certain step length within the focus range of the fully automatic microscopic imager, and a clarity curve is generated according to the imaging position and the corresponding clarity value.
4. The method for detecting the autofocus accuracy of a fully automatic microscopic imager according to claim 1, It is characterized in that Calculating the automatic focusing accuracy of the fully automatic microscopic imager according to the multiple focus positions includes: Calculate the average value of the Z-axis positions of the multiple focus positions Where n is the number of autofocus times; P i is the Z-axis position of the focus after the i-th autofocus; The relative deviation S is calculated according to the Bessel formula: According to the average value of the Z-axis position The focusing accuracy CV of the automatic microscopic imager autofocus is calculated using the relative deviation S:
5. An automatic focusing accuracy detection system for a fully automatic microscopic imaging instrument, It is characterized in that include: A focusing interval determination module, used to perform automatic focusing on the fully automatic microscopic imager once to obtain an accurate focusing interval of the fully automatic microscopic imager; A focusing module, used for selecting a plurality of different step lengths to perform multiple auto-focusing in the precise focusing interval to obtain a plurality of focus positions; A focusing accuracy calculation module, used for calculating the automatic focusing accuracy of the fully automatic microscopic imager according to a plurality of focal positions; The output report module is used to evaluate whether the fully automatic microscopic imager meets the standards according to the autofocus accuracy and output the evaluation result.
6. The automatic focusing accuracy detection system for a fully automatic microscopic imaging instrument according to claim 5, It is characterized in that The focusing module comprises: A clarity curve acquisition unit, used to obtain a clarity value curve within a focus range of a fully automatic microscopic imaging device; An equal division unit, used for equally dividing the clarity value curve into a plurality of equal parts; The interval selection unit is used to obtain the clarity value of the equally divided position, and select a number of equally divided intervals adjacent to the maximum clarity value on both sides to form a precise focus interval.
Citation Information
Patent Citations
Automatic focusing method and automatic focusing device
CN104133339A
Automatic focusing method and device for microscopic instrument, intelligent terminal and storage medium
CN113777769A
Automatic focusing method and electronic device therewith
CN1896859A
Focus detecting device
JP2008052285A
Dynamic autofocus method and system for assay imager
US20100157086A1
