Sterile and sterile carbon-based difference bacterial colony calculation method based on visual auxiliary detection
Through high-resolution camera and image processing technology combined with conductivity measurement, the problem of insufficient time-consuming, labor-intensive and accurate accuracy of traditional microbial detection methods is solved, and fast and accurate colony counting is achieved, which is suitable for food hygiene, drug quality control and environmental monitoring. and other fields.
Patent Information
- Application Number
- CN202411195970.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional microbial detection methods are time-consuming and labor-intensive, susceptible to operator experience and environmental factors, and automated colony counting has accuracy challenges in complex background and light changes, making it difficult to accurately distinguish between bacterial and sterile areas.
Using high-resolution industrial cameras and advanced image processing algorithms combined with conductance measurement and Yaoquan TOC algorithm, digital models are established to improve the accuracy and efficiency of colony detection through image acquisition, feature extraction and multiple regression analysis.
It significantly improves the detection speed and accuracy, reduces the impact of human factors and environmental changes on the results, enhances the repeatability and flexibility of the detection, and is suitable for a variety of microbial detection fields.
Smart Images

Figure CN119169619A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to microbial detection, and in particular to a method for calculating sterile and abscessed carbon-based differential colonies based on visually assisted detection. Background Art
[0002] Microbial testing plays a vital role in food hygiene, drug quality control, environmental monitoring and other fields. Traditional microbial testing methods, such as plate count and membrane filtration, usually require a long culture cycle and rely on the growth of microorganisms on specific culture media, followed by manual counting to determine the number of colonies. These methods are not only time-consuming and labor-intensive, but also easily affected by the operator's experience and subjective judgment, resulting in limited repeatability and accuracy of the results.
[0003] With the development of science and technology, automated colony counting methods based on image processing and computer vision technology have gradually emerged. These methods use high-resolution cameras to capture colony images and then use image processing algorithms to automatically identify and count colonies. Although automated methods have improved efficiency and repeatability, they still face challenges in dealing with complex backgrounds, different colony morphologies, and changes in lighting conditions.
[0004] In addition, the existing technology is also limited in the accuracy of colony counting. Due to differences in the growth characteristics of colonies and image acquisition conditions, it is difficult to accurately distinguish between sterile and sterile areas by relying solely on image recognition technology, resulting in possible errors in the counting results.
[0005] In view of the above problems, the present invention proposes a method for calculating the carbon-based difference between sterile and abscessed bacteria based on visual-assisted detection. This method not only uses high-resolution industrial cameras and advanced image processing algorithms to improve the acquisition and recognition quality of bacterial colony images, but also calculates the carbon-based values in the sterile and abscessed states through conductivity measurement and Yaoquan TOC algorithm, thereby realizing accurate calculation of the number of bacterial colonies. Summary of the invention
[0006] The technical solution of the present invention introduces a series of innovative image processing technologies and data analysis methods on the basis of the existing automated colony counting method to improve the accuracy and efficiency of colony detection.
[0007] Image acquisition environment control: By performing image acquisition in a constant temperature, humidity and pressure environment, the present invention ensures the stability and repeatability of image data and reduces the impact of environmental factors on the quality of colony images.
[0008] Multi-feature fusion recognition: The present invention not only extracts the color, shape, texture and gloss features of the colony, but also fuses these features through an algorithm to improve the accuracy of colony recognition, especially in complex backgrounds or under different growth conditions. The feature extraction step, including the extraction of color, shape, texture and gloss features, adopts advanced image processing techniques, such as RGB to HSV color space conversion, edge detection algorithm, wavelet transform and gloss feature extraction method, to ensure the accuracy and robustness of feature extraction.
[0009] Combination of conductivity measurement and TOC algorithm: The carbon-based data in the bacterial and aseptic states is obtained through conductivity measurement technology, and then combined with the Yaoquan TOC algorithm for quantitative analysis. This invention can more accurately evaluate the growth of the colony.
[0010] Multiple regression analysis of digital model: The present invention adopts multiple regression analysis method to establish digital model, which not only considers the influence of single feature on colony count, but also analyzes the interaction between features, thereby improving the prediction ability of the model.
[0011] Innovative method for model validation: By verifying the difference in colony counts before and after the addition of sterilized standard sucrose, the present invention provides an intuitive and effective method to evaluate the accuracy of the model.
[0012] The specific contents are as follows:
[0013] A method for calculating the difference between sterile and non-sterile carbon-based colonies based on visually assisted detection comprises the following steps:
[0014] Image acquisition: Use a high-resolution industrial camera, a macro lens and a telecentric lens to capture and collect external colony data in a constant temperature, humidity and pressure environment. The colony data includes color features, shape features, texture features and gloss features;
[0015] Feature extraction: Use image processing algorithms to extract visual features of sterile and aseptic areas;
[0016] Difference calculation: Calculate the carbon-based values based on the extracted characteristic data, and establish a digital model by comparing the differences in carbon-based data under sterile and aseptic conditions.
[0017] In feature extraction, the image processing algorithm includes the following steps:
[0018] First, when the external environmental factor data, shooting equipment and colony data are the same, take a group of pictures with colonies and pictures without colonies as background pictures, mark the pixels in the background pictures with RGB values and set them as reference thresholds;
[0019] Establish an empirical correlation model, input the reference threshold of the background image into the model, and use the following steps to define the features of the colony data in the image:
[0020] Color space conversion: converting RGB images collected by high-resolution industrial cameras into HSV space;
[0021] Edge detection: using edge detection algorithm to extract the edge contour of the colony in the image, and then using shape descriptors to describe the shape characteristics of the colony;
[0022] Texture feature extraction: Through wavelet transform, the image is decomposed into sub-bands of different frequencies, the coefficient distribution of different sub-bands is analyzed, and the texture features are extracted;
[0023] Gloss feature extraction calculates the reflectivity of the image by analyzing the highlight value distribution of pixels in the image.
[0024] In the establishment of the associated empirical model, the specific steps of color space transformation are as follows:
[0025] Separate out hue, saturation, and value;
[0026] First, calculate the brightness, the formula is as follows:
[0027] V = max(R, G, B)
[0028] Among them, R, G, and B represent the values of the red, green, and blue channels respectively, and their maximum value in is taken as the transparency;
[0029] Then, the saturation is calculated as follows:
[0030] If the image is black, V = 0, then S = 0
[0031] otherwise,
[0032] Here, the difference between the maximum and minimum values of the color component is calculated first, and then divided by the transparency;
[0033] Finally, calculate the hue using the following formula:
[0034] If the image is gray, S = 0, then H = 0
[0035] Otherwise, the hue is calculated based on the position of the maximum value in RGB;
[0036] If, max = R;
[0037] but
[0038] If max = G;
[0039] but,
[0040] If, max = B;
[0041] but,
[0042] Eliminate color redundant noise;
[0043] Subtract the RGB value of the current image from the RGB value of the corresponding pixel in the background image, and mark the HSV value of the background image as 0;
[0044] For each pixel's HSV value in the captured image, add one to the corresponding element value in the corresponding statistical array to obtain the pixel value distribution histogram of each channel, and then equalize the histogram. The specific steps are as follows:
[0045] Suppose the pixel value of the background image is r, and its value range is [0, L-1], where L is the maximum pixel value plus 1, and the number of pixels with pixel value r in the background image is recorded as n r ;
[0046] Calculate the histogram of the background image, and the calculation formula for the probability of pixel value r appearing is as follows:
[0047] p r =n r / N
[0048] Where N is the total number of pixels in the image;
[0049] Calculate the cumulative distribution function s k , the formula is as follows:
[0050]
[0051] Among them, r k is the current pixel value, s k is the cumulative distribution function in r k The value at
[0052] After histogram equalization, the pixel value r k The new pixel value mapped to is z k =(L-1)s k , by mapping the image, we get a uniformly distributed picture.
[0053] In the process of establishing the associated empirical model, the specific steps of edge detection are as follows:
[0054] Select the Canny algorithm, first perform Gaussian smoothing on the original image, then perform convolution operation with the image using the Gaussian kernel while retaining the edge position, and use the Sobel operator method to calculate the gradient amplitude and direction of each pixel in the image. The gradient amplitude indicates the severity of the grayscale change of the pixel, while the direction indicates the direction of the largest grayscale change. After calculating the gradient amplitude and direction, perform non-maximum suppression on the amplitude along the gradient direction, refine the wide edge into an edge with a single pixel width, and only retain the points with the largest local gradient as candidate edge points. Set high and low thresholds, and determine the pixel points with a gradient amplitude greater than the high threshold as strong edge points, and mark the pixel points with a gradient amplitude between the low threshold and the high threshold as weak edge points, while the pixel points with a gradient amplitude less than the low threshold are regarded as non-edge points. Then, the final edge image is formed by connecting the strong edge points and the weak edge points connected to the strong edge points.
[0055] Edge detection is performed on the colony image. The image containing the colony after color space conversion is input into the edge detection algorithm. The colony and the surrounding background have differences in grayscale and color characteristics. After being processed by the edge detection algorithm, the edge contour lines of the colony can be obtained. These edge contour lines distinguish the colony from the background and outline the shape boundary of the colony.
[0056] Select the Hu moment descriptor, calculate the central moment of the image, and then derive seven invariant moments based on the central moment to describe the characteristics of the shape. The calculation formula of the central moment is based on the coordinates and grayscale values of the pixel points. Seven Hu moments are calculated based on the central moment. The values of these Hu moments are the shape descriptors. The specific formula is as follows:
[0057] Let the seven Hu moments be M1, M2, M3, M4, M5, M6, and M7;
[0058] Assume that the actual area of the colony is measured as A read , let the estimated area of M1 be:
[0059] A estimated =f(M1)
[0060] Among them, f is a certain function, A estimated is the estimated area;
[0061] By comparing A real and A estimated The difference is used to evaluate the accuracy of M1 in describing the area. The difference value is:
[0062] ΔA=|A real -A estimated |;
[0063] The edge characteristic index is obtained by comprehensive analysis of area characteristics, center position characteristics and symmetry characteristics, and the shape characteristics of the colony are quantitatively analyzed. The specific calculation formula is as follows:
[0064]
[0065] Among them, k1 is f, d represents the distance between the actual center position of the colony and the center position estimated based on M2, and x real The horizontal coordinate, y, represents the actual center position of the colony. real The ordinate represents the actual center position of the colony, and k2 and b2 are used to calculate the abscissa of the estimated center position. k3 and b3 are used to calculate the ordinate of the estimated center position C represents the compactness parameter of the colony, k4, k5, and k6 represent 4f, 5f, and 6f, respectively, and are used to establish the functional relationship between M2 and C. S represents the symmetry index of the colony, g(M3) functionally associates M3 with S, K represents the skewness index of the colony, and h is the skewness function.
[0066] In the process of establishing the associated empirical model, the specific wavelet transform for texture feature extraction is as follows:
[0067] First select the Haar wavelet basis function, and then perform wavelet transform. In the process of wavelet transform, first expand the one-dimensional wavelet transform to two dimensions. The specific steps are as follows:
[0068] For the wavelet transform of an image, the concept of one-dimensional wavelet transform is extended to two dimensions. First, a one-dimensional wavelet transform is performed on each row of the image, and then a one-dimensional wavelet transform is performed on each column of the transformed result. In this way, four sub-bands can be obtained:
[0069] Low-frequency LL subband: contains the approximate information of the image, namely the main contour and low-frequency components of the image;
[0070] Low-frequency-high-frequency LH subband: represents high-frequency detail information in the horizontal direction;
[0071] High-low frequency HL subband: represents high-frequency detail information in the vertical direction;
[0072] High-frequency-high-frequency HH subband: contains the high-frequency detail information in the diagonal direction of the image;
[0073] Then, according to the discrete wavelet transform algorithm, the pixel values of the image are weighted summed to obtain the wavelet coefficients;
[0074] After the wavelet transform is completed, the texture features are extracted through statistical characteristic analysis and correlation analysis, and finally the image is reconstructed through inverse wavelet transform to retain the image features and delete the noise in the image.
[0075] In the process of establishing the associated empirical model, the specific method for calculating the reflectivity of the image is as follows:
[0076] According to the lightness formula:
[0077] V = max(R, G, B)
[0078] In the HSV space, the brightness threshold of the pixel (x, y) is set to V(x, y). For each pixel in the image, the highlight area pixel is determined according to the set brightness threshold. The highlight pixel is judged according to V(x, y)>T, where T is the brightness distribution value, which is a constant and can be freely set according to actual needs. The position and brightness of the highlight pixel are recorded to obtain the highlight pixel set {(x, y)V(x, y)>T}. The reflectivity R is calculated according to the Lambertian reflection model:
[0079]
[0080] in, Represents the sum of the brightness values of all highlighted pixels, N highlight : Indicates the number of highlighted pixels.
[0081] In the difference calculation, the steps for calculating the carbon base value are as follows:
[0082] Data preparation: collect various feature data in the feature extraction stage to determine the number, type and area of sterile and non-sterile colonies;
[0083] To calculate the carbon-based Yjc in the bacterial phase, first, use a conductivity measuring device to measure the conductivity difference before and after the complete decomposition of organic carbon in the bacterial state. Conductivity measurements are performed at key time points before and after the complete decomposition of organic carbon, and the corresponding conductivity values G are recorded. before and G after , and then calculate the conductivity difference:
[0084] ΔG=G after -G before
[0085] Then, the Yaoquan TOC algorithm is used. The Yaoquan TOC algorithm is assumed to be the function fTOOC(x), and the conductance difference ΔG is input, that is:
[0086] Yjc=f TOC (ΔG), calculate the carbon value of the bacterial phase, the calculation formula is as follows:
[0087] Bacteria-phase carbon-based Yjc = conductivity difference before and after complete decomposition of unfiltered organic carbon × Yaoquan TOC algorithm;
[0088] Calculate the sterile phase carbon base Wjc. Similarly, the conductivity of the sample after all microbial impurities have been removed to ensure that only organic carbon in a sterile state is contained is measured before and after the complete decomposition of organic carbon to obtain the conductivity value G cleanBefore and G clean A fter , calculate the conductivity difference:
[0089] ΔG clean =G clean A fter -G cleanBefore Then use the Yaoquan TOC algorithm to calculate the conductivity difference ΔG after filtration. clean Input, get the value of the sterile carbon base, that is, W jc =f TOC (ΔG clean ), the calculation formula is as follows:
[0090] Sterile phase carbon-based Wjc = conductivity difference before and after complete decomposition of organic carbon after filtration × Yaoquan TOC algorithm
[0091] After the calculation of the carbon basis of the bacterial phase and the carbon basis of the sterile phase is completed, the colony equivalent jd is calculated. The specific method is as follows:
[0092] When the user inputs the colony count Cla obtained by the traditional colony detection method:
[0093] According to the formula Jd = (Yjc-Wjc) ÷ 10 ÷ Cla, substitute the values of the carbon base of the bacterial phase and the carbon base of the sterile phase, and then divide by 10 and the input colony count Cla;
[0094] When the user does not enter the colony count Cla:
[0095] Calculate the average value of the comprehensive test colony equivalent Jldp and the colony equivalent Jlde of the specific strain;
[0096] For the comprehensive test colony equivalent average Jldp:
[0097] Calculated according to the formula Jldp = Jlde ÷ Tn, where Jlde is the sum of the colony equivalents of each specific strain, and Tn is the number of strains tested;
[0098] For the colony equivalent of a specific strain, Jlde:
[0099] According to the formula Jlde = (Yjc-Wjc) ÷ 10 ÷ ClaT, where ClaT is the quantitative working strain when measuring a specific bacterial strain;
[0100] The calculated Jldp is obtained by adding up the sum of each Jlde and then dividing it by the number of strains tested Tn;
[0101] After the calculation of the colony equivalent jd is completed, a digital model is first established and then verified, where:
[0102] Calculate the microbial carbon-based YWT = (Yjc-Wjc), calculate the difference between the bacterial phase carbon-based Yjc and the sterile phase carbon-based Wjc, and obtain the microbial carbon-based YWT;
[0103] Model establishment: Based on the collected characteristic data and the calculated carbon-based values and colony equivalent data, a digital model was established. The multivariate regression analysis method was used to take the characteristic data as independent variables, the microbial carbon-based YWT and colony equivalent jd as dependent variables, and a linear regression digital model was obtained.
[0104] The model was verified using the verification method "Online colony count in homologous water before adding sterilized standard sucrose SZjlcl-Online colony count in homologous water after adding sterilized standard sucrose-SZjlc2=OCUF / 100ml", and the specific steps are as follows:
[0105] Firstly, a homologous water sample, i.e., a water sample from the same source, is collected, and before adding sterilized standard sucrose, the calculation method and model are used to predict the online colony count in the water sample to obtain the predicted value of SZjlc1;
[0106] Then, sterilized standard sucrose is added to the water sample, and after waiting for a period of time for it to fully act, the method and model are used again to predict the online colony count to obtain the predicted value;
[0107] Finally, the difference between the two is calculated. If the difference is close to 0CUF / 100ml, it means that the accuracy of the model is high;
[0108] If the difference is large, the model needs to be rechecked to verify the accuracy of feature extraction, and the parameters and algorithms of the digital model need to be adjusted and optimized.
[0109] The beneficial effects of the present invention are as follows:
[0110] Improve detection speed: The automated image acquisition and processing process of the present invention significantly reduces the time required for traditional colony counting methods, thereby greatly improving the detection speed.
[0111] Enhanced detection accuracy: Through comprehensive multi-feature recognition and accurate difference calculation methods, the present invention improves the accuracy of colony counting and reduces the impact of human factors and environmental changes on the detection results.
[0112] Improve detection repeatability: Under a strictly controlled image acquisition environment, combined with an accurate feature extraction algorithm, the present invention ensures a high degree of consistency in the detection results each time and improves the repeatability of the experiment.
[0113] Expanding the scope of application: The method of the present invention is applicable to the detection of various microbial colonies, including but not limited to food hygiene, drug quality control, environmental monitoring and other fields, and has broad application prospects.
[0114] Support data-driven decision-making: By establishing and verifying digital models, the present invention provides data-driven decision-making support for microbial contamination assessment and control, which helps to improve the level of safety management in related fields.
[0115] Promoting environmentally friendly testing: The present invention reduces the dependence on chemical reagents and culture media, reduces the impact on the environment, and is in line with the concepts of green chemistry and sustainable development.
[0116] Improve detection flexibility: The method of the present invention can adjust the calculation method of colony equivalent according to the specific needs of users, whether it is based on the colony count of traditional colony detection methods or the average value of colony equivalent of comprehensive tests, it can be flexibly responded to. BRIEF DESCRIPTION OF THE DRAWINGS
[0117] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0118] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments of the present invention are provided for the purpose of illustration and description, and are not intended to be exhaustive or to limit the present invention to the disclosed forms. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present invention, and to enable those of ordinary skill in the art to understand the present invention and thereby design various embodiments with various modifications suitable for specific uses.
[0119] Example:
[0120] See also Figure 1 The present invention provides a technical solution: a method for calculating the difference between sterile and carbon-based colonies based on visually assisted detection, comprising the following steps:
[0121] Image acquisition: Use a high-resolution industrial camera, a macro lens and a telecentric lens to capture and collect external colony data in a constant temperature, humidity and pressure environment. The colony data includes color features, shape features, texture features and gloss features;
[0122] Feature extraction: Use image processing algorithms to extract visual features of sterile and aseptic areas;
[0123] Difference calculation: Calculate the carbon-based values based on the extracted characteristic data, and establish a digital model by comparing the differences in carbon-based data under sterile and aseptic conditions.
[0124] In feature extraction, the image processing algorithm includes the following steps:
[0125] First, when the external environmental factor data, shooting equipment and colony data are the same, take a group of pictures with colonies and pictures without colonies as background pictures, mark the pixels in the background pictures with RGB values and set them as reference thresholds;
[0126] Establish an empirical correlation model, input the reference threshold of the background image into the model, and use the following steps to define the features of the colony data in the image:
[0127] Color space conversion: converting RGB images collected by high-resolution industrial cameras into HSV space;
[0128] Edge detection: using edge detection algorithm to extract the edge contour of the colony in the image, and then using shape descriptors to describe the shape characteristics of the colony;
[0129] Texture feature extraction: Through wavelet transform, the image is decomposed into sub-bands of different frequencies, the coefficient distribution of different sub-bands is analyzed, and the texture features are extracted;
[0130] Gloss feature extraction calculates the reflectivity of the image by analyzing the highlight value distribution of pixels in the image.
[0131] In the establishment of the associated empirical model, the specific steps of color space transformation are as follows:
[0132] Separate out hue, saturation, and value;
[0133] First, calculate the brightness, the formula is as follows:
[0134] V = max(R, G, B)
[0135] Among them, R, G, and B represent the values of the red, green, and blue channels respectively, and their maximum value in is taken as the transparency;
[0136] Then, the saturation is calculated as follows:
[0137] If the image is black, V = 0, then S = 0
[0138] otherwise,
[0139] Here, the difference between the maximum and minimum values of the color component is calculated first, and then divided by the transparency;
[0140] Finally, calculate the hue using the following formula:
[0141] If the image is gray, S = 0, then H = 0
[0142] Otherwise, the hue is calculated based on the position of the maximum value in RGB;
[0143] If, max = R;
[0144] but
[0145] If max = G;
[0146] but,
[0147] If, max = B;
[0148] but,
[0149] Eliminate color redundant noise;
[0150] Subtract the RGB value of the current image from the RGB value of the corresponding pixel in the background image, and mark the HSV value of the background image as 0;
[0151] For each pixel's HSV value in the captured image, add one to the corresponding element value in the corresponding statistical array to obtain the pixel value distribution histogram of each channel, and then equalize the histogram. The specific steps are as follows:
[0152] Suppose the pixel value of the background image is r, and its value range is [0, L-1], where L is the maximum pixel value plus 1, and the number of pixels with pixel value r in the background image is recorded as n r ;
[0153] Calculate the histogram of the background image, and the calculation formula for the probability of pixel value r appearing is as follows:
[0154] p r =n r / N
[0155] Where N is the total number of pixels in the image;
[0156] Calculate the cumulative distribution function s k , the formula is as follows:
[0157]
[0158] Among them, r k is the current pixel value, s k is the cumulative distribution function in r k The value at
[0159] After histogram equalization, the pixel value rk The new pixel value mapped to is z k =(L-1)s k , by mapping the image, we get a uniformly distributed picture.
[0160] In the process of establishing the associated empirical model, the specific steps of edge detection are as follows:
[0161] Select the Canny algorithm, first perform Gaussian smoothing on the original image, then perform convolution operation with the image using the Gaussian kernel while retaining the edge position, and use the Sobel operator method to calculate the gradient amplitude and direction of each pixel in the image. The gradient amplitude indicates the severity of the grayscale change of the pixel, while the direction indicates the direction of the largest grayscale change. After calculating the gradient amplitude and direction, perform non-maximum suppression on the amplitude along the gradient direction, refine the wide edge into an edge with a single pixel width, and only retain the points with the largest local gradient as candidate edge points. Set high and low thresholds, and determine the pixel points with a gradient amplitude greater than the high threshold as strong edge points, and mark the pixel points with a gradient amplitude between the low threshold and the high threshold as weak edge points, while the pixel points with a gradient amplitude less than the low threshold are regarded as non-edge points. Then, the final edge image is formed by connecting the strong edge points and the weak edge points connected to the strong edge points.
[0162] Edge detection is performed on the colony image. The image containing the colony after color space conversion is input into the edge detection algorithm. The colony and the surrounding background have differences in grayscale and color characteristics. After being processed by the edge detection algorithm, the edge contour lines of the colony can be obtained. These edge contour lines distinguish the colony from the background and outline the shape boundary of the colony.
[0163] Select the Hu moment descriptor, calculate the central moment of the image, and then derive seven invariant moments based on the central moment to describe the characteristics of the shape. The calculation formula of the central moment is based on the coordinates and grayscale values of the pixel points. Seven Hu moments are calculated based on the central moment. The values of these Hu moments are the shape descriptors. The specific formula is as follows:
[0164] Let the seven Hu moments be M1, M2, M3, M4, M5, M6, and M7;
[0165] Assume that the actual area of the colony is measured as A real , let the estimated area of M1 be:
[0166] A estimated =f(M1)
[0167] Among them, f is a certain function, A estimated is the estimated area;
[0168] By comparing A real and Aestimated The difference is used to evaluate the accuracy of M1 in describing the area. The difference value is:
[0169] ΔA=|A real -A estimated |;
[0170] The edge characteristic index is obtained by comprehensive analysis of area characteristics, center position characteristics and symmetry characteristics, and the shape characteristics of the colony are quantitatively analyzed. The specific calculation formula is as follows:
[0171]
[0172] Among them, k1 is f, d represents the distance between the actual center position of the colony and the center position estimated based on M2, and x real The horizontal coordinate, y, represents the actual center position of the colony. real The ordinate represents the actual center position of the colony, and k2 and b2 are used to calculate the abscissa of the estimated center position. k3 and b3 are used to calculate the ordinate of the estimated center position C represents the compactness parameter of the colony, k4, k5, and k6 represent 4f, 5f, and 6f, respectively, and are used to establish the functional relationship between M2 and C. S represents the symmetry index of the colony, g(M3) functionally associates M3 with S, K represents the skewness index of the colony, and h is the skewness function.
[0173] In the process of establishing the associated empirical model, the specific wavelet transform for texture feature extraction is as follows:
[0174] First select the Haar wavelet basis function, and then perform wavelet transform. In the process of wavelet transform, first expand the one-dimensional wavelet transform to two dimensions. The specific steps are as follows:
[0175] For the wavelet transform of an image, the concept of one-dimensional wavelet transform is extended to two dimensions. First, a one-dimensional wavelet transform is performed on each row of the image, and then a one-dimensional wavelet transform is performed on each column of the transformed result. In this way, four sub-bands can be obtained:
[0176] Low-frequency LL subband: contains the approximate information of the image, namely the main contour and low-frequency components of the image;
[0177] Low-frequency-high-frequency LH subband: represents high-frequency detail information in the horizontal direction;
[0178] High-low frequency HL subband: represents high-frequency detail information in the vertical direction;
[0179] High-frequency-high-frequency HH subband: contains the high-frequency detail information in the diagonal direction of the image;
[0180] Then, according to the discrete wavelet transform algorithm, the pixel values of the image are weighted summed to obtain the wavelet coefficients;
[0181] After the wavelet transform is completed, the texture features are extracted through statistical characteristic analysis and correlation analysis, and finally the image is reconstructed through inverse wavelet transform to retain the image features and delete the noise in the image.
[0182] In the process of establishing the associated empirical model, the specific method for calculating the reflectivity of the image is as follows:
[0183] According to the lightness formula:
[0184] V = max(R, G, B)
[0185] In the HSV space, the brightness threshold of the pixel (x, y) is set to V(x, y). For each pixel in the image, the highlight area pixel is determined according to the set brightness threshold. The highlight pixel is judged according to V(x, y)>T, where T is the brightness distribution value, which is a constant and can be freely set according to actual needs. The position and brightness of the highlight pixel are recorded to obtain the highlight pixel set {(x, y)|V(x, y)>T}. The reflectivity R is calculated according to the Lambertian reflection model:
[0186]
[0187] in, Represents the sum of the brightness values of all highlighted pixels, N highlight : Indicates the number of highlighted pixels.
[0188] In the difference calculation, the steps for calculating the carbon base value are as follows:
[0189] Data preparation: collect various feature data in the feature extraction stage to determine the number, type and area of sterile and non-sterile colonies;
[0190] To calculate the carbon-based Yjc in the bacterial phase, first, use a conductivity measuring device to measure the conductivity difference before and after the complete decomposition of organic carbon in the bacterial state. Conductivity measurements are performed at key time points before and after the complete decomposition of organic carbon, and the corresponding conductivity values G are recorded. before and G after , and then calculate the conductivity difference:
[0191] ΔG=G after -G before
[0192] Then, the Yaoquan TOC algorithm is used, and the Yaoquan TOC algorithm is assumed to be function f TOC (x), input the conductance difference ΔG, that is:
[0193] Yjc=f TOC (ΔG), calculate the carbon value of the bacterial phase, the calculation formula is as follows:
[0194] Bacteria-phase carbon-based Yjc = conductivity difference before and after complete decomposition of unfiltered organic carbon × Yaoquan TOC algorithm;
[0195] Calculate the sterile phase carbon base Wjc. Similarly, the conductivity of the sample after all microbial impurities have been removed to ensure that only organic carbon in a sterile state is contained is measured before and after the complete decomposition of organic carbon to obtain the conductivity value G cleanBefore and G cleanAfter , calculate the conductivity difference: ΔG clean =G cleanAfter -G cleanBefore Then use the Yaoquan TOC algorithm to calculate the conductivity difference ΔG after filtration. clean Input, get the value of the sterile carbon base, that is, Wjc = f TOC (ΔG clean ), the calculation formula is as follows:
[0196] Sterile phase carbon-based Wjc = conductivity difference before and after complete decomposition of organic carbon after filtration × Yaoquan TOC algorithm
[0197] After the calculation of the carbon basis of the bacterial phase and the carbon basis of the sterile phase is completed, the colony equivalent jd is calculated. The specific method is as follows:
[0198] When the user inputs the colony count Cla obtained by the traditional colony detection method:
[0199] According to the formula Jd = (Yjc-Wjc) ÷ 10 ÷ Cla, substitute the values of the carbon base of the bacterial phase and the carbon base of the sterile phase, and then divide by 10 and the input colony count Cla;
[0200] When the user does not enter the colony count Cla:
[0201] Calculate the average value of the comprehensive test colony equivalent Jldp and the colony equivalent Jlde of the specific strain;
[0202] For the comprehensive test colony equivalent average Jldp:
[0203] Calculated according to the formula Jldp = Jlde ÷ Tn, where Jlde is the sum of the colony equivalents of each specific strain, and Tn is the number of strains tested;
[0204] For the colony equivalent of a specific strain, Jlde:
[0205] According to the formula Jlde = (Yjc-Wjc) ÷ 10 ÷ ClaT, where ClaT is the quantitative working strain when measuring a specific bacterial strain;
[0206] The calculated Jldp is obtained by adding up the sum of each Jlde and then dividing it by the number of strains tested Tn;
[0207] After the calculation of the colony equivalent jd is completed, a digital model is first established and then verified, where:
[0208] Calculate the microbial carbon-based YWT = (Yjc-Wjc), calculate the difference between the bacterial phase carbon-based Yjc and the sterile phase carbon-based Wjc, and obtain the microbial carbon-based YWT;
[0209] Model establishment: Based on the collected characteristic data and the calculated carbon-based values and colony equivalent data, a digital model was established. The multivariate regression analysis method was used to take the characteristic data as independent variables, the microbial carbon-based YWT and colony equivalent jd as dependent variables, and a linear regression digital model was obtained.
[0210] Model verification is performed using the verification method "Online colony count in homologous water before adding sterilized standard sucrose SZjlc1-Online colony count in homologous water after adding sterilized standard sucrose-SZjlc2=OCUF / 100ml". The specific steps are as follows:
[0211] Firstly, a homologous water sample, i.e., a water sample from the same source, is collected, and before adding sterilized standard sucrose, the calculation method and model are used to predict the online colony count in the water sample to obtain the predicted value of SZjlc1;
[0212] Then, sterilized standard sucrose is added to the water sample, and after waiting for a period of time for it to fully act, the method and model are used again to predict the online colony count to obtain the predicted value;
[0213] Finally, the difference between the two is calculated. If the difference OCUF / 100ml is close, it means that the model is more accurate;
[0214] If the difference is large, the model needs to be rechecked to verify the accuracy of feature extraction, and the parameters and algorithms of the digital model need to be adjusted and optimized.
[0215] Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field and related fields without creative work should fall within the scope of protection of the present invention. The structures, devices and operating methods not specifically described and explained in the present invention are implemented according to the conventional means in the field unless otherwise specified and limited.
Claims
1. A method for calculating the difference between sterile and carbon-based colonies based on visually assisted detection, characterized in that: The following steps are involved: Image acquisition: Use a high-resolution industrial camera, a macro lens and a telecentric lens to capture and collect external colony data in a constant temperature, humidity and pressure environment. The colony data includes color features, shape features, texture features and gloss features; feature Extraction: Use image processing algorithms to extract visual features of sterile and aseptic areas; Difference calculation: Calculate the carbon-based values based on the extracted characteristic data, and establish a digital model by comparing the differences in carbon-based data under sterile and aseptic conditions.
2. The method for calculating the difference between sterile and carbon-based colonies based on visually assisted detection according to claim 1, characterized in that: In feature extraction, the image processing algorithm includes the following steps: First, when the external environmental factor data, shooting equipment and colony data are the same, take a group of pictures with colonies and pictures without colonies as background pictures, mark the pixels in the background pictures with RGB values and set them as reference thresholds; Establish an empirical correlation model, input the reference threshold of the background image into the model, and use the following steps to define the features of the colony data in the image: Color space conversion: converting RGB images collected by high-resolution industrial cameras into HSV space; Edge detection: using edge detection algorithm to extract the edge contour of the colony in the image, and then using shape descriptors to describe the shape characteristics of the colony; Texture feature extraction: Through wavelet transform, the image is decomposed into sub-bands of different frequencies, the coefficient distribution of different sub-bands is analyzed, and the texture features are extracted; Gloss feature extraction calculates the reflectivity of the image by analyzing the highlight value distribution of pixels in the image.
3. A method for calculating the difference between sterile and carbon-based colonies based on visually assisted detection according to claim 2, characterized in that: In the establishment of the associated empirical model, the specific steps of color space transformation are as follows: Separate out hue, saturation, and value; First, calculate the brightness, the formula is as follows: V=max(R,G,B) Among them, R, G, and B represent the values of the red, green, and blue channels respectively, and their maximum value in is taken as the transparency; Then, the saturation is calculated as follows: If the image is black, V = 0, then S = 0 otherwise, Here, the difference between the maximum and minimum values of the color component is calculated first, and then divided by the transparency; Finally, calculate the hue using the following formula: If the image is gray, S = 0, then H = 0 Otherwise, the hue is calculated based on the position of the maximum value in RGB; If, max = R; but If max = G; but, If, max = B; but, Eliminate color redundant noise; Subtract the RGB value of the current image from the RGB value of the corresponding pixel in the background image, and mark the HSV value of the background image as 0; For each pixel's HSV value in the captured image, add one to the corresponding element value in the corresponding statistical array to obtain the pixel value distribution histogram of each channel, and then equalize the histogram. The specific steps are as follows: Suppose the pixel value of the background image is r, and its value range is [0, L1, where L is the maximum pixel value plus 1, and the number of pixels with pixel value r in the background image is recorded as n r ; Calculate the histogram of the background image, and the calculation formula for the probability of pixel value r appearing is as follows: p r =n r / N Where N is the total pixels of the image; Calculate the cumulative distribution function s k , the formula is as follows: Among them, r k is the current pixel value, s k is the cumulative distribution function in r k The value at After histogram equalization, the pixel value r k The new pixel value mapped to is z k =(L-1)s k , by mapping the image, we get a uniformly distributed picture.
4. The method for calculating the difference between sterile and carbon-based colonies based on visually assisted detection according to claim 2, characterized in that: In the process of establishing the associated empirical model, the specific steps of edge detection are as follows: Select the Canny algorithm, first perform Gaussian smoothing on the original image, then perform convolution operation with the image using the Gaussian kernel while retaining the edge position, and use the Sobel operator method to calculate the gradient amplitude and direction of each pixel in the image. The gradient amplitude indicates the severity of the grayscale change of the pixel, while the direction indicates the direction of the largest grayscale change. After calculating the gradient amplitude and direction, perform non-maximum suppression on the amplitude along the gradient direction, refine the wide edge into an edge with a single pixel width, and only retain the points with the largest local gradient as candidate edge points. Set high and low thresholds, and determine the pixel points with a gradient amplitude greater than the high threshold as strong edge points, and mark the pixel points with a gradient amplitude between the low threshold and the high threshold as weak edge points, while the pixel points with a gradient amplitude less than the low threshold are regarded as non-edge points. Then, the final edge image is formed by connecting the strong edge points and the weak edge points connected to the strong edge points. Edge detection is performed on the colony image. The image containing the colony after color space conversion is input into the edge detection algorithm. The colony and the surrounding background have differences in grayscale and color characteristics. After being processed by the edge detection algorithm, the edge contour lines of the colony can be obtained. These edge contour lines distinguish the colony from the background and outline the shape boundary of the colony. Select the Hu moment descriptor, calculate the central moment of the image, and then derive seven invariant moments based on the central moment to describe the characteristics of the shape. The calculation formula of the central moment is based on the coordinates and grayscale values of the pixel points. Seven Hu moments are calculated based on the central moment. The values of these Hu moments are the shape descriptors. The specific formula is as follows: Let the seven Hu moments be M1, M2, M3, M4, M5, M6, and M7; Assume that the actual area of the colony is measured as A real , let the estimated area of M1 be: A estimated =f(M1) Among them, f is a certain function, A estimated is the estimated area; By comparing A real and A estimated The difference is used to evaluate the accuracy of M1 in describing the area. The difference value is: ΔA=|A real -IN estimated |; The edge characteristic index is obtained by comprehensive analysis of area characteristics, center position characteristics and symmetry characteristics, and the shape characteristics of the colony are quantitatively analyzed. The specific calculation formula is as follows: Among them, k1 is f, d represents the distance between the actual center position of the colony and the center position estimated based on M2, and x real The horizontal coordinate, y, represents the actual center position of the colony. real The ordinate represents the actual center position of the colony, and k2 and b2 are used to calculate the abscissa of the estimated center position. k3 and b3 are used to calculate the ordinate of the estimated center position C represents the compactness parameter of the colony, k4, k5, and k6 represent 4 f , 5 f and 6 f , used to establish the functional relationship between M2 and C, S represents the symmetry index of the colony, g(M3) functionally associates M3 with S, K represents the skewness index of the colony, and h is the skewness function.
5. The method for calculating the difference between sterile and carbon-based colonies based on visually assisted detection according to claim 2, characterized in that: In the process of establishing the associated empirical model, the specific wavelet transform for texture feature extraction is as follows: First select the Haar wavelet basis function, and then perform wavelet transform. In the process of wavelet transform, first expand the one-dimensional wavelet transform to two dimensions. The specific steps are as follows: For the wavelet transform of an image, the concept of one-dimensional wavelet transform is extended to two dimensions. First, a one-dimensional wavelet transform is performed on each row of the image, and then a one-dimensional wavelet transform is performed on each column of the transformed result. In this way, four sub-bands can be obtained: Low-frequency LL subband: contains the approximate information of the image, namely the main contour and low-frequency components of the image; Low-frequency-high-frequency LH subband: represents high-frequency detail information in the horizontal direction; High-low frequency HL subband: represents high-frequency detail information in the vertical direction; High-frequency-high-frequency HH subband: contains the high-frequency detail information in the diagonal direction of the image; Then, according to the discrete wavelet transform algorithm, the pixel values of the image are weighted summed to obtain the wavelet coefficients; After the wavelet transform is completed, the texture features are extracted through statistical characteristic analysis and correlation analysis, and finally the image is reconstructed through inverse wavelet transform to retain the image features and delete the noise in the image.
6. The method for calculating the difference between sterile and carbon-based colonies based on visually assisted detection according to claim 3, characterized in that: In the process of establishing the associated empirical model, the specific method for calculating the reflectivity of the image is as follows: According to the lightness formula: V = max(R, G, B) In the HSV space, the brightness threshold of the pixel (x, y) is set to V(x, y). For each pixel in the image, the highlight area pixel is determined according to the set brightness threshold. The highlight pixel is judged according to V(x, y)>T, where T is the brightness distribution value, which is a constant and can be freely set according to actual needs. The position and brightness of the highlight pixel are recorded to obtain the highlight pixel set {(x, y)|V(x, y)>T}. The reflectivity R is calculated according to the Lambertian reflection model: in, Represents the sum of the brightness values of all highlighted pixels, N highlight : Indicates the number of highlighted pixels.
7. The method for calculating the difference between sterile and carbon-based colonies based on visually assisted detection according to claim 1, characterized in that: In the difference calculation, the steps for calculating the carbon base value are as follows: Data preparation: collect various feature data in the feature extraction stage to determine the number, type and area of sterile and non-sterile colonies; To calculate the carbon-based Yjc in the bacterial phase, first, use a conductivity measuring device to measure the conductivity difference before and after the complete decomposition of organic carbon in the bacterial state. Conductivity measurements are performed at key time points before and after the complete decomposition of organic carbon, and the corresponding conductivity values F are recorded. before and G after , and then calculate the conductivity difference: ΔG=G after -G before Then, the Yaoquan TOC algorithm is used, and the Yaoquan TOC algorithm is assumed to be function f TOC (x), input the conductance difference ΔG, that is: Y jc =f TOC (ΔG), calculate the carbon value of the bacterial phase, the calculation formula is as follows: Fungal carbon-based Y jc = Conductivity difference before and after complete decomposition of unfiltered organic carbon × Yaoquan TOC algorithm; Calculate the sterile phase carbon base Wjc. Similarly, the conductivity of the sample after all microbial impurities have been removed to ensure that only organic carbon in a sterile state is contained is measured before and after the complete decomposition of organic carbon to obtain the conductivity value G cleanBefore and G cleanAfter , calculate the conductivity difference: ΔG clean =G cleanAfter -G cleaBefore Then use the Yaoquan TOC algorithm to calculate the conductivity difference ΔG after filtration. clean Input, get the value of the sterile carbon base, that is, W jc =f TOC (ΔG clean ), the calculation formula is as follows: Sterile Carbon-Based W jc =Difference in conductivity before and after complete decomposition of organic carbon after filtration × Yaoquan TOC algorithm.
8. The method for calculating the difference between sterile and carbon-based colonies based on visually assisted detection according to claim 7, characterized in that: After the calculation of the carbon basis of the bacterial phase and the carbon basis of the sterile phase is completed, the colony equivalent jd is calculated. The specific method is as follows: When the user inputs the colony count Cla obtained by the traditional colony detection method: According to formula J d =(Y jc -W jc )÷10÷Cla, substitute the values of the carbon base of the bacterial phase and the carbon base of the sterile phase, and then divide by 10 and the input colony count Cla; When the user does not enter the colony count Cla: Calculate the average value of the comprehensive test colony equivalent Jldp and the colony equivalent Jlde of the specific strain; For the comprehensive test colony equivalent average Jldp: Calculated according to the formula Jldp = Jlde ÷ Tn, where Jlde is the sum of the colony equivalents of each specific strain, and Tn is the number of strains tested; For the colony equivalent of a specific strain, Jlde: According to the formula Jlde=(Y jc -W jc )÷10÷ClaT, where ClaT is the quantitative working strain when measuring a specific bacterial strain; The calculated Jldp is obtained by adding up the total Jldes and dividing by the number of bacterial species tested Tn.
9. The method for calculating the difference between sterile and carbon-based colonies based on visually assisted detection according to claim 8, characterized in that: After the calculation of the colony equivalent jd is completed, a digital model is first established and then verified, where: Calculate the microbial carbon base YWT = (Y jc -W jc ), calculate the difference between the carbon basis Yjc of the bacterial phase and the carbon basis Wjc of the sterile phase to obtain the microbial carbon basis YWT; Model establishment: Based on the collected characteristic data and the calculated carbon-based values and colony equivalent data, a digital model was established. The multivariate regression analysis method was used to take the characteristic data as independent variables, the microbial carbon-based YWT and colony equivalent jd as dependent variables, and a linear regression digital model was obtained. Model validation was performed using the validation method "Online colony count in homologous water before adding sterilized standard sucrose SZjlcl - Online colony count in homologous water after adding sterilized standard sucrose - SZjlc2 = OCUF / 100ml", and the specific steps are as follows: Firstly, a homologous water sample, i.e., a water sample from the same source, is collected, and before adding sterilized standard sucrose, the calculation method and model are used to predict the online colony count in the water sample to obtain the predicted value of SZjlc1; Then, sterilized standard sucrose is added to the water sample, and after waiting for a period of time for it to fully act, the method and model are used again to predict the online colony count to obtain the predicted value; Finally, the difference between the two is calculated. If the difference is close to 0CUF / 100ml, it means that the accuracy of the model is high; If the difference is large, the model needs to be rechecked to verify the accuracy of feature extraction, and the parameters and algorithms of the digital model need to be adjusted and optimized.
Citation Information
Patent Citations
Escherichia coli dynamic growth monitoring method
CN111368643A
Edible fungus hypha phenotype acquisition method
CN115294044A
Method and system for analyzing bacterial culture image of helicobacter pylori
CN118172608A
Method and system for screening monascus strains based on HSV model
CN118334135A
Cited By
Microbial colony quantitative analysis method based on fusion of conductance change and TOC (Total Organic Carbon) model
CN121901557A
Microbial colony quantitative analysis method based on fusion of conductance change and TOC model
CN121901557B
Bacterial colony number inversion method based on dynamic conductance response and organic carbon consumption characteristics
CN121905303A
Bacterial count inversion method based on dynamic conductance response and organic carbon consumption characteristics
CN121905303B
