Digital PCR image droplet segmentation and counting method, device and electronic equipment

By using dual-threshold and single-threshold segmentation algorithms in digital PCR images, combined with the maximum point counting method, the segmentation inaccuracy caused by droplet overlap and interference in digital PCR images is solved, and higher segmentation accuracy is achieved .

CN114842042BActive Publication Date: 2025-02-25HANGZHOU BIOER TECH CO LTD

Patent Information

Application Number
CN202210603635.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2025-02-25
Estimated Expiration
2042-05-30

AI Technical Summary

Technical Problem

Overlapping and interference between droplets in digital PCR images are prone to occur, resulting in the problem of inaccurate segmentation.

Method used

The preprocessed digital PCR image is segmented using a dual threshold segmentation algorithm to determine the maximum value point in the droplet collection image, and further segment it through a single threshold segmentation algorithm to obtain the first droplet collection image and the second droplet collection Image, and finally count the maximum points to obtain the number of droplets.

Benefits of technology

This method can effectively alleviate the problem of segmentation inaccuracy caused by droplet overlap and interference, and improve the accuracy of droplet segmentation in digital PCR images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114842042B_ABST
    Figure CN114842042B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and electronic device for segmenting and counting droplets in a digital PCR image, including: preprocessing the acquired digital PCR image to obtain a preprocessed image; segmenting the preprocessed image based on a double threshold segmentation algorithm to obtain a droplet collection image; determining the maximum point in the droplet collection image, and determining the grayscale value of the maximum point based on the preprocessed image; wherein the maximum point is a point whose grayscale value is greater than the surrounding grayscale value; segmenting the grayscale value of the maximum point based on a single threshold segmentation algorithm to obtain a first droplet collection image and a second droplet collection image; respectively counting the maximum points of the first droplet collection image and the second droplet collection image to obtain the number of droplets. The present invention can alleviate the problem of inaccurate segmentation caused by overlap and interference between droplets in a digital PCR image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital PCR detection technology, and in particular to a digital PCR image droplet segmentation and counting method, device and electronic equipment. Background Art

[0002] Digital PCR (polymerase chain reaction) belongs to the third generation of PCR technology. Its principle is to distribute a PCR reaction system into a large number of tiny reaction units. In each microreactor, there is no or one or more copies of the target nucleic acid molecule template, and "single molecule template" PCR amplification is performed. After the amplification is completed, the positive unit is judged by the end point fluorescence signal, and the copy number of the target gene in the original sample is calculated by statistical methods. For the statistics of the positive and negative end point fluorescence signal, the current common methods include Stilla's digital PCR technology, which automatically generates droplets and enters the chip in the form of about 30,000 droplets through capillary channels. The single layer is flattened, and then the droplets are imaged to detect the droplets containing the amplified fragments. However, when imaging the droplets, the droplets are prone to overlap and interference. The resolution of the digital PCR image is low, which will lead to inaccurate segmentation when performing segmentation counting. Summary of the invention

[0003] In view of this, an object of the present invention is to provide a method, device and electronic device for digital PCR image droplet segmentation and counting to alleviate the problem of inaccurate segmentation caused by overlap and interference between droplets in digital PCR images.

[0004] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a method for segmenting and counting droplets in a digital PCR image, comprising: preprocessing the acquired digital PCR image to obtain a preprocessed image; segmenting the preprocessed image based on a dual threshold segmentation algorithm to obtain a droplet collection image; determining the maximum points in the droplet collection image, and determining the grayscale values ​​of the maximum points based on the preprocessed image; wherein the maximum points are points whose grayscale values ​​are greater than the surrounding grayscale values; segmenting the grayscale values ​​of the maximum points based on a single threshold segmentation algorithm to obtain a first droplet collection image and a second droplet collection image; and counting the maximum points of the first droplet collection image and the second droplet collection image, respectively, to obtain the number of droplets.

[0006] In one embodiment, the step of preprocessing the acquired digital PCR image to obtain a preprocessed image includes: grayscale processing the acquired digital PCR image to obtain a grayscale image; filtering the grayscale image based on a median filtering algorithm to obtain a preprocessed image.

[0007] In one embodiment, the step of segmenting the preprocessed image based on a dual threshold segmentation algorithm to obtain a droplet collection image includes: calculating a first threshold and a second threshold of the preprocessed image based on the Otsu dual threshold segmentation algorithm; wherein the first threshold is less than the second threshold; and binarizing the preprocessed image based on the first threshold to obtain a droplet collection image.

[0008] In one embodiment, the steps of determining the maximum point in the droplet collection image and determining the grayscale value of the maximum point based on the preprocessed image include: calculating the droplet collection image based on distance transformation to obtain a distance transformation image; dilating the distance transformation image to obtain the position of the maximum point of the distance transformation image; and determining the grayscale value in the preprocessed image corresponding to the maximum point based on the position of the maximum point.

[0009] In one embodiment, the step of dilating the distance transform image to obtain the position of the maximum point of the distance transform image includes: dilating the distance transform image to obtain a dilated image; comparing the distance transform image and the dilated image to obtain the position of the maximum point of the distance transform image.

[0010] In one embodiment, the step of segmenting the grayscale values ​​of the maximum points based on a single threshold segmentation algorithm to obtain a first droplet collection image and a second droplet collection image includes: calculating a third threshold of the grayscale value of the maximum points based on the Otsu single threshold segmentation algorithm; binarizing the preprocessed image based on the third threshold to obtain a first droplet collection image; and obtaining a second droplet collection image based on the droplet collection image and the first droplet collection image.

[0011] In one embodiment, the steps of respectively counting the maximum points of the first droplet collection image and the second droplet collection image to obtain the number of droplets include: performing a distance transformation on the first droplet collection image to obtain the maximum points of the first droplet collection image and a first distance value corresponding to the maximum points; performing a distance transformation on the second droplet collection image to obtain the maximum points of the second droplet collection image and a second distance value corresponding to the maximum points; calculating a first number of maximum points whose first distance values ​​are within a predetermined droplet size threshold range, and a second number of maximum points whose second distance values ​​are within the droplet size threshold range; and determining the sum of the first number and the second number as the number of droplets.

[0012] In a second aspect, an embodiment of the present invention provides a digital PCR image droplet segmentation and counting device, comprising: a preprocessing module, used to preprocess the acquired digital PCR image to obtain a preprocessed image; a first segmentation module, used to segment the preprocessed image based on a dual threshold segmentation algorithm to obtain a droplet collection image; a grayscale determination module, used to determine the maximum point in the droplet collection image, and determine the grayscale value of the maximum point based on the preprocessed image; wherein the maximum point is a point whose grayscale value is greater than the surrounding grayscale value; the second segmentation module, used to segment the grayscale value of the maximum point based on a single threshold segmentation algorithm to obtain a first droplet collection image and a second droplet collection image; a counting module, used to count the maximum points of the first droplet collection image and the second droplet collection image respectively to obtain the number of droplets.

[0013] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of any one of the methods provided in the first aspect above.

[0014] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the methods provided in the first aspect are executed.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] The embodiment of the present invention provides the above-mentioned digital PCR image droplet segmentation and counting method, device and electronic device. First, the acquired digital PCR image is preprocessed to obtain a preprocessed image; secondly, the preprocessed image is segmented based on a double threshold segmentation algorithm to obtain a droplet collection image; then, the maximum point in the droplet collection image is determined, and the gray value of the maximum point is determined based on the preprocessed image; wherein the maximum point is a point whose gray value is greater than the surrounding gray value; then, the gray value of the maximum point is segmented based on a single threshold segmentation algorithm to obtain a first droplet collection image and a second droplet collection image; finally, the maximum points of the first droplet collection image and the second droplet collection image are counted respectively to obtain the number of droplets. The above-mentioned method first obtains a droplet collection image by a double threshold segmentation algorithm, and then further segments the droplet collection image by calculating the maximum point and the single threshold segmentation algorithm to obtain the first droplet collection image and the second droplet collection image, which can segment overlapping droplets, thereby alleviating the problem of inaccurate segmentation caused by overlap and interference between droplets in the digital PCR image.

[0017] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0018] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 1 A flow chart of a digital PCR image droplet segmentation and counting method provided by an embodiment of the present invention;

[0021] Figure 2 A local grayscale image provided by an embodiment of the present invention;

[0022] Figure 3 A partial schematic diagram of a droplet collection image provided by an embodiment of the present invention;

[0023] Figure 4 A local distance transformation normalized grayscale image provided by an embodiment of the present invention;

[0024] Figure 5 A first droplet set image provided by an embodiment of the present invention;

[0025] Figure 6 A schematic diagram of the position of a local droplet in an original image provided by an embodiment of the present invention;

[0026] Figure 7 A schematic diagram of the structure of a digital PCR image droplet segmentation and counting device provided by an embodiment of the present invention;

[0027] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] At present, there are three common methods for the statistics of the positive and negative end-point fluorescence signals, depending on the different ways of generating microdroplets. One is the microwell chip processing method represented by the QuantStudio 3D digital PCR system. Based on high-density chips, the samples are evenly distributed into up to 20,000 microwells and isolated from each other. After the PCR reaction, the fluorescence signal is excited by a high-brightness LED light source and a cold CCD (charge-coupled device, charge-coupled device) to detect and read the signal of each microwell. However, this method has high throughput and can easily realize multi-color fluorescence imaging. However, due to the change in the stability of the light source and the interference of fluorescence signals between adjacent droplets, the detection sensitivity and dynamic range of fluorescence imaging will be limited; the second is the droplet method represented by Bio-radQX200, which generates 20,000 uniform droplets with the help of a droplet generator. After the PCR reaction, the droplets are arranged in sequence in the flow channel and pass through the focus position of the side excitation light source one by one. Each droplet is irradiated in turn to generate excitation fluorescence and is read. Flow detection can obtain high sensitivity and dynamic range, but because it is detected one by one, the detection speed is slightly slow; the third is Stilla's digital PCR technology, which automatically generates droplets and enters the chip in the form of about 30,000 droplets through capillary channels. The single layer is flattened, and then the droplets are imaged to detect the droplets containing the amplified fragments. Compared with the first method, the main difference is that the chip has no microwells and the chip is easy to process, but when performing droplet imaging, the droplets are prone to overlap and interference, and the image processing is more difficult.

[0030] Based on this, the embodiments of the present invention provide a method, device and electronic device for digital PCR image droplet segmentation and counting to alleviate the problem of inaccurate segmentation caused by overlap and interference between droplets in digital PCR images.

[0031] To facilitate understanding of this embodiment, a digital PCR image droplet segmentation and counting method disclosed in an embodiment of the present invention is first described in detail. The method can be executed by an electronic device, such as a smart phone, a computer, an iPad, etc. Figure 1 The flowchart of a digital PCR image droplet segmentation and counting method shown in FIG. 1 illustrates that the method mainly includes the following steps S101 to S105:

[0032] Step S101: preprocessing the acquired digital PCR image to obtain a preprocessed image.

[0033] In specific applications, since the digital PCR image obtained by taking pictures is a color image, using RGB images for counting will increase the amount of calculation and reduce the recognition performance, which is not conducive to further processing of the image. Therefore, in this embodiment, before performing droplet segmentation and counting, it is necessary to preprocess the digital PCR image, convert the digital PCR image into a grayscale image, and remove the noise in the image to obtain a preprocessed image.

[0034] Step S102: Segment the preprocessed image based on a dual threshold segmentation algorithm to obtain a droplet collection image.

[0035] In one embodiment, the digital PCR image includes three parts: background, dark droplets and bright droplets. In order to eliminate the influence of factors such as overlap and light-dark interference and improve the accuracy of segmentation, a dual threshold segmentation algorithm is first used in the embodiment of the present invention to calculate the low threshold and high threshold of the image, and then the image background is removed according to the low threshold to obtain a droplet collection image.

[0036] Step S103: determining the maximum point in the droplet set image, and determining the grayscale value of the maximum point based on the preprocessed image.

[0037] The maximum point is a point whose grayscale value is greater than the surrounding grayscale values. In one embodiment, the maximum point in the droplet collection image and the position of the maximum point can be obtained according to the distance transformation and expansion processing, and then the brightness value corresponding to the position is determined in the preprocessed image according to the position of the maximum point.

[0038] Step S104: Segment the grayscale value of the maximum point based on a single threshold segmentation algorithm to obtain a first droplet set image and a second droplet set image.

[0039] In one embodiment, the segmentation threshold of the grayscale value of the maximum point can be calculated based on a single threshold segmentation algorithm, and then the preprocessed image is processed according to the obtained segmentation threshold to obtain a first droplet collection image, i.e., a bright droplet collection image (a droplet collection with a grayscale value greater than the segmentation threshold); then, based on the droplet collection image and the first droplet collection image, a second droplet collection image, i.e., a dark droplet collection image (a droplet collection with a grayscale value greater than the low threshold and less than the segmentation threshold) is obtained.

[0040] Step S105: Count the maximum points of the first droplet set image and the second droplet set image respectively to obtain the number of droplets.

[0041] In one embodiment, distance transformation can be performed on the first droplet set image and the second droplet set image respectively to obtain maximum points, and the excessively large and small maximum points can be removed according to the given droplet size, and the number of maximum points can be counted, which is the number of all droplets.

[0042] An embodiment of the present invention provides the above-mentioned digital PCR image droplet segmentation and counting method, which first obtains a droplet collection image through a dual-threshold segmentation algorithm, and then further segments the droplet collection image by calculating the maximum point and a single-threshold segmentation algorithm to obtain a first droplet collection image and a second droplet collection image. The method can segment overlapping droplets, thereby alleviating the problem of inaccurate segmentation caused by overlap and interference between droplets in the digital PCR image.

[0043] In order to reduce the amount of calculation and improve the recognition performance, the digital PCR image needs to be preprocessed in the embodiment of the present invention. Based on this, the aforementioned step S101, i.e., preprocessing the acquired digital PCR image to obtain the preprocessed image, can be implemented in the following ways, including but not limited to:

[0044] First, the acquired digital PCR image is gray-scaled to obtain a gray-scale image.

[0045] In one embodiment, the digital PCR image can be converted into a grayscale image, and the conversion method includes: average method, weighted method, etc. In a specific application, the image conversion can be performed using the weighted method according to the following formula:

[0046] Gray=R×0.3+G×0.59+B×0.11.

[0047] For details, see Figure 2 A local grayscale image is shown.

[0048] Then, the grayscale image is filtered based on the median filtering algorithm to obtain the preprocessed image.

[0049] Taking into account the presence of impulse noise in the image, in order to eliminate the influence of noise and improve the image accuracy, in an embodiment of the present invention, the grayscale image can be filtered. Specifically, median filtering can be used for processing. A 3*3 template is used to perform median filtering on the grayscale image to remove noise.

[0050] For ease of understanding, the aforementioned step S102, i.e., segmenting the pre-processed image based on the dual threshold segmentation algorithm to obtain the droplet collection image, can be implemented in the following ways including but not limited to:

[0051] Firstly, a first threshold and a second threshold of the preprocessed image are calculated based on the Otsu double threshold segmentation algorithm; wherein the first threshold is smaller than the second threshold.

[0052] In one embodiment, the Otsu method is a threshold segmentation algorithm that aims to maximize the inter-class variance. Single threshold segmentation is commonly used. In order to improve the segmentation accuracy, in the embodiment of the present invention, a search algorithm is used to preliminarily find the corresponding double thresholds with the maximum inter-class variance when divided into three categories, namely the first threshold (also the low threshold) and the second threshold (also the high threshold). The three categories are background, dark droplets, and bright droplets. Specifically, the double thresholds obtained by using the Otsu double threshold segmentation algorithm in this embodiment are 46 and 83 respectively.

[0053] Then, the preprocessed image is binarized based on the first threshold to obtain a droplet collection image.

[0054] In a specific application, the pre-processed image is binarized with a low threshold value to remove the image background and obtain an image of all droplets (i.e., an image of a collection of bright and dark droplets). Specifically, in the embodiment of the present invention, the threshold value 46 is used for binarization, and a partial schematic diagram of the obtained droplet collection image is shown as follows: Figure 3 shown.

[0055] For ease of understanding, the aforementioned step S103, i.e., determining the maximum point in the droplet set image and determining the grayscale value of the maximum point based on the preprocessed image, can be implemented in the following ways including but not limited to:

[0056] Firstly, the droplet set image is calculated based on the distance transform to obtain the distance transform image.

[0057] In one embodiment, the distance transform can be used to calculate the binary droplet collection image to obtain the distance between each non-zero point in the image and the nearest zero point (i.e., the background), and obtain a grayscale image, i.e., the distance transform image. The brighter the point on the image, the farther the non-zero point is from the zero point. Furthermore, the transformed distance of the distance transform image can be normalized to obtain: Figure 4 A local distance transform normalized grayscale image is shown.

[0058] Then, the distance transform image is dilated to obtain the position of the maximum value point of the distance transform image.

[0059] In one implementation, the distance transform image may be first dilated to obtain a dilated image; then, the distance transform image and the dilated image may be compared to obtain the position of the maximum value point of the distance transform image.

[0060] Finally, based on the position of the maximum point, the grayscale value in the preprocessed image corresponding to the maximum point is determined.

[0061] In one embodiment, the grayscale image obtained by the distance transformation can be dilated, and the images before and after the dilation can be compared to find the positions of all the maximum points in the image and the brightness of the preprocessed image corresponding to the positions of the maximum points (i.e., the grayscale value), wherein the maximum point is the point in the grayscale image obtained by the distance transformation whose grayscale value is greater than the grayscale value of its surroundings, i.e., the center point of the bright droplet.

[0062] For ease of understanding, the aforementioned step S104, i.e., segmenting the grayscale value of the maximum point based on the single threshold segmentation algorithm to obtain the first droplet set image and the second droplet set image, can be implemented in the following ways including but not limited to:

[0063] First, the third threshold of the grayscale value of the maximum point is calculated based on the Otsu single threshold segmentation algorithm.

[0064] In one embodiment, the Otsu single threshold segmentation algorithm is used to preliminarily find the threshold corresponding to the maximum inter-class variance when dividing into two categories, that is, the third threshold, where the two categories are dark droplets and bright droplets. Specifically, the third threshold obtained in this embodiment is 91.

[0065] Then, the preprocessed image is binarized based on the third threshold to obtain a first droplet set image.

[0066] Finally, based on the droplet collection image and the first droplet collection image, a second droplet collection image is obtained.

[0067] In one embodiment, the pre-processed image is binarized based on the third threshold value, so as to find all bright droplets with brightness exceeding the third threshold value, that is, to obtain a first droplet set image. For details, see Figure 5 The first droplet set image is shown; then the bright droplets are used as a template, that is, the first droplet set image is used as a template to find other areas except the bright droplets in the droplet set image, that is, the second droplet set image.

[0068] It should be noted that the droplet collection image is obtained by binarization processing based on the first threshold, wherein only the background is removed, including all droplets, while the first droplet collection image is obtained by binarization processing based on the third threshold, wherein only all bright droplets are included. Therefore, by comparing the first droplet collection image with the droplet collection image, the other areas in the droplet collection image except the bright droplets can be obtained, namely the second droplet collection image, that is, the dark droplet collection image.

[0069] For ease of understanding, the aforementioned step S105, i.e., counting the maximum points of the first droplet set image and the second droplet set image respectively to obtain the number of droplets, can be implemented in the following ways including but not limited to:

[0070] First, a distance transformation is performed on the first droplet set image to obtain a maximum point of the first droplet set image and a first distance value corresponding to the maximum point.

[0071] Secondly, a distance transformation is performed on the second droplet set image to obtain a maximum point of the second droplet set image and a second distance value corresponding to the maximum point.

[0072] In one embodiment, the same distance transformation and maximum point determination method as in the aforementioned embodiment can be used to obtain the maximum points of the first droplet collection image and the maximum points of the second droplet collection image, respectively. The found maximum points are summarized and their corresponding distances, i.e., the first distance value and the second distance value, are recorded. The distance is approximately equal to the droplet radius.

[0073] Then, a first number of maximum points whose first distance values ​​are within a predetermined droplet size threshold range and a second number of maximum points whose second distance values ​​are within the droplet size threshold range are calculated.

[0074] Finally, the sum of the first number and the second number is determined as the number of droplets.

[0075] In one embodiment, after removing the maximum points that are too large or too small according to a given droplet size (i.e., a predetermined droplet size threshold range), the number of maximum points corresponding to the first distance value that meets the requirement (i.e., the first number) and the number of maximum points corresponding to the second distance value that meets the requirement (i.e., the second number) can be counted respectively, and the sum of the first number and the second number is the number of all droplets.

[0076] In specific applications, the size of the generated droplets can usually be approximately determined by experiments. Therefore, under a given error, the points corresponding to the maximum points that are too large or too small can be filtered out, and the remaining maximum points are counted, which is the number of all normal droplets. Specifically, assuming that the radius of the generated droplets in this embodiment is about 50 microns, 20% is used as the allowable error band, that is, when the distance corresponding to the maximum point is outside the range [40,60], it is abnormal. Therefore, the positions of all droplets can be obtained, see Figure 6 The schematic diagram of the position of a local droplet in the original image is shown in FIG. 1 , in which the droplet position is marked with solid black. Figure 6 The number of all droplets can be counted.

[0077] The above-mentioned digital PCR image droplet segmentation and counting method provided in the embodiment of the present invention, by comprehensively adopting analysis methods such as Otsu algorithm, distance transformation, morphological operation, etc., to segment and count droplets in low-resolution digital PCR images, thereby alleviating the problem of inaccurate segmentation of current low-resolution digital PCR images due to overlap and interference between droplets. The method is easy to understand and easy to implement.

[0078] For the aforementioned digital PCR image droplet segmentation and counting method, the present invention also provides a digital PCR image droplet segmentation and counting device, see Figure 7 The schematic diagram of the structure of a digital PCR image droplet segmentation and counting device shown in FIG. 1 shows that the device mainly includes the following parts:

[0079] The preprocessing module 701 is used to preprocess the acquired digital PCR image to obtain a preprocessed image.

[0080] The first segmentation module 702 is used to segment the preprocessed image based on a dual threshold segmentation algorithm to obtain a droplet collection image.

[0081] The grayscale determination module 703 is used to determine the maximum point in the droplet collection image and determine the grayscale value of the maximum point based on the preprocessed image; wherein the maximum point is a point whose grayscale value is greater than the surrounding grayscale values.

[0082] The second segmentation module 704 is used to segment the gray value of the maximum point based on a single threshold segmentation algorithm to obtain a first droplet set image and a second droplet set image.

[0083] The counting module 705 is used to count the maximum points of the first droplet set image and the second droplet set image respectively to obtain the number of droplets.

[0084] An embodiment of the present invention provides the above-mentioned digital PCR image droplet segmentation and counting device, which first obtains a droplet collection image through a dual-threshold segmentation algorithm, and then further segments the droplet collection image by calculating the maximum point and a single-threshold segmentation algorithm to obtain a first droplet collection image and a second droplet collection image. It is capable of segmenting overlapping droplets, thereby alleviating the problem of inaccurate segmentation caused by overlap and interference between droplets in the digital PCR image.

[0085] In one embodiment, the preprocessing module 701 is further used to: perform grayscale processing on the acquired digital PCR image to obtain a grayscale image; and perform filtering processing on the grayscale image based on a median filtering algorithm to obtain a preprocessed image.

[0086] In one embodiment, the first segmentation module 702 is further used to: calculate the first threshold and the second threshold of the preprocessed image based on the OTSU dual threshold segmentation algorithm; wherein the first threshold is less than the second threshold; and binarize the preprocessed image based on the first threshold to obtain a droplet collection image.

[0087] In one embodiment, the grayscale determination module 703 is further used to: calculate the droplet collection image based on the distance transformation to obtain a distance transformation image; dilate the distance transformation image to obtain the position of the maximum point of the distance transformation image; and determine the grayscale value in the preprocessed image corresponding to the maximum point based on the position of the maximum point.

[0088] In one implementation, the grayscale determination module 703 is further used to: dilate the distance transformation image to obtain a dilated image; and compare the distance transformation image with the dilated image to obtain the position of the maximum value point of the distance transformation image.

[0089] In one embodiment, the second segmentation module 704 is further used to: calculate a third threshold of the grayscale value of the maximum point based on the Otsu single threshold segmentation algorithm; binarize the pre-processed image based on the third threshold to obtain a first droplet collection image; and obtain a second droplet collection image based on the droplet collection image and the first droplet collection image.

[0090] In one embodiment, the counting module 705 is further used to: perform distance transformation on the first droplet collection image to obtain the maximum points of the first droplet collection image and the first distance values ​​corresponding to the maximum points; perform distance transformation on the second droplet collection image to obtain the maximum points of the second droplet collection image and the second distance values ​​corresponding to the maximum points; calculate the first number of maximum points whose first distance values ​​are within a predetermined droplet size threshold range, and the second number of maximum points whose second distance values ​​are within the droplet size threshold range; and determine the sum of the first number and the second number as the number of droplets.

[0091] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0092] An embodiment of the present invention further provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above implementation methods.

[0093] Figure 8 A structural diagram of an electronic device provided in an embodiment of the present invention, the electronic device 100 includes: a processor 400, a memory 401, a bus 402 and a communication interface 403, wherein the processor 400, the communication interface 403 and the memory 401 are connected via the bus 402; the processor 400 is used to execute an executable module stored in the memory 401, such as a computer program.

[0094] The memory 401 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 403 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0095] The bus 402 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0096] Among them, the memory 401 is used to store programs, and the processor 400 executes the program after receiving the execution instruction. The method executed by the device for flow process definition disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 400, or implemented by the processor 400.

[0097] The processor 400 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 400. The above processor 400 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 401, and the processor 400 reads the information in the memory 401 and completes the steps of the above method in combination with its hardware.

[0098] The computer program product of the readable storage medium provided in the embodiment of the present invention includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be referred to the previous method embodiments, which will not be repeated here.

[0099] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0100] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A digital PCR image droplet segmentation and counting method, characterized in that: include: Preprocessing the acquired digital PCR image to obtain a preprocessed image; Segmenting the preprocessed image based on a dual threshold segmentation algorithm to obtain a droplet collection image; Determine a maximum point in the droplet set image, and determine a grayscale value of the maximum point based on the preprocessed image; wherein the maximum point is a point whose grayscale value is greater than the surrounding grayscale values; Segmenting the grayscale value of the maximum point based on a single threshold segmentation algorithm to obtain a first droplet set image and a second droplet set image; Counting the maximum points of the first droplet set image and the second droplet set image respectively to obtain the number of droplets; The steps of determining the maximum point in the droplet collection image and determining the grayscale value of the maximum point based on the preprocessed image include: calculating the droplet collection image based on distance transformation to obtain a distance transformation image; dilating the distance transformation image to obtain the position of the maximum point of the distance transformation image; and determining the grayscale value in the preprocessed image corresponding to the maximum point based on the position of the maximum point.

2. The method according to claim 1, characterized in that The step of preprocessing the acquired digital PCR image to obtain a preprocessed image includes: grayscale processing is performed on the acquired digital PCR image to obtain a grayscale image; The grayscale image is filtered based on a median filtering algorithm to obtain a preprocessed image.

3. The method according to claim 1, characterized in that The step of segmenting the preprocessed image based on a dual threshold segmentation algorithm to obtain a droplet collection image includes: Calculate a first threshold and a second threshold of the preprocessed image based on the OTSU double threshold segmentation algorithm; wherein the first threshold is less than the second threshold; The preprocessed image is binarized based on the first threshold to obtain a droplet set image.

4. The method according to claim 1, characterized in that The step of performing dilation processing on the distance transform image to obtain the position of the maximum value point of the distance transform image comprises: Performing dilation processing on the distance transformation image to obtain a dilated image; The distance transformation image and the expanded image are compared to obtain the position of the maximum value point of the distance transformation image.

5. The method according to claim 1, characterized in that The step of segmenting the gray value of the maximum point based on a single threshold segmentation algorithm to obtain a first droplet set image and a second droplet set image comprises: Calculate the third threshold of the gray value of the maximum point based on the Otsu single threshold segmentation algorithm; Binarize the preprocessed image based on the third threshold to obtain a first droplet set image; A second droplet collection image is obtained based on the droplet collection image and the first droplet collection image.

6. The method according to claim 1, characterized in that The step of respectively counting the maximum points of the first droplet set image and the second droplet set image to obtain the number of droplets comprises: Performing distance transformation on the first droplet set image to obtain a maximum point of the first droplet set image and a first distance value corresponding to the maximum point; Performing distance transformation on the second droplet set image to obtain a maximum point of the second droplet set image and a second distance value corresponding to the maximum point; Calculating a first number of maximum points whose first distance value is within a predetermined droplet size threshold range, and a second number of maximum points whose second distance value is within the droplet size threshold range; The sum of the first number and the second number is determined as the number of droplets.

7. A digital PCR image droplet segmentation and counting device, characterized in that: include: A preprocessing module, used to preprocess the acquired digital PCR image to obtain a preprocessed image; A first segmentation module, used to segment the preprocessed image based on a dual threshold segmentation algorithm to obtain a droplet collection image; A grayscale determination module, used to determine a maximum point in the droplet collection image, and determine a grayscale value of the maximum point based on the preprocessed image; wherein the maximum point is a point whose grayscale value is greater than the surrounding grayscale values; A second segmentation module is used to segment the gray value of the maximum point based on a single threshold segmentation algorithm to obtain a first droplet set image and a second droplet set image; A counting module, used for respectively counting the maximum points of the first droplet set image and the second droplet set image to obtain the number of droplets; The grayscale determination module is also used to: calculate the droplet collection image based on distance transformation to obtain a distance transformation image; dilate the distance transformation image to obtain the position of the maximum point of the distance transformation image; and determine the grayscale value in the preprocessed image corresponding to the maximum point based on the position of the maximum point.

8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are executed.

Citation Information

Patent Citations

  • Calculation method of digital PCR liquid drop concentration

    CN107844683A

  • Micro-droplet digital PCR droplet detection method and system

    CN114549528A

Cited By

  • Digital PCR image droplet segmentation positioning method and device

    CN122435608A