Static and dynamic combined treatment methods, systems, equipment, and media for colony count

By combining static and dynamic identification methods, the problem of large errors in counting adherent colonies was solved, achieving more accurate colony identification and counting.

CN116188932BActive Publication Date: 2026-01-30SICHUAN RUOBIN BIOTECHNOLOGY CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310175568.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2026-01-30
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately count clusters of bacteria that are stuck together or multiple clusters, and most methods only operate at the static identification stage, resulting in significant counting errors.

Method used

By combining static and dynamic recognition methods, including outer circle, inner circle and colony recognition steps, image processing techniques are used to scale, threshold binarize, fit and register colony images, select the best registration strategy, and dynamically update the colony recognition results.

Benefits of technology

It enables more accurate counting of colonies and improves the accuracy and precision of colony identification by dynamically identifying and correcting errors in static identification.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

This invention relates to the field of colony identification technology, specifically to a method, system, device, and medium for the fusion processing of static and dynamic colony counts. The method involves static identification, which is performed at least twice to obtain two static colony result images, followed by dynamic identification. Dynamic identification includes: acquiring two adjacent static colony identification results; preprocessing the colony data; and updating the previous dynamic identification result with the next dynamic identification result. This invention mainly combines static and dynamic identification of colony images. The dynamic identification step compares and analyzes the results of two adjacent static identifications, identifying covered colonies or other interfering factors such as impurities, and correcting subsequent dynamic identification. The beneficial effect is that it obtains a more accurate colony count, solving the problem of large counting errors in current technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of colony identification technology, and more specifically, to a method, system, device, and medium for the fusion processing of static and dynamic colony counts. Background Technology

[0002] In biological research, the number and size of colonies formed in petri dishes are important indicators for antibiotic screening, bacterial identification, and related tests. Accurately measuring the growth information of target colonies to observe their dynamic changes remains a significant challenge. Manual colony counting and size measurement is a laborious and error-prone process, often requiring computer software for labeling, which is time-consuming and laborious. Furthermore, colony units formed in petri dishes are often not independent but may be clustered together, further complicating colony information measurement. With the widespread application of image processing and computer vision, many researchers have applied these technologies to microbial research, including colony identification, colony counting, and localization. In the field of colony counting, relatively mature methods include watershed segmentation based on distance transform, image segmentation methods based on deep learning, and active contour detection algorithms. Among these, the more traditional watershed segmentation method based on distance transform performs well for segmenting fewer clustered colonies and those with regular shapes, but it is less effective for severely clustered colonies, easily leading to oversegmentation and undersegmentation, failing to meet the requirements for accurate segmentation.

[0003] Furthermore, most existing processing methods rely on single-image recognition, remaining at a static recognition stage. The final colony image is captured for identification, analysis, and counting, resulting in a significant counting error. Summary of the Invention

[0004] The purpose of this invention is to provide a method, system, device, and medium for the static and dynamic fusion processing of bacterial colony counts.

[0005] The embodiments of the present invention are achieved through the following technical solutions:

[0006] The first aspect of this application provides a method for fusing static and dynamic colony count processing, including:

[0007] Perform static identification, the static identification including;

[0008] Acquire colony images, perform outer circle recognition processing on the images, and identify the outer circle of the petri dish;

[0009] Based on the identified outer circle, the inner circle is identified to identify the inner circle in the petri dish;

[0010] Based on the identified inner circle, colony identification is performed to obtain a static image of the identified colony results;

[0011] After at least two static identifications to obtain two static identification colony result images, dynamic identification is performed, which includes:

[0012] Obtain the static colony identification results of two consecutive times, and preprocess the colony data;

[0013] The colonies in the static colony recognition images from two consecutive tests were registered, and the best registration strategy was selected to obtain the colony entries.

[0014] The next dynamic recognition result will update the previous dynamic recognition result.

[0015] In one possible implementation, the outer circle processing includes;

[0016] The colony images were reduced in size by several times;

[0017] Then, perform morphological dilation on the colony image several times.

[0018] One possible implementation also includes thresholding the colony image to find all contours and determine the largest contour, then fitting an ellipse to the boundary of the largest contour to obtain the outer circle.

[0019] In one possible implementation, the inner circle processing includes;

[0020] The inner circle of the colony image is reduced by a factor of several to obtain the black ring of the inner circle;

[0021] The area of ​​any value between 15% and 25% of the diameter of the outer circle is taken as the wall thickness area of ​​the inner and outer circles. The area within any value between 75% and 85% of the center of the outer circle is cleared, and the wall thickness area image is retained.

[0022] Based on the image of the wall thickness region, the image is binarized using a threshold range of 0-254 to obtain the binarized threshold X;

[0023] Find the patches in the image after binarization, and use the patches as points to fit an ellipse to obtain the optimal inner circle;

[0024] The identified inner circle is magnified several times to restore the true image size.

[0025] In one possible implementation, the radius error between the optimal inner circle and the initial inner circle cleared area is less than a certain expected value;

[0026] If not, then perform the inner circle identification process again.

[0027] The second inner circle recognition will be binarized using 0-X as the new threshold range.

[0028] In one possible implementation, the patches in the binarized image also include;

[0029] Remove weak connections between half-points in the binary image and connect the binarized image;

[0030] Filter out patches that are too small or whose central area is too far from the center of the outer circle to obtain the smallest patches and semi-circular patches.

[0031] In one possible implementation, the colony identification includes:

[0032] Obtain the recognized inner circle image, and then cut the image to retain only the inner circle portion for recognition;

[0033] Convert the obtained image from RGB to LAB.

[0034] Spot recognition is performed by identifying spots in the inner circular image region using a predefined threshold range and the maximum size of the colony, thus obtaining the colony.

[0035] Contour recognition is performed, the image is Gaussian blurred, the possible size range of colonies is predefined, and the image is binarized with an adaptive threshold to obtain the colony contour.

[0036] Boundary recognition is performed using the inner circle as the boundary. Adaptive threshold recognition is then performed on the annulus to obtain the colony outline on the boundary.

[0037] All contours obtained from spot recognition, contour recognition, and boundary recognition are merged, unqualified contours are filtered out, and color difference analysis is performed to obtain valid contour data.

[0038] By combining effective contour data and spot data, ellipse fitting is performed to obtain the final colony identification results.

[0039] In one possible implementation, the merging of all contours obtained from spot recognition, contour recognition, and boundary recognition includes;

[0040] The image was divided into 16 regions of 4 by 4, the center coordinates of the colonies were established, and the colony area was obtained.

[0041] Based on the center coordinates and area of ​​the colony, the colony was divided into different regions, and morphological analysis, size analysis, spot color difference analysis, and CIEDE2000 color difference analysis were performed on each region.

[0042] Inadequate filtration and invalid spots.

[0043] In one possible implementation, the ellipse fitting includes:

[0044] Based on ellipse fitting, the minimum circumscribed rectangle of the ellipse is obtained. The circumscribed rectangle is then filtered by shape and size to remove unqualified rectangles.

[0045] In one possible implementation, the colony data preprocessing includes:

[0046] Data repackaging;

[0047] Construct the characteristic information of bacterial colonies.

[0048] In one possible implementation, the registration of colonies in the static colony recognition result images of the two consecutive images further includes a registration strategy, which includes:

[0049] Colony coordinates are not processed and are directly registered.

[0050] Colony coordinates are scaled and translated based on the statically identified vessel information;

[0051] Colony coordinates are transformed based on a feature transformation matrix calculated from feature points along the outer edge of the vessel.

[0052] Based on the colony location characteristics in the pretreatment, a transformation matrix is ​​calculated for coordinate transformation;

[0053] The best-matching registration strategy is selected, and the registration strategy with the fewest merged colony records is the best-matching registration strategy.

[0054] In one possible implementation, a colony determination method is also included, the colony determination method comprising:

[0055] Based on the time of the first appearance of the colony, if the colony shows a huge growth range, all statically identified colonies will be judged as impurities;

[0056] If the area of ​​a colony identified by static identification is less than a threshold, it is judged as an impurity;

[0057] If the continuity of colony growth is not exceeded, it is judged as an impurity.

[0058] If the colony growth rate does not exceed a specified threshold, it is judged as an impurity.

[0059] The number of times a colony is identified is used to determine if it is less than the configured quantity, and if so, it is considered an impurity.

[0060] In one possible implementation, the determination of colony growth continuity includes:

[0061] G = Number of times the time occurred * 100 / (Last time - Earliest time + 1);

[0062] The determination of the colony growth ratio includes:

[0063] The colony growth ratio is the area at maximum time / the area at current time.

[0064] One possible implementation also includes;

[0065] If the colony count exceeds the maximum threshold for dynamic identification, dynamic identification will stop and static data will be returned.

[0066] If the colony observation time exceeds the configured maximum time, dynamic identification will stop and static data will be returned.

[0067] A second aspect of this application also provides a system for fusing static and dynamic colony count processing, including:

[0068] Acquisition module, the acquisition module is used to acquire colony images;

[0069] The processing module is used to execute the above-described static and dynamic fusion processing method for colony count.

[0070] A third aspect of this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described static and dynamic fusion processing method for colony counts.

[0071] A fourth aspect of this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described static and dynamic fusion processing method for colony counts.

[0072] The technical solutions of the embodiments of the present invention have at least the following advantages and beneficial effects:

[0073] This invention mainly involves combining static and dynamic recognition of colony images to obtain a more accurate colony count. The dynamic recognition step compares and analyzes the results of two adjacent static recognitions to identify covered colonies or other interfering factors such as impurities. The correct colony count is selected and stored using the method provided by this invention, and then corrected for subsequent dynamic recognition to obtain a more accurate colony count. Detailed Implementation

[0074] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0075] In the field of colony counting, relatively mature methods include watershed segmentation based on distance transform, image segmentation methods based on deep learning, and active contour detection algorithms. Among them, the more traditional watershed segmentation method based on distance transform performs well in segmenting a small number of adherent colonies and regular shapes, but it is not effective in cases with severe adhesion of colonies, and is prone to oversegmentation and undersegmentation, failing to meet the requirements of accurate segmentation.

[0076] Furthermore, most existing processing methods rely on single-image recognition, remaining at a static recognition stage. The final colony image is captured for identification, analysis, and counting, resulting in a significant counting error.

[0077] In view of the above problems, the first aspect of the present invention provides a method for the static and dynamic fusion processing of colony counts. This method can be applied to experiments or related intelligent devices for colony counting, or intelligent systems composed of various modules.

[0078] Mainly includes;

[0079] S101: Perform static identification, which includes: acquiring colony images, performing outer circle identification processing on the images, and identifying the outer circle of the petri dish;

[0080] The static identification in this scheme mainly focuses on analyzing the growth status of colonies at a specific time point to prepare for counting. It is a single operation process: taking a picture of the colony growth at that moment, processing the image, and obtaining an accurate colony count.

[0081] S102: Based on the identified outer circle, perform inner circle identification processing to identify the inner circle in the petri dish;

[0082] The identification of inner circles needs to be based on the identification of outer circles. The specific steps and contents of inner circle identification and outer circle identification will be explained in detail below.

[0083] S103: Based on the identified inner circle, colony identification is performed to obtain a static colony identification result image;

[0084] S104: After at least two static identifications to obtain two static identification colony result images, dynamic identification is performed, wherein the dynamic identification includes;

[0085] S105: Obtain the static colony identification results of two adjacent counts and preprocess the colony data;

[0086] The basis for dynamic identification is to collect the results of two static identifications and process them. For example, after obtaining the result image from the first static identification, when performing dynamic identification, since there is only one static identification result, the result of this dynamic identification is the result of the first static identification. Therefore, dynamic identification can be performed when only the first static identification result is available, and this dynamic identification is the result of the first static identification. Alternatively, dynamic identification can be skipped. After obtaining the result image from the second static identification, the dynamic identification in this round will retrieve the results of the first and second static identifications, compare and analyze them, and save the result of this round. The next round of dynamic identification will retrieve the results of the second and third static identifications. If the result of the previous dynamic identification contains information about colony coverage, the result of the previous dynamic identification will be updated in the current round. For example, if one colony is covered, the result of the static identification will be one less colony than the result of the previous static identification. This will be recorded in the current dynamic identification, and the covered colony will be added by default in the next dynamic identification. This cycle continues until the end of the experiment.

[0087] S106: Register the colonies in the static colony recognition images from the two consecutive times, select the best registration strategy, and obtain the colony entries;

[0088] S107: The next dynamic recognition result updates the previous dynamic recognition result.

[0089] This invention mainly involves combining static and dynamic recognition of colony images to obtain a more accurate colony count. The dynamic recognition step compares and analyzes the results of two adjacent static recognitions to identify covered colonies or other interfering factors such as impurities. The method provided by this invention selects the correct colony count, stores it, and corrects subsequent dynamic recognitions to obtain a more accurate colony count.

[0090] The main steps for the outer circle treatment in this embodiment are as follows;

[0091] The image is reduced by a factor of 4, and then dilated three times using morphological operations to eliminate noise.

[0092] Next, perform OTSU thresholding binarization on the image. Specifically, use the OTSU thresholding binarization method from the standard OpenCV image library to find all contours and then find the largest contour among all contours.

[0093] Take up to 100 points within the boundary of the maximum contour to fit an ellipse, and obtain the outer circle.

[0094] Otsu thresholding binarization is a common method for image binarization, implemented in both Matlab and OpenCV. The Otsu Threshing method is based on finding a suitable threshold for binarization. Its most important part is finding the image binarization threshold, and then dividing the image into foreground (white) or background (black) based on the threshold.

[0095] The inner circle treatment mainly includes the following steps:

[0096] The inner circle recognition requires prior recognition of the outer circle. First, the inner circle image is reduced by a factor of 2. Due to the large feature sizes of both the inner and outer circles, image scaling significantly accelerates the recognition speed. The scaled image should clearly show the black ring of the inner circle.

[0097] The area representing 21% of the outer circle's diameter is used as the wall thickness region for both the inner and outer circles. The area within 79% of the outer circle's center is removed from the image, leaving only the wall thickness region.

[0098] In the image of the wall thickness region, the first round binarizes the image through the threshold range of 0-254 and obtains the binarized threshold X. If the second round of inner circle recognition is to be performed, the second round of inner circle recognition will use 0-X as the new threshold range for binarization.

[0099] Weak connections between half-points in a binary image are removed by using morphological erosion. Then, a connected component algorithm, specifically using the connected component function method from the standard OpenCV image library, is used to connect the binarized image, identify connected patches, and filter out patches that are too small or whose central region is too far from the center of the outer circle. Among the remaining large patches, the smallest patch and the semi-circular patch are finally identified. Finally, ellipse fitting is performed using points from the patches, that is, an ellipse containing all points is found based on the least squares method to obtain the optimal inner circle.

[0100] If the radius error between the optimal inner circle and the initial inner circle clearing area is less than a certain expected value, it means that the inner circle is very close to the boundary of the clearing area. In this case, the inner circle is considered not to have been identified as expected, and a second round of identification will be required.

[0101] Finally, the size of the identified inner circle was magnified by 2 times to restore the true image size.

[0102] Connected component analysis (CFI), also known as blob extraction or region labeling, is an algorithmic application of graph theory used to determine the connectivity of "blob-like" regions in binary images. CFI is typically used in the same context as contour analysis; however, CFI often allows for finer-grained filtering of blobs in binary images. When using contour analysis, we are often limited by the contour hierarchy (i.e., one contour contained within another). CFI allows us to more easily segment and analyze these structures.

[0103] Furthermore, colony identification mainly includes the following steps:

[0104] S201: Obtain the recognized inner circle image, cut the image, and retain only the inner circle portion for recognition.

[0105] After magnifying the inner circle size by 2 times to restore the true image size, the original image is cropped to remove the part outside the inner circle, leaving only the inner circle for recognition. This reduces misidentification caused by the outer boundary. This cropping depends on the efficiency of the inner circle recognition. If there is an error in the recognition of the inner and outer circles, misidentified colonies, impurities, or the container wall may easily appear in the boundary area.

[0106] S202: Convert the image from RGB to LAB.

[0107] To facilitate color difference analysis, a specific color difference analysis algorithm is provided. This algorithm extracts grayscale values ​​from individual pixels within a rectangular area at intervals, counts the number of grayscale values ​​between 0 and 255, calculates the average grayscale value, and then selects a peak grayscale value on each side of the average grayscale value to calculate the average color difference value. Simultaneously, the average color difference between the central area of ​​the colony and the entire colony area can be compared to detect the possibility of air bubbles.

[0108] S203: Perform spot recognition. By defining a predefined threshold range and the maximum size of the colony, spot recognition is performed on the inner circular image region to obtain the colony.

[0109] By defining a predefined threshold range and the maximum colony size, the system performs blob detection on the inner circular image region, automatically identifying all similar circular blobs, primarily finding small and relatively regular colonies. Specifically, the SimpleBlobDetector function from the standard OpenCV image library can be used for blob detection.

[0110] Specifically, the usage of the SimpleBlobDetector function for blob recognition is as follows:

[0111] First, the input grayscale image is converted into a set of binary images by a series of consecutive thresholds, with a threshold range of [T1, T2] and a step size of t. Then, all the thresholds are:

[0112] T1, T1+t, T1+2t, T1+3t,…, T2

[0113] The second step is to use the algorithm proposed by Suzuki to extract the connected regions of each binary image by detecting the boundaries of each binary image. We can consider the different connected regions enclosed by the boundaries as the spots of the binary image.

[0114] The third step is to classify the binary image spots according to the center coordinates of all binary image spots, thereby forming grayscale image spots. Those binary image spots belonging to the same class eventually form grayscale image spots. Specifically, the grayscale image spots are composed of those binary image spots whose center coordinates are less than the threshold Tb, that is, these binary image spots belong to the grayscale image spots.

[0115] Finally, we determine the information of the grayscale image blob—its position and size. The position is the weighted sum of the center coordinates of all binary image blobs belonging to that grayscale image blob, as shown in Formula 2. The weight q is equal to the square of the blob's rate of inertia. This means that the closer the shape of the blob is to a circle, the more desirable it is, and therefore, the greater its contribution to the position of the grayscale image blob. The size is the radius of the blob with the median area among all the binary image blobs belonging to that grayscale image blob.

[0116] In the second step, not all connected regions of a binary image can be considered as blobs. We often use certain constraints to obtain more accurate blobs. These constraints include color, area, and shape. The shape of the blobs can be represented by roundness, eccentricity, or convexity.

[0117] For binary images, there are only two spot colors—white spots and black spots. We only need spots of one color, and we can distinguish the color of the spots by determining their grayscale values.

[0118] S204: Perform contour recognition, apply Gaussian blur to the image, predefine the possible size range of colonies, perform adaptive threshold binarization of the image, and obtain the colony contour.

[0119] The image is Gaussian blurred, the possible size range of colonies is predefined, and the image is binarized using an adaptive threshold to obtain the colony outline. Specifically, the Gaussian blur algorithm function GaussianBlur and the adaptive threshold function function adaptiveThreshold from the standard OpenCV image library are used.

[0120] Otsu thresholding involves applying Gaussian blur to the image and then re-thresholding it using an improved Otsu algorithm to obtain the colony outline.

[0121] Gaussian blur reduces image noise and detail. Gaussian smoothing is also used in the preprocessing stage of computer vision algorithms to enhance image quality at different scales. From a mathematical perspective, the Gaussian blurring process is essentially convolving the image with a normal distribution.

[0122] S205: Perform boundary recognition. Using the inner circle as the boundary, perform adaptive threshold recognition on the ring to obtain the colony outline on the boundary.

[0123] Boundary colony identification involves adaptive threshold recognition on a ring within a 50-pixel area, with the inner circle serving as the outer boundary, to obtain the colony outline on the boundary.

[0124] S206: Merge all contours obtained from spot recognition, contour recognition, and boundary recognition, filter out unqualified contours, and perform color difference analysis to obtain valid contour data.

[0125] All contours obtained from spot recognition, contour recognition, and boundary recognition are merged. Since colony merging generally only requires comparison with other colonies, whereas normally it would require comparing one colony with all others, resulting in a large amount of data, a Level of Distance (LOD) algorithm is used to accelerate the recognition speed. This involves dividing the image into 16 4x4 regions. Based on the center coordinates and area of ​​the colony, it is divided into different smaller regions. Larger colonies may be divided into multiple smaller regions simultaneously. Finally, only colonies within a small region are processed to reduce the processing load. Morphological analysis is performed on each small region, considering factors such as size, aspect ratio, minimum size, maximum size, contour area, and the ratio of the contour area to the area of ​​the bounding rectangle, filtering out unqualified contours. Finally, color difference detection is performed to obtain valid contour data.

[0126] The spots are divided into 4*4 regions using the LOD algorithm. Morphological analysis, size analysis, and color difference analysis are performed between each small region. CIEDE2000 color difference analysis is used to filter out unqualified spots. In addition, effective contour data is used for screening. The rotatedRectangleIntersection algorithm and the pointPolygonTest algorithm are used to handle overlapping, intersecting and other invalid spots.

[0127] S207: Combining effective contour data and spot data, ellipse fitting is performed to obtain the final colony identification result.

[0128] Finally, by combining the effective contour data and spot data, ellipse fitting is performed to obtain the smallest circumscribed rectangle of the ellipse. The circumscribed rectangle is then filtered for shape and size to remove unqualified rectangles, resulting in the final recognition result.

[0129] In the embodiments provided by the present invention, the preprocessing of colony data for dynamic processing includes:

[0130] Data repackaging;

[0131] Construct the characteristic information of bacterial colonies.

[0132] Specifically, in this embodiment, the colony feature is defined as follows: taking a colony as the center, calculating the distance information, vector information, and angle information between this colony and the center of the vessel within a certain area of ​​the colony.

[0133] Secondly, the registration of colonies in the static colony recognition images of the two consecutive images includes a registration strategy, which includes:

[0134] Colony coordinates are not processed and are directly registered.

[0135] Colony coordinates are scaled and translated based on the statically identified vessel information;

[0136] Colony coordinates are transformed based on a feature transformation matrix calculated from feature points along the outer edge of the vessel.

[0137] Based on the colony location characteristics in the pretreatment, a transformation matrix is ​​calculated for coordinate transformation;

[0138] The best-matching registration strategy is selected, and the registration strategy with the fewest merged colony records is the best-matching registration strategy.

[0139] The following examples illustrate this in detail:

[0140] For example, frame 50 contains 180 colonies, and frame 51 contains 200 colonies, of which 180 are existing colonies and 20 are newly added colonies. Merging involves updating existing records for the same colony, and adding new colonies to existing records. Ideally, the merged record from frames 50 and 51 would contain 200 colonies. However, machine motion errors can cause colony coordinates to not be properly matched one-to-one, resulting in two records for the same colony. Strategy 1: 220 records after merging; Strategy 2: 260 records after merging; Strategy 3: 380 records after merging; Strategy 4: 210 records after merging. Different strategies will produce different records, so we select Strategy 4 with the fewest records as the merged data and discard the others.

[0141] A more detailed explanation of the above registration steps is as follows:

[0142] Strategy 1: Direct registration of colonies

[0143] Ideally, the culture dish remains stationary, ensuring consistent image quality across all photographs. The coordinates of the colonies can then be directly matched.

[0144] Strategy 2: Rigid Body Transformation Registration

[0145] When the culture vessel undergoes a small-scale rigid body movement, without perspective or radial transformation as seen in camera photography, the coordinates of the colonies are simply translated, selected, scaled, and registered based on the statically identified vessel information (vessel center, vessel size).

[0146] Image feature method:

[0147] Traditional image processing, particularly image feature matching, involves three basic steps: feature extraction, feature description, and feature matching. Feature extraction involves extracting key points (or feature points, corner points, etc.) from an image. Feature description uses a set of mathematical vectors to describe the feature points, ensuring a correspondence between different vectors and different feature points, while minimizing the differences between similar key points. Feature matching essentially calculates the distance between feature vectors, using common methods such as Euclidean distance, Hamming distance, and cosine distance. Based on the degree of matching, the corresponding feature points are obtained, and the transformation matrix is ​​calculated.

[0148] Strategy 3: Registration of Vessel Features

[0149] Based on image feature analysis, the prominent points along the outer edge of the culture vessel are used as features, and a transformation matrix is ​​calculated based on these feature points. The colony coordinates are then transformed using this matrix for registration.

[0150] Strategy 4: Colony Neighborhood Feature Registration

[0151] Based on image feature analysis. Colony features are defined as follows: Taking a colony as the center, calculate the distance and vector information of this colony to other colonies within a certain neighborhood, as well as the angle information with the center of the container. A set of corresponding feature points is selected based on the colony features, and a transformation matrix is ​​calculated based on these feature points. Specifically, the `cv::findHomography()` method from the OpenCV open-source library is called to perform matrix transformation on the colony coordinates for registration.

[0152] In the algorithm, colony type can be defined as:

[0153] Colony: COLONY_TYPE_YES

[0154] Impurities: COLONY_TYPE_IMPURITY

[0155] Uncertain: COLONY_TYPE_UNCERTAIN

[0156] Covered colony: COLONY_TYPE_COVERD.

[0157] The present invention provides a detailed explanation and description of the criteria for determining the above-mentioned colony types, as follows:

[0158] Determining the time of first colony appearance. Based on the growth characteristics of colonies, it is assumed that colonies in the first few observed images will not exhibit significant growth, and their growth will be visible to the naked eye. Therefore, statically identified colonies are considered impurities and have the highest priority.

[0159] Static identification of colonies with an area less than a threshold results in direct filtering as impurities without further evaluation; this is a secondary priority.

[0160] Static recognition provides a confidence level assessment, which requires exceeding a specified threshold.

[0161] Colony growth continuity assessment. Definition: GrowthContinuity, calculated as: GrowthContinuity = Number of occurrences * 100 / (Last occurrence - Earliest occurrence + 1). For example, for an uncertain colony with occurrence times {0, 2, 5, 8, 19}, then GrowthContinuity = 5 * 100 / (19 - 0 + 1), which needs to exceed a specified threshold.

[0162] Colony growth ratio assessment. Definition: GrowthRatio. For example, if the area of ​​an uncertain colony at its first appearance is 100, and the area at its maximum appearance is 111, the calculation is: 111 * 100 / 100 > GrowthRatio. This indicates the colony is likely a colony; otherwise, it is an impurity. Usage: a. The first few observed images. b. The area around the inner ring of the petri dish.

[0163] The number of times a colony is identified is used to determine if it is less than the configured quantity, and if so, it is considered an impurity.

[0164] Based on the specific judgment steps described above, the judgment result is as follows:

[0165] Based on the time of the first appearance of the colony, if the colony shows a huge growth range, all statically identified colonies will be judged as impurities.

[0166] If the area of ​​a colony identified by static identification is less than a threshold, it is judged as an impurity;

[0167] If the continuity of colony growth is not exceeded, it is judged as an impurity.

[0168] If the colony growth rate does not exceed a specified threshold, it is judged as an impurity.

[0169] The number of times a colony is identified is used to determine if it is less than the configured quantity, and if so, it is considered an impurity.

[0170] Furthermore, misidentification in static identification manifests in the stored colony data as a colony that appears only once during the entire colony growth cycle, thus being interpreted as uncertain.

[0171] If the colony count exceeds the maximum threshold for dynamic identification, dynamic identification will stop and static data will be returned.

[0172] If the colony observation time exceeds the configured maximum time, dynamic identification will stop and static data will be returned.

[0173] Once the above two conditions are met, dynamic recognition will no longer be performed, because the colony may have reached its growth limit or may have been completely covered by a single colony, meaning the image result shows only one large colony, and subsequent photos will not show any changes.

[0174] This invention also provides a system for the fusion processing of static and dynamic colony counts, including:

[0175] Acquisition module, the acquisition module is used to acquire colony images;

[0176] The processing module is used to execute the above-described static and dynamic fusion processing method for colony count.

[0177] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0178] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. This computer software product, stored in a storage medium, includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0179] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for static and dynamic fusion of bacterial colony numbers, characterized in that, The application relates to a colony recognition method and device. The static recognition includes: An image of the colony is acquired, and an outer circle recognition process is performed on the image to recognize the outer circle of the culture dish; According to the recognized outer circle, an inner circle recognition process is performed to recognize the inner circle in the culture dish; According to the recognized inner circle, colony recognition is performed to obtain a static recognition colony result image; The colony recognition includes: An image after recognition is acquired, and the image is cut to only keep the inner circle part for recognition; An RGB-to-LAB conversion is performed on the obtained image; Spot recognition is performed, a pre-defined threshold interval and the maximum size of the colony are used to perform spot recognition on the inner circle image area to obtain the colony; Contour recognition is performed, Gaussian blur is performed on the image, a possible size range of the colony is pre-defined, a self-adaptive threshold binary image is obtained, and the colony contour is obtained; Boundary recognition is performed, the inner circle is taken as the boundary, a self-adaptive threshold recognition is performed on the annulus, and the colony contour on the boundary is obtained; All the contours obtained through the spot recognition, the contour recognition and the boundary recognition are combined, unqualified contours are filtered, and color difference analysis is performed to obtain effective contour data; Combining the effective contour data and the spot data, ellipse fitting is performed to obtain a final colony recognition result; After at least twice of static recognition, two static recognition colony result images are obtained, and dynamic recognition is performed, the dynamic recognition includes: Two adjacent times of static colony recognition results are acquired, and colony data is pre-processed; The colonies in the static recognition colony result images of the previous and next times are registered, the best registration strategy is screened out, and a colony entry is obtained; The dynamic recognition result of the next time is updated to the dynamic recognition result of the previous time; The registration strategy includes: The colony coordinates are not processed and are directly registered; The colony coordinates are scaled and translated according to the dish information of the static recognition; The colony coordinates are transformed according to a feature conversion matrix calculated based on feature points of the outer edge of the dish; A conversion matrix is calculated based on the colony position features in the pre-processing to perform coordinate conversion; The best matching registration strategy is selected, and the registration strategy with the least entry of the combined colony record is the best matching registration strategy; The colony judgment method includes: If the colony appears a large growth amplitude, the colonies in the static recognition are all judged as impurities according to the first appearance time judgment of the colony; If the area of the colony in the static recognition is smaller than a threshold value, the colony is judged as impurities; If the colony growth continuity does not exceed a specified threshold value, the colony is judged as impurities; If the colony growth proportion does not exceed a specified threshold value, the colony is judged as impurities; If the number of times of colony recognition is less than a configured number, the colony is judged as impurities.

2. The colony number static and dynamic fusion processing method according to claim 1, characterized in that, The outer circle recognition process includes: The colony image is reduced by several times; The colony image is dilated several times through morphological operation.

3. The colony number static and dynamic fusion processing method according to claim 2, characterized in that, The colony image is processed through threshold binaryzation, all contours are found, the largest contour is determined, and ellipse fitting is performed on the boundary of the largest contour to obtain the outer circle.

4. The colony number static and dynamic fusion processing method according to claim 1, characterized in that, The inner circle recognition process includes: The inner circle of the colony image is reduced by several times to obtain a black ring of the inner circle; The wall thickness area is the area with an outer diameter of 15% to 25% of the total outer diameter, and the area within 75% to 85% of the center of the outer circle is removed, and the wall thickness area image is reserved; According to the wall thickness area image, the image is binarized by a threshold interval of 0-254 to obtain a threshold X of the binarization; The optimal inner circle is obtained by finding the plaque of the image after the binarization and taking points on the plaque for ellipse fitting; The identified inner circle is enlarged by several times to restore the real image size.

5. The colony number static and dynamic fusion processing method according to claim 4, characterized in that, Whether the radius error between the optimal inner circle and the initial inner circle removal area is less than a certain expected value; If not, the above-mentioned inner circle identification is performed again; The inner circle identification for the second time is binarized with 0-X as a new threshold interval.

6. The colony number static and dynamic fusion processing method according to claim 4, characterized in that, The plaque after the binarization of the image also includes: Remove the weak connection between the half points in the binary image, and perform connectivity on the binarized image; Filter the plaques with too small size and too far distance from the center of the outer circle to obtain the smallest plaque and the semicircular plaque.

7. The colony number static and dynamic fusion processing method according to claim 6, characterized in that, The merging of all contours obtained by the plaque identification, contour identification and boundary identification includes: Divide the image into 4 by 4, a total of 16 areas, establish the center coordinates of the colonies, and obtain the colony area; According to the center coordinates and area of the colonies, the colonies are divided into different areas, and morphological analysis, size, spot color difference analysis, and CIEDE2000 color difference analysis are performed on each area; Filter out unqualified and invalid spots.

8. The colony number static and dynamic fusion processing method according to claim 7, characterized in that, The ellipse fitting includes: According to the ellipse fitting, the minimum circumscribed rectangle of the ellipse is obtained, and the circumscribed rectangle is further screened for shape and size to filter out unqualified rectangles.

9. The colony number static and dynamic fusion processing method according to claim 1, characterized in that, The preprocessing of the colony data includes: Data re-encapsulation; Constructing feature information of the colonies.

10. The colony number static and dynamic fusion processing method according to claim 9, wherein, The colony growth continuity judgment includes: G=number of occurrences*100 / (last time-earliest time+1); The colony growth ratio judgment includes: The colony growth ratio is the maximum time area / now time area.

11. The colony number static and dynamic fusion processing method according to claim 10, characterized in that, It also includes: If the colony count exceeds the maximum threshold of dynamic recognition, stop dynamic recognition and return static data; If the colony observation time exceeds the configured maximum time, stop dynamic recognition and return static data.

12. A colony number static and dynamic fusion processing system, characterized in that, It includes: A collection module for collecting colony images; A processing module for executing the colony number static and dynamic fusion processing method of any one of claims 1-11.

13. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to realize the colony number static and dynamic fusion processing method of any one of claims 1-11.

14. A computer readable storage medium characterized by, The computer readable storage medium stores a computer program, which is executed by the processor to realize the colony number static and dynamic fusion processing method of any one of claims 1-11.

Citation Information

Patent Citations

  • Escherichia coli dynamic growth monitoring method

    CN111368643A

  • Automatic colony counting method and system

    CN114926390A