Sample point identification method and device, mass spectrometer, electronic equipment and readable storage medium

By performing grayscale conversion, denoising, gradient detection and binary processing on the target plate images detected by mass spectrometer, we can accurately identify whether there are colonies in the target, solving the problems of low efficiency and error-prone artificial input information in the prior art, and achieving efficient and accurate sample point recognition.

CN119863449APending Publication Date: 2025-04-22AUTOBIO LABTEC INSTR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411952100.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

When existing mass spectrometers detect multiple targets in the target plate, the efficiency of manually input information is low and error-prone, resulting in low sample detection efficiency, especially when the number of target plates is large, the problem is even more serious.

Method used

By taking each target in the target plate as the target target in turn, the target image is acquired and processed, including conversion to grayscale images, denoising processing, gradient detection and binarization processing, the number of target pixel points is determined to identify whether the target has colonies, thereby accurately identifying sample points.

Benefits of technology

This method can accurately identify sample points in the target plate, improve detection efficiency, and reduce the possibility of manual input errors, especially in the case of large number of target plates, which significantly improve the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863449A_ABST
    Figure CN119863449A_ABST
Patent Text Reader

Abstract

The invention discloses a sample point identification method and device, a mass spectrometer, electronic equipment and a readable storage medium, and relates to the technical field of mass spectrometry. The method comprises the following steps: taking each target spot in a target plate as a target spot in sequence; obtaining an image of a target spot; converting the image of the target spot into a grayscale image; performing de-noising processing on the grayscale image; carrying out gradient detection on the denoised grayscale image to obtain a gradient amplitude image; carrying out binarization processing on the gradient magnitude image; determining the number of target pixel points in the binary image; and determining whether a bacterial colony exists in the target point based on the number of the target pixel points, and determining the target point as a sample point under the condition that the bacterial colony exists in the target point. According to the technical scheme disclosed by the invention, the sample points in the target plate can be accurately identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of mass spectrometry analysis, and in particular, relates to a sample point identification method, device, mass spectrometer, electronic device and readable storage medium. Background Art

[0002] A mass spectrometer is an instrument that separates and detects the composition of substances according to the mass differences of atoms, molecules or molecular fragments of substances based on the principle that charged particles can move in electric or magnetic fields. Mass spectrometers are widely used in the field of biomedicine for proteomics research, discovery of disease markers, drug metabolism analysis and clinical diagnosis.

[0003] The sample detection process mainly includes: taking a sample (colony) from a culture dish, placing (dropping or smearing) the sample on the target point of a target plate (also called a sample plate or sample plate), the target point where the sample is placed is called a sample point or sample point, and then applying a matrix to the sample in the target point, drying it, and then sending the target plate into a mass spectrometer; the mass spectrometer detects the sample in the target point. The target plate usually includes multiple target points. For example, a target plate includes 12 or more target points. In actual use, the user (i.e., the tester) may only place samples on some of the target points in the target plate. If a mass spectrometer is used to detect all the target points in the target plate, more resources will be consumed and the detection time will be longer.

[0004] In view of the above situation, the current solution is that the user inputs the information of the target point where the sample is placed into the mass spectrometer, and the mass spectrometer detects only the target point indicated by the user input information based on the above information. However, this solution has the following problems: the efficiency of manual input of information is low and it is easy to make mistakes (for example, multiple selection or missed selection of targets), which leads to low sample detection efficiency. When the number of target plates is large, the above problems will be more serious. Summary of the invention

[0005] In view of the above problems, the present application provides a sample point identification method, device, mass spectrometer, electronic device and readable storage medium to accurately identify sample points in a target plate.

[0006] To achieve the above objectives, this application provides the following technical solutions:

[0007] The first aspect of the present application provides a sample point identification method, comprising:

[0008] Each target point in the target plate is used as a target target point in turn;

[0009] Acquiring an image of the target;

[0010] Converting the image of the target point into a grayscale image;

[0011] Performing denoising on the grayscale image;

[0012] Perform gradient detection on the denoised grayscale image to obtain a gradient amplitude image;

[0013] Binarization is performed on the gradient amplitude image, wherein when the value of a pixel point in the gradient amplitude image is greater than a preset first threshold, the value of the pixel point is set to a first value, and when the value of the pixel point in the gradient amplitude image is less than or equal to the first threshold, the value of the pixel point is set to a second value;

[0014] Determine the number of target pixel points in the binary image, wherein the value of the target pixel point is the first value;

[0015] It is determined whether there is a colony at the target point based on the number of the target pixel points. If there is a colony at the target point, the target point is determined to be a sample point.

[0016] In a possible implementation, determining whether a colony exists at the target point based on the number of the target pixel points includes:

[0017] Determining the proportion of the target pixel points in the gradient amplitude image according to the number of the target pixel points and the number of pixel points included in the gradient amplitude image;

[0018] When the ratio is greater than a preset second threshold, it is determined that there are colonies at the target point; and when the ratio is less than or equal to the second threshold, it is determined that there are no colonies at the target point.

[0019] In a possible implementation, performing gradient detection on the denoised grayscale image to obtain a gradient amplitude image includes:

[0020] Respectively determining the gradient value of each pixel in the denoised grayscale image in the horizontal direction;

[0021] Respectively determining the gradient value of each pixel in the denoised grayscale image in the vertical direction;

[0022] For each pixel in the denoised grayscale image, the gradient value of the pixel in the horizontal direction and the gradient value in the vertical direction are combined to obtain the gradient amplitude of the pixel, so as to form a gradient amplitude image.

[0023] In a possible implementation, respectively determining the gradient value of each pixel in the denoised grayscale image in the horizontal direction includes: performing a convolution operation on a horizontal Sobel operator with the denoised grayscale image to obtain the gradient value of each pixel in the denoised grayscale image in the horizontal direction.

[0024] In a possible implementation, respectively determining the gradient value of each pixel in the denoised grayscale image in the vertical direction includes: performing a convolution operation on a vertical Sobel operator with the denoised grayscale image to obtain the gradient value of each pixel in the denoised grayscale image in the vertical direction.

[0025] In a possible implementation, combining the gradient value of the pixel point in the horizontal direction and the gradient value in the vertical direction to obtain the gradient amplitude of the pixel point includes:

[0026] According to the formula Calculating the gradient amplitude of the pixel;

[0027] Among them, G x is the gradient value of the pixel in the horizontal direction, G y is the gradient value of the pixel in the vertical direction, and G is the gradient amplitude of the pixel.

[0028] Optionally, converting the image of the target point into a grayscale image includes:

[0029] For each pixel in the image of the target point, the grayscale value of the pixel is determined according to the value of the red channel, the value of the green channel and the value of the blue channel of the pixel to generate a grayscale image.

[0030] A second aspect of the present application provides a sample point identification device, comprising:

[0031] A target point determination module is used to sequentially select each target point in the target plate as a target point;

[0032] An image acquisition module, used to obtain an image of the target;

[0033] An image conversion module, used for converting the image of the target point into a grayscale image;

[0034] A denoising module, used for performing denoising processing on the grayscale image;

[0035] A gradient detection module is used to perform gradient detection on the denoised grayscale image to obtain a gradient amplitude image;

[0036] A binarization processing module, configured to perform binarization processing on the gradient amplitude image, wherein when the value of a pixel point in the gradient amplitude image is greater than a preset first threshold, the value of the pixel point is set to a first value, and when the value of a pixel point in the gradient amplitude image is less than or equal to the first threshold, the value of the pixel point is set to a second value;

[0037] A pixel number determination module, used to determine the number of target pixel points in the binary image, wherein the value of the target pixel point is the first value;

[0038] The sample point identification module is used to determine whether there is a colony at the target point based on the number of the target pixel points, and if there is a colony at the target point, determine the target point as a sample point.

[0039] A third aspect of the present application provides a mass spectrometer, comprising an ion source, a mass analyzer and a control device, wherein the control device is used to implement any one of the above-mentioned sample point identification methods.

[0040] A fourth aspect of the present application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:

[0041] The memory is used to store computer programs;

[0042] The processor is used to execute the computer program so that the electronic device implements any one of the above sample point identification methods.

[0043] In a fifth aspect, the present application provides a readable storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device implements any one of the above-mentioned sample point identification methods.

[0044] A sixth aspect of the present application provides a computer program product, including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any one of the above-mentioned sample point identification methods.

[0045] It can be seen that the beneficial effects of this application are:

[0046] The technical solution disclosed in the present application takes each target point in the target plate as a target target point in turn, and executes the following steps for the target target point: obtaining an image of the target target point; converting the image of the target target point into a grayscale image; denoising the grayscale image; performing gradient detection on the denoised grayscale image to obtain a gradient amplitude image; binarizing the gradient amplitude image, and setting the value of the pixel point to a first value when the value of the pixel point is greater than a preset first threshold, and setting the value of the pixel point to a second value when the value of the pixel point is less than or equal to the first threshold; determining the number of target pixels (pixels with a value of the first value) in the binary image; and determining whether a colony exists at the target target point based on the number of target pixels, and if a colony exists at the target target point, determining the target target point to be a sample point. The technical solution disclosed in the present application is that, when a sample is placed at a target point, the image of the target point includes an image formed by colonies in the sample. The image formed by the colonies is significantly different from images of other areas. In the binary image obtained by processing the image of the target point, there will be more target pixels. Based on the number of target pixels, it is possible to accurately determine whether there are colonies at the target point, thereby accurately identifying whether the target point is a sample point. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0048] Figure 1 A flow chart of a sample point identification method disclosed in this application;

[0049] Figure 2-1 is a grayscale image of the target in this application;

[0050] Figure 2-2 is the grayscale image of the target point after denoising in this application;

[0051] Figure 2-3 It is the gradient image of the target point in the vertical direction in this application;

[0052] Figure 2-4 It is the gradient image of the target point in the horizontal direction in this application;

[0053] Figure 2-5 is the gradient amplitude image of the target point in this application;

[0054] Figure 2-6 is a binary image of the target in this application;

[0055] Figure 3 A schematic diagram of the structure of a sample point identification device disclosed in this application;

[0056] Figure 4 This is a schematic diagram of the structure of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0057] The present application discloses a sample point identification method, device, mass spectrometer, electronic device and readable storage medium, so as to accurately identify sample points in a target plate, that is, accurately identify target points on the target plate where samples are placed.

[0058] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0059] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable in appropriate circumstances, which is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only include those elements, but also include other elements that are not clearly listed, or also include elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the statement "include one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.

[0060] See also Figure 1 , Figure 1 This is a flow chart of a sample point identification method disclosed in the present application. The sample identification method can be performed by a mass spectrometer, or by an electronic device capable of data exchange with a mass spectrometer. The method includes:

[0061] S101: taking each target point in the target plate as a target target point in turn.

[0062] In the sample processing stage, the sample is taken from the culture dish and placed (dropped or smeared) on the target point of the target plate, and then the matrix is ​​applied to the sample in the target point to dry the target plate. After the drying process is completed, the target plate is sent to the mass spectrometer, which detects the sample in the target point.

[0063] As an optional solution, after the target plate is dried, before the target plate is fed into the mass spectrometer, the sample point identification method disclosed in the present application is executed to determine whether each target point of the target plate is a sample point. As another optional solution, after determining that the target plate enters the mass spectrometer, the sample point identification method disclosed in the present application is executed to determine whether each target point of the target plate is a sample point. It should be noted that determining whether each target point of the target plate is a sample point means determining which target points in the target plate have samples placed thereon so that the mass spectrometer performs detection on the identified sample points.

[0064] In this solution, each target point in the target plate is taken as a target target point in turn. After each target target point is determined, steps S102 to S108 are executed for the current target target point to determine whether the current target target point is a sample point, that is, to determine whether a sample is placed at the current target target point.

[0065] S102: Obtain an image of the target point.

[0066] If the solution of performing sample point identification before sending the target plate into the mass spectrometer is adopted, the image of each target point in the target plate is collected by an image acquisition device located in the external space of the mass spectrometer. The image acquisition device transmits the image of the target point to the device performing the sample point identification method, and the device obtains the image of the target point from the received image.

[0067] If the solution of performing sample point identification after the target plate enters the mass spectrometer is adopted, an image acquisition device can be arranged in the mass spectrometer. After the target plate enters the mass spectrometer, the image acquisition device acquires the image of each target point in the target plate. The image acquisition device transmits the image of the target point to the device for performing the sample point identification method, and the device obtains the image of the target point from the received image.

[0068] As an optional solution, the target plate's carrying mechanism has the ability to move in the mass spectrometer. When the image acquisition device is fixed in position, the target plate is moved by the carrying mechanism to ensure that the image acquisition device can acquire images of each target point.

[0069] The space inside the mass spectrometer has a high degree of cleanliness. Sample point identification is performed after the target plate enters the mass spectrometer, which makes it very unlikely that the target plate and image acquisition device will be interfered by impurities such as dust, and can reduce the noise in the image of the target point.

[0070] S103: Convert the image of the target point into a grayscale image.

[0071] The image of the target point obtained by the image acquisition device is an RGB image. In order to simplify subsequent processing, the image of the target point is converted into a grayscale image.

[0072] Optionally, the image of the target point is converted to a grayscale image using the following scheme:

[0073] For each pixel in the image of the target point, the grayscale value of the pixel is determined according to the value of the red channel, the value of the green channel and the value of the blue channel of the pixel to generate a grayscale image.

[0074] In practice, the grayscale value of a pixel can be calculated according to the following formula:

[0075] I gray =0.299×I R +0.587×I G +0.114×I B

[0076] Among them, I R is the value of the red channel of the pixel, I G is the value of the green channel of the pixel, I B is the value of the blue channel of the pixel, I gray is the gray value of the pixel.

[0077] That is to say, for each pixel in the target image, perform the following steps: weighted sum of the red channel value, green channel value and blue channel value of the pixel according to the above formula to obtain the gray value of the pixel. The gray values ​​of all pixels constitute the gray image of the target.

[0078] S104: De-noising the grayscale image of the target point.

[0079] During the image acquisition process of the target, noise may be introduced due to shooting conditions, sensor defects or other interference factors. The purpose of denoising the grayscale image of the target is to remove the noise in the grayscale image, thereby improving the quality and clarity of the grayscale image, which can reduce the difficulty of identifying colonies in the image later.

[0080] Optionally, Gaussian filtering is performed on the grayscale image of the target point.

[0081] Gaussian filtering is a linear smoothing filter that has a good inhibitory effect on noise that obeys the normal distribution and can reduce Gaussian noise in the image.

[0082] The essence of Gaussian filtering on the grayscale image of the target is to perform convolution operation on the Gaussian kernel and the grayscale image of the target. In other words, the pixel value of each pixel in the grayscale image after Gaussian filtering is obtained by weighted average of its own pixel value and the pixel values ​​of other pixels in its neighborhood.

[0083] Optionally, a two-dimensional Gaussian function is used to generate a Gaussian kernel used for Gaussian filtering of the grayscale image of the target point.

[0084] The two-dimensional Gaussian function is:

[0085] Among them, (x, y) is the relative coordinate of the pixel point, indicating the distance between the pixel point and the center point; G(x, y) is the weight of the pixel point with a relative position of (x, y); σ is the standard deviation, which determines the smoothness of the image after Gaussian filtering.

[0086] S105: Performing gradient detection on the denoised grayscale image to obtain a gradient amplitude image.

[0087] The gradient magnitude indicates the intensity of the grayscale value change in the image, which can help identify the edges and boundaries in the image. The larger the gradient magnitude, the more dramatic the grayscale change in the image in that area, usually corresponding to the edge or boundary; conversely, the area with a smaller gradient magnitude indicates a smoother image.

[0088] In this scheme, if a sample is placed at the target point, the image of the target point includes an image formed by the colonies in the sample. The image formed by the colonies has a large difference in grayscale value compared with the images in other areas. Based on this, in this scheme, gradient detection is performed on the denoised grayscale image to obtain the gradient amplitude image of the target point, and then it is determined whether there are colonies at the target point based on the gradient amplitude image.

[0089] Optionally, gradient detection is performed on the denoised grayscale image to obtain a gradient amplitude image using the following scheme:

[0090] A1: Determine the horizontal gradient value of each pixel in the denoised grayscale image;

[0091] A2: Determine the vertical gradient value of each pixel in the denoised grayscale image;

[0092] A3: For each pixel in the denoised grayscale image, the gradient value of the pixel in the horizontal direction and the gradient value in the vertical direction are combined to obtain the gradient amplitude of the pixel, so as to form a gradient amplitude image.

[0093] That is to say, for each pixel in the denoised grayscale image, the following operations are performed: determining the horizontal gradient value and the vertical gradient value of the pixel, merging the horizontal gradient value and the vertical gradient value of the pixel, and obtaining the gradient amplitude of the pixel. The gradient amplitudes of all pixels constitute the gradient amplitude image of the target point.

[0094] As an optional solution, the gradient value of each pixel in the denoised grayscale image in the horizontal direction is determined respectively, including: performing a convolution operation on the horizontal Sobel operator with the denoised grayscale image to obtain the gradient of each pixel in the denoised grayscale image in the horizontal direction.

[0095] The Sobel operator in the horizontal direction is:

[0096] Here, a pixel point in the denoised grayscale image (the pixel point located at the 2nd row and the 2nd column) is taken as an example to illustrate the scheme for determining the gradient value of the pixel point in the horizontal direction.

[0097]

[0098] Where: G (2,2)x is the horizontal gradient value of the pixel located at the 2nd row and the 2nd column in the denoised grayscale image; f(i,j) is the grayscale value of the pixel located at the ith row and the jth column in the denoised grayscale image, i=1,2,3…,M, j=1,2,3…,N, M is the number of rows of pixels in the denoised grayscale image, and N is the number of columns of pixels in the denoised grayscale image.

[0099] As an optional solution, the vertical gradient of each pixel in the denoised grayscale image is determined separately, including: performing a convolution operation on the vertical Sobel operator and the denoised grayscale image to obtain the vertical gradient of each pixel in the denoised grayscale image.

[0100] The Sobel operator in the vertical direction is:

[0101] Here, a pixel point in the denoised grayscale image (the pixel point located at the 2nd row and the 2nd column) is taken as an example to illustrate the scheme for determining the gradient value of the pixel point in the horizontal direction.

[0102]

[0103] Among them, G (2,2)y is the vertical gradient value of the pixel located at the 2nd row and the 2nd column in the denoised grayscale image; f(i,j) is the grayscale value of the pixel located at the ith row and the jth column in the denoised grayscale image, i=1,2,3…,M, j=1,2,3…,N, M is the number of rows of pixels in the denoised grayscale image, and N is the number of columns of pixels in the denoised grayscale image.

[0104] It should be noted that the Sobel operator assigns different weights to pixels at different positions in the neighborhood of the center point. Based on this, the Sobel operator is used to determine the gradient values ​​of each pixel in the denoised grayscale image in the horizontal and vertical directions. Subsequently, the edge points can be more accurately identified based on the gradient amplitude image, thereby more accurately determining whether there are colonies at the target point.

[0105] Of course, other solutions may also be used to determine the gradient value of each pixel in the denoised grayscale image in the horizontal and vertical directions.

[0106] As another optional solution, the gradient value of each pixel in the denoised grayscale image in the horizontal direction is determined separately, including: performing a convolution operation on the horizontal prewitt operator and the denoised grayscale image to obtain the gradient of each pixel in the denoised grayscale image in the horizontal direction.

[0107] The prewitt operator in the horizontal direction is:

[0108] As an optional solution, the vertical gradient of each pixel in the denoised grayscale image is determined separately, including: convolving the vertical prewitt operator with the denoised grayscale image to obtain the vertical gradient of each pixel in the denoised grayscale image.

[0109] The prewitt operator in the vertical direction is:

[0110] As an optional solution, the gradient value of the pixel in the horizontal direction and the gradient value in the vertical direction are combined to obtain the gradient amplitude of the pixel, including:

[0111] According to the formula Calculate the gradient magnitude of a pixel.

[0112] As another optional solution, the gradient value of the pixel point in the horizontal direction and the gradient value in the vertical direction are combined to obtain the gradient amplitude of the pixel point, including:

[0113] According to the formula G=|G x |+|G y |Calculate the gradient magnitude of a pixel.

[0114] In the above two formulas, G x is the gradient value of the pixel in the horizontal direction, G y is the gradient value of the pixel in the vertical direction, and G is the gradient amplitude of the pixel.

[0115] S106: Binarization processing is performed on the gradient amplitude image.

[0116] When the value of a pixel in the gradient amplitude image is greater than a preset first threshold, the value of the pixel is set to a first value; when the value of a pixel in the gradient amplitude image is less than or equal to the first threshold, the value of the pixel is set to a second value.

[0117] Optionally, when the value of a pixel in the gradient amplitude image is greater than a preset first threshold, the value of the pixel is set to 255, and when the value of a pixel in the gradient amplitude image is less than or equal to the first threshold, the value of the pixel is set to 0. That is, if the value of a pixel in the gradient amplitude image is greater than the first threshold, the pixel is processed as a point with a gray value of 255 (i.e., a white point), and if the value of a pixel in the gradient amplitude image is less than or equal to the first threshold, the pixel is processed as a point with a gray value of 0 (i.e., a black point).

[0118] Optionally, when the value of a pixel in the gradient amplitude image is greater than a preset first threshold, the value of the pixel is set to 0, and when the value of a pixel in the gradient amplitude image is less than or equal to the first threshold, the value of the pixel is set to 255. That is, if the value of a pixel in the gradient amplitude image is greater than the first threshold, the pixel is processed as a point with a gray value of 0 (i.e., a black point), and if the value of a pixel in the gradient amplitude image is less than or equal to the first threshold, the pixel is processed as a point with a gray value of 255 (i.e., a white point).

[0119] The above are two examples of the first value and the second value. In practice, the first value and the second value may also be other values, as long as the first value and the second value have a large difference.

[0120] The first threshold may be an empirical value calibrated through multiple tests.

[0121] S107: Determine the number of target pixel points in the binary image (ie, the image after binarization), wherein the value of the target pixel point is a first value.

[0122] That is to say, the number of pixels whose values ​​are the first value in the binary image is determined.

[0123] S108: Determine whether there is a colony at the target point based on the number of target pixel points. If there is a colony at the target point, determine the target point as a sample point.

[0124] If a sample is placed at the target point, the image of the target point includes an image formed by the colonies in the sample, and the image after binarization will contain more target pixels. Therefore, based on the number of target pixels contained in the binary image, it can be determined whether there are colonies at the target point. Further, if there are colonies at the target point, the target point is determined to be a sample point.

[0125] As an optional solution, determining whether there is a colony at the target point based on the number of target pixels includes:

[0126] According to the number of target pixels and the number of pixels contained in the binary image, the proportion of the target pixels in the binary image is determined;

[0127] When the ratio is greater than a preset second threshold, it is determined that there are colonies at the target point, and when the ratio is less than or equal to the second threshold, it is determined that there are no colonies at the target point.

[0128] The second threshold may be an empirical value calibrated through multiple tests.

[0129] As another optional solution, determining whether there is a colony at the target point based on the number of target pixels includes:

[0130] Comparing the number of target pixels with a preset third threshold;

[0131] If the number of target pixel points is greater than the third threshold, it is determined that there is a colony at the target point; if the number of target pixel points is less than or equal to the third threshold, it is determined that there is no colony at the target point.

[0132] The third threshold may be an empirical value calibrated through multiple tests.

[0133] The sample point recognition method disclosed in the present application takes each target point in a target plate as a target target point in turn, and performs the following steps on the target target point: obtaining an image of the target target point; converting the image of the target target point into a grayscale image; performing denoising on the grayscale image; performing gradient detection on the denoised grayscale image to obtain a gradient amplitude image; performing binarization on the gradient amplitude image, and setting the value of the pixel point to a first value when the value of the pixel point is greater than a preset first threshold, and setting the value of the pixel point to a second value when the value of the pixel point is less than or equal to the first threshold; determining the number of target pixel points (pixel points with a value of the first value) in the binary image; and determining whether a colony exists at the target target point based on the number of target pixel points, and if a colony exists at the target target point, determining the target target point to be a sample point. The technical solution disclosed in the present application is that, when a sample is placed at a target point, the image of the target point includes an image formed by colonies in the sample. The image formed by the colonies is significantly different from images of other areas. In the binary image obtained by processing the image of the target point, there will be more target pixels. Based on the number of target pixels, it is possible to accurately determine whether there are colonies at the target point, thereby accurately identifying whether the target point is a sample point.

[0134] The sample point identification method disclosed in the present application is described below by taking a target plate with 12 target points as an example.

[0135] 1) In the sample processing stage, the user places (drops or smears) the sample in the target point of the target plate, then applies the matrix to the sample in the target point and dries the target plate.

[0136] 2) The user places the dried target plate into the mass spectrometer.

[0137] 3) When it is determined that the target plate enters the mass spectrometer (for example, the user inputs instructions through the human-computer interaction device of the mass spectrometer), the image acquisition device in the mass spectrometer respectively acquires images of the 12 target points, and transmits the acquired images to the control device of the mass spectrometer, or transmits the acquired images to another electronic device, such as a mid-position computer.

[0138] 4) The control device of the mass spectrometer or the other electronic device determines the 12 targets as target targets in sequence, and after each determination of the target target, performs subsequent steps for the current target target to determine whether there is a colony at the current target target (i.e., whether it is a sample point).

[0139] 5) A control device of the mass spectrometer or another electronic device executes: obtaining an image of the target target, converting the image of the target target into a grayscale image; denoising the grayscale image of the target target; performing gradient detection on the denoised grayscale image to obtain a gradient amplitude image; binarizing the gradient amplitude image; determining the number of target pixels (pixels with a first value) in the binary image; determining whether there is a colony at the target target based on the number of target pixels, and determining the target target as a sample point if there is a colony at the target target.

[0140] It should be noted that if the sample point identification method is executed by another electronic device, then the electronic device needs to transmit the identification result of each target point to the control device of the mass spectrometer so that the mass spectrometer performs detection on each sample point based on the identification result.

[0141] See also Figure 2-1 to Figure 2-6 . Figure 2-1 is the grayscale image of the target point, Figure 2-2 is the grayscale image of the target after denoising, Figure 2-3 is the gradient image of the target point in the vertical direction, Figure 2-4 is the gradient image of the target point in the horizontal direction, Figure 2-5 is the gradient magnitude image of the target point, Figure 2-6 is the binary image of the target point. Figure 2-1 to Figure 2-6 In the figure, the white area represents the colony formation in the sample, and also contains some noise points.

[0142] The present application discloses a sample point identification method as mentioned above, and correspondingly, the present application also discloses a sample point identification device, and the descriptions of the two in the specification can refer to each other.

[0143] See also Figure 3 , Figure 3 The schematic diagram of the structure of a sample point identification device disclosed in this application is as follows. The sample point identification device includes:

[0144] The target point determination module 301 is used to sequentially use each target point in the target plate as a target point;

[0145] An image acquisition module 302 is used to obtain an image of a target point;

[0146] An image conversion module 303 is used to convert the image of the target point into a grayscale image;

[0147] A denoising module 304, used for denoising the grayscale image;

[0148] A gradient detection module 305 is used to perform gradient detection on the denoised grayscale image to obtain a gradient amplitude image;

[0149] A binarization processing module 306 is used to perform binarization processing on the gradient amplitude image, wherein when the value of a pixel point in the gradient amplitude image is greater than a preset first threshold, the value of the pixel point is set to a first value, and when the value of a pixel point in the gradient amplitude image is less than or equal to the first threshold, the value of the pixel point is set to a second value;

[0150] The pixel number determination module 307 is used to determine the number of target pixel points in the binary image, wherein the value of the target pixel point is a first value;

[0151] The sample point identification module 308 is used to determine whether there is a colony at the target point based on the number of target pixel points, and if there is a colony at the target point, determine the target point as a sample point.

[0152] As an optional solution, the sample point identification module 308 includes: a ratio determination unit, which is used to determine the ratio of the target pixel points in the binary image according to the number of target pixel points and the number of pixel points contained in the binary image; and a sample point identification unit, which is used to determine that there are colonies at the target target point when the ratio is greater than a preset second threshold, and to determine that there are no colonies at the target target point when the ratio is less than or equal to the second threshold.

[0153] As an optional solution, the image conversion module 303 is specifically used to: for each pixel in the image of the target, determine the grayscale value of the pixel according to the value of the red channel, the value of the green channel and the value of the blue channel of the pixel to generate a grayscale image.

[0154] As an optional solution, the denoising module 304 is specifically used to perform Gaussian filtering on the grayscale image.

[0155] As an optional solution, the gradient detection module 305 includes: a horizontal gradient determination unit, which is used to determine the gradient value of each pixel in the denoised grayscale image in the horizontal direction; a vertical gradient determination unit, which is used to determine the gradient value of each pixel in the denoised grayscale image in the vertical direction; and a gradient merging unit, which is used to merge the gradient value of the pixel in the horizontal direction and the gradient value in the vertical direction for each pixel in the denoised grayscale image to obtain the gradient amplitude of the pixel so as to form a gradient amplitude image.

[0156] As an optional solution, the horizontal gradient determination unit is specifically used to: perform a convolution operation on the Sobel operator in the horizontal direction and the denoised grayscale image to obtain the gradient value of each pixel in the denoised grayscale image in the horizontal direction.

[0157] As an optional solution, the vertical gradient determination unit is specifically used to: perform a convolution operation on the Sobel operator in the vertical direction and the denoised grayscale image to obtain the gradient value of each pixel in the denoised grayscale image in the vertical direction.

[0158] As an optional solution, the gradient merging unit is specifically used to: According to the formula Calculate the gradient amplitude of the pixel; where G x is the gradient value of the pixel in the horizontal direction, G y is the gradient value of the pixel in the vertical direction, and G is the gradient amplitude of the pixel.

[0159] The sample point identification device disclosed in the present application, when a sample is placed at a target point, the image of the target point includes an image formed by colonies in the sample. The image formed by the colonies is significantly different from images of other areas. A large number of target pixels will be present in the binary image obtained by processing the image of the target point. Based on the number of target pixels, it can be accurately determined whether there are colonies at the target point, thereby accurately identifying whether the target point is a sample point.

[0160] The application also discloses a mass spectrometer.

[0161] The mass spectrometer disclosed in the present application includes an ion source, a mass analyzer and a control device, wherein the ion source and the mass analyzer adopt existing structures, and the control device is used to implement any one of the sample point identification methods disclosed in the present application.

[0162] The application also discloses an electronic device.

[0163] See also Figure 4 , Figure 4 The hardware structure of the electronic device is shown. The electronic device includes: a processor 401 , a memory 402 , a communication interface 403 , and a communication bus 404 .

[0164] In the embodiment of the present application, the number of the processor 401, the memory 402, the communication interface 403, and the communication bus 404 is at least one, and the processor 401, the memory 402, and the communication interface 403 communicate with each other through the communication bus 404. The communication bus 404 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0165] It should be noted that those skilled in the art can understand that Figure 4 The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include Figure 4 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.

[0166] Combine the following Figure 4 Provide a detailed introduction to the various components of electronic equipment.

[0167] The processor 401 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing software programs and / or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the electronic device as a whole.

[0168] The processor 401 may be a central processing unit (CPU), or an application specific integrated circuit ASIC (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0169] The memory 402 may include a memory, such as a high-speed random-access memory (RAM) and a read-only memory (ROM), and may also include a large-capacity storage device, such as at least one disk storage.

[0170] The memory 402 stores a computer program, and the processor 401 is used to execute the computer program stored in the memory 401, so that the electronic device implements any sample point identification method disclosed in the embodiments of the present application.

[0171] The present application also discloses a readable storage medium, which carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device implements any sample point identification method disclosed in the embodiments of the present application.

[0172] The present application also discloses a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any sample point identification method provided in the embodiments of the present application.

[0173] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. The various technical features in the various embodiments can be arranged and combined to form new embodiments. For the sample point identification device, mass spectrometer, electronic device, readable storage medium and computer program product disclosed in the embodiments, since they correspond to the sample point identification method disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0174] In addition, it should be noted that the device embodiments described above are merely schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, and may be located in one place or distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0175] Through the description of the above implementation methods, the technicians in the relevant field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation method in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device to execute the methods described in each embodiment of the present application.

[0176] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0177] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A sample point identification method, characterized in that: include: Each target point in the target plate is used as a target target point in turn; Acquiring an image of the target; Converting the image of the target point into a grayscale image; Performing denoising on the grayscale image; Perform gradient detection on the denoised grayscale image to obtain a gradient amplitude image; Binarization is performed on the gradient amplitude image, wherein when the value of a pixel point in the gradient amplitude image is greater than a preset first threshold, the value of the pixel point is set to a first value, and when the value of the pixel point in the gradient amplitude image is less than or equal to the first threshold, the value of the pixel point is set to a second value; Determine the number of target pixel points in the binary image, wherein the value of the target pixel point is the first value; It is determined whether there is a colony at the target point based on the number of the target pixel points. If there is a colony at the target point, the target point is determined to be a sample point.

2. The sample point identification method according to claim 1, characterized in that: The determining whether there is a colony at the target point based on the number of the target pixel points includes: Determining the proportion of the target pixel points in the binary image according to the number of the target pixel points and the number of pixel points included in the binary image; When the ratio is greater than a preset second threshold, it is determined that there are colonies at the target point; and when the ratio is less than or equal to the second threshold, it is determined that there are no colonies at the target point.

3. The sample point identification method according to claim 1 or 2, characterized in that: The step of performing gradient detection on the denoised grayscale image to obtain a gradient amplitude image includes: Respectively determining the gradient value of each pixel in the denoised grayscale image in the horizontal direction; Respectively determining the gradient value of each pixel in the denoised grayscale image in the vertical direction; For each pixel in the denoised grayscale image, the gradient value of the pixel in the horizontal direction and the gradient value in the vertical direction are combined to obtain the gradient amplitude of the pixel, so as to form a gradient amplitude image.

4. The sample point identification method according to claim 3, characterized in that: The step of respectively determining the gradient value of each pixel in the denoised grayscale image in the horizontal direction comprises: performing a convolution operation on a Sobel operator in the horizontal direction and the denoised grayscale image to obtain the gradient value of each pixel in the denoised grayscale image in the horizontal direction; The step of respectively determining the vertical gradient value of each pixel in the denoised grayscale image comprises: performing a convolution operation on a vertical Sobel operator and the denoised grayscale image to obtain the vertical gradient value of each pixel in the denoised grayscale image.

5. The sample point identification method according to claim 3, characterized in that: The step of combining the gradient value of the pixel point in the horizontal direction and the gradient value of the pixel point in the vertical direction to obtain the gradient amplitude of the pixel point includes: According to the formula Calculating the gradient amplitude of the pixel; Among them, G x is the gradient value of the pixel in the horizontal direction, G y is the gradient value of the pixel in the vertical direction, and G is the gradient amplitude of the pixel.

6. The sample point identification method according to claim 1 or 2, characterized in that: The step of converting the image of the target point into a grayscale image comprises: For each pixel in the image of the target point, the grayscale value of the pixel is determined according to the value of the red channel, the value of the green channel and the value of the blue channel of the pixel to generate a grayscale image.

7. A sample point identification device, characterized in that: include: A target point determination module is used to sequentially select each target point in the target plate as a target point; An image acquisition module, used to obtain an image of the target; An image conversion module, used for converting the image of the target point into a grayscale image; A denoising module, used for performing denoising processing on the grayscale image; A gradient detection module is used to perform gradient detection on the denoised grayscale image to obtain a gradient amplitude image; A binarization processing module, configured to perform binarization processing on the gradient amplitude image, wherein when the value of a pixel point in the gradient amplitude image is greater than a preset first threshold, the value of the pixel point is set to a first value, and when the value of a pixel point in the gradient amplitude image is less than or equal to the first threshold, the value of the pixel point is set to a second value; A pixel number determination module, used to determine the number of target pixel points in the binary image, wherein the value of the target pixel point is the first value; The sample point identification module is used to determine whether there is a colony at the target point based on the number of the target pixel points, and if there is a colony at the target point, determine the target point as a sample point.

8. A mass spectrometer, comprising an ion source, a mass analyzer and a control device, characterized in that: The control device is used to implement the sample point identification method according to any one of claims 1 to 6.

9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device implements the sample point identification method according to any one of claims 1 to 6.

10. A readable storage medium, characterized in that: The readable storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device implements the sample point identification method according to any one of claims 1 to 6.