CN113625440A - Automatic focusing method for microscope - Google Patents

Automatic focusing method for microscope Download PDF

Info

Publication number
CN113625440A
CN113625440A CN202110940942.8A CN202110940942A CN113625440A CN 113625440 A CN113625440 A CN 113625440A CN 202110940942 A CN202110940942 A CN 202110940942A CN 113625440 A CN113625440 A CN 113625440A
Authority
CN
China
Prior art keywords
point
corner
real
pixel
frame
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.)
Granted
Application number
CN202110940942.8A
Other languages
Chinese (zh)
Other versions
CN113625440B (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.)
Xinxiang Seprit Environmental Protection Technology Co ltd
Original Assignee
Xinxiang Seprit Environmental Protection 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 Xinxiang Seprit Environmental Protection Technology Co ltd filed Critical Xinxiang Seprit Environmental Protection Technology Co ltd
Priority to CN202110940942.8A priority Critical patent/CN113625440B/en
Publication of CN113625440A publication Critical patent/CN113625440A/en
Application granted granted Critical
Publication of CN113625440B publication Critical patent/CN113625440B/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

Abstract

The invention relates to an automatic focusing method of a microscope, which is characterized in that images of slices on an objective table in the automatic descending process of an objective lens are collected based on a preset collection frame rate; zooming each collected frame of real-time image to a preset pixel size; preliminarily screening each frame of real-time image to determine corner point pixel points and positions thereof in the image; based on a non-maximum value inhibition method, inhibiting redundant corner point pixel points; and if the number of the corner point pixel points of the current frame of real-time image is greater than a preset threshold value and less than the number of the corner point pixel points of the previous frame of real-time image, successfully focusing and stopping the operation of the objective lens. The method realizes the control of the focusing of the microscope based on the image characteristic point selection mode, so that the focusing of the microscope is not influenced by the measured object, the focusing can be more stable and faster, and the accuracy of the analysis result is improved.

Description

Automatic focusing method for microscope
Technical Field
The invention belongs to the technical field of medical instruments, and particularly relates to an automatic focusing method of a microscope.
Background
The microscope is an observation device which is commonly used in the fields of biology, medicine and the like, can assist a tester to observe various samples and is unavailable. With the increase of samples to be detected, the workload of detection personnel is increased, and the requirement of work can not be met by simply adopting a manual adjustment mode to focus the microscope for observation. With the continuous development of science and technology, automatic focusing techniques have appeared, and the automatic focusing methods can be divided into active focusing methods and passive focusing methods. The microscope auto-focusing method generally adopts a passive focusing method, namely, a position with the highest searching definition is recorded, and an actuating mechanism is controlled to return to the position. The definition directly affects the accuracy of the in-focus position.
Currently, the focusing method is a gradient calculation and averaging method to count the definition of the whole image. However, the method is greatly influenced by the object to be measured, so that the focusing position deviation of the same slice position under different objective lenses is large, the method is not favorable for stable and rapid focusing, and the accuracy of an analysis result is reduced.
Disclosure of Invention
In order to solve the problems of poor stability and poor accuracy in the prior art, the invention provides an automatic focusing method for a microscope, which has the characteristics of high focusing accuracy, high stability and the like.
The microscope automatic focusing method according to the embodiment of the invention comprises the following steps:
acquiring an image of a slide on an objective table in the automatic objective lowering process based on a preset acquisition frame rate;
zooming each collected frame of real-time image to a preset pixel size;
preliminarily screening each frame of real-time image to determine corner point pixel points and positions thereof in the image;
based on a non-maximum value inhibition method, inhibiting redundant corner point pixel points;
and if the number of the corner point pixel points of the current frame of real-time image is greater than a preset threshold value and less than the number of the corner point pixel points of the previous frame of real-time image, successfully focusing and stopping the operation of the objective lens.
Further, the acquiring the image of the slice on the objective table during the automatic lowering of the objective lens based on the preset acquisition frame rate includes:
and acquiring images of the slices on the objective table in the automatic descending process of the objective lens based on an acquisition frame rate of 30 FPS.
Further, the scaling the acquired real-time image of each frame to a preset pixel size includes:
the acquired real-time images of each frame are scaled to 512 x 512 pixels.
Further, the preliminary screening of each frame of real-time image to determine the corner pixel points and the positions thereof in the image includes:
acquiring the gray value of each pixel point in each frame of real-time image;
and if the absolute value of the difference value between the gray value of any pixel point and the gray values of other pixel points in the preset radius distance range is larger than the preset difference value, the pixel point is an angular point pixel point and the position of the pixel point is determined.
Further, the radial distance comprises 3.
Further, the preset difference value comprises 20.
Further, the suppressing the redundant corner pixel points based on the non-maximum suppression method includes:
determining the corner point score value of the corner point pixel point based on the absolute value of the gray value difference value of the corner point pixel point and other pixel points within the preset radius distance range;
and reserving the corner pixel point with the largest corner score value in the preset neighborhood of the corner pixel point.
Further, the suppressing the redundant corner pixel points based on the non-maximum suppression method further includes:
and if only one angular point pixel point exists in the preset neighborhood of the angular point pixel point, reserving the angular point pixel point.
Further, the preset threshold comprises 400. The invention has the beneficial effects that: acquiring an image of a slide on an objective table in the automatic objective lowering process based on a preset acquisition frame rate; zooming each collected frame of real-time image to a preset pixel size; preliminarily screening each frame of real-time image to determine corner point pixel points and positions thereof in the image; based on a non-maximum value inhibition method, inhibiting redundant corner point pixel points; and if the number of the corner point pixel points of the current frame of real-time image is greater than a preset threshold value and less than the number of the corner point pixel points of the previous frame of real-time image, successfully focusing and stopping the operation of the objective lens. The method realizes the control of the focusing of the microscope based on the image characteristic point selection mode, so that the focusing of the microscope is not influenced by the measured object, the focusing can be more stable and faster, and the accuracy of the analysis result is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method of microscope auto-focus provided according to an exemplary embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
Referring to fig. 1, an embodiment of the present invention provides an auto-focusing method for a microscope, which specifically includes:
101. acquiring an image of a slide on an objective table in the automatic objective lowering process based on a preset acquisition frame rate;
the real-time image of the section placed on the microscope stage during the movement of the objective lens can be obtained by a micro-camera arranged on the microscope and moving together with the objective lens, wherein the section can be made of transparent medium such as glass and transparent plastic, the middle part is a placed observation object, and the lower part is bearing transparent medium such as glass and transparent plastic.
102. Zooming each collected frame of real-time image to a preset pixel size;
the collected images of each frame are zoomed to a fixed size, so that the post-processing of the images is more convenient through a form of unified specification, and the comparison between the front frame image and the rear frame image is convenient.
103. Preliminarily screening each frame of real-time image to determine corner point pixel points and positions thereof in the image;
the purpose of the preliminary screening is to find corner pixels and their locations in the image that differ significantly from surrounding pixels.
104. Based on a non-maximum value inhibition method, inhibiting redundant corner point pixel points;
and if a plurality of characteristic points exist, deleting the characteristic points with smaller response values, and only keeping the characteristic points with the maximum response values.
105. And if the number of the corner point pixel points of the current frame of real-time image is greater than a preset threshold value and less than that of the corner point pixel points of the previous frame of real-time image, successfully focusing and stopping the operation of the objective lens.
Such as AnThe number of the target characteristic points of the current image, An-1The number of the target characteristic points of the previous frame image is AnIs greater than a predetermined threshold, and An-AnAnd (4) when the-1 is less than 0, the objective lens stops running and the automatic focusing is successful.
Compared with the existing automatic focusing mode, the method realizes the control of the focusing of the microscope based on the mode of selecting the image characteristic points, so that the focusing of the microscope is not influenced by the measured object, the focusing can be more stable and faster, and the accuracy of the analysis result is improved.
In some embodiments of the present invention, acquiring the image of the slice on the stage during the automatic lowering of the objective lens based on the preset acquisition frame rate comprises:
and acquiring images of the slices on the objective table in the automatic descending process of the objective lens based on an acquisition frame rate of 30 FPS.
The step of scaling the acquired real-time image of each frame to a preset pixel size comprises the following steps:
the acquired real-time images of each frame are scaled to 512 x 512 pixels.
The preliminary screening of each frame of real-time image to determine the corner point pixel points and the positions thereof in the image comprises the following steps:
acquiring the gray value of each pixel point in each frame of real-time image;
and if the absolute value of the difference value between the gray value of any pixel point and the gray values of other pixel points in the preset radius distance range is larger than the preset difference value, the pixel point is an angular point pixel point and the position of the pixel point is determined.
The method for restraining the redundant corner point pixel points based on the non-maximum value restraining method comprises the following steps:
determining the corner point score value of the corner point pixel point based on the absolute value of the gray value difference value of the corner point pixel point and other pixel points within the preset radius distance range;
and reserving the corner pixel point with the maximum corner point score value in the preset neighborhood of the corner pixel point.
The method for suppressing the redundant corner point pixel points based on the non-maximum value suppression method further comprises the following steps:
if only one corner pixel point exists in the preset neighborhood of the corner pixel point, the corner pixel point is reserved.
As a possible implementation manner of the above embodiment, the objective lens moves down in the Z-axis direction (vertical direction) at a certain speed, the moving down speed can be set to 0.01mm/s, the image is acquired while the lens moves down, the image acquisition frame rate can be 30FPS, and the acquired real-time image is scaled to a specified size, for example, 512 × 512 pixels.
Firstly, carrying out primary screening, wherein the purpose of the primary screening is to find corner pixels and positions thereof, which have larger differences with surrounding pixels, in an image:
a pixel point P can be selected from the picture, the gray value of the pixel point P is determined, then a proper difference threshold value is determined, the value can be selected to be 20, and when the absolute value of the difference between the gray value of the pixel point P and the gray value of other points is larger than 20, the difference value of the 2 points is considered to be large. Thus, by considering 4 pixels around the pixel point, that is, the radius distance is 3, if the difference between 3 points in the 4 points and the point P is greater than 20, the point P is a corner point pixel.
Then, the angular point pixel points in the image need to be suppressed, and excessive angular point pixel points cannot appear:
and adopting a non-maximum value inhibition method to inhibit redundant characteristic points. That is, for a 3 × 3 window, if there are a plurality of feature points, the feature point with a small response value is deleted, and only the feature point with the largest response value is retained.
The method can adopt non-maximum suppression processing according to the response value of the angular point, and screens the characteristic points, wherein the specific screening mode is as follows:
and (4) calculating the corner score value (or response value) of the corner pixel point, namely the sum of the absolute values of the difference between 4 points and the center. Then, by judging a neighborhood (which can be set to be 3x3) with the corner pixel point p as the center, if a plurality of corner pixel points exist, the response value of each corner is judged, if p is the largest, the response value is kept, and if not, the response value is deleted. If there is only one feature point, it is retained.
And finally, setting the corner point as 400, stopping the downward movement of the objective lens when the threshold value exceeds 400, and finishing focusing:
Anthe number of the target characteristic points of the current image, An-1The number of the target characteristic points of the previous frame image is An> 400, and An-An-1If the number is less than 0, the objective lens stops running and automatic focusing is successful.
The microscope automatic focusing method provided by the embodiment of the invention realizes the control of the focusing of the microscope based on the image characteristic point selection mode, so that the focusing of the microscope is not influenced by the measured object, the focusing can be more stable and faster, and the accuracy of the analysis result is improved.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
What has been described above includes examples of one or more embodiments. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the aforementioned embodiments, but one of ordinary skill in the art may recognize that many further combinations and permutations of various embodiments are possible. Accordingly, the embodiments described herein are intended to embrace all such alterations, modifications and variations that fall within the scope of the appended claims. Furthermore, to the extent that the term "includes" is used in either the detailed description or the claims, such term is intended to be inclusive in a manner similar to the term "comprising" as "comprising" is interpreted when employed as a transitional word in a claim. Furthermore, any use of the term "or" in the specification of the claims is intended to mean a "non-exclusive or".
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (9)

1. An auto-focusing method for a microscope, comprising:
acquiring an image of a slide on an objective table in the automatic objective lowering process based on a preset acquisition frame rate;
zooming each collected frame of real-time image to a preset pixel size;
preliminarily screening each frame of real-time image to determine corner point pixel points and positions thereof in the image;
based on a non-maximum value inhibition method, inhibiting redundant corner point pixel points;
and if the number of the corner point pixel points of the current frame of real-time image is greater than a preset threshold value and less than the number of the corner point pixel points of the previous frame of real-time image, successfully focusing and stopping the operation of the objective lens.
2. The method of claim 1, wherein the acquiring the image of the slice on the stage during the automatic lowering of the objective lens based on the preset acquisition frame rate comprises:
and acquiring images of the slices on the objective table in the automatic descending process of the objective lens based on an acquisition frame rate of 30 FPS.
3. The method of claim 1, wherein the scaling the captured real-time images of each frame to a predetermined pixel size comprises:
the acquired real-time images of each frame are scaled to 512 x 512 pixels.
4. The method of claim 1, wherein the preliminary screening of each frame of real-time image to determine the corner pixel points and their positions in the image comprises:
acquiring the gray value of each pixel point in each frame of real-time image;
and if the absolute value of the difference value between the gray value of any pixel point and the gray values of other pixel points in the preset radius distance range is larger than the preset difference value, the pixel point is an angular point pixel point and the position of the pixel point is determined.
5. The method of claim 4, wherein the radial distance comprises 3.
6. The method of claim 4, wherein the predetermined difference comprises 20.
7. The microscope auto-focusing method of claim 4, wherein the suppressing the redundant corner pixel points based on the non-maximum suppression method comprises:
determining the corner point score value of the corner point pixel point based on the absolute value of the gray value difference value of the corner point pixel point and other pixel points within the preset radius distance range;
and reserving the corner pixel point with the largest corner score value in the preset neighborhood of the corner pixel point.
8. The microscope auto-focus method of claim 7, wherein said suppressing redundant pixel points based on non-maxima suppression further comprises:
and if only one angular point pixel point exists in the preset neighborhood of the angular point pixel point, reserving the angular point pixel point.
9. The method of any of claims 1 to 8, wherein the predetermined threshold comprises 400.
CN202110940942.8A 2021-08-17 2021-08-17 Automatic focusing method for microscope Active CN113625440B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110940942.8A CN113625440B (en) 2021-08-17 2021-08-17 Automatic focusing method for microscope

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110940942.8A CN113625440B (en) 2021-08-17 2021-08-17 Automatic focusing method for microscope

Publications (2)

Publication Number Publication Date
CN113625440A true CN113625440A (en) 2021-11-09
CN113625440B CN113625440B (en) 2023-07-07

Family

ID=78385938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110940942.8A Active CN113625440B (en) 2021-08-17 2021-08-17 Automatic focusing method for microscope

Country Status (1)

Country Link
CN (1) CN113625440B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6259080B1 (en) * 1998-03-18 2001-07-10 Olympus Optical Co. Ltd. Autofocus device for microscope
CN104182983A (en) * 2014-08-27 2014-12-03 重庆大学 Highway monitoring video definition detection method based on corner features
CN108259759A (en) * 2018-03-20 2018-07-06 北京小米移动软件有限公司 focusing method, device and storage medium
CN108537796A (en) * 2018-03-19 2018-09-14 太原理工大学 Adaptive H arris angular-point detection methods based on template edge
CN109361849A (en) * 2018-09-30 2019-02-19 桂林优利特医疗电子有限公司 A kind of algorithm of auto-focusing
CN111640157A (en) * 2020-05-28 2020-09-08 华中科技大学 Checkerboard corner detection method based on neural network and application thereof
CN112099217A (en) * 2020-08-18 2020-12-18 宁波永新光学股份有限公司 Automatic focusing method for microscope
CN112561890A (en) * 2020-12-18 2021-03-26 深圳赛安特技术服务有限公司 Image definition calculation method and device and computer equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6259080B1 (en) * 1998-03-18 2001-07-10 Olympus Optical Co. Ltd. Autofocus device for microscope
CN104182983A (en) * 2014-08-27 2014-12-03 重庆大学 Highway monitoring video definition detection method based on corner features
CN108537796A (en) * 2018-03-19 2018-09-14 太原理工大学 Adaptive H arris angular-point detection methods based on template edge
CN108259759A (en) * 2018-03-20 2018-07-06 北京小米移动软件有限公司 focusing method, device and storage medium
CN109361849A (en) * 2018-09-30 2019-02-19 桂林优利特医疗电子有限公司 A kind of algorithm of auto-focusing
CN111640157A (en) * 2020-05-28 2020-09-08 华中科技大学 Checkerboard corner detection method based on neural network and application thereof
CN112099217A (en) * 2020-08-18 2020-12-18 宁波永新光学股份有限公司 Automatic focusing method for microscope
CN112561890A (en) * 2020-12-18 2021-03-26 深圳赛安特技术服务有限公司 Image definition calculation method and device and computer equipment

Also Published As

Publication number Publication date
CN113625440B (en) 2023-07-07

Similar Documents

Publication Publication Date Title
KR101891364B1 (en) Fast auto-focus in microscopic imaging
US7307652B2 (en) Method and apparatus for object tracking and detection
US7769219B2 (en) Method for assessing image focus quality
GB2607749A (en) Fine-grained visual recognition in mobile augmented reality
CN112601006B (en) Tracking focusing method and device based on pan-tilt camera
US10371931B2 (en) Digital microscope apparatus, method of searching for in-focus position thereof, and program
TW201120807A (en) Apparatus and method for moving object detection
CN108710192B (en) Automatic focusing system and method based on statistical data
CN112697789B (en) Image focusing method and device for digital slice scanner
CN111462075A (en) Rapid refocusing method and system for full-slice digital pathological image fuzzy area
CN110460771A (en) Focusing method, device and focus apparatus
CN115308876A (en) Reference focal plane-based microscope rapid focusing method, device, medium and product
WO2007126437A2 (en) Systems and methods for emphasized cytological specimen review
CN115047610B (en) Chromosome karyotype analysis device and method for automatically fitting microscopic focusing plane
CN116912475B (en) Display screen foreign matter detection method and device, electronic equipment and storage medium
CN113625440B (en) Automatic focusing method for microscope
CN111131717B (en) Focusing method, device, equipment and computer readable storage medium
CN111505816A (en) High-flux electron microscope imaging method and system
CN116567412A (en) Zoom tracking curve determination method, apparatus, computer device and storage medium
US20140210980A1 (en) Image acquisition apparatus and image acquisition method
US11588974B2 (en) Zooming method for imaging device, and image processing method and imaging device
JPH0658212B2 (en) Three-dimensional coordinate measuring device
CN111598834A (en) Automatic focusing method and system for micromanipulation
JP2925172B2 (en) Automatic tracking device
CN117850017A (en) Microscope automatic focusing method, device, computer equipment and storage medium

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
CB03 Change of inventor or designer information

Inventor after: Yuan Yongsheng

Inventor after: Zhou Xiaoqiang

Inventor after: Su Juan

Inventor after: Zhang Man

Inventor before: Yuan Yongsheng

Inventor before: Zhou Xiaoqiang

Inventor before: Su Juan

Inventor before: Zhang Man

CB03 Change of inventor or designer information