WO2024045889A1 - Focus locking method and apparatus for microscope - Google Patents

Focus locking method and apparatus for microscope Download PDF

Info

Publication number
WO2024045889A1
WO2024045889A1 PCT/CN2023/105812 CN2023105812W WO2024045889A1 WO 2024045889 A1 WO2024045889 A1 WO 2024045889A1 CN 2023105812 W CN2023105812 W CN 2023105812W WO 2024045889 A1 WO2024045889 A1 WO 2024045889A1
Authority
WO
WIPO (PCT)
Prior art keywords
displacement
image data
several
focus
coordinate
Prior art date
Application number
PCT/CN2023/105812
Other languages
French (fr)
Chinese (zh)
Inventor
汤伯超
王宏达
孙佳音
Original Assignee
广东粤港澳大湾区黄埔材料研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 广东粤港澳大湾区黄埔材料研究院 filed Critical 广东粤港澳大湾区黄埔材料研究院
Publication of WO2024045889A1 publication Critical patent/WO2024045889A1/en

Links

Classifications

    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B21/00Microscopes
    • G02B21/24Base structure
    • G02B21/241Devices for focusing
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B21/00Microscopes
    • G02B21/34Microscope slides, e.g. mounting specimens on microscope slides
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B21/00Microscopes
    • G02B21/36Microscopes arranged for photographic purposes or projection purposes or digital imaging or video purposes including associated control and data processing arrangements
    • G02B21/365Control or image processing arrangements for digital or video microscopes

Definitions

  • the present invention relates to the technical field of microscope distance measurement, and in particular, to a focus locking method and device for a microscope.
  • Microscope focus locking mainly locks the distance between the objective lens of the microscope and the sample, that is, the focal plane of the objective lens; during the focus locking process, on the one hand, the detector of the microscope is used to detect the distance between the objective lens and the sample in real time; on the other hand, due to Normally the displacement of the objective lens and sample is 20-50nm, so a sophisticated detector is used to detect values of 20nm or less. Therefore, the existing technology mainly measures the distance between the objective lens and the sample through hardware including detectors to determine whether the distance remains within the preset locking distance value. If a deviation occurs, the distance between the objective lens and the sample is adjusted to achieve the focus locking function. ; To implement this focus locking method, additional hardware equipment is required, resulting in lower accuracy.
  • the present invention provides a focus locking method and device for a microscope to solve the technical problems of the existing technology requiring additional hardware equipment and low precision.
  • embodiments of the present invention provide a focus locking method for a microscope, which includes:
  • the position of the Z-axis displacer is adjusted to achieve focus locking.
  • the curve fitting processing and the acquisition of the linear relationship in the present invention do not need to be obtained by additional hardware equipment, and can be realized through software on the computer, thereby reducing the cost caused by the use of additional hardware equipment; in addition, by adjusting the Z-axis displacer Real-time collection of displacement data and slide image data, combined with calculation Based on the calculated linear relationship, the Z-axis shifter can be adjusted in real time, improving the focus lock accuracy.
  • the real-time collection of the displacement data of the Z-axis displacer and the image data of the glass slide is specifically as follows:
  • Image data of the slide corresponding to each of the displacement values is acquired.
  • changing the position of the Z-axis displacer and obtaining several first displacement values according to the movement distance of the Z-axis displacer can be replaced by recording several first displacement values generated by the Z-axis displacer when the stage sinks. The first displacement value.
  • the present invention collects or records the Z-axis displacement value by changing the position of the Z-axis displacer, or the stage changes the position of the Z-axis displacer due to automatic sinking, and collects image data corresponding to each displacement value. Furthermore, when the stage sinks due to sinking, the Z-axis displacer is adjusted in real time based on the linear relationship and the collected displacement value and image data, thereby improving the focus locking accuracy.
  • the displacement data are several first displacement values of the Z-axis displacer
  • a linear equation is calculated; wherein the linear relationship includes the linear equation.
  • the present invention obtains a linear equation through the displacement value of the Z displacer and the centroid calculation of the image data.
  • the linear equation represents the linear relationship between the image data and the position of the Z-axis displacer.
  • the Z adjustment can be obtained
  • the data required by the axis displacer can be used to realize real-time adjustment of the Z-axis displacer; in addition, the calculations required to obtain linear equations can be realized on the computer, thus avoiding the use of additional hardware equipment.
  • the present invention eliminates erroneous points in the second coordinate pair through a consistent sampling algorithm, eliminating errors generated during acquisition, thereby eliminating errors in subsequent calculations, and improving focus lock accuracy; in addition, the process of eliminating erroneous points does not require additional hardware
  • the equipment can be implemented on a computer, thereby reducing costs.
  • the slope is calculated
  • the present invention calculates the slope based on the least square method and several first coordinate pairs; through the linear equation established by the slope, after substituting the centroid and offset of the current image, the required amount of movement of the Z-axis displacer can be calculated displacement value to adjust the Z-axis displacer according to the required displacement value.
  • the position of the Z-axis displacer is adjusted to achieve focus locking, specifically as follows:
  • the linear relationship includes a linear equation
  • the offset is obtained by solving
  • the image data is one-dimensional image data generated by linear CCD collecting the reflected light spot of the glass slide.
  • the present invention also provides a focus locking device for a microscope, including: a collection module, a calculation module and a focus locking module;
  • the acquisition module is used to collect the displacement data of the Z-axis displacer and the image data of the glass slide in real time;
  • the calculation module is used to obtain a linear relationship between the displacement data and the image data through curve fitting processing according to the displacement data and the image data;
  • the focus lock module is used to adjust the position of the Z-axis displacer according to the linear relationship to achieve focus lock.
  • the curve fitting processing and the acquisition of the linear relationship in the present invention do not need to be obtained by additional hardware equipment, and can be realized through software on the computer, thereby reducing the cost caused by the use of additional hardware equipment; in addition, by adjusting the Z-axis displacer Real-time collection of displacement data and slide image data, combined with the calculated linear relationship, enables real-time adjustment of the Z-axis displacer, improving focus lock accuracy.
  • Figure 1 is a schematic flow chart of an embodiment of a focus locking method for a microscope provided by the present invention
  • Figure 2 is a schematic flow chart of another embodiment of a focus locking method for a microscope provided by the present invention.
  • Figure 3 is a schematic flow chart of another embodiment of the focus locking method of a microscope provided by the present invention.
  • Figure 4 is a schematic flow chart of another embodiment of the focus locking method of a microscope provided by the present invention.
  • Figure 5 is a schematic structural diagram of an embodiment of the focus locking device of a microscope provided by the present invention.
  • Figure 6 is a schematic structural diagram of another embodiment of the focus locking device of the microscope provided by the present invention.
  • Figure 7 is a schematic structural diagram of another embodiment of the focus locking device of the microscope provided by the present invention.
  • FIG. 8 is a schematic structural diagram of another embodiment of the focus locking device of a microscope provided by the present invention.
  • Figure 1 is a schematic flow chart of an embodiment of a focus locking method for a microscope provided by the present invention. It mainly includes steps 101 to 103, specifically as follows:
  • Step 101 Collect the displacement data of the Z-axis displacer and the image data of the glass slide in real time.
  • the displacement data of the Z-axis displacer is the distance that the Z-axis displacer controls the movement of the objective lens
  • the image data is the image generated by the camera by collecting the reflected light spot on the glass slide.
  • the image data may be one-dimensional image data generated by a linear CCD collecting the reflected light spot of the glass slide.
  • Step 102 According to the displacement data and the image data, obtain a linear relationship between the displacement data and the image data through curve fitting processing.
  • the distance required to move the Z-axis displacer is calculated, and then the Z-axis displacer is Adjust so that the center of mass moves to the focus lock position.
  • Step 103 According to the linear relationship, adjust the position of the Z-axis displacer to achieve focus locking.
  • FIG. 2 is a schematic flow chart of another embodiment of a focus locking method for a microscope provided by the present invention.
  • the main difference between Figure 2 and Figure 1 is that Figure 2 also includes step 201 and step 202, as follows:
  • step 201 is specifically step 201-step 202.
  • Step 201 Change the position of the Z-axis displacer, and obtain several first displacement values according to the movement distance of the Z-axis displacer; wherein the displacement data is the several first displacement values.
  • changing the position of the Z-axis displacer and obtaining several first displacement values according to the movement distance of the Z-axis displacer can be replaced by: when the recording stage sinks, the Z-axis displacer generates several first displacement values.
  • the present invention changes the position of the Z-axis displacer, or the stage generates the Z-axis position due to automatic sinking.
  • the position of the shifter changes, the Z-axis displacement value is collected or recorded, and the image data corresponding to each displacement value is collected. Then when the stage sinks due to sinking, the linear relationship is combined with the collected displacement value and image data. Real-time adjustment of the Z-axis shifter improves focus lock accuracy.
  • FIG. 3 is a schematic flow chart of another embodiment of a focus locking method for a microscope provided by the present invention.
  • the main difference between Figure 3 and Figure 1 is that Figure 3 also includes steps 301 to 303, which are as follows:
  • step 102 specifically includes steps 301 to 303.
  • the displacement data is several first displacement values of the Z-axis displacer.
  • Step 301 According to the image data corresponding to each first displacement value, obtain several first coordinates after curve fitting.
  • first coordinates are obtained after curve fitting based on the image data corresponding to each first displacement value, specifically: selecting the centroid area in each image data; Perform Gaussian fitting on each centroid area to obtain a unimodal Gaussian curve; select the position corresponding to the maximum value of each unimodal Gaussian curve, and set the position as the first coordinate.
  • Step 302 Set the first displacement value corresponding to each first coordinate as a second coordinate, and select several first coordinate pairs based on several first coordinates and several second coordinates.
  • the number of the first coordinate pairs is greater than three.
  • several coordinate pairs are selected based on several first coordinates and several second coordinates, specifically: combining each first coordinate with the second coordinate corresponding to each first coordinate. , generate several second coordinate pairs; according to the consistency sampling algorithm, eliminate the error points in the several second coordinate pairs, and obtain the several first coordinate pairs.
  • the present invention eliminates erroneous points in the second coordinate pair through a consistent sampling algorithm, eliminating errors generated during acquisition, thereby eliminating errors in subsequent calculations, and improving focus lock accuracy; in addition, the process of eliminating erroneous points does not require additional hardware
  • the equipment can be implemented on a computer, thereby reducing costs.
  • Step 303 Calculate a linear equation according to the several first coordinate pairs; wherein the linear relationship includes the linear equation.
  • calculating a linear equation based on the several first coordinate pairs specifically includes: establishing a fitting straight line equation based on the several first coordinate pairs; calculating a linear equation based on the straight line equation. The error value is calculated; the slope is calculated according to the least square method and the error value; and the linear equation is established based on the slope.
  • the present invention calculates the slope based on the least square method and several first coordinate pairs; through the linear equation established by the slope, after substituting the centroid and offset of the current image, the required amount of movement of the Z-axis displacer can be calculated displacement value to adjust the Z-axis displacer according to the required displacement value.
  • the present invention obtains a linear equation through the displacement value of the Z displacer and the centroid calculation of the image data.
  • the linear equation represents the linear relationship between the image data and the position of the Z-axis displacer.
  • the Z adjustment can be obtained
  • the data required by the axis displacer can be used to realize real-time adjustment of the Z-axis displacer; in addition, the calculations required to obtain linear equations can be realized on the computer, thus avoiding the use of additional hardware equipment.
  • FIG. 4 is a schematic flow chart of another embodiment of a focus locking method for a microscope provided by the present invention.
  • the main difference between Figure 4 and Figure 1 is that Figure 3 also includes steps 301 to 303, which are as follows:
  • the linear relationship includes a linear equation.
  • Step 301 According to the center of mass of the image to be locked and the current position of the Z-axis displacer, solve to obtain the offset.
  • Step 302 Substitute the center of mass and the offset into the linear equation, and solve to obtain the second displacement value of the Z-axis displacer required for focus locking.
  • Step 303 According to the second displacement value, adjust the position of the Z-axis displacer so that the center of mass returns to the focus-locked position.
  • FIG. 5 is a schematic structural diagram of an embodiment of the focus locking device of a microscope provided by the present invention. It mainly includes: an acquisition module 501 , a calculation module 502 and a focus locking module 503 .
  • the acquisition module 501 is used to acquire the displacement data of the Z-axis displacer and the image data of the glass slide in real time.
  • the calculation module 502 is used to obtain a linear relationship between the displacement data and the image data through curve fitting processing according to the displacement data and the image data.
  • the focus lock module 503 is used to adjust the position of the Z-axis displacer according to the linear relationship to achieve focus lock.
  • Figure 6 is a schematic structural diagram of another embodiment of the focus locking device of a microscope provided by the present invention.
  • the main difference between Figure 6 and Figure 5 is that Figure 6 also includes: a first collection unit 601 and a second collection unit 602.
  • the collection module 501 includes a first collection unit 601 and a second collection unit 602.
  • the first acquisition unit 601 is used to change the position of the Z-axis displacer, and obtain several first displacement values according to the movement distance of the Z-axis displacer; wherein the displacement data is the several first displacement values.
  • the second acquisition unit 602 is used to acquire image data of the slide corresponding to each displacement value.
  • the first acquisition unit 601 can be replaced by a third acquisition unit; the third acquisition unit is used to record several first displacement values generated by the Z-axis displacer when the stage sinks.
  • Figure 7 is a schematic structural diagram of another embodiment of the focus locking device of a microscope provided by the present invention.
  • the main difference between Figure 7 and Figure 5 is that Figure 7 also includes: a curve fitting unit 701 and a coordinate pair generation unit. 702 and equation building unit 703.
  • the calculation module 502 includes: a curve fitting unit 701, a coordinate pair generating unit 702, and an equation establishing unit 703.
  • the curve fitting unit 701 is configured to obtain several first coordinates after curve fitting based on the image data corresponding to each first displacement value.
  • the curve fitting unit 701 also includes a centroid selection subunit, a curve fitting subunit and a first setting subunit; the centroid selection subunit is used to select the centroid area in each image data; the curve fitter The unit is used to perform Gaussian fitting on each of the centroid regions to obtain a unimodal Gaussian curve; the first setting subunit is used to select the position corresponding to the maximum value of each unimodal Gaussian curve, and set the position to The first coordinate.
  • the coordinate pair generating unit 702 is used to set the first displacement value corresponding to each of the first coordinates as a second coordinate, and select several first coordinate pairs according to several first coordinates and several second coordinates. .
  • the coordinate pair generation unit 702 also includes: a coordinate pair generation subunit and an error point elimination subunit; the coordinate pair generation subunit is used to generate each first coordinate corresponding to each first coordinate.
  • the second coordinate combination generates several second coordinate pairs; the erroneous point elimination subunit is used to eliminate erroneous points in the several second coordinate pairs according to the consistency sampling algorithm to obtain the several first coordinate pairs.
  • the equation establishing unit 703 is configured to calculate a linear equation according to the plurality of first coordinate pairs; wherein the linear relationship includes the linear equation.
  • the equation establishing unit 703 includes a straight line fitting subunit, an error value calculating subunit, a slope calculating subunit and an equation establishing subunit; the straight line fitting subunit is used to establish a linear equation based on the several first coordinate pairs. Fitting the straight line equation; the error value calculation subunit is used to calculate the error value according to the straight line equation; the slope calculation subunit is used to calculate the slope according to the least square method and the error value; the equation establishment subunit is used to calculate the slope according to the least squares method and the error value. The slope, establishes the linear equation.
  • Figure 8 is a schematic structural diagram of another embodiment of the focus locking device of a microscope provided by the present invention.
  • the main difference between Figure 8 and Figure 5 is that Figure 8 also includes: an offset calculation unit 801 and a displacement value calculation unit.
  • the focus lock module 503 includes: an offset calculation unit 801, a displacement value calculation unit 802, and a focus lock unit 803.
  • the offset calculation unit 801 is used to obtain the offset based on the centroid of the image to be focused and the current position of the Z-axis displacer.
  • the displacement value calculation unit 802 is used to substitute the center of mass and the offset into the linear equation, and solve to obtain the second displacement value of the Z-axis displacer required for focus locking.
  • the focus lock unit 803 is used to adjust the position of the Z-axis displacer according to the second displacement value so that the center of mass returns to the focus lock position.
  • the curve fitting processing and the acquisition of the linear relationship in the present invention do not need to be obtained by additional hardware equipment, and can be realized through software on the computer, thereby reducing the cost caused by the use of additional hardware equipment; in addition, by adjusting the Z-axis displacer Real-time collection of displacement data and slide image data, combined with the calculated linear relationship, enables real-time adjustment of the Z-axis displacer, improving focus lock accuracy.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Optics & Photonics (AREA)
  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Microscoopes, Condenser (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

Disclosed are a focus locking method and apparatus for a microscope. The method comprises: collecting displacement data of a Z-axis shifter and image data of a slide in real time (101); according to the displacement data and the image data, performing curve fitting processing, so as to obtain a linear relationship between the displacement data and the image data (102); and according to the linear relationship, adjusting the position of the Z-axis shifter, so as to realize focus locking (103). Therefore, curve fitting processing and the acquisition of a linear relationship require no additional hardware device, but can be realized on a computer by means of software, thereby reducing the cost generated by using an additional hardware device. In addition, by means of the real-time collection of displacement data of a Z-axis shifter and image data of a slide, in combination with a calculated linear relationship, the adjustment of the Z-axis shifter can be performed in real time, thereby improving the precision of focus locking.

Description

一种显微镜的锁焦方法及装置A focus locking method and device for a microscope 技术领域Technical field
本发明涉及显微镜测距技术领域,尤其涉及一种显微镜的锁焦方法及装置。The present invention relates to the technical field of microscope distance measurement, and in particular, to a focus locking method and device for a microscope.
背景技术Background technique
显微镜锁焦主要是锁定显微镜的物镜与样品之间的距离,也就是物镜的焦面;在锁焦过程中,一方面显微镜的探测器用于实时探测物镜与样品之间的距离,另一方面由于通常情况下物镜和样品位移量在20-50nm,因此采用精密的探测器来探测到20nm或更小的值。因此现有技术主要通过包括探测器在内的硬件测量物镜和样品的距离,判断距离是否保持在预设的锁焦距值内,产生偏移则调整物镜与样品之间的距离以实现锁焦功能;为实现这种锁焦方法,需要额外的硬件设备,进而精度较低。Microscope focus locking mainly locks the distance between the objective lens of the microscope and the sample, that is, the focal plane of the objective lens; during the focus locking process, on the one hand, the detector of the microscope is used to detect the distance between the objective lens and the sample in real time; on the other hand, due to Normally the displacement of the objective lens and sample is 20-50nm, so a sophisticated detector is used to detect values of 20nm or less. Therefore, the existing technology mainly measures the distance between the objective lens and the sample through hardware including detectors to determine whether the distance remains within the preset locking distance value. If a deviation occurs, the distance between the objective lens and the sample is adjusted to achieve the focus locking function. ; To implement this focus locking method, additional hardware equipment is required, resulting in lower accuracy.
发明内容Contents of the invention
本发明提供了一种显微镜的锁焦方法及装置,以解决现有技术需要额外的硬件设备且精度较低的技术问题。The present invention provides a focus locking method and device for a microscope to solve the technical problems of the existing technology requiring additional hardware equipment and low precision.
为了解决上述技术问题,本发明实施例提供了一种显微镜的锁焦方法,包括:In order to solve the above technical problems, embodiments of the present invention provide a focus locking method for a microscope, which includes:
实时采集Z轴位移器的位移数据和载玻片的图像数据;Collect the displacement data of the Z-axis displacer and the image data of the glass slide in real time;
根据所述位移数据和所述图像数据,经过曲线拟合处理,得到位移数据和图像数据之间的线性关系;According to the displacement data and the image data, through curve fitting processing, a linear relationship between the displacement data and the image data is obtained;
根据所述线性关系,调整Z轴位移器的位置,实现锁焦。According to the linear relationship, the position of the Z-axis displacer is adjusted to achieve focus locking.
本发明中曲线拟合处理以及线性关系的获取不需要用额外的硬件设备获得,在计算机上通过软件即可实现,进而降低了因使用额外硬件设备产生的成本;此外,通过对Z轴位移器的位移数据和载玻片的图像数据的实时采集,结合计 算得到的线性关系,对Z轴位移器的调整可实时进行,提高了锁焦的精度。The curve fitting processing and the acquisition of the linear relationship in the present invention do not need to be obtained by additional hardware equipment, and can be realized through software on the computer, thereby reducing the cost caused by the use of additional hardware equipment; in addition, by adjusting the Z-axis displacer Real-time collection of displacement data and slide image data, combined with calculation Based on the calculated linear relationship, the Z-axis shifter can be adjusted in real time, improving the focus lock accuracy.
进一步地,所述实时采集Z轴位移器的位移数据和载玻片的图像数据,具体为:Further, the real-time collection of the displacement data of the Z-axis displacer and the image data of the glass slide is specifically as follows:
改变Z轴位移器的位置,根据Z轴位移器的移动距离,获取若干个第一位移值;其中,所述位移数据为所述若干个第一位移值;Change the position of the Z-axis displacer, and obtain several first displacement values according to the movement distance of the Z-axis displacer; wherein the displacement data is the several first displacement values;
采集与每个所述位移值对应的载玻片的图像数据。Image data of the slide corresponding to each of the displacement values is acquired.
进一步地,所述改变Z轴位移器的位置,根据Z轴位移器的移动距离,获取若干个第一位移值,可替换为,记录载物台下沉时,Z轴位移器产生的若干个第一位移值。Further, changing the position of the Z-axis displacer and obtaining several first displacement values according to the movement distance of the Z-axis displacer can be replaced by recording several first displacement values generated by the Z-axis displacer when the stage sinks. The first displacement value.
本发明通过改变Z轴位移器的位置,或者,载物台因自动下沉产生Z轴位移器位置的改变,采集或记录获得Z轴的位移值,并采集每个位移值对应的图像数据,进而当载物台因下沉时,结合线性关系和实施采集的位移值和图像数据,对Z轴位移器进行实时调整,提高了锁焦精度。The present invention collects or records the Z-axis displacement value by changing the position of the Z-axis displacer, or the stage changes the position of the Z-axis displacer due to automatic sinking, and collects image data corresponding to each displacement value. Furthermore, when the stage sinks due to sinking, the Z-axis displacer is adjusted in real time based on the linear relationship and the collected displacement value and image data, thereby improving the focus locking accuracy.
进一步地,所述根据所述位移数据和所述图像数据,经过曲线拟合处理,得到位移数据和图像数据之间的线性关系,具体为:Further, according to the displacement data and the image data, through curve fitting processing, a linear relationship between the displacement data and the image data is obtained, specifically:
其中,所述位移数据为Z轴位移器的若干个第一位移值;Wherein, the displacement data are several first displacement values of the Z-axis displacer;
根据与每个所述第一位移值对应的图像数据,经曲线拟合后,获取若干个第一坐标;According to the image data corresponding to each first displacement value, after curve fitting, several first coordinates are obtained;
将与每个所述第一坐标对应的所述第一位移值设置为第二坐标,根据若干个第一坐标和若干个第二坐标,选取若干个第一坐标对;Set the first displacement value corresponding to each of the first coordinates as a second coordinate, and select several first coordinate pairs based on several first coordinates and several second coordinates;
根据所述若干个第一坐标对,计算得到线性方程;其中,所述线性关系包括所述线性方程。According to the plurality of first coordinate pairs, a linear equation is calculated; wherein the linear relationship includes the linear equation.
本发明通过Z位移器的位移值和图像数据的质心计算获得线性方程,线性方程表示图像数据与Z轴位移器的位置的线性关系,将当前的采集数据代入线性方程中,即可得到调节Z轴位移器所需要的数据,进而实现对Z轴位移器的实时调节;此外,获取线性方程式时所需的计算,在计算机上即可实现,进而避免了使用额外的硬件设备。 The present invention obtains a linear equation through the displacement value of the Z displacer and the centroid calculation of the image data. The linear equation represents the linear relationship between the image data and the position of the Z-axis displacer. By substituting the current collection data into the linear equation, the Z adjustment can be obtained The data required by the axis displacer can be used to realize real-time adjustment of the Z-axis displacer; in addition, the calculations required to obtain linear equations can be realized on the computer, thus avoiding the use of additional hardware equipment.
进一步地,所述根据与每个所述第一位移值对应的图像数据,经曲线拟合后,获取若干个第一坐标,具体为:Further, according to the image data corresponding to each of the first displacement values, after curve fitting, several first coordinates are obtained, specifically:
选取每个图像数据中的质心区域;Select the centroid area in each image data;
对每个所述质心区域进行高斯拟合,得到单峰高斯曲线;Perform Gaussian fitting on each of the centroid regions to obtain a single-peak Gaussian curve;
选取每个单峰高斯曲线的最大值对应的位置,并将所述位置设置为第一坐标。Select the position corresponding to the maximum value of each unimodal Gaussian curve, and set the position as the first coordinate.
进一步地,所述根据若干个第一坐标和若干个第二坐标,选取若干个坐标对,具体为:Further, several coordinate pairs are selected based on several first coordinates and several second coordinates, specifically:
将每个第一坐标与每个所述第一坐标对应的第二坐标组合,生成若干个第二坐标对;Combining each first coordinate with the second coordinate corresponding to each first coordinate to generate several second coordinate pairs;
根据一致性采样算法,剔除所述若干个第二坐标对中的误点,得到所述若干个第一坐标对。According to the consistency sampling algorithm, error points in the plurality of second coordinate pairs are eliminated to obtain the plurality of first coordinate pairs.
本发明通过一致性采样算法剔除了第二坐标对中的误点,消除了采集时产生的误差,进而消除后续计算中的误差,提高了锁焦精度;此外,剔除误点的过程不需要额外的硬件设备,在计算机上即可实现,进而降低了成本。The present invention eliminates erroneous points in the second coordinate pair through a consistent sampling algorithm, eliminating errors generated during acquisition, thereby eliminating errors in subsequent calculations, and improving focus lock accuracy; in addition, the process of eliminating erroneous points does not require additional hardware The equipment can be implemented on a computer, thereby reducing costs.
进一步地,所述根据所述若干个第一坐标对,计算得到线性方程,具体为:Further, a linear equation is calculated based on the several first coordinate pairs, specifically:
根据所述若干个第一坐标对建立拟合直线方程;Establish a fitting straight line equation according to the several first coordinate pairs;
根据所述直线方程,计算得到误差值;According to the straight line equation, the error value is calculated;
根据最小二乘法和所述误差值,计算得到斜率;According to the least square method and the error value, the slope is calculated;
根据所述斜率,建立所述线性方程。Based on the slope, the linear equation is established.
本发明根据最小二乘法和若干个第一坐标对,计算得出斜率;通过所述斜率建立的线性方程,在代入当前图像的质心和偏移量后,可计算出移动Z轴位移器所需的位移值,以实现根据所需的位移值对Z轴位移器进行调节。The present invention calculates the slope based on the least square method and several first coordinate pairs; through the linear equation established by the slope, after substituting the centroid and offset of the current image, the required amount of movement of the Z-axis displacer can be calculated displacement value to adjust the Z-axis displacer according to the required displacement value.
进一步地,所述根据所述线性关系,调整Z轴位移器的位置,实现锁焦,具体为:Further, according to the linear relationship, the position of the Z-axis displacer is adjusted to achieve focus locking, specifically as follows:
其中,所述线性关系包括线性方程;Wherein, the linear relationship includes a linear equation;
根据要锁焦的图像的质心和Z轴位移器当前的位置,求解得到偏移量; According to the center of mass of the image to be locked and the current position of the Z-axis displacer, the offset is obtained by solving;
将所述质心和所述偏移量代入所述线性方程,求解得到锁焦需要的Z轴位移器的第二位移值;Substitute the center of mass and the offset into the linear equation, and solve to obtain the second displacement value of the Z-axis displacer required for focus locking;
根据所述第二位移值,调整Z轴位移器的位置,以使所述质心回到锁焦的位置。According to the second displacement value, adjust the position of the Z-axis displacer so that the center of mass returns to the focus-locked position.
进一步地,所述图像数据为线性CCD采集载玻片的反射光斑所生成的一维图像数据。Further, the image data is one-dimensional image data generated by linear CCD collecting the reflected light spot of the glass slide.
另一方面,本发明还提供了一种显微镜的锁焦装置,包括:采集模块、计算模块和锁焦模块;On the other hand, the present invention also provides a focus locking device for a microscope, including: a collection module, a calculation module and a focus locking module;
其中,采集模块用于实时采集Z轴位移器的位移数据和载玻片的图像数据;Among them, the acquisition module is used to collect the displacement data of the Z-axis displacer and the image data of the glass slide in real time;
计算模块用于根据所述位移数据和所述图像数据,经过曲线拟合处理,得到位移数据和图像数据之间的线性关系;The calculation module is used to obtain a linear relationship between the displacement data and the image data through curve fitting processing according to the displacement data and the image data;
锁焦模块用于根据所述线性关系,调整Z轴位移器的位置,实现锁焦。The focus lock module is used to adjust the position of the Z-axis displacer according to the linear relationship to achieve focus lock.
本发明中曲线拟合处理以及线性关系的获取不需要用额外的硬件设备获得,在计算机上通过软件即可实现,进而降低了因使用额外硬件设备产生的成本;此外,通过对Z轴位移器的位移数据和载玻片的图像数据的实时采集,结合计算得到的线性关系,对Z轴位移器的调整可实时进行,提高了锁焦的精度。The curve fitting processing and the acquisition of the linear relationship in the present invention do not need to be obtained by additional hardware equipment, and can be realized through software on the computer, thereby reducing the cost caused by the use of additional hardware equipment; in addition, by adjusting the Z-axis displacer Real-time collection of displacement data and slide image data, combined with the calculated linear relationship, enables real-time adjustment of the Z-axis displacer, improving focus lock accuracy.
附图说明Description of drawings
图1为本发明提供的显微镜的锁焦方法的一种实施例的流程示意图;Figure 1 is a schematic flow chart of an embodiment of a focus locking method for a microscope provided by the present invention;
图2为本发明提供的显微镜的锁焦方法的另一种实施例的流程示意图;Figure 2 is a schematic flow chart of another embodiment of a focus locking method for a microscope provided by the present invention;
图3为本发明提供的显微镜的锁焦方法的再一种实施例的流程示意图;Figure 3 is a schematic flow chart of another embodiment of the focus locking method of a microscope provided by the present invention;
图4为本发明提供的显微镜的锁焦方法的再一种实施例的流程示意图;Figure 4 is a schematic flow chart of another embodiment of the focus locking method of a microscope provided by the present invention;
图5为本发明提供的显微镜的锁焦装置的一种实施例的结构示意图;Figure 5 is a schematic structural diagram of an embodiment of the focus locking device of a microscope provided by the present invention;
图6为本发明提供的显微镜的锁焦装置的另一种实施例的结构示意图;Figure 6 is a schematic structural diagram of another embodiment of the focus locking device of the microscope provided by the present invention;
图7为本发明提供的显微镜的锁焦装置的再一种实施例的结构示意图;Figure 7 is a schematic structural diagram of another embodiment of the focus locking device of the microscope provided by the present invention;
图8为本发明提供的显微镜的锁焦装置的再一种实施例的结构示意图。FIG. 8 is a schematic structural diagram of another embodiment of the focus locking device of a microscope provided by the present invention.
具体实施方式 Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present invention.
实施例一Embodiment 1
请参照图1,为本发明提供的显微镜的锁焦方法的一种实施例的流程示意图,其主要包括步骤101至103,具体如下:Please refer to Figure 1, which is a schematic flow chart of an embodiment of a focus locking method for a microscope provided by the present invention. It mainly includes steps 101 to 103, specifically as follows:
步骤101:实时采集Z轴位移器的位移数据和载玻片的图像数据。Step 101: Collect the displacement data of the Z-axis displacer and the image data of the glass slide in real time.
在本实施例中,Z轴位移器的位移数据为Z轴位移器控制物镜移动的距离,图像数据为相机通过采集载玻片上的反射光斑生成的图像。In this embodiment, the displacement data of the Z-axis displacer is the distance that the Z-axis displacer controls the movement of the objective lens, and the image data is the image generated by the camera by collecting the reflected light spot on the glass slide.
在本实施例中,所述图像数据可以为线性CCD采集载玻片的反射光斑所生成的一维图像数据。In this embodiment, the image data may be one-dimensional image data generated by a linear CCD collecting the reflected light spot of the glass slide.
步骤102:根据所述位移数据和所述图像数据,经过曲线拟合处理,得到位移数据和图像数据之间的线性关系。Step 102: According to the displacement data and the image data, obtain a linear relationship between the displacement data and the image data through curve fitting processing.
在本实施例中,通过Z轴位移器移动距离和图像数据之间存在的线性关系,结合当前图像数据的质心,计算得出Z轴位移器所需移动的距离,再对Z轴位移器进行调节,使质心移动到锁焦位置。In this embodiment, through the linear relationship between the moving distance of the Z-axis displacer and the image data, combined with the centroid of the current image data, the distance required to move the Z-axis displacer is calculated, and then the Z-axis displacer is Adjust so that the center of mass moves to the focus lock position.
步骤103:根据所述线性关系,调整Z轴位移器的位置,实现锁焦。Step 103: According to the linear relationship, adjust the position of the Z-axis displacer to achieve focus locking.
请参照图2,为本发明提供的显微镜的锁焦方法的另一种实施例的流程示意图。图2与图1的主要区别在于,图2还包括步骤201和步骤202,具体如下:Please refer to FIG. 2 , which is a schematic flow chart of another embodiment of a focus locking method for a microscope provided by the present invention. The main difference between Figure 2 and Figure 1 is that Figure 2 also includes step 201 and step 202, as follows:
在本实施例中,步骤201具体为步骤201-步骤202。In this embodiment, step 201 is specifically step 201-step 202.
步骤201:改变Z轴位移器的位置,根据Z轴位移器的移动距离,获取若干个第一位移值;其中,所述位移数据为所述若干个第一位移值。Step 201: Change the position of the Z-axis displacer, and obtain several first displacement values according to the movement distance of the Z-axis displacer; wherein the displacement data is the several first displacement values.
在本实施例中,所述改变Z轴位移器的位置,根据Z轴位移器的移动距离,获取若干个第一位移值,可替换为,记录载物台下沉时,Z轴位移器产生的若干个第一位移值。In this embodiment, changing the position of the Z-axis displacer and obtaining several first displacement values according to the movement distance of the Z-axis displacer can be replaced by: when the recording stage sinks, the Z-axis displacer generates several first displacement values.
本发明通过改变Z轴位移器的位置,或者,载物台因自动下沉产生Z轴位 移器位置的改变,采集或记录获得Z轴的位移值,并采集每个位移值对应的图像数据,进而当载物台因下沉时,结合线性关系和实施采集的位移值和图像数据,对Z轴位移器进行实时调整,提高了锁焦精度。The present invention changes the position of the Z-axis displacer, or the stage generates the Z-axis position due to automatic sinking. When the position of the shifter changes, the Z-axis displacement value is collected or recorded, and the image data corresponding to each displacement value is collected. Then when the stage sinks due to sinking, the linear relationship is combined with the collected displacement value and image data. Real-time adjustment of the Z-axis shifter improves focus lock accuracy.
请参照图3,为本发明提供的显微镜的锁焦方法的再一种实施例的流程示意图。图3与图1的主要区别在于,图3还包括步骤301至303,具体如下:Please refer to FIG. 3 , which is a schematic flow chart of another embodiment of a focus locking method for a microscope provided by the present invention. The main difference between Figure 3 and Figure 1 is that Figure 3 also includes steps 301 to 303, which are as follows:
在本实施例中,步骤102具体包括步骤301-步骤303。In this embodiment, step 102 specifically includes steps 301 to 303.
在本实施例中,所述位移数据为Z轴位移器的若干个第一位移值。In this embodiment, the displacement data is several first displacement values of the Z-axis displacer.
步骤301:根据与每个所述第一位移值对应的图像数据,经曲线拟合后,获取若干个第一坐标。Step 301: According to the image data corresponding to each first displacement value, obtain several first coordinates after curve fitting.
在本实施例中,所述根据与每个所述第一位移值对应的图像数据,经曲线拟合后,获取若干个第一坐标,具体为:选取每个图像数据中的质心区域;对每个所述质心区域进行高斯拟合,得到单峰高斯曲线;选取每个单峰高斯曲线的最大值对应的位置,并将所述位置设置为第一坐标。In this embodiment, several first coordinates are obtained after curve fitting based on the image data corresponding to each first displacement value, specifically: selecting the centroid area in each image data; Perform Gaussian fitting on each centroid area to obtain a unimodal Gaussian curve; select the position corresponding to the maximum value of each unimodal Gaussian curve, and set the position as the first coordinate.
步骤302:将与每个所述第一坐标对应的所述第一位移值设置为第二坐标,根据若干个第一坐标和若干个第二坐标,选取若干个第一坐标对。Step 302: Set the first displacement value corresponding to each first coordinate as a second coordinate, and select several first coordinate pairs based on several first coordinates and several second coordinates.
在本实施例中,所述若干个第一坐标对的数量大于3个。In this embodiment, the number of the first coordinate pairs is greater than three.
在本实施例中,所述根据若干个第一坐标和若干个第二坐标,选取若干个坐标对,具体为:将每个第一坐标与每个所述第一坐标对应的第二坐标组合,生成若干个第二坐标对;根据一致性采样算法,剔除所述若干个第二坐标对中的误点,得到所述若干个第一坐标对。In this embodiment, several coordinate pairs are selected based on several first coordinates and several second coordinates, specifically: combining each first coordinate with the second coordinate corresponding to each first coordinate. , generate several second coordinate pairs; according to the consistency sampling algorithm, eliminate the error points in the several second coordinate pairs, and obtain the several first coordinate pairs.
本发明通过一致性采样算法剔除了第二坐标对中的误点,消除了采集时产生的误差,进而消除后续计算中的误差,提高了锁焦精度;此外,剔除误点的过程不需要额外的硬件设备,在计算机上即可实现,进而降低了成本。The present invention eliminates erroneous points in the second coordinate pair through a consistent sampling algorithm, eliminating errors generated during acquisition, thereby eliminating errors in subsequent calculations, and improving focus lock accuracy; in addition, the process of eliminating erroneous points does not require additional hardware The equipment can be implemented on a computer, thereby reducing costs.
步骤303:根据所述若干个第一坐标对,计算得到线性方程;其中,所述线性关系包括所述线性方程。Step 303: Calculate a linear equation according to the several first coordinate pairs; wherein the linear relationship includes the linear equation.
在本实施例中,所述根据所述若干个第一坐标对,计算得到线性方程,具体为:根据所述若干个第一坐标对建立拟合直线方程;根据所述直线方程,计 算得到误差值;根据最小二乘法和所述误差值,计算得到斜率;根据所述斜率,建立所述线性方程。In this embodiment, calculating a linear equation based on the several first coordinate pairs specifically includes: establishing a fitting straight line equation based on the several first coordinate pairs; calculating a linear equation based on the straight line equation. The error value is calculated; the slope is calculated according to the least square method and the error value; and the linear equation is established based on the slope.
本发明根据最小二乘法和若干个第一坐标对,计算得出斜率;通过所述斜率建立的线性方程,在代入当前图像的质心和偏移量后,可计算出移动Z轴位移器所需的位移值,以实现根据所需的位移值对Z轴位移器进行调节。The present invention calculates the slope based on the least square method and several first coordinate pairs; through the linear equation established by the slope, after substituting the centroid and offset of the current image, the required amount of movement of the Z-axis displacer can be calculated displacement value to adjust the Z-axis displacer according to the required displacement value.
在本实施例中,所述线性方程表示为y=kx+b,其中,x为第一坐标的变量,y为第二坐标的变量,k为斜率,b为偏移量。In this embodiment, the linear equation is expressed as y=kx+b, where x is the variable of the first coordinate, y is the variable of the second coordinate, k is the slope, and b is the offset.
本发明通过Z位移器的位移值和图像数据的质心计算获得线性方程,线性方程表示图像数据与Z轴位移器的位置的线性关系,将当前的采集数据代入线性方程中,即可得到调节Z轴位移器所需要的数据,进而实现对Z轴位移器的实时调节;此外,获取线性方程式时所需的计算,在计算机上即可实现,进而避免了使用额外的硬件设备。The present invention obtains a linear equation through the displacement value of the Z displacer and the centroid calculation of the image data. The linear equation represents the linear relationship between the image data and the position of the Z-axis displacer. By substituting the current collection data into the linear equation, the Z adjustment can be obtained The data required by the axis displacer can be used to realize real-time adjustment of the Z-axis displacer; in addition, the calculations required to obtain linear equations can be realized on the computer, thus avoiding the use of additional hardware equipment.
请参照图4,为本发明提供的显微镜的锁焦方法的再一种实施例的流程示意图。图4与图1的主要区别在于,图3还包括步骤301至303,具体如下:Please refer to FIG. 4 , which is a schematic flow chart of another embodiment of a focus locking method for a microscope provided by the present invention. The main difference between Figure 4 and Figure 1 is that Figure 3 also includes steps 301 to 303, which are as follows:
在本实施例中,所述线性关系包括线性方程。In this embodiment, the linear relationship includes a linear equation.
步骤301:根据要锁焦的图像的质心和Z轴位移器当前的位置,求解得到偏移量。Step 301: According to the center of mass of the image to be locked and the current position of the Z-axis displacer, solve to obtain the offset.
步骤302:将所述质心和所述偏移量代入所述线性方程,求解得到锁焦需要的Z轴位移器的第二位移值。Step 302: Substitute the center of mass and the offset into the linear equation, and solve to obtain the second displacement value of the Z-axis displacer required for focus locking.
步骤303:根据所述第二位移值,调整Z轴位移器的位置,以使所述质心回到锁焦的位置。Step 303: According to the second displacement value, adjust the position of the Z-axis displacer so that the center of mass returns to the focus-locked position.
请参照图5,为本发明提供的显微镜的锁焦装置的一种实施例的结构示意图,其主要包括:采集模块501、计算模块502和锁焦模块503。Please refer to FIG. 5 , which is a schematic structural diagram of an embodiment of the focus locking device of a microscope provided by the present invention. It mainly includes: an acquisition module 501 , a calculation module 502 and a focus locking module 503 .
在本实施例中,采集模块501用于实时采集Z轴位移器的位移数据和载玻片的图像数据。In this embodiment, the acquisition module 501 is used to acquire the displacement data of the Z-axis displacer and the image data of the glass slide in real time.
计算模块502用于根据所述位移数据和所述图像数据,经过曲线拟合处理,得到位移数据和图像数据之间的线性关系。 The calculation module 502 is used to obtain a linear relationship between the displacement data and the image data through curve fitting processing according to the displacement data and the image data.
锁焦模块503用于根据所述线性关系,调整Z轴位移器的位置,实现锁焦。The focus lock module 503 is used to adjust the position of the Z-axis displacer according to the linear relationship to achieve focus lock.
请参照图6,为本发明提供的显微镜的锁焦装置的另一种实施例的结构示意图,图6与图5的主要区别在于,图6还包括:第一采集单元601和第二采集单元602。Please refer to Figure 6 , which is a schematic structural diagram of another embodiment of the focus locking device of a microscope provided by the present invention. The main difference between Figure 6 and Figure 5 is that Figure 6 also includes: a first collection unit 601 and a second collection unit 602.
在本实施例中,采集模块501包括第一采集单元601和第二采集单元602。In this embodiment, the collection module 501 includes a first collection unit 601 and a second collection unit 602.
第一采集单元601用于改变Z轴位移器的位置,根据Z轴位移器的移动距离,获取若干个第一位移值;其中,所述位移数据为所述若干个第一位移值。The first acquisition unit 601 is used to change the position of the Z-axis displacer, and obtain several first displacement values according to the movement distance of the Z-axis displacer; wherein the displacement data is the several first displacement values.
第二采集单元602用于采集与每个所述位移值对应的载玻片的图像数据。The second acquisition unit 602 is used to acquire image data of the slide corresponding to each displacement value.
在本实施例中,第一采集单元601可替换为第三采集单元;第三采集单元用于记录载物台下沉时,Z轴位移器产生的若干个第一位移值。In this embodiment, the first acquisition unit 601 can be replaced by a third acquisition unit; the third acquisition unit is used to record several first displacement values generated by the Z-axis displacer when the stage sinks.
请参照图7,为本发明提供的显微镜的锁焦装置的再一种实施例的结构示意图,图7与图5的主要区别在于,图7还包括:曲线拟合单元701、坐标对生成单元702和方程建立单元703。Please refer to Figure 7 , which is a schematic structural diagram of another embodiment of the focus locking device of a microscope provided by the present invention. The main difference between Figure 7 and Figure 5 is that Figure 7 also includes: a curve fitting unit 701 and a coordinate pair generation unit. 702 and equation building unit 703.
在本实施例中,计算模块502包括:曲线拟合单元701、坐标对生成单元702和方程建立单元703。In this embodiment, the calculation module 502 includes: a curve fitting unit 701, a coordinate pair generating unit 702, and an equation establishing unit 703.
曲线拟合单元701用于根据与每个所述第一位移值对应的图像数据,经曲线拟合后,获取若干个第一坐标。The curve fitting unit 701 is configured to obtain several first coordinates after curve fitting based on the image data corresponding to each first displacement value.
在本实施例中,曲线拟合单元701还包括质心选取子单元、曲线拟合子单元和第一设置子单元;质心选取子单元用于选取每个图像数据中的质心区域;曲线拟合子单元用于对每个所述质心区域进行高斯拟合,得到单峰高斯曲线;第一设置子单元用于对选取每个单峰高斯曲线的最大值对应的位置,并将所述位置设置为第一坐标。In this embodiment, the curve fitting unit 701 also includes a centroid selection subunit, a curve fitting subunit and a first setting subunit; the centroid selection subunit is used to select the centroid area in each image data; the curve fitter The unit is used to perform Gaussian fitting on each of the centroid regions to obtain a unimodal Gaussian curve; the first setting subunit is used to select the position corresponding to the maximum value of each unimodal Gaussian curve, and set the position to The first coordinate.
坐标对生成单元702用于将与每个所述第一坐标对应的所述第一位移值设置为第二坐标,根据若干个第一坐标和若干个第二坐标,选取若干个第一坐标对。The coordinate pair generating unit 702 is used to set the first displacement value corresponding to each of the first coordinates as a second coordinate, and select several first coordinate pairs according to several first coordinates and several second coordinates. .
在本实施例中,坐标对生成单元702还包括:坐标对生成子单元和误点剔除子单元;坐标对生成子单元用于将每个第一坐标与每个所述第一坐标对应的 第二坐标组合,生成若干个第二坐标对;误点剔除子单元用于根据一致性采样算法,剔除所述若干个第二坐标对中的误点,得到所述若干个第一坐标对。In this embodiment, the coordinate pair generation unit 702 also includes: a coordinate pair generation subunit and an error point elimination subunit; the coordinate pair generation subunit is used to generate each first coordinate corresponding to each first coordinate. The second coordinate combination generates several second coordinate pairs; the erroneous point elimination subunit is used to eliminate erroneous points in the several second coordinate pairs according to the consistency sampling algorithm to obtain the several first coordinate pairs.
方程建立单元703用于根据所述若干个第一坐标对,计算得到线性方程;其中,所述线性关系包括所述线性方程。The equation establishing unit 703 is configured to calculate a linear equation according to the plurality of first coordinate pairs; wherein the linear relationship includes the linear equation.
在本实施例中,方程建立单元703包括直线拟合子单元、误差值计算子单元、斜率计算子单元和方程建立子单元;直线拟合子单元用于根据所述若干个第一坐标对建立拟合直线方程;误差值计算子单元用于根据所述直线方程,计算得到误差值;斜率计算子单元用于根据最小二乘法和所述误差值,计算得到斜率;方程建立子单元用于根据所述斜率,建立所述线性方程。In this embodiment, the equation establishing unit 703 includes a straight line fitting subunit, an error value calculating subunit, a slope calculating subunit and an equation establishing subunit; the straight line fitting subunit is used to establish a linear equation based on the several first coordinate pairs. Fitting the straight line equation; the error value calculation subunit is used to calculate the error value according to the straight line equation; the slope calculation subunit is used to calculate the slope according to the least square method and the error value; the equation establishment subunit is used to calculate the slope according to the least squares method and the error value. The slope, establishes the linear equation.
请参照图8,为本发明提供的显微镜的锁焦装置的再一种实施例的结构示意图,图8与图5的主要区别在于,图8还包括:偏移量计算单元801、位移值计算单元802和锁焦单元803。Please refer to Figure 8, which is a schematic structural diagram of another embodiment of the focus locking device of a microscope provided by the present invention. The main difference between Figure 8 and Figure 5 is that Figure 8 also includes: an offset calculation unit 801 and a displacement value calculation unit. Unit 802 and focus lock unit 803.
在本实施例中,锁焦模块503包括:偏移量计算单元801、位移值计算单元802和锁焦单元803。In this embodiment, the focus lock module 503 includes: an offset calculation unit 801, a displacement value calculation unit 802, and a focus lock unit 803.
偏移量计算单元801用于根据要锁焦的图像的质心和Z轴位移器当前的位置,求解得到偏移量。The offset calculation unit 801 is used to obtain the offset based on the centroid of the image to be focused and the current position of the Z-axis displacer.
位移值计算单元802用于将所述质心和所述偏移量代入所述线性方程,求解得到锁焦需要的Z轴位移器的第二位移值。The displacement value calculation unit 802 is used to substitute the center of mass and the offset into the linear equation, and solve to obtain the second displacement value of the Z-axis displacer required for focus locking.
锁焦单元803用于根据所述第二位移值,调整Z轴位移器的位置,以使所述质心回到锁焦的位置。The focus lock unit 803 is used to adjust the position of the Z-axis displacer according to the second displacement value so that the center of mass returns to the focus lock position.
本发明中曲线拟合处理以及线性关系的获取不需要用额外的硬件设备获得,在计算机上通过软件即可实现,进而降低了因使用额外硬件设备产生的成本;此外,通过对Z轴位移器的位移数据和载玻片的图像数据的实时采集,结合计算得到的线性关系,对Z轴位移器的调整可实时进行,提高了锁焦的精度。The curve fitting processing and the acquisition of the linear relationship in the present invention do not need to be obtained by additional hardware equipment, and can be realized through software on the computer, thereby reducing the cost caused by the use of additional hardware equipment; in addition, by adjusting the Z-axis displacer Real-time collection of displacement data and slide image data, combined with the calculated linear relationship, enables real-time adjustment of the Z-axis displacer, improving focus lock accuracy.
以上所述的具体实施例,对本发明的目的、技术方案和有益效果进行了进一步的详细说明,应当理解,以上所述仅为本发明的具体实施例而已,并不用于限定本发明的保护范围。特别指出,对于本领域技术人员来说,凡在本发明 的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above-mentioned specific embodiments further describe the purpose, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above-mentioned are only specific embodiments of the present invention and are not intended to limit the scope of the present invention. . It is particularly pointed out that for those skilled in the art, anything in the present invention Within the spirit and principles of the present invention, any modifications, equivalent substitutions, improvements, etc. shall be included in the protection scope of the present invention.

Claims (10)

  1. 一种显微镜的锁焦方法,其特征在于,包括:A focus locking method for a microscope, which is characterized by including:
    实时采集Z轴位移器的位移数据和载玻片的图像数据;Collect the displacement data of the Z-axis displacer and the image data of the glass slide in real time;
    根据所述位移数据和所述图像数据,经过曲线拟合处理,得到位移数据和图像数据之间的线性关系;According to the displacement data and the image data, through curve fitting processing, a linear relationship between the displacement data and the image data is obtained;
    根据所述线性关系,调整Z轴位移器的位置,实现锁焦。According to the linear relationship, the position of the Z-axis displacer is adjusted to achieve focus locking.
  2. 如权利要求1所述的显微镜的锁焦方法,其特征在于,所述实时采集Z轴位移器的位移数据和载玻片的图像数据,具体为:The focus locking method of a microscope according to claim 1, wherein the real-time collection of the displacement data of the Z-axis displacer and the image data of the glass slide is:
    改变Z轴位移器的位置,根据Z轴位移器的移动距离,获取若干个第一位移值;其中,所述位移数据为所述若干个第一位移值;Change the position of the Z-axis displacer, and obtain several first displacement values according to the movement distance of the Z-axis displacer; wherein the displacement data is the several first displacement values;
    采集与每个所述位移值对应的载玻片的图像数据。Image data of the slide corresponding to each of the displacement values is acquired.
  3. 如权利要求2所述的显微镜的锁焦方法,其特征在于,所述改变Z轴位移器的位置,根据Z轴位移器的移动距离,获取若干个第一位移值,可替换为,记录载物台下沉时,Z轴位移器产生的若干个第一位移值。The focus locking method of a microscope according to claim 2, characterized in that said changing the position of the Z-axis displacer, obtaining several first displacement values according to the movement distance of the Z-axis displacer, can be replaced by, recording When the object platform sinks, several first displacement values are generated by the Z-axis displacer.
  4. 如权利要求1所述的显微镜的锁焦方法,其特征在于,所述根据所述位移数据和所述图像数据,经过曲线拟合处理,得到位移数据和图像数据之间的线性关系,具体为:The focus locking method of a microscope according to claim 1, characterized in that, according to the displacement data and the image data, a linear relationship between the displacement data and the image data is obtained through curve fitting processing, specifically as follows: :
    其中,所述位移数据为Z轴位移器的若干个第一位移值;Wherein, the displacement data are several first displacement values of the Z-axis displacer;
    根据与每个所述第一位移值对应的图像数据,经曲线拟合后,获取若干个第一坐标;According to the image data corresponding to each first displacement value, after curve fitting, several first coordinates are obtained;
    将与每个所述第一坐标对应的所述第一位移值设置为第二坐标,根据若干个第一坐标和若干个第二坐标,选取若干个第一坐标对;Set the first displacement value corresponding to each of the first coordinates as a second coordinate, and select several first coordinate pairs based on several first coordinates and several second coordinates;
    根据所述若干个第一坐标对,计算得到线性方程;其中,所述线性关系包 括所述线性方程。According to the several first coordinate pairs, a linear equation is calculated; wherein the linear relationship includes include the linear equation.
  5. 如权利要求4所述的显微镜的锁焦方法,其特征在于,所述根据与每个所述第一位移值对应的图像数据,经曲线拟合后,获取若干个第一坐标,具体为:The focus locking method of a microscope according to claim 4, characterized in that, based on the image data corresponding to each of the first displacement values, several first coordinates are obtained after curve fitting, specifically:
    选取每个图像数据中的质心区域;Select the centroid area in each image data;
    对每个所述质心区域进行高斯拟合,得到单峰高斯曲线;Perform Gaussian fitting on each of the centroid regions to obtain a single-peak Gaussian curve;
    选取每个单峰高斯曲线的最大值对应的位置,并将所述位置设置为第一坐标。Select the position corresponding to the maximum value of each unimodal Gaussian curve, and set the position as the first coordinate.
  6. 如权利要求4所述的显微镜的锁焦方法,其特征在于,所述根据若干个第一坐标和若干个第二坐标,选取若干个坐标对,具体为:The focus locking method of a microscope according to claim 4, wherein several coordinate pairs are selected based on several first coordinates and several second coordinates, specifically:
    将每个第一坐标与每个所述第一坐标对应的第二坐标组合,生成若干个第二坐标对;Combining each first coordinate with the second coordinate corresponding to each first coordinate to generate several second coordinate pairs;
    根据一致性采样算法,剔除所述若干个第二坐标对中的误点,得到所述若干个第一坐标对。According to the consistency sampling algorithm, error points in the plurality of second coordinate pairs are eliminated to obtain the plurality of first coordinate pairs.
  7. 如权利要求4所述的显微镜的锁焦方法,其特征在于,所述根据所述若干个第一坐标对,计算得到线性方程,具体为:The focus locking method of a microscope according to claim 4, wherein a linear equation is calculated based on the plurality of first coordinate pairs, specifically:
    根据所述若干个第一坐标对建立拟合直线方程;Establish a fitting straight line equation according to the several first coordinate pairs;
    根据所述直线方程,计算得到误差值;According to the straight line equation, the error value is calculated;
    根据最小二乘法和所述误差值,计算得到斜率;According to the least square method and the error value, the slope is calculated;
    根据所述斜率,建立所述线性方程。Based on the slope, the linear equation is established.
  8. 如权利要求1所述的显微镜的锁焦方法,其特征在于,所述根据所述线性关系,调整Z轴位移器的位置,实现锁焦,具体为:The focus locking method of a microscope according to claim 1, wherein the position of the Z-axis displacer is adjusted according to the linear relationship to achieve focus locking, specifically:
    其中,所述线性关系包括线性方程; Wherein, the linear relationship includes a linear equation;
    根据要锁焦的图像的质心和Z轴位移器当前的位置,求解得到偏移量;According to the center of mass of the image to be locked and the current position of the Z-axis displacer, the offset is obtained by solving;
    将所述质心和所述偏移量代入所述线性方程,求解得到锁焦需要的Z轴位移器的第二位移值;Substitute the center of mass and the offset into the linear equation, and solve to obtain the second displacement value of the Z-axis displacer required for focus locking;
    根据所述第二位移值,调整Z轴位移器的位置,以使所述质心回到锁焦的位置。According to the second displacement value, adjust the position of the Z-axis displacer so that the center of mass returns to the focus-locked position.
  9. 如权利要求1-8任意一项所述的显微镜的锁焦方法,其特征在于,所述图像数据为线性CCD采集载玻片的反射光斑所生成的一维图像数据。The focus locking method of a microscope according to any one of claims 1 to 8, wherein the image data is one-dimensional image data generated by a linear CCD collecting the reflected light spot of a glass slide.
  10. 一种显微镜的锁焦装置,其特征在于,包括:采集模块、计算模块和锁焦模块;A focus locking device for a microscope, characterized by comprising: an acquisition module, a calculation module and a focus locking module;
    其中,采集模块用于实时采集Z轴位移器的位移数据和载玻片的图像数据;Among them, the acquisition module is used to collect the displacement data of the Z-axis displacer and the image data of the glass slide in real time;
    计算模块用于根据所述位移数据和所述图像数据,经过曲线拟合处理,得到位移数据和图像数据之间的线性关系;The calculation module is used to obtain a linear relationship between the displacement data and the image data through curve fitting processing according to the displacement data and the image data;
    锁焦模块用于根据所述线性关系,调整Z轴位移器的位置,实现锁焦。 The focus lock module is used to adjust the position of the Z-axis displacer according to the linear relationship to achieve focus lock.
PCT/CN2023/105812 2022-09-01 2023-07-05 Focus locking method and apparatus for microscope WO2024045889A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211064778.X 2022-09-01
CN202211064778.XA CN115356840A (en) 2022-09-01 2022-09-01 Focal locking method and device of microscope

Publications (1)

Publication Number Publication Date
WO2024045889A1 true WO2024045889A1 (en) 2024-03-07

Family

ID=84005597

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/105812 WO2024045889A1 (en) 2022-09-01 2023-07-05 Focus locking method and apparatus for microscope

Country Status (2)

Country Link
CN (1) CN115356840A (en)
WO (1) WO2024045889A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115356840A (en) * 2022-09-01 2022-11-18 广东粤港澳大湾区黄埔材料研究院 Focal locking method and device of microscope

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013190680A (en) * 2012-03-14 2013-09-26 Olympus Corp Microscope
CN108254853A (en) * 2018-01-17 2018-07-06 宁波舜宇仪器有限公司 A kind of micro imaging system and its real-time focusing method
CN113795778A (en) * 2019-04-29 2021-12-14 分子装置有限公司 Self-calibrating and directional focusing system and method for infinity corrected microscopes
CN113885189A (en) * 2021-09-22 2022-01-04 广东粤港澳大湾区黄埔材料研究院 Focal locking control method and focal locking device of microscope focal locking system
CN114565684A (en) * 2022-03-03 2022-05-31 安徽工业大学 Target homography matrix calculation method based on consistency sampling algorithm
CN114972240A (en) * 2022-05-20 2022-08-30 陕西师范大学 Automatic detection and quantification method for digital pathology image missing tissue
CN115356840A (en) * 2022-09-01 2022-11-18 广东粤港澳大湾区黄埔材料研究院 Focal locking method and device of microscope

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013190680A (en) * 2012-03-14 2013-09-26 Olympus Corp Microscope
CN108254853A (en) * 2018-01-17 2018-07-06 宁波舜宇仪器有限公司 A kind of micro imaging system and its real-time focusing method
CN113795778A (en) * 2019-04-29 2021-12-14 分子装置有限公司 Self-calibrating and directional focusing system and method for infinity corrected microscopes
CN113885189A (en) * 2021-09-22 2022-01-04 广东粤港澳大湾区黄埔材料研究院 Focal locking control method and focal locking device of microscope focal locking system
CN114565684A (en) * 2022-03-03 2022-05-31 安徽工业大学 Target homography matrix calculation method based on consistency sampling algorithm
CN114972240A (en) * 2022-05-20 2022-08-30 陕西师范大学 Automatic detection and quantification method for digital pathology image missing tissue
CN115356840A (en) * 2022-09-01 2022-11-18 广东粤港澳大湾区黄埔材料研究院 Focal locking method and device of microscope

Also Published As

Publication number Publication date
CN115356840A (en) 2022-11-18

Similar Documents

Publication Publication Date Title
WO2024045889A1 (en) Focus locking method and apparatus for microscope
Lai et al. A generalized depth estimation algorithm with a single image
JP4896373B2 (en) Three-dimensional three-dimensional measurement system and method
CN108986070B (en) Rock crack propagation experiment monitoring method based on high-speed video measurement
CN106875436B (en) It is a kind of based on feature dot density by the method and apparatus of focusing storehouse estimating depth
JP2005514606A5 (en)
CN108333145B (en) Novel ICF target pill detection device and positioning method
CN102967261A (en) Laser displacement measuring method based on digital speckle correlation method (DSCM)
CN103323216B (en) A kind of device and method detecting parallax error of collimator
CN108254395A (en) Scan image means for correcting, method and mobile scanning device
CN109636859A (en) A kind of scaling method of the 3D vision detection based on one camera
CN110657750B (en) Detection system and method for passivation of cutting edge of cutter
CN112985259A (en) Target positioning method and system based on multi-view vision
CN108833789A (en) A kind of real-time autofocus and auto focusing method
CN105717502A (en) High speed laser distance measuring device based on linear array CCD and method
CN110866951B (en) Method for correcting optical axis inclination of monocular camera
CN114034471A (en) Method for measuring laser light path profile
CN103926799B (en) A kind of focusing leveling measuring method
CN106092518A (en) Finite conjugate differential detection of holding concurrently seeks burnt light electric image analyzer and method thereof
Moru et al. Improving optical pipeline through better alignment and calibration process
CN111862237A (en) Camera calibration method for optical surface shape measurement and device for implementing method
JPS63194886A (en) Device for detecting laser optical axis
CN101354308A (en) Instrument and method for measuring digital parallax
CN109307481A (en) High-speed sensor confocal micro-measurement method
CN110455797A (en) Metallographic microscope matrix normalization bearing calibration

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23858927

Country of ref document: EP

Kind code of ref document: A1