Microscope image definition scoring method

By performing noise reduction processing and feature extraction on microscope images, and using KD-Tree of the FLANN library for feature matching, the problem of inaccurate scoring of microscope images in the existing technology is solved, and accurate clarity scoring and efficient calculation of microscope images are achieved. .

CN118628775AActive Publication Date: 2024-09-10笑纳科技(苏州)有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411113818.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-09-10
Estimated Expiration
2044-08-14

AI Technical Summary

Technical Problem

Existing camera autofocus technology cannot correctly calculate the clearest image in a microscope image. Images that are blurry or contain impurities are scored higher, resulting in inaccurate scoring of microscope images.

Method used

A microscope image clarity scoring method is used to obtain a clear chromosome image as a template, perform noise reduction processing and extract feature points, match the feature points of the image to be scored, calculate the distance between the feature points and delete points whose distance is less than the threshold, and count the remaining features. Points are used as sharpness scores, and KD-Tree of the FLANN library is used for feature matching and nearest neighbor query.

Benefits of technology

It achieves accurate clarity scoring of microscope images, improves calculation efficiency, and can significantly reduce calculation time and resource consumption while ensuring processing effects. It is suitable for pathological diagnosis and biomedical research in the field of medical images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628775A
    Figure CN118628775A
Patent Text Reader

Abstract

The invention discloses a microscope image definition scoring method, and relates to the technical field of image recognition. The method comprises the following steps: S1, obtaining a clear chromosome image as a template image, and carrying out noise reduction processing to obtain a denoised template image; template image features are extracted from the denoised template image based on a feature extractor; s2, obtaining a to-be-scored image, and carrying out noise reduction processing to obtain the to-be-scored image after noise reduction; extracting to-be-scored image features from the denoised to-be-scored image based on a feature extractor; s3, matching the template image features' with to-be-scored image features to obtain a matched feature point set; s4, calculating to obtain a definition score; according to the method, the matching feature point set is obtained by matching the template image features with the to-be-scored image features, and then the definition score and the like are obtained through calculation, so that the microscope image scoring is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image recognition, and in particular to a microscope image clarity scoring method. Background Art

[0002] Microscope imaging technology is an indispensable tool in biomedical research, allowing scientists to observe the details of cells, tissues and other microscopic structures. However, traditional microscope images require human eyes to observe. With the development of automation technology, the technology of fully automatic shooting and enhancing microscope images is becoming more and more mature. The key to achieving full automation is to automatically identify the focal length of the clearest image when the camera adjusts the focus to shoot.

[0003] Existing camera autofocus technology is mainly used for ordinary scenes. For taking microscope images, the camera focus is automatically controlled to take a picture every 1 micron. The existing clarity algorithm cannot correctly calculate the clearest picture in a series of images taken, and often blurry pictures containing impurities have higher scores. Summary of the invention

[0004] The invention provides a microscope image clarity scoring method to solve the technical problem of inaccurate microscope image scoring.

[0005] In order to solve the above technical problems, the technical solutions adopted by the present invention are as follows:

[0006] A microscope image clarity scoring method comprises the following steps:

[0007] Step S1: Obtain a clear chromosome image as a template image A, obtain a denoised template image A' through denoising; extract a template image feature F from the denoised template image A' based on a feature extractor A' ; Feature F A' The set of feature points {P A'} and the feature description vector {V A'};

[0008] Step S2: Obtain the image I to be rated K , after denoising, the denoised image to be rated is obtained ; Based on the feature extractor, the image to be rated after denoising Extract the features of the image to be rated ;feature The set of feature points includes { } and the feature description vector corresponding to each feature point { };

[0009] Step S3: The template feature F obtained in step S1A' and the image features to be rated obtained in step S2 Perform matching to obtain matching feature point set ; Matching feature point set It contains the mapping relationship between feature points, that is, each element in the set is a pair of points and does not contain a feature description vector;

[0010] Step S4: Calculate and obtain the clarity score, which is specifically divided into the following steps:

[0011] Step S401: From the matching feature point set Delete the template graph feature F A' Corresponding feature points are obtained with the image to be rated Features F A' The corresponding feature point set {P img}; Feature point set {P img} only includes points and does not contain feature description vectors; the feature point set {P img} is a feature The feature point set { } subset;

[0012] Step S402: For the feature point set {P img Every point P in i , calculate P i The distance value with all other points, if there is a distance value less than the threshold, then P i From {P img}, and obtain the filtered image feature point set {P res};

[0013] Step S403: Count the filtered feature point set of the image to be rated {P res} is used as the clarity score of the image to be rated.

[0014] A further technical solution is that in step S1, the noise reduction step includes performing discrete Fourier transform on the template image A to obtain a frequency domain image A DFT , for the frequency domain image A DFT Perform logarithmic transformation to obtain frequency domain image A DFT The logarithmic Fourier amplitude spectrum of the template image A is obtained by obtaining the frequency domain filter Filter, which is a binary image with the same size as the template image A. DFT The logarithmic Fourier amplitude spectrum is multiplied by the frequency domain filter Filter to obtain the filtered frequency domain image The Fourier amplitude spectrum of the filtered frequency domain image The Fourier amplitude spectrum is inversely discrete Fourier transformed to obtain the denoised template image A'.

[0015] A further technical solution is that in the step S1, the feature extractor is a SIFT feature extractor, which is created by calling the cv2.SIFT_create() function by the scale-invariant feature transformation algorithm SIFT.

[0016] A further technical solution is that: the step S1 further includes converting the template feature F A' The feature points in are drawn on the denoised template image A' to obtain an image containing the feature points.

[0017] A further technical solution is that: in step S2, the image to be rated I K Includes multiple images of the same field of view automatically taken at multiple focal lengths, and noise reduction processing of the image to be scored I K The method is the same as the method for denoising the template image A in step S1.

[0018] A further technical solution is that in step S2, the pictures are pictures taken by controlling the microscope with a focal length interval of 1 micron, and the number of pictures is nine.

[0019] A further technical solution is that: the step S2 further includes extracting the features of the image to be rated Draw the image to be scored after denoising The image to be scored containing feature points is obtained.

[0020] A further technical solution is that: in step S3, the matching step includes a matcher using a KD-Tree in the FLANN library to perform a range query and a nearest neighbor query, and the matcher is created by calling cv2.FlannBasedMatcher() in the OpenCV library; when the feature of an image to be scored in step S2 is calculated The corresponding matching feature point set , repeat step S3 until each image feature to be rated is obtained The corresponding matching feature point set .

[0021] A further technical solution is that: the step S3 further includes matching the feature point set Draw the template image A' after denoising and the image to be scored after denoising A denoised image containing a set of matching feature points is obtained, and the two denoised images are stitched together for display.

[0022] A further technical solution is that: in step S402, the distance is a Euclidean distance or a Euclidean distance; in step S403, a clarity score of an image to be rated is calculated, and step S4 is repeated until the clarity score of each image to be rated obtained according to step S3 is obtained. The corresponding matching feature point set , calculate and obtain the clarity scores of all images to be rated.

[0023] The beneficial effects of adopting the above technical solution are: First, a microscope image clarity scoring method includes the following steps: Step S1: obtaining a clear chromosome image as a template image A, and obtaining a denoised template image A' through denoising; extracting a template image feature F from the denoised template image A' based on a feature extractor; A' ; Step S2: Obtain the image I to be rated K , after denoising, the denoised image to be scored is obtained ; Based on the feature extractor, the image to be rated after denoising Extract the features of the image to be rated ; Step S3: The template feature F obtained in step S1 A' and the image features to be rated obtained in step S2 Perform matching to obtain matching feature point set ; Step S4: Calculate the clarity score, which includes the following steps: Step S401: From the matching feature point set Delete the template graph feature F A' The corresponding feature points are obtained with the image to be rated Features The corresponding feature point set {P img}; Step S402: Calculate the feature point set {P img}, and the image to be scored is matched with the feature point set {P img}The corresponding feature points with distance values ​​less than the distance threshold are deleted to obtain the filtered feature point set of the image to be scored{P res Step S403: Count the filtered feature point set of the image to be rated {P res} is used as the clarity score of the image to be rated. A' and the features of the image to be rated Perform matching to obtain matching feature point set , and then calculate the clarity score, etc., making the microscope image scoring more accurate.

[0024] Second, in step S3, the matching step includes a matcher using KD-Tree in the FLANN library to perform range query and nearest neighbor query, and the matcher is created by calling cv2.FlannBasedMatcher() in the OpenCV library. This application uses the FLANN library for feature matching, which is an efficient approximate nearest neighbor search library, particularly suitable for high-dimensional feature spaces, and uses the KD-Tree in the FLANN library to efficiently perform range query and nearest neighbor query.

[0025] Please refer to the detailed description of the specific implementation method. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1a is a flow chart of Embodiment 1 of the present invention; Figure 1b yes Figure 1a Flow chart of step S1 in FIG. Figure 1c yes Figure 1a Flow chart of step S4; Figure 1d is a data flow diagram of Embodiment 1 of the present invention; Figure 2a is the original image of template image A; Figure 2b is the frequency domain image A DFT The logarithmic Fourier amplitude spectrum of Figure 3 It is a binary image of the frequency domain filter Filter; Figure 4 is the frequency domain image after filtering The Fourier amplitude spectrum of Figure 5 is the template image A' after denoising; Figure 6 The template graph feature F A' Plot the image obtained on the denoised template image A'; Figure 7a is the original image to be rated; Figure 7b is the log Fourier magnitude spectrum of the image to be scored; Figure 7c is the Fourier amplitude spectrum of the filtered image to be scored; Figure 7d is the image to be rated after denoising ; Figure 8 is the image to be scored containing feature points; Fig. 9 is a denoised image containing a set of matching feature points; Fig.10 is a graph of the clarity scores. DETAILED DESCRIPTION

[0027] The microscope image clarity enhancement algorithm of the present application is intended to address the limitations of the prior art. The purpose of the algorithm is to calculate the clarity score of each input image. The algorithm expects that among the n images of the same field of view input, the image that is clearest to the naked eye has the highest clarity score.

[0028] This algorithm improves the existing technology in the following aspects: Accurately calculate clarity: The algorithm can automatically calculate the clarity of images taken at different focal lengths, without being affected by impurities and lighting in the camera's field of view, and has high accuracy.

[0029] Noise suppression: Use discrete Fourier transform to convert to the frequency domain for noise reduction. The algorithm is highly stable against noise.

[0030] Computational efficiency: The algorithm optimizes the calculation process. By parallelizing the key time-consuming steps, it can significantly reduce the calculation time and resource consumption while ensuring the processing effect.

[0031] The algorithm of this application has important application value in the field of medical images. In pathological diagnosis, clear images can help doctors identify and evaluate lesions more accurately. In biomedical research, high-quality image data can provide a more reliable basis for quantitative analysis and pattern recognition.

[0032] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present application and its application or use. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.

[0034] Example 1

[0035] like Figure 1a As shown, the present invention discloses a microscope image clarity scoring method comprising the following steps: Step S1: Obtain features of the template image.

[0036] A clear chromosome image is obtained as a template image A, and a denoised template image A' is obtained after denoising. The template image feature F is extracted from the denoised template image A' based on a feature extractor. A' ; Feature F A' The set of feature points {P A'} and the feature description vector {V A'}.

[0037] Details are as follows: like Figure 1b As shown, Figure 1a Flow chart of step S1 in FIG. 1 , step S1 is divided into the following steps.

[0038] Step S101: Read the template image and reduce noise.

[0039] The clear chromosome image is obtained as the template image A, and the template image A' after noise reduction is obtained by noise reduction processing; this step is step S101, and step S101 includes obtaining a clear chromosome image as the template image A, obtaining a frequency domain image A by discrete Fourier transform DFT , for the frequency domain image A DFT Perform logarithmic transformation to obtain frequency domain image A DFT The logarithmic Fourier amplitude spectrum of the template image A is obtained by obtaining the frequency domain filter Filter, which is a binary image with the same size as the template image A. DFT The logarithmic Fourier amplitude spectrum is multiplied by the frequency domain filter Filter to obtain the filtered frequency domain image The Fourier amplitude spectrum of the filtered frequency domain image The Fourier amplitude spectrum of is subjected to inverse discrete Fourier transform to obtain the template image A' after noise reduction. The details are as follows.

[0040] like Figure 2a As shown, the original grayscale image of template image A, template image A is a clear chromosome image taken with a camera manually focused, and does not contain background impurities, etc. The shooting area of ​​the template image is randomly selected, and is not taken in the same field of view as the image to be calculated later.

[0041] The noise reduction processing of this application is performed in the frequency domain, using the Discrete Fourier Transform, or DFT for short. It is the application of the Fourier transform on discrete signals and is a core tool in digital signal processing for converting signals from the time domain to the frequency domain. The principle of DFT is based on the expansion of the Fourier series, which can analyze the frequency components of discrete signals.

[0042] For a length of The discrete time signal x[n], whose discrete Fourier transform is defined as: (1) In formula (1), X[k] is the kth frequency component of the signal x[n], x[n] is a discrete signal in the time domain; k is a frequency index, which is usually in the range of 0, 1, 2, ..., N-1; j is an imaginary unit that satisfies j 2 =-1; N is the signal length, e is the base of the natural logarithm.

[0043] Apply DFT to the input template image A to obtain the frequency domain image A DFT To display the image after discrete Fourier transform DFT, it is usually not necessary to directly display the complex form of DFT result, that is, the frequency domain image A DFT Instead, the magnitude spectrum of the DFT or the log-transformed magnitude spectrum is usually displayed because the original magnitude spectrum may span several orders of magnitude and displaying it directly may make most of the details invisible.

[0044] like Figure 2b As shown, for the frequency domain image A DFT Perform logarithmic transformation to obtain frequency domain image A DFT The logarithmic Fourier amplitude spectrum of .

[0045] like Figure 3 As shown, we then create a frequency domain filter Filter, which is a binary image of the same size as the template image A. Assume that the width and height of the template image A are W and H respectively, and its central area has a circle with a radius of r=min(W,H)×0.1. The value in the circular area is 1, and the rest of the area is 0.

[0046] like Figure 4 As shown, the frequency domain image A DFT The logarithmic Fourier amplitude spectrum is multiplied by the frequency domain filter Filter to obtain the filtered frequency domain image The Fourier amplitude spectrum of .

[0047] Finally, the Inverse Discrete Fourier Transform (IDFT) is used to convert the frequency domain signal back to the time domain. The formula is as follows: (2)

[0048] like Figure 5 As shown, the filtered image The Fourier amplitude spectrum is inversely discrete Fourier transformed to obtain the output denoised template image A'.

[0049] Step S102: extracting template image features.

[0050] The feature extractor is used to extract the template image feature F from the denoised template image A'. A' This step is step S102, the feature extractor is a SIFT feature extractor, and step S102 includes extracting the template image A' obtained in step S101 after denoising by the SIFT feature extractor to obtain the template image feature F A' The SIFT feature extractor is created by calling the cv2.SIFT_create() function using the scale-invariant feature transformation algorithm SIFT.

[0051] The template graph feature F A' The feature points in are drawn on the denoised template image A' to obtain an image containing the feature points.

[0052] Details are as follows: The input of this step is the denoised template image A' output from step S101. This application uses the SIFT operator to extract image features. Scale-Invariant Feature Transform, abbreviated as SIFT, is a feature extraction algorithm used for key point detection and description in images. It is a mature algorithm that can be directly created by calling the cv2.SIFT_create() function to obtain a SIFT feature extractor. The SIFT feature extractor is applied to the denoised template image A', and the extracted template image features are recorded as F A' ; Feature F A' The set of feature points {P A'} and the feature description vector {V A'}.

[0053] like Figure 6 As shown, the template feature F A' The screenshot of the result obtained by plotting the recorded feature points on the template image A' after noise reduction. The feature points are the feature points detected in the template image. The size of the circle represents the scale of the feature, and the direction of the straight line in the circle represents the main direction of the feature.

[0054] Step S2: Read the images in parallel to perform noise reduction and feature extraction.

[0055] Obtain multiple images of the same field of view automatically taken at multiple focal lengths as the image to be rated I K , after denoising, the denoised image to be rated is obtained ; Based on the feature extractor, the image to be rated after denoising Extract the features of the image to be rated ;feature The set of feature points includes { } and the feature description vector corresponding to each feature point { }.

[0056] Details are as follows: like Figure 1d As shown in the figure, the processing in this step is all parallel operation. The input images are 9 images of the same field of view automatically taken at multiple focal lengths by a machine-controlled 63x microscope. The focal length interval of each image is 1 micron, denoted as {I}. The clarity of these 9 images is unknown. The purpose of the algorithm is to calculate the clarity score of each image to be rated. The algorithm expects that the image that is clearest to the naked eye among the 9 images will have the highest clarity score. Since the parallel operation of each image is the same, the following will take one of them as an example to illustrate the processing steps. This image is denoted as image I to be rated. K The parallel processing in subsequent steps S3 and S4 is similar, and only the processing steps of a single picture are described, and the processing of other pictures is the same.

[0057] like Figure 7a As shown, an original grayscale image of the image to be rated.

[0058] For the image to be rated I K , the processing steps are the same as those of template image A, including denoising and feature extraction.

[0059] The denoising method is the same as that of the template image A in step S101. K Use DFT transform to convert to frequency domain to obtain the frequency domain image of the image to be scored.

[0060] like Figure 7b As shown, the frequency domain image of the image to be scored is logarithmically transformed to obtain the logarithmic Fourier amplitude spectrum of the image to be scored.

[0061] Then apply the frequency domain filter Filter I , which is the image to be rated I K Binary images of the same size. Suppose the image to be scored I K The width and height are W K , H K , whose central area has a radius r=min(W K ,H K )×0.1 circle, the value inside the circle is 1, and the rest of the area is 0.

[0062] like Figure 7c As shown, the logarithmic Fourier amplitude spectrum of the image to be scored is filtered through a frequency domain filter IAfter filtering, the Fourier amplitude spectrum of the filtered image to be scored is obtained.

[0063] like Figure 7d As shown in the figure, the Fourier amplitude spectrum of the image to be rated is transformed back to the time domain using the inverse discrete Fourier transform IDFT to obtain the denoised image to be rated. .

[0064] The feature extraction method is the same as that in step S102. Apply SIFT feature extractor, the feature extraction method is the same as step S102, extract the image to be rated after denoising The features are recorded as the features of the image to be scored .

[0065] like Figure 8 As shown, the extracted image features to be rated Draw the image to be scored after denoising The image to be scored containing feature points is obtained.

[0066] Step S3: Perform feature matching in parallel.

[0067] The template feature F obtained in step S1 A' and the image features to be rated obtained in step S2 Perform matching to obtain matching feature point set ; Matching feature point set It contains the mapping relationship between feature points, that is, each element in the set is a pair of points and does not contain a feature description vector.

[0068] The matching step includes a matcher using a KD-Tree in the FLANN library to perform a range query and a nearest neighbor query, and the matcher is created by calling cv2.FlannBasedMatcher() in the OpenCV library.

[0069] When the features of an image to be rated in step S2 are obtained by calculation The corresponding matching feature point set , repeat step S3 until each image feature to be rated is obtained The corresponding matching feature point set .

[0070] Details are as follows: All calculations in this step are processed in parallel, and the input is the template image feature F extracted in step S102. A' and the features of each image to be rated extracted in step S2 , k∈[0,n], n is the number of pictures of the same scene with different focal lengths taken at one time. Template image feature F A' It is calculated only once and reused.

[0071] This application uses the FLANN library for feature matching. Fast Library for Approximate Nearest Neighbors, abbreviated as FLANN, is an efficient library for approximate nearest neighbor search, especially suitable for high-dimensional feature space. Here, KD-Tree in the FLANN library is used to efficiently perform range query and nearest neighbor query.

[0072] The cv2.FlannBasedMatcher() in the OpenCV library can be called to create a matcher and the template feature F extracted in step S102 can be matched. A' and the image features to be rated extracted in step S2 Perform matching to obtain a set of matching feature points .

[0073] like Fig. 9 As shown, the feature point set will be matched Draw the template image A' after denoising and the image to be scored after denoising The denoised image containing the matching feature point set is obtained above. The two denoised images are displayed together. The connecting lines represent the matching feature points. It can be seen that there are a large number of matching points in the chromosome region.

[0074] Step S4: Calculate the clarity scores in parallel.

[0075] All calculations in this step are processed in parallel, and the input is the set of matching feature points obtained in step S3. In order to match the result of the matching, that is, the matching feature point set In order to score the image clarity, this application designs a scoring algorithm.

[0076] like Figure 1c As shown, Figure 1a Flow chart of step S4 in FIG. 1 , step S4 is specifically divided into the following steps.

[0077] Step S401: From the matching feature point set Delete the template graph feature F A' Corresponding feature points are obtained with the image to be rated Features F A' The corresponding feature point set {P img}; Feature point set {P img} only includes points and does not contain feature description vectors; the feature point set {P img} is a feature The feature point set { }.

[0078] Step S402: For the feature point set {P img Every point P in i , calculate P i The distance value with all other points, if there is a distance value less than the threshold, then P i From {P img}, and obtain the filtered image feature point set {P res}.

[0079] Details are as follows: The distance is Euclidean distance or Euclidean distance.

[0080] In this step, the feature point set {P img The distance value between every two feature points in the feature point set {P img}, the filtered feature point set of the image to be rated is obtained {P res}.

[0081] Specifically, local non-maximum suppression NMS is performed. Non-Maximum Suppression, abbreviated as NMS. img Every point P in i , traverse all remaining points P j ,(j≠i), if distance(P i , P j )﹤threshold, then P j From {P img} until the condition is met: P i , P j ( i≠j)∈{P img}, distance(P i , P j )>threshold, in this application, the distance threshold threshold= 10, the unit is pixel, then the point set consisting of the remaining points {P res}.

[0082] Step S403: Count the filtered feature point set of the image to be rated {P res} is used as the clarity score of the image to be rated.

[0083] At this point, the clarity score of an image to be rated is calculated, and step S4 is repeated until the feature of each image to be rated obtained in step S3 is The corresponding matching feature point set , calculate and obtain the clarity scores of all images to be rated.

[0084] like Fig.10 As shown in the figure, here we select 9 pictures taken continuously with a focal length interval of 1 micron as an example, and the clarity score calculated by the algorithm. It can be seen that the 6th picture has the highest score, which is consistent with the intuition of the human eye, so the result of the clarity algorithm is correct and effective.

[0085] Technical effect: In summary, the clarity algorithm described in the technical solution of the present application can accurately calculate and obtain the clearest microscopic image, and has the following advantages compared with the prior art: First, the calculation can be run on a machine equipped with only a CPU, with high computational efficiency. The total time required to process 20 2048*2048 pixel images on a 12th generation i5 processor is less than 200ms. Second, the accuracy of finding the clearest image is over 90%. Among the 100 groups of images taken, each group of 20 images of the same field of view taken at different focal lengths, only 8 groups had slight deviations in clarity scores.

[0086] Example 2

[0087] Embodiment 2 is different from Embodiment 1 in that, in step S1 and step S2, the step of denoising and the step of extracting features adopt the method steps in the prior art.

[0088] The present invention discloses a microscope image clarity scoring method, comprising the following steps, and the similarities with Example 1 are not repeated here.

[0089] Step S1: Obtain features of the template image.

[0090] Step S1 division includes the following steps.

[0091] Step S101: Read the template image and reduce noise.

[0092] Step S102: extracting template image features.

[0093] Step S2: Read the images in parallel to perform noise reduction and feature extraction.

[0094] Step S3: Perform feature matching in parallel.

[0095] Step S4: Calculate the clarity scores in parallel.

[0096] In step S1 and step S2, the steps of noise reduction processing are the same, and both adopt the method steps of noise reduction processing in the prior art, and the prior art will not be repeated.

[0097] In step S1 and step S2, the steps of extracting features are the same, and both adopt the method steps of extracting features in the prior art, and the prior art will not be repeated.

[0098] Example 3

[0099] The present invention discloses a microscope image clarity scoring device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. The memory and the processor form an electronic terminal. When the processor executes the computer program, the steps of Example 1 are implemented.

[0100] Example 4

[0101] The present invention discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in Embodiment 1 are implemented.

Claims

1. A method for scoring the clarity of microscope images. Features: The following steps are included: Step S1: Obtain a clear chromosome image as a template image A, obtain a denoised template image A' through denoising; extract a template image feature F from the denoised template image A' based on a feature extractor A' ; Feature F A' The set of feature points {P A' } and the feature description vector {V A' }; Step S2: Obtain the image I to be rated K , after denoising, the denoised image to be rated is obtained ; Based on the feature extractor, the image to be rated after denoising Extract the features of the image to be rated ;feature The set of feature points includes { } and the feature description vector corresponding to each feature point { }; Step S3: The template feature F obtained in step S1 A' and the image features to be rated obtained in step S2 Perform matching to obtain matching feature point set ; Matching feature point set It contains the mapping relationship between feature points, that is, each element in the set is a pair of points and does not contain a feature description vector; Step S4: Calculate and obtain the clarity score, which is specifically divided into the following steps: Step S401: From the matching feature point set Delete the template graph feature F A' Corresponding feature points are obtained with the image to be rated Features F A' The corresponding feature point set {P img }; Feature point set {P img } only includes points and does not contain feature description vectors; the feature point set {P img } is a feature The feature point set { } subset; Step S402: For the feature point set {P img Every point P in i , calculate P i The distance value with all other points, if there is a distance value less than the threshold, then P i From {P img }, and obtain the filtered image feature point set to be scored {P res }; Step S403: Count the filtered feature point set of the image to be rated {P res The number of feature points in} is used as the clarity score of the image to be rated.

2. A microscope image clarity scoring method according to claim 1, Features: In step S1, the noise reduction step includes performing discrete Fourier transform on the template image A to obtain a frequency domain image A. DFT , for the frequency domain image A DFT Perform logarithmic transformation to obtain frequency domain image A DFT The logarithmic Fourier amplitude spectrum of the template image A is obtained by obtaining the frequency domain filter Filter, which is a binary image with the same size as the template image A. DFT The logarithmic Fourier amplitude spectrum is multiplied by the frequency domain filter Filter to obtain the filtered frequency domain image The Fourier amplitude spectrum of the filtered frequency domain image The Fourier amplitude spectrum is inversely discrete Fourier transformed to obtain the denoised template image A'.

3. A microscope image clarity scoring method according to claim 1, Features: In the step S1, the feature extractor is a SIFT feature extractor, which is created by calling the cv2.SIFT_create() function by the scale-invariant feature transform algorithm SIFT.

4. A microscope image clarity scoring method according to claim 1, Features: The step S1 also includes converting the template feature F A' The feature points in are drawn on the denoised template image A' to obtain an image containing the feature points.

5. A microscope image clarity scoring method according to claim 1, Features: In step S2, the image to be rated I K Includes multiple images of the same field of view automatically taken at multiple focal lengths, and noise reduction processing of the image to be scored I K The method is the same as the method for denoising the template image A in step S1.

6. A microscope image clarity scoring method according to claim 5, Features: In the step S2, the pictures are taken by controlling the microscope with a focal length interval of 1 micron, and the number of pictures is nine.

7. A microscope image clarity scoring method according to claim 1, Features: The step S2 also includes extracting the features of the image to be rated Draw the image to be scored after denoising The image to be scored containing feature points is obtained.

8. A microscope image clarity scoring method according to claim 1, Features: In step S3, the matching step includes a matcher using a KD-Tree in the FLANN library to perform a range query and a nearest neighbor query, and the matcher is created by calling cv2.FlannBasedMatcher() in the OpenCV library; when the features of an image to be scored in step S2 are obtained by calculation, The corresponding matching feature point set , repeat step S3 until each image feature to be rated is obtained The corresponding matching feature point set .

9. A microscope image clarity scoring method according to claim 1, Features: The step S3 also includes matching the feature point set Draw the template image A' after denoising and the image to be scored after denoising A denoised image containing a set of matching feature points is obtained, and the two denoised images are stitched together for display.

10. A microscope image clarity scoring method according to claim 1, Features: In step S402, the distance is a Euclidean distance or a Euclidian distance; in step S403, a clarity score of an image to be rated is calculated, and step S4 is repeated until the clarity score of each image to be rated obtained according to step S3 is obtained. The corresponding matching feature point set , calculate and obtain the clarity scores of all images to be rated.

Citation Information

Patent Citations

  • Improved approximate projection transformation image splicing method

    CN107016646A

  • Image automatic focusing algorithm for microscopic imaging

    CN114092445A

  • Self-resisting defocus blurring gray template matching method and self-resisting defocus blurring gray template matching system

    CN117746070A

  • Determining multiple camera positions from multiple videos

    US10096114B1