A method for detecting biological colony cells

By combining bilateral filtering, detail enhancement, Otsu segmentation, and Hough circle transform algorithms, the problems of high manpower consumption and insufficient recognition accuracy in biological colony detection are solved, achieving efficient and accurate colony detection.

CN116958051BActive Publication Date: 2026-07-31GUANGZHOU INSTITUTE OF TECHNOLOY XIDIAN UNIVERSITY +2
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU INSTITUTE OF TECHNOLOY XIDIAN UNIVERSITY
Filing Date
2023-06-20
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The detection of biological colonies suffers from serious human resource consumption, untimely information acquisition, low work efficiency, and large errors in experimental results. Furthermore, existing image processing technologies are insufficient in colony identification and localization.

Method used

Noise is eliminated using a bilateral filtering model, the image is optimized using a detail enhancement algorithm, the background and colonies are segmented using the Otsu algorithm, the image is processed using a detail compensation algorithm, and the colony identification is performed using the Hough circle transform algorithm.

Benefits of technology

It improves the accuracy and efficiency of colony detection, reduces human intervention, minimizes experimental errors, simplifies image processing, and lowers operating and training costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116958051B_ABST
    Figure CN116958051B_ABST
Patent Text Reader

Abstract

This invention provides a method for detecting bacterial colonies, relating to the field of image processing technology, comprising the following steps: acquiring a bacterial colony image; eliminating image noise using a bilateral filtering model based on the threshold features of the bacterial colony image; optimizing the cell edge image of the noise-eliminating bacterial colony image using a detail enhancement algorithm to obtain a detail-enhanced bilateral filtered image; determining the binarization segmentation threshold of the detail-enhanced bilateral filtered image using the Otsu algorithm and segmenting the background image and the colony image to obtain an Otsu threshold segmentation image; processing the detail-enhanced bilateral filtered image using a detail compensation algorithm and superimposing the Otsu threshold segmentation image through bitwise operations to obtain a complete image; analyzing the complete image and using the Hough circle transform algorithm to identify the target bacterial colony. This invention's method is beneficial for enhancing the edge information of the filtered image, improving the accuracy and reliability of colony image binarization and target bacterial colony identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, specifically a method for detecting biological colony cells. Background Technology

[0002] With the development of the times, biomedical technology has experienced rapid growth. In the biomedical field, to achieve research objectives, researchers often need to culture large numbers of cells in petri dishes. For cells that meet the requirements, researchers need to extract them. This type of microbial colony experiment is often performed manually. Furthermore, colony detection and capture are greatly influenced by the experimental environment and the experimenter's subjective intentions. In large-scale colony testing and screening tasks, it is difficult for experimenters to maintain uninterrupted observation and recording. Therefore, microbial research experiments in the biomedical field suffer from problems such as high human resource consumption, untimely information acquisition, low work efficiency, and large errors in experimental results.

[0003] To address these issues, image processing techniques can be used to preprocess colony images. Image preprocessing refers to performing a series of transformations and optimizations on the original image as needed, mainly including grayscale conversion, filtering, and image detail enhancement. Essentially, it involves performing mathematical operations on the individual pixel values ​​of the original image. With the development of computer technology and image recognition theory, the technology of transmitting colony images to a computer via image acquisition devices for computer recognition and statistical analysis is maturing, achieving high recognition rates and gradually replacing traditional manual methods.

[0004] In the process of acquiring colony images, some minor salt-and-pepper noise is inevitably generated, and biological colony images often contain adhered colonies. Therefore, relevant image processing techniques are needed to enhance image quality. Although the accuracy and speed of colony identification and localization have been greatly improved with the development of computer vision and deep learning, there are still many shortcomings in colony identification and localization due to the complexity of the colony selection environment and the uncertainty of the petri dish surface. Summary of the Invention

[0005] To address the aforementioned problems in the existing technology, the present invention adopts the following technical solution:

[0006] A method for detecting bacterial colony cells includes the following steps:

[0007] Step 1: Obtain images of biological colonies, and use a bilateral filtering model to eliminate image noise based on the threshold features of the biological colony images;

[0008] Step 2: Utilize a detail enhancement algorithm to optimize the cell edge image of the biological colony image after noise removal, resulting in a detail-enhanced bilateral filtered image;

[0009] Step 3: Use the Otsu algorithm to determine the binarization segmentation threshold of the detail-enhanced bilateral filtered image and segment the background image and colony image to obtain the Otsu threshold segmentation image;

[0010] Step 4: Process the detail-enhancing bilateral filtered image using the detail compensation algorithm, and then superimpose the Otsu thresholded segmentation image using bitwise operations to obtain the complete image;

[0011] Step 5: Analyze the complete image using the Hough circle transform algorithm to identify the target bacterial colonies.

[0012] As a preferred embodiment, the bilateral filtering model is expressed as follows:

[0013]

[0014] W p The normalization factor is expressed as:

[0015]

[0016] Where, σ s Indicates spatial domain filtering, σ r Indicates grayscale filtering; It is a spatial domain weight function used to represent the kernel weights of the template, representing the distance between pixels. This is the range weighting function, used to represent the similarity of gray values ​​between pixels; s is the set of pixels used to calculate the filtering result; p is the number of pixels in the output image, and I... p I represents the pixel value corresponding to pixel p; q represents a pixel in the input image. q Let q be the pixel value corresponding to pixel point q.

[0017] As a preferred embodiment, step two includes the following steps:

[0018] Gaussian filtering is applied to the original image of the bacterial colony to obtain a Gaussian-filtered image, and bilateral filtering is applied to the original image of the bacterial colony to obtain a bilateral-filtered image.

[0019] Extract the first detail difference image between the Gaussian filtered image and the bilateral filtered image;

[0020] A blurred image is obtained by applying a Gaussian convolution kernel function to the bilaterally filtered image;

[0021] The blurred image is subjected to detail extraction to obtain a second detail difference image P2;

[0022] A final detail image is generated based on the first detail difference image and the second detail difference image;

[0023] The final detail image is restored to the bilaterally filtered image to generate a detail-enhanced bilaterally filtered image.

[0024] As a preferred embodiment, step three includes the following steps:

[0025] The image is divided into two parts, target and background, based on the segmentation threshold.

[0026] Calculate the target class variance and the background class variance;

[0027] Calculate the final inter-class variance based on the target inter-class variance and the background inter-class variance;

[0028] Obtain the value of the segmentation threshold that maximizes the final inter-class variance, and use the segmentation threshold for binarization to obtain the Otsu threshold segmentation image.

[0029] As a preferred embodiment, the target class variance and the background class variance are respectively expressed as:

[0030]

[0031]

[0032] in, Indicates the variance between target classes. ω0 and ω1 represent the inter-class variance of the background, respectively. μ0 represents the average gray value of the target object, μ1 represents the average gray value of the background, X0 represents the pixels with gray values ​​from 0 to k-1, and X1 represents the pixels with gray values ​​from k to 255.

[0033] As a preferred embodiment, the final inter-class variance is expressed as:

[0034]

[0035] Where ω(k) = ω0, ω0 represents the probability of pixels with gray values ​​from 0 to k-1, μ T The average gray value of the image is represented by μ(k) = μ0ω(k), where μ0 represents the average gray value of the target object.

[0036] As a preferred embodiment, step four includes the following steps:

[0037] A template is set as the range of pixels that need to be included in the calculation. The template is then used to traverse all pixels to obtain a detail-compensated image.

[0038] The detail-compensated image is superimposed onto the Otsu thresholded segmentation image through bitwise operations to obtain the complete image;

[0039] Specifically, the template iterates through all pixels, including:

[0040] The latest grayscale value is obtained by weighted calculation of each pixel in the image; the pixels with the latest grayscale value less than the original grayscale value are compensated, and the grayscale value of the pixels with the latest grayscale value less than the original grayscale value is set to 0; the grayscale value of the pixels with the latest grayscale value greater than or equal to the original grayscale value is set to 255.

[0041] As a preferred embodiment, the Hough circle transform algorithm is specifically as follows:

[0042] Construct a (a,b,r) parameter space, map the pixels on the (x,y) plane one by one, and create an accumulator to record the intersection points of the cone clusters in the parameter space, setting the initial value to 0;

[0043] Traverse the image, perform Hough transform on the edge points of the colony image in turn, and record the results on the accumulator;

[0044] By using a pre-set threshold, circular colonies that meet the requirements are identified; for colonies that meet the requirements, the local maximum value of the accumulator is used to obtain the target parameters (a,b,r), and the center and radius of the colony are determined.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] This application takes into account both the distance between pixels and the gray-level similarity through a bilateral filtering algorithm. This method can not only effectively achieve the noise reduction function, but also improve the protection of edge information.

[0047] This application enhances the edge image information of the original biological colony image after bilateral filtering by using a detail enhancement algorithm. The multi-weight detail enhancement algorithm can further improve the smoothness of the edges of the bilateral filtering algorithm and improve the utilization rate of the edge image of the bilateral filtering.

[0048] This application uses the Otsu algorithm to solve the image target and background separation binarization problem. The Otsu algorithm mainly utilizes the maximum inter-class variance of the image to automatically select the binarization threshold. The greater the difference between the background image information and the target image information, the more accurate the threshold selection and the better the binarization effect.

[0049] This application addresses the issue of missing edge pixels in biological colony images when the Otsu algorithm uses the maximum inter-class variance to determine the image binarization threshold. This patent uses a Gaussian kernel function to determine the difference between the center pixel and the surrounding pixels, traverses to obtain a detail-compensated image, and compensates the original image through bitwise operations.

[0050] This application adopts a target colony recognition algorithm based on Hough circle transform. Compared with target detection algorithms based on neural networks, the Hough circle detection algorithm has lower running and training costs, a simpler structure, and can achieve good results without a large dataset. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is a schematic diagram of the steps of the biological colony cell detection method according to an embodiment of the present invention;

[0053] Figure 2 This is a schematic flowchart of the biological colony cell detection method according to an embodiment of the present invention. Detailed Implementation

[0054] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention. It should be noted that relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0055] Please see Figure 1 and Figure 2 This invention provides a method for detecting bacterial colony cells, comprising the following steps:

[0056] Step 1: Obtain images of biological colonies, and use a bilateral filtering model to eliminate image noise based on the threshold features of the biological colony images.

[0057] Specifically, the bilateral filtering model employs a bilateral filtering algorithm. The bilateral filtering algorithm is a modification of Gaussian filtering. Unlike Gaussian filtering, the bilateral filtering algorithm introduces weights not only for distance but also for gray-level similarity. When calculating pixels, the bilateral filtering algorithm assigns different weights based on the gray-level similarity of adjacent pixels. If the gray-level value of an adjacent pixel is similar to that of the target pixel, the pixel weight is larger. Its specific mathematical expression is shown below:

[0058]

[0059] Among them W p The normalization factor is defined as shown in Figure 1-2:

[0060]

[0061] Where, σ s Indicates spatial domain filtering, σ r This indicates grayscale filtering. It is a spatial domain weight function used to represent the weight of the template convolution kernel based on the distance between pixels. The greater the distance between pixels, the lower the weight, and the smaller the impact on the target pixel. This is the range weighting function, used to represent the similarity of gray values ​​between pixels; the more similar the pixels, the greater the weight. `s` is the set of pixels used to calculate the filtering result. `p` represents the number of pixels in the output image, and `I`... p is the pixel value corresponding to pixel p. q is a pixel in the input image, that is, an element in set s. q It is the pixel value corresponding to pixel q. Spatial domain filtering σ s It can make images smoother and filter out more noise. Gray-scale filtering σ r This will cause the range weight function To make it flatter, if σ r If BF(I) is set to infinity, then BF(I) will become a Gaussian filter. As shown in equation (2-2), the key feature of bilateral filtering is weight accumulation, which means that if either the spatial weight or the grayscale weight is close to zero, the pixels at that point will not be smoothed.

[0062] Bilateral filtering algorithms consider both pixel distance and gray-level similarity, effectively denoising while also better preserving edge information. For colony detection algorithms, good cell edge information improves detection accuracy. However, while bilateral filtering preserves edge information relatively completely, it doesn't address the issue of varying edge values ​​(σ). r and σ s The effect of filtering varies depending on the parameter settings. Even after bilateral filtering, the image may still exhibit blurriness and weak edge information, which can affect subsequent edge shape extraction.

[0063] Step 2: Use the detail enhancement algorithm to optimize the cell edge image of the biological colony image after noise removal, and obtain the detail-enhanced bilateral filtered image.

[0064] Bilateral filtering is affected by spatial domain filtering σ r and grayscale filtering σ sDue to the influence of parameters, the filtered image may exhibit blurring and unclear boundaries. To address this, this step analyzes the characteristics of biological colony images and constructs a detail enhancement algorithm suitable for biological colony images. This detail enhancement algorithm is applied to bilateral filtering to ensure the integrity of cell edge images in biological colony images. In biological colony images, because the image information of cells differs significantly from that of the background, if the spatial domain filtering σ... r and grayscale filtering σ s Improper settings can lead to overly smoothed cell images, weakening cell edge details and impacting subsequent target detection algorithms. Furthermore, due to the large number of colonies, if the spatial domain filtering σ... r Setting the value too high expands the filtering calculation range, which can weaken edge information. Therefore, for images of biological colonies, image enhancement algorithms are needed to enhance the details of the filtered image to ensure the integrity of individual cell image information.

[0065] Detail enhancement algorithms primarily extract cell edge information from the original filtered colony image and then superimpose this edge information onto the filtered image. This algorithm essentially amplifies the cell edge information in the image, further enhancing the edge protection of the bilateral filtering algorithm. This section employs a multi-weighted detail enhancement algorithm to enhance the edge image information of the original biological colony image after bilateral filtering. The multi-weighted detail enhancement algorithm can further improve the smoothness of the edges obtained by the bilateral filtering algorithm.

[0066] First, the original image of the bacterial colony is Gaussian filtered to obtain the Gaussian-filtered image GC[I], and the original image of the bacterial colony is bilaterally filtered to obtain the bilaterally-filtered image BF[I]. Bilateral filtering is an improvement on Gaussian filtering, which considers the influence of similar gray levels between adjacent pixels and better preserves edge information. After obtaining the Gaussian-filtered image and the bilaterally-filtered image, the detail difference image of the Gaussian-filtered image and the bilaterally-filtered image is extracted. The detail difference image is represented by P1:

[0067] P1=BF[I]-GC[I] (2-1)

[0068] Then, the Gaussian convolution kernel function G with standard deviation σ = 1.0 is applied to the bilaterally filtered image BF[I] to obtain a blurred image denoted by W. The specific implementation is shown below:

[0069] W = G * BF[I] (2-2)

[0070] The blurred image is then subjected to detail extraction, and the result is represented by P2:

[0071] P2=BF[I]-W (2-3)

[0072] Based on the two detail difference images P1 and P2 obtained, the final detail image P is generated according to the weights μ = 0.5 and β = 0.5.

[0073] P = μ × P1 + β × P2 (2-4)

[0074] The final detail image obtained by equation (2-4) is then restored to the bilaterally filtered image BF[I] to generate the detail-enhanced bilaterally filtered image RBF[I].

[0075] Step 3: Use the Otsu algorithm to determine the binarization segmentation threshold of the detail-enhanced bilateral filtered image and segment the background image and colony image to obtain the Otsu threshold segmentation image;

[0076] For an image with a grayscale value range of 0 to 255, the number of pixels with grayscale level i (i = 0, 1, ..., 255) is N. i The total number of pixels in the image is N, and the number of pixels is N. i The percentage is P i , k represents the image segmentation threshold, which divides the image into two parts: one part consists of pixels with gray values ​​from 0 to k-1, denoted by X0, and the other part consists of pixels with gray values ​​from k to 255, denoted by X1.

[0077]

[0078]

[0079]

[0080] Where ω0 and ω1 represent the probabilities of X0 and X1, μ0 represents the average gray value of the target object, μ1 represents the average gray value of the background, and μ T μ represents the average gray value of the entire image. T =μ L =∑ip i This represents the average grayscale value of the input image.

[0081] At the same time, equations (3-4) and (3-5) should always be satisfied:

[0082] ω0μ0+ω1μ1=μ T (3-4)

[0083] ω0 + ω1 = 1 (3-5)

[0084] Between-class variance of target and background The mathematical expression is:

[0085]

[0086]

[0087] Therefore, based on equations (3-6) and (3-7), the final inter-class variance σ can be obtained. 2 for:

[0088]

[0089] When the final inter-class variance σ in equation (3-8) 2 When the threshold value is maximized, the segmentation threshold k can be obtained. Binarization is then performed using the segmentation threshold k to obtain the Otsu thresholded segmentation image P. Otsu .

[0090] Step 4: Process the detail-enhancing bilateral filtered image using the detail compensation algorithm, and obtain the complete image by superimposing the Otsu threshold segmentation image through bitwise operations.

[0091] The Otsu algorithm can cause the loss of some edge information in colony images, which can affect subsequent object detection. To compensate for this lost edge information, this section employs a detail compensation algorithm to mitigate the problems caused by the Otsu algorithm.

[0092] The detail compensation algorithm primarily compensates for edge details by extracting cell edge images and then overlaying them onto the image binarized by the Otsu algorithm. Similar to mean filtering, the detail compensation algorithm first sets a template, which represents the range of pixels to be calculated. Then, a Gaussian kernel function G is used as the template calculation method. After determining the template size and calculation method, the template iterates through every pixel g(x,y) in the image, and obtains the latest grayscale value G by weighted calculation of each pixel. new Then compared with the original grayscale value G old For comparison, its mathematical expression is shown in 4-1:

[0093]

[0094] Where f(x,y) represents the number of pixels within the template range. After calculation, if the gray value is less than the original gray value, it indicates that the pixel is more inclined towards the cell image, and this pixel needs compensation. The gray value of this pixel is then set to 0. If the gray value is greater than or equal to the original gray value, it indicates that the pixel is more inclined towards the background image, and no compensation is needed. The gray value of this pixel is then set to 255. The mathematical expression is shown in Figure 4-2.

[0095]

[0096] After traversing all pixels, the detail-compensated image P is obtained. details The detail-compensated image is superimposed onto the Otsu thresholding image through bitwise operations to obtain the complete image P. Its mathematical expression is shown in Figure 4-5:

[0097] P = P details &P Otsu (4-3)

[0098] Step 5: Analyze the complete image using the Hough circle transform algorithm to identify the target bacterial colonies.

[0099] Image recognition primarily utilizes relevant image processing techniques to determine the features of target objects. The accuracy of recognition algorithms often relies on high-quality image information and clear object images. However, bacterial colony images are often dense and complex, posing a significant challenge to recognition algorithms designed for colony images.

[0100] To address the issues of densely packed and overlapping cells in bacterial colony images, this invention employs the Hough circle transform method to perform colony recognition based on the complete binary colony image, i.e., the complete image P obtained in step four. The goal of Hough circle detection is to find the (a,b,r) parameter pair that passes through the most pixels, where (a,b) is the center of the circle in the image space, and r is the radius. In the cumulative space (a,b,r):

[0101] x = a + r cosθ (4-4)

[0102] y = b + rsinθ (4-5)

[0103] Where θ represents the polar coordinate angle after the Hough circle transformation. For any point (x, y) in the image space, it corresponds to a cone in the parameter space. In the parameter space, the intersection of the cone clusters obtained by the Hough circle transformation corresponds to the circle of the original image in the (x, y) plane. Thus, the center position and radius of the detection circle are obtained. The Hough circle transformation algorithm is shown below:

[0104] Construct a (a,b,r) parameter space, map the pixels on the (x,y) plane one by one, and create an accumulator to record the intersection points of the cone clusters in the parameter space, setting the initial value to 0;

[0105] Traverse the image, perform Hough transform on the edge points of the colony image in turn, and record the results on the accumulator;

[0106] By using a pre-set threshold, circular colonies that meet the requirements are identified. For colonies that meet the requirements, the target parameters (a, b, r) are obtained by using the local maximum value of an accumulator, and the center and radius of the colony are determined.

[0107] Based on the above, the bilateral filtering algorithm proposed in this invention has the following beneficial effects: In the filtering process of the original image, addressing the problems of weakened edge information and destroyed edge details in the bilateral filtering algorithm, this project adopts a multi-weighted detail enhancement algorithm to reduce the influence of spatial domain filtering parameters and gray-level domain filtering parameters on the bilateral filtering algorithm, enhance the edge information of the filtered image, ensure the integrity of individual cell image information, generate detail-compensated images, and realize the detail enhancement of the bilateral filtering algorithm. The multi-weighted detail enhancement algorithm can further enhance the smoothness of the edges of the bilateral filtering algorithm and improve the utilization rate of the edge image of the bilateral filtering algorithm.

[0108] The Otsu threshold segmentation algorithm based on detail compensation proposed in this invention has the following beneficial effects: In the process of binarizing colony images, the Otsu algorithm's method of determining the threshold using maximum inter-class variance suffers from problems such as loss of image edge pixels and unreasonable threshold selection. This project uses a Gaussian kernel function to measure the difference between the center pixel and surrounding pixels, determines the key pixels that need compensation, extracts the key pixels at the edge of a single cell, calculates the pixel value by weighted average, compares the original pixel value, achieves binarization of the biological colony, obtains the detail-compensated image through traversal, and uses bitwise operations to achieve detail compensation of the biological image, making up for the key pixels missed by the Otsu threshold segmentation algorithm, and providing complete edge information for the target detection algorithm.

[0109] The target colony recognition algorithm based on Hough circle transform proposed in this invention has the following advantages: In the process of detecting and recognizing target colony images, considering the characteristics of biological colony images—namely, clearly defined target colony shapes and limited datasets of biological colony types—this project adopts a target biological colony detection algorithm based on Hough circle transform. By analyzing the shape and size features of colonies, a biological colony feature model is established, edge information of cell images is extracted, parameter space coordinates are mapped, and the edge pixel points of individual colony cells are determined using Hough circle transform. The Hough circle detection algorithm has low running and training costs, meeting the target colony detection requirements of this project.

[0110] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the models and modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0111] In the embodiments provided in this application, it should be understood that the disclosed models and methods can be implemented in other ways. For example, the model embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another model, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between modules may be electrical, mechanical, or other forms.

[0112] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0113] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0114] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and 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 described in the various embodiments of this application. 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.

Claims

1. A method for detecting biological colony cells, characterized by: Includes the following steps: Step 1: Obtain images of biological colonies, and use a bilateral filtering model to eliminate image noise based on the threshold features of the biological colony images; Step 2: Utilize a detail enhancement algorithm to optimize the cell edge image of the biological colony image after noise removal, resulting in a detail-enhanced bilateral filtered image; Step 3: Use the Otsu algorithm to determine the binarization segmentation threshold of the detail-enhanced bilateral filtered image and segment the background image and colony image to obtain the Otsu threshold segmentation image; Step 4: Process the detail-enhancing bilateral filtered image using the detail compensation algorithm, and then superimpose the Otsu thresholded segmentation image using bitwise operations to obtain the complete image; Step 5: Analyze the complete image using the Hough circle transform algorithm to identify the target bacterial colonies; Step two includes the following steps: Gaussian filtering is applied to the original image of the bacterial colony to obtain a Gaussian-filtered image, and bilateral filtering is applied to the original image of the bacterial colony to obtain a bilateral-filtered image. Extract the first detail difference image between the Gaussian filtered image and the bilateral filtered image; A blurred image is obtained by applying a Gaussian convolution kernel function to the bilaterally filtered image; The blurred image is subjected to detail extraction to obtain a second detail difference image; A final detail image is generated based on the first detail difference image and the second detail difference image; The final detail image is restored to the bilaterally filtered image to generate a detail-enhanced bilaterally filtered image; Step four includes the following steps: A template is set as the range of pixels that need to be included in the calculation. The template is then used to traverse all pixels to obtain a detail-compensated image. The detail-compensated image is superimposed onto the Otsu thresholded segmentation image through bitwise operations to obtain the complete image; Specifically, the template iterates through all pixels, including: The latest grayscale value is obtained by weighted calculation of each pixel in the image; the pixels with the latest grayscale value less than the original grayscale value are compensated, and the grayscale value of the pixels with the latest grayscale value less than the original grayscale value is set to 0; the grayscale value of the pixels with the latest grayscale value greater than or equal to the original grayscale value is set to 255.

2. The method of claim 1, wherein: The bilateral filtering model is expressed as follows: Wp is the normalization factor, expressed as: in, Indicates spatial domain filtering, Indicates grayscale filtering; It is a spatial domain weight function used to represent the kernel weights of the template, representing the distance between pixels. is the range weighting function, used to represent the similarity of gray values ​​between pixels; s is the set of pixels used to calculate the filtering result; p is the number of pixels in the output image. Let p be the pixel value; q be the number of pixels in the input image. Let q be the pixel value corresponding to pixel point q.

3. The method of claim 1, wherein: Step three includes the following steps: The image is divided into two parts, target and background, based on the segmentation threshold. Calculate the target class variance and the background class variance; Calculate the final inter-class variance based on the target inter-class variance and the background inter-class variance; Obtain the value of the segmentation threshold that maximizes the final inter-class variance, and use the segmentation threshold for binarization to obtain the Otsu threshold segmentation image.

4. The method of claim 3, wherein: The target class variance and the background class variance are respectively expressed as: in, Indicates the variance between target classes. Indicates the variance between background classes. , express , The probability, This represents the average gray value of the target object. This represents the average grayscale value of the background. This represents pixels with grayscale values ​​from 0 to k-1. This represents pixels with grayscale values ​​from k to 255.

5. The method of claim 3, wherein the method comprises: The final inter-class variance is expressed as: ; in, , This represents the probability of pixels with grayscale values ​​from 0 to k-1. This represents the average gray value of the image. , This represents the average grayscale value of the target object.

6. The method of claim 1, wherein: The Hough circle transform algorithm is as follows: Construct a (a, b, r) parameter space, map the pixels on the (x, y) plane one by one, and create an accumulator to record the intersection points of the cone clusters in the parameter space, setting the initial value to 0; Traverse the image, perform Hough transform on the edge points of the colony image in turn, and record the results on the accumulator; By pre-set threshold, judging the qualified round colony; using the local maximum of the accumulator to obtain the target parameters (a, b, r) for the qualified colony, and determining the center and radius of the colony.