CN117970595A - Microscope automatic focusing method based on deep learning and image processing - Google Patents
Microscope automatic focusing method based on deep learning and image processing Download PDFInfo
- Publication number
- CN117970595A CN117970595A CN202410354290.3A CN202410354290A CN117970595A CN 117970595 A CN117970595 A CN 117970595A CN 202410354290 A CN202410354290 A CN 202410354290A CN 117970595 A CN117970595 A CN 117970595A
- Authority
- CN
- China
- Prior art keywords
- image
- deep learning
- gray
- microscope
- digital
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000013135 deep learning Methods 0.000 title claims abstract description 25
- 238000012545 processing Methods 0.000 title claims abstract description 18
- 238000013507 mapping Methods 0.000 claims abstract description 5
- 238000013136 deep learning model Methods 0.000 claims description 30
- 238000011156 evaluation Methods 0.000 claims description 24
- 230000006870 function Effects 0.000 claims description 17
- 238000012549 training Methods 0.000 claims description 13
- 238000005070 sampling Methods 0.000 claims description 9
- 239000012535 impurity Substances 0.000 claims description 8
- 238000003708 edge detection Methods 0.000 claims description 6
- 238000012935 Averaging Methods 0.000 claims description 3
- 238000001914 filtration Methods 0.000 claims description 3
- 238000010606 normalization Methods 0.000 claims description 3
- 238000001000 micrograph Methods 0.000 abstract description 6
- 238000003384 imaging method Methods 0.000 abstract description 5
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000011161 development Methods 0.000 abstract description 2
- 238000003062 neural network model Methods 0.000 abstract 1
- 238000007796 conventional method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 239000000428 dust Substances 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000012804 iterative process Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Landscapes
- Microscoopes, Condenser (AREA)
Abstract
The invention discloses a microscope automatic focusing method based on deep learning and image processing. First, a large number of microscope images are acquired and corresponding sharpness information is annotated. The data is then used to train a deep learning algorithm model to build a mapping relationship between image sharpness and focus. In practical application, through collecting a microscope image in real time and inputting the microscope image into a trained neural network model, automatic focusing can be rapidly and accurately realized, and the imaging quality and the working efficiency of a microscope are effectively improved. The invention has wide application prospect in various microscope application scenes, and provides a new thought and method for development of microscope automatic focusing technology.
Description
Technical Field
The invention relates to the field of artificial intelligence, in particular to a microscope automatic focusing method based on deep learning and image processing.
Background
The auto-focusing of microscopes, especially low power microscopes, is a critical function, especially when high precision microscopic imaging and image acquisition is required.
The general step of auto-focusing of the low power microscope is that after the sample image is collected, the vertical Z-axis height of the microscope is manually adjusted to achieve the focusing effect of coarse adjustment of the microscope; secondly, the computer calculates focusing measures including definition, contrast and the like on the acquired sample image to acquire the measuring values of the definition and the focusing degree of the image; the calculated focus amount is then fed back to the microscope system. This feedback is typically used to control the focal length or lens position of the microscope to achieve auto-focus adjustment; and finally realizing the automatic focusing function of the microscope through the iterative process adjustment of the low power microscope automatic focusing algorithm.
The disadvantages of the above approach are:
Insensitive to complex scenes and changes: conventional low power microscope auto-focus methods are typically based on manually designed feature extraction and conventional image processing techniques with poor adaptability to complex scene and sample changes. Conventional auto-focus methods may not be able to effectively capture key features when complex structures, noise, or illumination variations are present in the sample.
The universality is limited: conventional auto-focus methods may depend on a particular scene or sample and thus lack versatility. In the face of different kinds of samples or different imaging conditions, conventional methods may require adjustments or redesigns, resulting in application limitations.
Manual adjustment of parameters is required: conventional auto-focus methods for microscopes typically require manual adjustment of parameters and instrumentation, and before each slide experiment, the Z-axis of the microscope requires time to manually calibrate the focal point of the camera, the threshold value of the algorithm parameters, etc. This makes these methods less automated by requiring manual intervention and adjustment when applied to different microscopic imaging scenarios.
Performance limitations: the conventional auto-focusing method of the low-power microscope may be limited in performance, so that the clearest image calculated by the image definition algorithm is inconsistent with the actual clearest image.
Poor image recognition capability: the conventional automatic focusing method of the low-power microscope cannot identify non-focusing target objects in the sample, such as impurities, dust, background lines and the like, so that the problems of misjudgment of the focusing target and the like often occur.
Disclosure of Invention
The invention aims to provide a microscope automatic focusing method based on deep learning and image processing, which solves or partially solves the technical problems.
In order to achieve the above purpose, the present invention provides the following technical solutions:
A microscope automatic focusing method based on deep learning and image processing is characterized in that a microscope used by the microscope automatic focusing method comprises an objective lens, a driving device for adjusting the Z-axis position of the objective lens and a digital camera for acquiring digital images from the microscope, wherein the microscope automatic focusing method comprises a sampling module for controlling the driving device and the digital camera to acquire digital images of samples and Z-axis position information of the corresponding objective lens when the objective lens is positioned at different Z-axis heights; the system also comprises an optimal focal length evaluation module for outputting an optimal focal length;
The automatic focusing method of the microscope comprises the following steps:
s1, setting n travel ranges R (n), n step sizes delta X (n) and a first initial position O 1, wherein n is a natural number larger than 1, and R (k) > R (k+1), delta X (k) > delta X (k+1) are met, wherein k >1 and k < n;
S2, letting i=1;
S3, inputting an initial position O i, the travel range R (i) and a step length delta x (i) into the sampling module to obtain a digital image and corresponding Z-axis position information thereof;
s4, inputting the digital image obtained in the S3 and the Z-axis position information corresponding to the digital image into the optimal focal length evaluation module to obtain an optimal focal length;
S5, making i=i+1, and repeating the steps S3 to S5 by taking the optimal focal length obtained in the step S4 as an initial position O i until i=n;
s6, taking the optimal focal length obtained in the step S4 as a final focal length, and driving the objective lens to move to the final focal length by the driving device so as to complete automatic focusing;
The workflow of the sampling module comprises the following steps:
s1-1, controlling the objective lens to move to an input initial position, and driving the objective lens to move unidirectionally along a Z axis according to an input step length in an input stroke range from the initial position; after each time the objective lens moves into place, acquiring a digital image of a sample by the digital camera;
S1-2, outputting all the digital images acquired in the step S1-1 and Z-axis position information corresponding to each digital image;
The workflow of the best focus evaluation module comprises the following steps:
s2-1, sequentially calculating each input digital image through a traditional image definition evaluation algorithm to obtain a traditional image definition score corresponding to each digital image;
S2-2, sequentially passing each input digital image through a deep learning model to obtain the confidence score of the deep learning definition of each digital image;
S2-3, carrying out normalization processing on the traditional image definition scores of each digital image according to the scoring ranges of all the current digital images, and then weighting the traditional image definition scores and the confidence scores of the deep learning definition:
Where AEG is the average energy gradient, Q is the final image sharpness score, Q is the weighting factor, The prediction probability of the model to the image definition;
S2-4, fitting the final image definition score of each digital image and the Z-axis position information corresponding to the final image definition score into a quadratic curve, calculating the vertex of the quadratic curve, obtaining the Z-axis position information when the final image definition score is highest, taking the Z-axis position information as the best focal length, and outputting the Z-axis position information.
Preferably, the conventional image sharpness evaluation algorithm includes the steps of:
S2-1-1, converting the digital image into a gray image;
s2-1-2, carrying out noise and impurity removal treatment on the gray level image obtained in the step S2-1-1;
S2-1-3, taking the gray level image obtained in the step S2-1-2 as an input image, and solving an image definition evaluation index of the gray level image.
Preferably, the step S2-1-3 comprises the following steps:
s2-1-3a-1, calculating gradients of an input gray image in horizontal and vertical directions by using a Sobel operator;
The Sobel operator is as follows:
Longitudinal direction:
Transverse direction:
Wherein, And/>Representing the longitudinal Sobel operator and the transverse Sobel operator, respectively,/>And/>Expressed as the convolution of Sobel horizontal and vertical edge detection operators at pixel (x, y), x, y being the abscissa and ordinate of pixel (x, y), respectively,/>Is an input gray scale image;
s2-1-3a-2. Solving the image sharpness with a Ten gradient function As an image sharpness evaluation index of an inputted gray-scale image:
Wherein, Is a given edge detection threshold.
Preferably, the step S2-1-3 comprises the following steps:
s2-1-3b-1. Calculating the difference between the gray values of the input gray image in the horizontal and vertical directions at the pixel point (x, y) And/>:
Gradation value representing gradation image,/>And/>Pixel coordinates of the gray scale images respectively;
s2-1-3b-2. Calculating energy gradient ;
Wherein the energy gradientA gradient value representing an inputted gray-scale image at each pixel position;
S2-1-3b-3, accumulating and averaging the energy gradients of the whole image obtained in the step S2-1-3b-2, and calculating an average energy gradient AEG to be used as an image definition evaluation index of the input gray image;
Wherein, And/>The height and width of the inputted gray-scale image are represented, respectively.
Preferably, training the deep learning model includes the steps of:
S2-2-1, taking a digital image of a sample shot by a digital camera, performing manual marking, and then inputting the digital image into the deep learning model to perform training; digital image for input Calculating prediction probability/>, of image definition, of the deep learning model:
,
Wherein,Is a parameter of the deep learning model,/>Is a mapping function of the deep learning model;
s2-2-2 using a binary cross entropy function as a loss function of the deep learning model With calculated predictive probability/>And actual tag/>Differences between;
Wherein each digital image corresponds to an actual label The actual definition mark is an artificial mark, the definition image is 1, and the blurred image is 0;
s2-2-3 solving a minimized loss function of the deep learning model And adjusting parameters/>, of the deep learning model multiple times by a random gradient descent optimizerTo optimize the parameters/>, of the deep learning model:
Wherein,Representing the number of training samples,/>Represents the/>Training samples,/>Is its corresponding tag.
Preferably, n=3, and R (1) isDeltaX (1) is/>R (2) is/>DeltaX (2) is/>R (3) is/>DeltaX (3) is/>。
Preferably, the step S2-1-2 includes the steps of:
s2-1-2-1, carrying out guide filtering treatment on the gray level image obtained in the step S2-1-1;
s2-1-2-2, normalizing the gray value of each pixel of the processed gray image into a [60,255] interval according to the gray value interval of the gray image so as to be consistent with the background gray of the gray image, thereby removing part of noise and impurities.
The invention utilizes the deep learning technology and assists the automatic focusing of the microscope image by training a deep learning algorithm model. First, a large number of microscope images are acquired and corresponding sharpness information is annotated. The data is then used to train a deep learning algorithm model to build a mapping relationship between image sharpness and focus. In practical application, through collecting a microscope image in real time and inputting a trained deep learning algorithm model, automatic focusing can be rapidly and accurately realized, and the imaging quality and the working efficiency of the microscope are effectively improved. The invention has wide application prospect in various microscope application scenes, and provides a new thought and method for development of microscope automatic focusing technology.
Drawings
FIG. 1 is a real digital image of a pattern from blurred to clear and then to blurred during auto-focus of a microscope;
Fig. 2 is the most clear digital image of fig. 1.
Detailed Description
The technical scheme of the patent is further described in detail below with reference to the specific embodiments.
In the description of the present invention, it should be noted that the positional or positional relationship indicated by the terms such as "inner", "outer", "upper", "lower", "horizontal", etc. are based on the positional or positional relationship shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the apparatus or element in question must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention.
As shown in fig. 1 and 2, the microscope used in the method for automatically focusing a microscope based on deep learning and image processing comprises an objective lens, a driving device for adjusting the Z-axis position of the objective lens, and a digital camera for acquiring digital images from the microscope, wherein the microscope comprises a sampling module for controlling the driving device and the digital camera to acquire digital images of samples and Z-axis position information of corresponding objective lenses when the objective lenses are positioned at different Z-axis heights; the system also comprises an optimal focal length evaluation module for outputting an optimal focal length.
The automatic focusing method of the microscope comprises the following steps:
s1, setting n travel ranges R (n), n step sizes delta X (n) and a first initial position O 1, wherein n is a natural number larger than 1, and R (k) > R (k+1), delta X (k) > delta X (k+1) are met, wherein k >1 and k < n;
S2, letting i=1;
s3, inputting an initial position O i, a travel range R (i) and a step length delta x (i) into a sampling module to obtain a digital image and corresponding Z-axis position information thereof;
s4, inputting the digital image obtained in the step S3 and the corresponding Z-axis position information into an optimal focal length evaluation module to obtain an optimal focal length;
S5, making i=i+1, and repeating the steps S3 to S5 by taking the optimal focal length obtained in the step S4 as an initial position O i until i=n;
S6, taking the best focal length obtained in the S4 as a final focal length, and driving the objective lens to move to the final focal length by the driving device so as to complete automatic focusing.
In a preferred embodiment of the present invention, n=3 is taken and R (1) isDeltaX (1) is/>R (2) is/>DeltaX (2) is/>R (3) is/>DeltaX (3) is/>. By adopting the parameters, the effect is good, the time consumption is less, and the efficiency is high.
The workflow of the sampling module comprises the following steps:
s1-1, controlling the objective lens to move to an input initial position, and driving the objective lens to move unidirectionally along a Z axis according to an input step length in an input stroke range from the initial position; after each objective lens moves in place, a digital image of the sample is obtained through a digital camera;
S1-2, outputting all the digital images acquired in the step S1-1 and Z-axis position information corresponding to each digital image.
The workflow of the best focus evaluation module comprises the following steps:
s2-1, sequentially calculating each input digital image through a traditional image definition evaluation algorithm to obtain a traditional image definition score corresponding to each digital image;
S2-2, sequentially passing each input digital image through a deep learning model to obtain the confidence score of the deep learning definition of each digital image;
S2-3, carrying out normalization processing on the traditional image definition scores of each digital image according to the scoring ranges of all the current digital images, and then weighting the traditional image definition scores and the confidence scores of the deep learning definition:
Where AEG is the average energy gradient, Q is the final image sharpness score, Q is the weighting factor, The prediction probability of the model to the image definition;
S2-4, fitting the final image definition score of each digital image and the Z-axis position information corresponding to the final image definition score into a quadratic curve, calculating the vertex of the quadratic curve, obtaining the Z-axis position information when the final image definition score is highest, taking the Z-axis position information as the best focal length, and outputting the Z-axis position information.
And wherein the conventional image sharpness evaluation algorithm comprises the steps of:
S2-1-1, converting the digital image into a gray image;
s2-1-2, carrying out noise and impurity removal treatment on the gray level image obtained in the step S2-1-1;
S2-1-3, taking the gray level image obtained in the step S2-1-2 as an input image, and solving an image definition evaluation index of the gray level image.
Wherein, for step S2-1-2, comprising the following steps:
s2-1-2-1, carrying out guide filtering treatment on the gray level image obtained in the step S2-1-1;
s2-1-2-2, normalizing the gray value of each pixel of the processed gray image into a [60,255] interval according to the gray value interval of the gray image so as to be consistent with the background gray of the gray image, thereby removing part of noise and impurities.
As one of ordinary skill in the art, in step S2-1-1, converting the digital image into a gray scale image is a well known and conventional technique in the art, and the relevant processing method is numerous, and a proper use may be selected.
As one of ordinary skill in the art, other techniques known in the art may be used to remove noise and impurities from the gray scale image in step S2-1-2.
For step S2-1-3, the present invention provides two solutions:
Scheme one, including the following steps:
s2-1-3a-1, calculating gradients of an input gray image in horizontal and vertical directions by using a Sobel operator;
The Sobel operator is as follows:
Longitudinal direction:
Transverse direction:
Wherein, And/>Representing the longitudinal Sobel operator and the transverse Sobel operator, respectively,/>And/>Expressed as the convolution of Sobel horizontal and vertical edge detection operators at pixel (x, y), x, y being the abscissa and ordinate of pixel (x, y), respectively,/>Is an input gray scale image;
s2-1-3a-2. Solving the image sharpness with a Ten gradient function As an image sharpness evaluation index of an inputted gray-scale image:
Wherein, Is a given edge detection threshold.
Scheme II, including the following steps:
s2-1-3b-1. Calculating the difference between the gray values of the input gray image in the horizontal and vertical directions at the pixel point (x, y) And/>:
Gradation value representing gradation image,/>And/>Pixel coordinates of the gray scale images respectively;
s2-1-3b-2. Calculating energy gradient ;
Wherein the energy gradientA gradient value representing an inputted gray-scale image at each pixel position;
S2-1-3b-3, accumulating and averaging the energy gradients of the whole image obtained in the step S2-1-3b-2, and calculating an average energy gradient AEG to be used as an image definition evaluation index of the input gray image;
Wherein, And/>The height and width of the inputted gray-scale image are represented, respectively.
The training of the deep learning model comprises the following steps:
S2-2-1, taking a digital image of a sample shot by a digital camera, performing manual marking, and then inputting the digital image into a deep learning model to perform training; digital image for input Calculating prediction probability/>, of image definition, of deep learning model:
,
Wherein,Is a parameter of a deep learning model,/>Is a mapping function of the deep learning model;
s2-2-2 using a binary cross entropy function as a loss function for the deep learning model With calculated predictive probability/>And actual tag/>Differences between;
Wherein each digital image corresponds to an actual label The actual definition mark is an artificial mark, the definition image is 1, and the blurred image is 0;
s2-2-3 solving the minimum loss function of the deep learning model And the parameter/>, of the deep learning model is adjusted for a plurality of times through a random gradient descent optimizerTo optimize the parameters/>, of the deep learning model:
Wherein,Representing the number of training samples,/>Represents the/>Training samples,/>Is its corresponding tag.
In practical operation, for example, a slide sample is first placed under a low power objective lens of a microscope, and rough focusing is required after the slide is replaced because the surface flatness, height and target size of different samples are different. The Z-axis distance between the sample and the microscope objective is controlled by the objective table controller to replace the traditional manual preliminary coarse focusing. First, setting the coarse focus adjustment stroke of the Z axis inMove unidirectionally within a range, every/>And shooting once, and respectively acquiring low-power objective shooting images under different focal lengths. Secondly, after obtaining the optimal focal length, taking the Z-axis height of the microscope corresponding to the optimal focal length as an initial position 0, and then carrying out preliminary focusing on different shooting positions, wherein the focusing shooting range isThe Z-axis height of the microscope is adjusted to be unidirectionally adjusted, and the interval between each shooting is/>. Thirdly, after obtaining the optimal focal length, taking the Z-axis height of the microscope corresponding to the optimal focal length as an initial position 0, and finally performing focal length fine adjustment, wherein the focusing shooting range is/>The Z-axis height of the microscope is adjusted to be unidirectionally adjusted, and the interval between each shooting is/>。
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present invention.
Claims (7)
1. A microscope automatic focusing method based on deep learning and image processing, which uses a microscope comprising an objective lens, a driving device for adjusting the Z-axis position of the objective lens and a digital camera for acquiring digital images from the microscope, and is characterized by comprising a sampling module for controlling the driving device and the digital camera to acquire digital images of samples and Z-axis position information of the corresponding objective lens when the objective lens is positioned at different Z-axis heights; the system also comprises an optimal focal length evaluation module for outputting an optimal focal length;
The automatic focusing method of the microscope comprises the following steps:
s1, setting n travel ranges R (n), n step sizes delta X (n) and a first initial position O 1, wherein n is a natural number larger than 1, and R (k) > R (k+1), delta X (k) > delta X (k+1) are met, wherein k >1 and k < n;
S2, letting i=1;
S3, inputting an initial position O i, the travel range R (i) and a step length delta x (i) into the sampling module to obtain a plurality of digital images and corresponding Z-axis position information thereof;
s4, inputting all the digital images obtained in the step S3 and the corresponding Z-axis position information into the optimal focal length evaluation module to obtain an optimal focal length;
S5, making i=i+1, and repeating the steps S3 to S5 by taking the optimal focal length obtained in the step S4 as an initial position O i until i=n;
s6, taking the optimal focal length obtained in the step S4 as a final focal length, and driving the objective lens to move to the final focal length by the driving device so as to complete automatic focusing;
The workflow of the sampling module comprises the following steps:
s1-1, controlling the objective lens to move to an input initial position, and driving the objective lens to move unidirectionally along a Z axis according to an input step length in an input stroke range from the initial position; after each time the objective lens moves into place, acquiring a digital image of a sample by the digital camera;
S1-2, outputting all the digital images acquired in the step S1-1 and Z-axis position information corresponding to each digital image;
The workflow of the best focus evaluation module comprises the following steps:
s2-1, sequentially calculating each input digital image through a traditional image definition evaluation algorithm to obtain a traditional image definition score corresponding to each digital image;
S2-2, sequentially passing each input digital image through a deep learning model to obtain the confidence score of the deep learning definition of each digital image;
S2-3, carrying out normalization processing on the traditional image definition scores of each digital image according to the scoring ranges of all the current digital images, and then weighting the traditional image definition scores and the confidence scores of the deep learning definition:
Where AEG is the average energy gradient, Q is the final image sharpness score, Q is the weighting factor, The prediction probability of the model to the image definition;
S2-4, fitting the final image definition score of each digital image and the Z-axis position information corresponding to the final image definition score into a quadratic curve, calculating the vertex of the quadratic curve, obtaining the Z-axis position information when the final image definition score is highest, taking the Z-axis position information as the best focal length, and outputting the Z-axis position information.
2. The method for automatically focusing a microscope based on deep learning and image processing according to claim 1, wherein: the conventional image definition evaluation algorithm comprises the following steps:
S2-1-1, converting the digital image into a gray image;
s2-1-2, carrying out noise and impurity removal treatment on the gray level image obtained in the step S2-1-1;
S2-1-3, taking the gray level image obtained in the step S2-1-2 as an input image, and solving an image definition evaluation index of the gray level image.
3. The method for automatically focusing a microscope based on deep learning and image processing according to claim 2, wherein: the step S2-1-3 comprises the following steps:
s2-1-3a-1, calculating gradients of an input gray image in horizontal and vertical directions by using a Sobel operator;
The Sobel operator is as follows:
Longitudinal direction: ,
Transverse direction: ,
,
,
Wherein, And/>Representing the longitudinal Sobel operator and the transverse Sobel operator, respectively,/>And/>Expressed as the convolution of Sobel horizontal and vertical edge detection operators at pixel (x, y), x, y being the abscissa and ordinate of pixel (x, y), respectively,/>Is an input gray scale image;
s2-1-3a-2. Solving the image sharpness with a Ten gradient function As an image sharpness evaluation index of an inputted gray-scale image:
Wherein, Is a given edge detection threshold.
4. The method for automatically focusing a microscope based on deep learning and image processing according to claim 2, wherein: the step S2-1-3 comprises the following steps:
s2-1-3b-1. Calculating the difference between the gray values of the input gray image in the horizontal and vertical directions at the pixel point (x, y) And/>:
Gradation value representing gradation image,/>And/>Pixel coordinates of the gray scale images respectively;
s2-1-3b-2. Calculating energy gradient ;
Wherein the energy gradientA gradient value representing an inputted gray-scale image at each pixel position;
S2-1-3b-3, accumulating and averaging the energy gradients of the whole image obtained in the step S2-1-3b-2, and calculating an average energy gradient AEG to be used as an image definition evaluation index of the input gray image;
Wherein, And/>The height and width of the inputted gray-scale image are represented, respectively.
5. The method for automatically focusing a microscope based on deep learning and image processing according to claim 1, wherein: training the deep learning model comprises the following steps:
S2-2-1, taking a digital image of a sample shot by a digital camera, performing manual marking, and then inputting the digital image into the deep learning model to perform training; digital image for input Calculating prediction probability/>, of image definition, of the deep learning model:
,
Wherein,Is a parameter of the deep learning model,/>Is a mapping function of the deep learning model;
s2-2-2 using a binary cross entropy function as a loss function of the deep learning model With calculated predictive probability/>And actual tag/>Differences between;
Wherein each digital image corresponds to an actual label The actual definition mark is an artificial mark, the definition image is 1, and the blurred image is 0;
s2-2-3 solving a minimized loss function of the deep learning model And adjusting parameters/>, of the deep learning model multiple times by a random gradient descent optimizerTo optimize the parameters/>, of the deep learning model:
Wherein,Representing the number of training samples,/>Represents the/>Training samples,/>Is its corresponding tag.
6. The method for automatically focusing a microscope based on deep learning and image processing according to claim 1, wherein: n=3, and R (1) isDeltaX (1) is/>R (2) is/>DeltaX (2) is/>R (3) isDeltaX (3) is/>。
7. The method for automatically focusing a microscope based on deep learning and image processing according to claim 1, wherein: the step S2-1-2 comprises the following steps:
s2-1-2-1, carrying out guide filtering treatment on the gray level image obtained in the step S2-1-1;
s2-1-2-2, normalizing the gray value of each pixel of the processed gray image into a [60,255] interval according to the gray value interval of the gray image so as to be consistent with the background gray of the gray image, thereby removing part of noise and impurities.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410354290.3A CN117970595B (en) | 2024-03-27 | 2024-03-27 | Microscope automatic focusing method based on deep learning and image processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410354290.3A CN117970595B (en) | 2024-03-27 | 2024-03-27 | Microscope automatic focusing method based on deep learning and image processing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117970595A true CN117970595A (en) | 2024-05-03 |
CN117970595B CN117970595B (en) | 2024-06-18 |
Family
ID=90862911
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410354290.3A Active CN117970595B (en) | 2024-03-27 | 2024-03-27 | Microscope automatic focusing method based on deep learning and image processing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117970595B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118400616A (en) * | 2024-06-25 | 2024-07-26 | 三诺生物传感股份有限公司 | Camera focusing method of blood analyzer and blood analyzer |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000009991A (en) * | 1998-06-19 | 2000-01-14 | Nec Corp | Device and method of automatic focusing |
US20080137938A1 (en) * | 2006-12-11 | 2008-06-12 | Cytyc Corporation | Method for assessing image focus quality |
WO2014059858A1 (en) * | 2012-10-18 | 2014-04-24 | 苏州惠生电子科技有限公司 | Microscope image detecting instrument and automatic focusing method therefor |
WO2016101092A1 (en) * | 2014-12-22 | 2016-06-30 | 杭州唐光科技有限公司 | Digital microscope and focusing method thereof |
CN110428463A (en) * | 2019-06-04 | 2019-11-08 | 浙江大学 | The method that image automatically extracts center during aspherical optical element defocus blur is fixed |
CN110531484A (en) * | 2019-07-24 | 2019-12-03 | 中国地质大学(武汉) | A kind of microscope Atomatic focusing method that focus process model can be set |
CN111007661A (en) * | 2019-12-02 | 2020-04-14 | 湖南国科智瞳科技有限公司 | Microscopic image automatic focusing method and device based on deep learning |
CN112433339A (en) * | 2020-12-10 | 2021-03-02 | 济南国科医工科技发展有限公司 | Microscope fine focusing method based on random forest |
CN116405775A (en) * | 2023-03-06 | 2023-07-07 | 广州市华粤行医疗科技有限公司 | Automatic focusing method and device, electronic equipment and shooting system |
CN117310962A (en) * | 2023-09-12 | 2023-12-29 | 湖南晟瞳科技有限公司 | Microscopic imaging focusing control method and device |
CN117590574A (en) * | 2023-12-08 | 2024-02-23 | 广东粤港澳大湾区黄埔材料研究院 | Microscope automatic focusing method, terminal and system |
-
2024
- 2024-03-27 CN CN202410354290.3A patent/CN117970595B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000009991A (en) * | 1998-06-19 | 2000-01-14 | Nec Corp | Device and method of automatic focusing |
US20080137938A1 (en) * | 2006-12-11 | 2008-06-12 | Cytyc Corporation | Method for assessing image focus quality |
WO2014059858A1 (en) * | 2012-10-18 | 2014-04-24 | 苏州惠生电子科技有限公司 | Microscope image detecting instrument and automatic focusing method therefor |
WO2016101092A1 (en) * | 2014-12-22 | 2016-06-30 | 杭州唐光科技有限公司 | Digital microscope and focusing method thereof |
CN110428463A (en) * | 2019-06-04 | 2019-11-08 | 浙江大学 | The method that image automatically extracts center during aspherical optical element defocus blur is fixed |
CN110531484A (en) * | 2019-07-24 | 2019-12-03 | 中国地质大学(武汉) | A kind of microscope Atomatic focusing method that focus process model can be set |
CN111007661A (en) * | 2019-12-02 | 2020-04-14 | 湖南国科智瞳科技有限公司 | Microscopic image automatic focusing method and device based on deep learning |
CN112433339A (en) * | 2020-12-10 | 2021-03-02 | 济南国科医工科技发展有限公司 | Microscope fine focusing method based on random forest |
CN116405775A (en) * | 2023-03-06 | 2023-07-07 | 广州市华粤行医疗科技有限公司 | Automatic focusing method and device, electronic equipment and shooting system |
CN117310962A (en) * | 2023-09-12 | 2023-12-29 | 湖南晟瞳科技有限公司 | Microscopic imaging focusing control method and device |
CN117590574A (en) * | 2023-12-08 | 2024-02-23 | 广东粤港澳大湾区黄埔材料研究院 | Microscope automatic focusing method, terminal and system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118400616A (en) * | 2024-06-25 | 2024-07-26 | 三诺生物传感股份有限公司 | Camera focusing method of blood analyzer and blood analyzer |
Also Published As
Publication number | Publication date |
---|---|
CN117970595B (en) | 2024-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN117970595B (en) | Microscope automatic focusing method based on deep learning and image processing | |
CN109085113B (en) | Automatic focusing method and device for cervical exfoliated cell detection device | |
EP2102816B1 (en) | Method for assessing image focus quality | |
EP2671113B1 (en) | Fast auto-focus in microscopic imaging | |
CN110531484B (en) | Microscope automatic focusing method with settable focusing process model | |
CN111062961A (en) | Contact lens edge defect detection method based on deep learning | |
CN111462075A (en) | Rapid refocusing method and system for full-slice digital pathological image fuzzy area | |
CN114119526A (en) | Steel plate surface defect detection and identification system and method based on machine vision | |
CN113923358A (en) | Online automatic focusing method and system in flying shooting mode | |
CN115330859A (en) | Automatic focusing and automatic centering method and system based on machine vision | |
CN106381264B (en) | The a wide range of automatic positioning method of micropipette pipe needle point in the micro-injection system of robot assisted | |
CN113899698B (en) | Real-time focusing and centering adjustment method and device for in-situ test platform | |
CN113253416B (en) | Telescope efficient and accurate focusing method based on star image ellipticity model | |
CN116931248A (en) | Microscope automatic focusing method and system based on image definition evaluation | |
CN109318235B (en) | Quick focusing method of robot vision servo system | |
CN111505816A (en) | High-flux electron microscope imaging method and system | |
CN114120318B (en) | Dark field image target point accurate extraction method based on integrated decision tree | |
CN116164641A (en) | Probe station motion position compensation method based on machine vision | |
CN112839168B (en) | Method for automatically adjusting camera imaging resolution in AOI detection system | |
CN114384681A (en) | Rapid and accurate automatic focusing method and system for microscope, computer equipment and medium | |
CN117850032B (en) | Optical lens adjusting method and system | |
CN114119555B (en) | Large-caliber element edge detection method based on object distance focusing method | |
CN116736511B (en) | Natural image automatic focusing method based on deep learning | |
CN113869363B (en) | Mountain climbing focusing searching method based on image evaluation network and image evaluation function | |
CN115876803A (en) | Milling cutter coating defect detection method and system based on zoom microscopy |
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 |