CN110244444B - Microscope focusing method and device, terminal equipment and storage medium - Google Patents

Microscope focusing method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN110244444B
CN110244444B CN201910423048.6A CN201910423048A CN110244444B CN 110244444 B CN110244444 B CN 110244444B CN 201910423048 A CN201910423048 A CN 201910423048A CN 110244444 B CN110244444 B CN 110244444B
Authority
CN
China
Prior art keywords
position information
displacement range
value
focusing
focusing curve
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201910423048.6A
Other languages
Chinese (zh)
Other versions
CN110244444A (en
Inventor
刘旋
权申文
刘远明
李宏军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Zhiying Medical Technology Co ltd
Original Assignee
Shenzhen Zhiying Medical Technology Co ltd
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 Shenzhen Zhiying Medical Technology Co ltd filed Critical Shenzhen Zhiying Medical Technology Co ltd
Priority to CN201910423048.6A priority Critical patent/CN110244444B/en
Publication of CN110244444A publication Critical patent/CN110244444A/en
Application granted granted Critical
Publication of CN110244444B publication Critical patent/CN110244444B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B21/00Microscopes
    • G02B21/24Base structure
    • G02B21/241Devices for focusing
    • G02B21/244Devices for focusing using image analysis techniques
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/28Systems for automatic generation of focusing signals
    • G02B7/36Systems for automatic generation of focusing signals using image sharpness techniques, e.g. image processing techniques for generating autofocus signals

Abstract

The invention is suitable for the technical field of microscopic imaging, and provides a focusing method, a device, terminal equipment and a storage medium of a microscope, wherein the method comprises the following steps: controlling the object stage to move along the direction towards or away from the objective lens within a first displacement range smaller than the movement range of the object stage, acquiring a group of first images of a sample on the object stage in the moving process of the object stage, and recording position information of the object stage when each first image is acquired; acquiring a definition value of each first image, and generating a first focusing curve according to the definition value and the position information of each first image; judging whether the position information corresponding to the wave crest of the first focusing curve is within the preset offset of the maximum value or the minimum value of the first displacement range; if not, the object stage is controlled to move to the position represented by the position information corresponding to the wave crest. The problem that the imaging quality is reduced due to the fact that a large amount of time is consumed for focusing of the fluorescence microscope is solved, the focusing time is shortened, and the quality of microscopic imaging is guaranteed.

Description

Microscope focusing method and device, terminal equipment and storage medium
Technical Field
The invention belongs to the technical field of microscopic imaging, and particularly relates to a focusing method and device of a microscope, terminal equipment and a storage medium.
Background
Fluorescence microscopy has important applications in the field of biomedical research, and the auto-focusing method of fluorescence microscopy is the key of fluorescence microscopy. To ensure successful focusing of the fluorescence microscope, the conventional auto-focusing method needs to ensure that the stage must pass through the focus when the focusing image is acquired. However, focusing of the fluorescence microscope takes a lot of time, and the fluorescence sample is quenched with time, which eventually degrades the imaging quality.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for focusing a microscope, a terminal device, and a storage medium, so as to solve the problem that a lot of time is consumed for focusing a fluorescence microscope in the prior art, which reduces imaging quality.
A first aspect of an embodiment of the present invention provides a focusing method for a microscope, the microscope at least includes an object stage and an objective lens, the focusing method includes:
controlling the object stage to move along the direction towards or away from the objective lens within a first displacement range smaller than the movement range of the object stage, acquiring a group of first images of a sample on the object stage in the moving process of the object stage, and recording position information of the object stage when each first image is acquired;
acquiring a definition value of each first image, and generating a first focusing curve according to the definition value and the position information of each first image;
judging whether the position information corresponding to the wave crest of the first focusing curve is within the preset offset of the maximum value or the minimum value of the first displacement range;
if not, the object stage is controlled to move to the position represented by the position information corresponding to the wave crest.
A second aspect of an embodiment of the present invention provides a focusing apparatus for a microscope, including:
the acquisition module is used for controlling the object stage to move along the direction towards or away from the objective lens within a first displacement range smaller than the movement range of the object stage, acquiring a group of first images of a sample on the object stage in the moving process of the object stage, and recording position information of the object stage when each first image is acquired;
the generating module is used for acquiring the definition value of each first image and generating a first focusing curve according to the definition value and the position information of each first image;
the judging module is used for judging whether the position information corresponding to the wave crest of the first focusing curve is within the preset offset of the maximum value or the minimum value of the first displacement range;
and the control module is used for controlling the objective table to move to the position represented by the position information corresponding to the wave crest if the objective table is not moved to the position represented by the position information corresponding to the wave crest.
A third aspect of embodiments of the present invention provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs steps of a method.
The object stage is controlled to move in a first displacement range smaller than the movement range of the object stage along a direction towards or away from the objective lens, first images of a sample on a group of object stages are collected in the moving process of the object stage, and position information of the object stage when each first image is collected is recorded; acquiring a definition value of each first image, and generating a first focusing curve according to the definition value and the position information of each first image; judging whether the position information corresponding to the wave crest of the first focusing curve is within the preset offset of the maximum value or the minimum value of the first displacement range; if not, the object stage is controlled to move to the position represented by the position information corresponding to the wave crest. The problem of in the prior art fluorescence microscope focus need consume a large amount of time and reduce the imaging quality is solved, shorten the time of focusing, guarantee the quality of microscopic imaging.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic diagram illustrating a focusing method for a microscope according to an embodiment of the present invention;
FIG. 2 is a diagram of a first focusing curve according to an embodiment of the present invention;
FIG. 3 is a diagram of a first focusing curve according to another embodiment of the present invention;
FIG. 4 is an exemplary diagram of a first focus curve provided by yet another embodiment of the present invention;
FIG. 5 is a diagram of a first focusing curve according to still another embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a focusing device of a microscope provided in an embodiment of the present invention;
fig. 7 is a schematic diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
At present, in order to ensure that the objective table passes through a focus, the existing automatic focusing method needs to set a large moving range of the objective table, but focusing of the fluorescence microscope needs to consume a lot of time, and the fluorescence sample is quenched along with the time, and finally the imaging quality is reduced.
In the embodiment, the displacement range of the objective table is adjusted, the objective table is controlled to move in a smaller displacement range at each time, the problem that in the prior art, focusing of a fluorescence microscope needs to consume a large amount of time to reduce imaging quality is solved, and the displacement distance when the objective table is adjusted is shortened, so that the focusing time is shortened, and the quality of microscopic imaging is guaranteed.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Referring to fig. 1, in an embodiment of the present invention, a focusing method of a microscope, the microscope including at least a stage and an objective lens, includes:
s101, controlling the objective table to move in a direction towards or away from an objective lens within a first displacement range smaller than the movement range of the objective table, acquiring a group of first images of a sample on the objective table in the moving process of the objective table, and recording position information of the objective table when each first image is acquired;
the objective table is an observation table for placing a sample to be observed, and the positions of the objective table in the vertical direction and the horizontal direction can be adjusted to find the position which is most suitable for the objective lens to observe the sample. The above-mentioned range of movement is the maximum displacement range of the stage in the vertical direction (i.e. the direction toward or away from the objective lens). The first moving range is a preset moving range in the moving range, and optionally, the user may adjust the first moving range before focusing the microscope, or may adopt a preset default range without adjusting, for example, the first moving range is a range of a size of one fifth of the moving range. The position information is a displacement of the stage in a direction toward or away from the objective lens at the position where the stage starts moving.
After the user places the sample on the stage, the controller of the microscope controls the stage to move in a direction toward or away from the objective lens within a first displacement range according to a preset movement path. Preferably, the controller of the microscope controls the stage to move in one direction toward or away from the objective lens within a preset first displacement range, and when the current position of the stage is at a position farther from the objective lens, the controller controls the stage to move in a direction toward the objective lens, and when the current position of the stage is at a position closer to the objective lens, the controller controls the stage to move in a direction away from the objective lens. Thus, the stage does not need to be moved from the position closest to or farthest from the objective lens, and the stage can be moved from any position to find the focal position, so that the displacement distance of the stage is shortened, and the focusing time is shortened.
In one embodiment, the user can first adjust the range of the first displacement range, then the controller of the microscope controls the stage to move in a single direction toward or away from the objective lens within a preset first displacement range, during the movement of the stage, the COMS camera is controlled to capture a set of first images of a sample on the stage observed by the objective lens at preset time intervals or distance intervals, and the position information of the stage when each first image is captured is recorded.
S102, acquiring a definition value of each first image, and generating a first focusing curve according to the definition value and the position information of each first image;
the first focusing curve is a curve of the corresponding relation between each position information of the objective table in the first displacement range and each definition value of each first image, and is also a focusing curve corresponding to the first displacement range, wherein the first displacement range is a section of range in the moving range of the objective table, namely the first focusing curve is a part of curve in the complete focusing curve corresponding to the moving range of the objective table, the peak of the complete focusing curve can be estimated according to the trend of the first focusing curve, and the position represented by the position information corresponding to the peak is the focusing position, so that the objective table does not need to move the complete moving range, the displacement range of the objective table is shortened, the displacement time is shortened, and the focusing speed is accelerated.
Alternatively, the sharpness value of the first image may be calculated by a focus evaluation function, which may be a gray gradient function (a gray level fluctuation variation function or a gray level absolute variation function, etc.), an informatics function (e.g., an information entropy function), a frequency domain function (e.g., a high-frequency pass-band law function), or a statistical function.
In an embodiment, the obtaining the sharpness value of each of the first images includes: and acquiring the width value, the height value and the gray value of each first image, and calculating the definition value of each first image according to the width value, the height value and the gray value of each first image.
Preferably, the width value, the height value and the gray value of the first image may be substituted into the following formula to calculate the sharpness value:
Figure BDA0002066391880000051
where Nx, Ny are the width and height (in pixels) of the first image, respectively, and I (I, j) is the gray value of the first image, i.e. the pixel value at the coordinates (I, j) of the first image.
In an embodiment, the generating a first focus curve according to the sharpness value and the position information of each of the first images includes: and generating the first focusing curve by taking the position information as an X axis and the definition value as a Y axis.
In the embodiment, the position information is used as an X axis, the definition value is used as a Y axis, a plane rectangular coordinate system is established, the coordinate points of each first image are marked in the plane rectangular coordinate system according to the definition value of the first image and the position information when the first image is collected, a smooth first focusing curve is fitted according to a fitting curve formula and the coordinate points, and the first focusing curve is displayed on a display unit in communication connection with a controller of a microscope, so that the first focusing curve is displayed for a user in a visual display mode.
S103, judging whether the position information corresponding to the wave crest of the first focusing curve is within the preset offset of the maximum value or the minimum value of the first displacement range;
and if the wave crest of the first focusing curve is also the wave crest of the complete focusing curve, the position represented by the position information corresponding to the wave crest is the optimal focusing position. In this embodiment, it is determined whether the position information corresponding to the peak of the first focusing curve is within the preset offset of the maximum value or the minimum value of the first displacement range, so as to determine whether the peak of the first focusing curve is the peak of the complete focusing curve.
Preferably, the value of the preset offset is related to the range of the first displacement range, and when the first displacement range is larger, the preset offset is smaller, the first displacement range is smaller, and the preset offset is larger, so that it can be ensured that the peak of the first focusing curve is definitely the peak of the complete focusing curve, and the judgment result is accurate. For example, when the range of the first displacement range is one third of the moving range, the preset offset may be 10%, i.e. 10% of the maximum value or the minimum value of the first displacement range, and when the range of the first displacement range is one tenth of the moving range, the preset offset may be 30%. The value of the preset offset is a preferred embodiment, but is not limited to this embodiment, and in other embodiments, the value of the preset offset may be a fixed value.
In an embodiment, the determining whether the position information corresponding to the peak of the first focusing curve is within a preset offset of the maximum value or the minimum value of the first displacement range includes: judging whether the first focus curve has the wave crest or not; if so, judging whether the position information corresponding to the wave crest of the first focusing curve is within a preset offset of the maximum value or the minimum value of the first displacement range; if not, adjusting the position of the object stage on the horizontal plane.
The horizontal plane is a plane where the fluorescence sample is placed on the objective table. As shown in fig. 2, when the fluorescent sample is not in the field of view of the objective lens, the acquired image has no bright spots, i.e. the image is a pure black image, so the sharpness value of the first image is 0, and the first focus curve is a horizontal line with the sharpness value of 0 at this time, so the first focus curve has no peak. The embodiment solves the problem of focusing failure of the conventional automatic focusing method by judging whether the first focusing curve has a peak or not and automatically adjusting the position of the objective table on the horizontal plane when the peak does not exist so as to enable the fluorescent sample to be in the visual field range of the objective lens.
In an embodiment, the adjusting the position of the object table in the horizontal plane includes: controlling the object stage to move on a horizontal plane, and acquiring a second image of the sample in the moving process of the object stage; and acquiring the definition value of the second image, and controlling the objective table to stop moving at the corresponding position when the definition value of the second image is not zero.
The moving track of the object stage in the horizontal plane may be a random moving track or a preset moving track. The CMOS camera is controlled to collect a second image of a sample on the objective table observed by the objective lens at a preset time interval or a preset distance interval, the definition of the second image is analyzed in real time, when the definition value of the second image is not 0, the corresponding position stops moving when the definition value is not 0, if the moving speed of the objective table is too fast, the objective table is not in the position corresponding to the definition value of 0, and the objective table is moved to the position corresponding to the definition value of 0.
And S104, if not, controlling the objective table to move to the position represented by the position information corresponding to the wave crest.
As shown in fig. 3, when the position information corresponding to the peak of the first focusing curve is not within the preset offset of the maximum value or the minimum value of the first displacement range, it indicates that the peak is not at both ends of the first focusing curve, but in the middle of the first focusing curve, and according to the rule that the field of view of the objective lens is from blurred to clear to blurred, when the peak is in the middle of the focusing curve, it can be determined that the peak is the peak of the complete focusing curve, i.e. the position represented by the corresponding position information is the optimal focusing position.
Preferably, the fact that the peak is not within the preset offset of the maximum value or the minimum value of the first displacement range can avoid that the first focusing curve is only an accidental rising result, and a true peak may appear on the right of the maximum value or the left of the minimum value, so that the determined peak is the peak of the complete focusing curve, and the result is accurate and free of errors.
If the position information corresponding to the peak of the first focusing curve is within the preset offset of the maximum value or the minimum value of the first displacement range, it is indicated that the peak of the first focusing curve is not necessarily the peak of the complete focusing curve, and therefore the displacement range needs to be adjusted to find the peak of the complete focusing curve.
In an embodiment, after determining whether the position information corresponding to the peak of the first focusing curve is within a preset offset of the maximum value or the minimum value of the first displacement range, the method includes: if the position information corresponding to the peak of the first focusing curve is within the preset offset of the minimum value of the first moving range, adjusting the first moving range to be a second moving range by a preset adjusting amplitude until the position information corresponding to the peak of the generated second focusing curve is not within the preset offset of the minimum value of the second moving range, wherein the value in the second moving range is smaller than the minimum value of the first moving range, and the second focusing curve is a focusing curve corresponding to the objective table moving in the second moving range; and controlling the objective table to move to the position represented by the position information corresponding to the peak of the second focusing curve.
When the position information corresponding to the peak of the first focusing curve is within the preset offset of the minimum value of the first displacement range, that is, the peak may be on the left side of the first focusing curve, the first displacement range is adjusted to the second displacement range by the preset adjustment amplitude. As shown in fig. 4, the position information of the peak is within the preset offset of the minimum value of the first focusing curve, and the first displacement range is 0 to 35, then the second displacement range may be-35 to 0, where "-" indicates that the original movement direction is opposite, and the focusing curve in the movement range of-35 to 0 is generated, and when no focusing position is found in-35 to 0, the displacement range is adjusted to-70 to-35 until a focusing position is found, and the focusing curve in the focusing position is found as the second focusing curve. This subtracts the 35 to N range of motion without the stage moving at 35 to N, where N is the maximum value of the range of motion, shortening the range of motion.
It should be noted that, when the displacement range of the object stage exceeds the moving range and cannot move, and no focusing position is found in the second moving range, the peak of the first focusing curve is determined as the focusing position, and the object stage is directly moved to the position represented by the position information corresponding to the peak of the first focusing curve.
In an embodiment, after determining whether the position information corresponding to the peak of the first focusing curve is within a preset offset of the maximum value or the minimum value of the first displacement range, the method includes: if the position information corresponding to the peak of the first focusing curve is within the preset offset of the maximum value of the first moving range, adjusting the first moving range to a third moving range by a preset adjusting amplitude until the position information corresponding to the peak of a generated third focusing curve is not within the preset offset of the maximum value of the third moving range, wherein the value in the third moving range is larger than the maximum value range of the first moving range, and the third focusing curve is a focusing curve corresponding to the objective table moving in the third moving range; and controlling the objective table to move to the position represented by the position information corresponding to the peak of the third focusing curve.
When the position information corresponding to the peak of the first focusing curve is within the preset offset of the maximum value of the first displacement range, that is, the peak may be on the right of the first focusing curve, the first displacement range is adjusted to the second displacement range by the preset adjustment amplitude. As shown in fig. 5, the position information of the peak is within the preset offset of the maximum value of the first focusing curve, and the first displacement range is 0 to 35, the second displacement range may be 35 to 70, and a focusing curve in the displacement range of 35 to 70 is generated, and when no focusing position is found in 35 to 70, the displacement range is adjusted to 70 to 105 until a focusing position is found, and the focusing curve in the focusing position is found as the second focusing curve. This subtracts the range of movement from M to 0, where M is the minimum of the range of movement, without the stage moving at M to 0, shortening the range of movement.
It should be noted that, when the displacement range of the object stage exceeds the moving range and cannot move, and no focusing position is found in the third moving range, the peak of the first focusing curve is determined as the focusing position, and the object stage is directly moved to the position represented by the position information corresponding to the peak of the first focusing curve.
Referring to fig. 6, in an embodiment of the present invention, a focusing device 600 for a microscope includes:
the acquisition module 601 is used for controlling the object stage to move towards or away from the objective lens within a first displacement range smaller than the movement range of the object stage, acquiring a group of first images of a sample on the object stage in the movement process of the object stage, and recording position information of the object stage when each first image is acquired;
a generating module 602, configured to obtain a sharpness value of each first image, and generate a first focusing curve according to the sharpness value and the position information of each first image;
a determining module 603, configured to determine whether position information corresponding to a peak of the first focusing curve is within a preset offset of a maximum value or a minimum value of the first displacement range;
and the control module 604 is configured to control the object stage to move to the position represented by the position information corresponding to the peak if the position information is not the peak.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, modules and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Fig. 7 is a schematic diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 7, the terminal device 7 of this embodiment includes: a processor 70, a memory 71 and a computer program 72, such as a program controlling the movement of the object table, stored in said memory 71 and executable on said processor 70. The processor 70, when executing the computer program 72, implements the steps in the focusing method embodiments of the microscopes described above, such as steps 101 to 104 shown in fig. 1. Alternatively, the processor 70, when executing the computer program 72, implements the functions of each module/unit in the above-mentioned device embodiments, for example, the functions of the modules 601 to 604 shown in fig. 6.
Illustratively, the computer program 72 may be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 70 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 72 in the terminal device 7. For example, the computer program 72 may be divided into an acquisition module, a generation module, a judgment module and a control module, and the specific functions of each module are as follows: the acquisition module is used for controlling the object stage to move towards or away from the objective lens within a first displacement range smaller than the movement range of the object stage, acquiring a group of first images of a sample on the object stage in the movement process of the object stage, and recording position information of the object stage when each first image is acquired; the generating module is used for acquiring the definition value of each first image and generating a first focusing curve according to the definition value and the position information of each first image; the judging module is used for judging whether the position information corresponding to the wave crest of the first focusing curve is within the preset offset of the maximum value or the minimum value of the first displacement range; and the control module is used for controlling the objective table to move to the position represented by the position information corresponding to the wave crest if the objective table is not moved to the position represented by the position information corresponding to the wave crest.
The terminal device 7 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 70, a memory 71. It will be appreciated by those skilled in the art that fig. 7 is merely an example of a terminal device 7 and does not constitute a limitation of the terminal device 7 and may comprise more or less components than shown, or some components may be combined, or different components, for example the terminal device may further comprise input output devices, network access devices, buses, etc.
The Processor 70 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7. The memory 71 may also be an external storage device of the terminal device 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the terminal device 7. The memory 71 is used for storing the computer program and other programs and data required by the terminal device. The memory 71 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (8)

1. A method of focusing a microscope, the microscope comprising a fluorescence microscope; the fluorescence microscope at least comprises an object stage and an objective lens, and is characterized in that the focusing method comprises the following steps:
controlling the object stage to move in a direction towards or away from the objective lens within a first displacement range smaller than the movement range of the object stage, acquiring a group of first images of a sample on the object stage during the movement of the object stage, and recording position information of the object stage when each first image is acquired; the position information is the displacement of the objective lens moving towards or away from the objective lens at the position where the objective lens starts to move;
acquiring a definition value of each first image, and generating a first focusing curve according to the definition value and the position information of each first image;
judging whether the position information corresponding to the wave crest of the first focusing curve is within the preset offset of the maximum value or the minimum value of the first displacement range;
if not, controlling the objective table to move to the position represented by the position information corresponding to the wave crest;
if the position information corresponding to the wave crest of the first focusing curve is within the preset offset of the minimum value of the first displacement range, adjusting the first displacement range to be a second displacement range by a preset adjustment amplitude until the position information corresponding to the wave crest of the generated second focusing curve is not within the preset offset of the minimum value of the second displacement range; the objective table is controlled to move to the position represented by the position information corresponding to the peak of the second focusing curve; wherein, the value in the second displacement range is smaller than the minimum value of the first displacement range, and the second focusing curve is a corresponding focusing curve when the objective table moves in the second displacement range;
if the position information corresponding to the peak of the first focusing curve is within the preset offset of the maximum value of the first displacement range, adjusting the first displacement range to a third displacement range by the preset adjustment amplitude until the position information corresponding to the peak of the generated third focusing curve is not within the preset offset of the maximum value of the third displacement range; the objective table is controlled to move to the position represented by the position information corresponding to the peak of the third focusing curve; and the value in the third displacement range is larger than the maximum value range of the first displacement range, and the third focusing curve is a corresponding focusing curve when the objective table moves in the third displacement range.
2. The method of claim 1, wherein said obtaining a sharpness value for each of said first images comprises:
and acquiring the width value, the height value and the gray value of each first image, and calculating the definition value of each first image according to the width value, the height value and the gray value of each first image.
3. The method of focusing a microscope according to claim 1, wherein the generating a first focus curve from the sharpness values and the position information of each of the first images comprises:
and generating the first focusing curve by taking the position information as an X axis and the definition value as a Y axis.
4. The method according to any one of claims 1 to 3, wherein the determining whether the position information corresponding to the peak of the first focusing curve is within a preset offset of the maximum value or the minimum value of the first displacement range comprises:
judging whether the first focus curve has the wave crest or not;
if so, judging whether the position information corresponding to the wave crest of the first focusing curve is within a preset offset of the maximum value or the minimum value of the first displacement range;
if not, adjusting the position of the object stage on the horizontal plane.
5. The method of claim 4, wherein the adjusting the position of the stage in the horizontal plane comprises:
controlling the object stage to move on a horizontal plane, and acquiring a second image of the sample in the moving process of the object stage;
and acquiring the definition value of the second image, and controlling the objective table to stop moving at the corresponding position when the definition value of the second image is not zero.
6. A focusing device for a microscope, wherein the microscope comprises a fluorescence microscope; the focusing device includes:
the acquisition module is used for controlling the object stage to move towards or away from the objective lens within a first displacement range smaller than the movement range of the object stage, acquiring a group of first images of a sample on the object stage in the movement process of the object stage, and recording position information of the object stage when each first image is acquired; the position information is the displacement of the objective lens moving towards or away from the objective lens at the position where the objective lens starts to move;
the generating module is used for acquiring the definition value of each first image and generating a first focusing curve according to the definition value and the position information of each first image;
the judging module is used for judging whether the position information corresponding to the wave crest of the first focusing curve is within the preset offset of the maximum value or the minimum value of the first displacement range;
the control module is used for controlling the objective table to move to the position represented by the position information corresponding to the wave crest if the objective table is not moved to the position represented by the position information corresponding to the wave crest;
the control module is further configured to: if the position information corresponding to the wave crest of the first focusing curve is within the preset offset of the minimum value of the first displacement range, adjusting the first displacement range to be a second displacement range by a preset adjustment amplitude until the position information corresponding to the wave crest of the generated second focusing curve is not within the preset offset of the minimum value of the second displacement range; the objective table is controlled to move to the position represented by the position information corresponding to the peak of the second focusing curve; wherein, the value in the second displacement range is smaller than the minimum value of the first displacement range, and the second focusing curve is a corresponding focusing curve when the objective table moves in the second displacement range;
the control module is further configured to: if the position information corresponding to the peak of the first focusing curve is within the preset offset of the maximum value of the first displacement range, adjusting the first displacement range to a third displacement range by the preset adjustment amplitude until the position information corresponding to the peak of the generated third focusing curve is not within the preset offset of the maximum value of the third displacement range; the objective table is controlled to move to the position represented by the position information corresponding to the peak of the third focusing curve; and the value in the third displacement range is larger than the maximum value range of the first displacement range, and the third focusing curve is a corresponding focusing curve when the objective table moves in the third displacement range.
7. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN201910423048.6A 2019-05-21 2019-05-21 Microscope focusing method and device, terminal equipment and storage medium Active CN110244444B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910423048.6A CN110244444B (en) 2019-05-21 2019-05-21 Microscope focusing method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910423048.6A CN110244444B (en) 2019-05-21 2019-05-21 Microscope focusing method and device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110244444A CN110244444A (en) 2019-09-17
CN110244444B true CN110244444B (en) 2021-09-03

Family

ID=67884628

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910423048.6A Active CN110244444B (en) 2019-05-21 2019-05-21 Microscope focusing method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110244444B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2999988A4 (en) 2013-05-23 2017-01-11 S.D. Sight Diagnostics Ltd. Method and system for imaging a cell sample
CN110930363A (en) * 2019-10-29 2020-03-27 北京临近空间飞行器系统工程研究所 Method and device for determining sharpness evaluation value of curved-surface blurred image and storage medium
CN110764244B (en) * 2019-11-05 2022-03-18 安图实验仪器(郑州)有限公司 Automatic focusing method for microscope tabletting microscopic examination
WO2021092742A1 (en) * 2019-11-12 2021-05-20 深圳迈瑞生物医疗电子股份有限公司 Method for adjusting film reader, device, apparatus and medium
CN112911133B (en) * 2019-12-03 2023-05-09 精微视达医疗科技(武汉)有限公司 Endoscope focusing method and device
CN112904548B (en) * 2019-12-03 2023-06-09 精微视达医疗科技(武汉)有限公司 Endoscope focusing method and device
CN111694476B (en) * 2020-05-15 2022-07-08 平安科技(深圳)有限公司 Translation browsing method and device, computer system and readable storage medium
WO2022009104A2 (en) * 2020-07-07 2022-01-13 S.D. Sight Diagnostics Ltd Focusing a microscope using fluorescent images
CN114280769A (en) * 2020-12-28 2022-04-05 深圳同舟光电科技有限公司 High-sensitivity optical imaging system, method and device
CN112954138A (en) * 2021-02-20 2021-06-11 东营市阔海水产科技有限公司 Aquatic economic animal image acquisition method, terminal equipment and movable material platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102540639A (en) * 2010-12-08 2012-07-04 佳能企业股份有限公司 Automatic focusing method and image capturing system
CN105700106A (en) * 2016-03-28 2016-06-22 华为技术有限公司 Automatic focusing method and automatic focusing device
CN109116541A (en) * 2018-09-10 2019-01-01 广州鸿琪光学仪器科技有限公司 Microscope focusing method, device, computer equipment and storage medium
CN109218718A (en) * 2018-10-31 2019-01-15 广州立景创新科技有限公司 Auto-focusing adjustment method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008020710A (en) * 2006-07-13 2008-01-31 Fujifilm Corp Photographing device and focus adjusting method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102540639A (en) * 2010-12-08 2012-07-04 佳能企业股份有限公司 Automatic focusing method and image capturing system
CN105700106A (en) * 2016-03-28 2016-06-22 华为技术有限公司 Automatic focusing method and automatic focusing device
CN109116541A (en) * 2018-09-10 2019-01-01 广州鸿琪光学仪器科技有限公司 Microscope focusing method, device, computer equipment and storage medium
CN109218718A (en) * 2018-10-31 2019-01-15 广州立景创新科技有限公司 Auto-focusing adjustment method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110244444A (en) 2019-09-17

Similar Documents

Publication Publication Date Title
CN110244444B (en) Microscope focusing method and device, terminal equipment and storage medium
US20180143419A1 (en) Variable focal length lens system with multi-level extended depth of field image processing
CN109085113B (en) Automatic focusing method and device for cervical exfoliated cell detection device
CN111311482B (en) Background blurring method and device, terminal equipment and storage medium
CN102304472A (en) Device and method for detecting sputum smear tubercle bacillus quickly
WO2019105433A1 (en) Image distortion detection method and system
CN109286758B (en) High dynamic range image generation method, mobile terminal and storage medium
CN102375228A (en) Microscope control device and optical distortion correction method
US20190355101A1 (en) Image refocusing
Sha et al. Research on auto-focusing technology for micro vision system
CN108665436B (en) Multi-focus image fusion method and system based on gray mean reference
CN110838099A (en) Foreign matter detection method, device and system and terminal equipment
CN111199536B (en) Focusing evaluation method and device
CN104184936A (en) Image focusing processing method and system based on light field camera
CN111800579B (en) Lens focusing method and system and related equipment
CN111556311B (en) Quality detection method and device for fixed-focus camera module and computer storage medium
CN111340722B (en) Image processing method, processing device, terminal equipment and readable storage medium
CN111062916B (en) Definition evaluation method and device for microscopic image
CN116182786B (en) Monocular vision ranging method, camera and medium
US10481378B2 (en) Interactive graphical representation of image quality and control thereof
CN104866837B (en) The image collecting device and its acquisition method of calligraphy and painting Micro texture
CN110087063A (en) A kind of image processing method, device and electronic equipment
CN112036401B (en) License plate recognition integrated machine evaluation method and device based on license plate image attribute calibration
JP2016206228A (en) Focused position detection device, focused position detection method, imaging device and imaging system
Chiang et al. Design of a hand-held automatic focus digital microscope by using CMOS image sensor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant