CN117274293A - Accurate bacterial colony dividing method based on image features - Google Patents

Accurate bacterial colony dividing method based on image features Download PDF

Info

Publication number
CN117274293A
CN117274293A CN202311534168.6A CN202311534168A CN117274293A CN 117274293 A CN117274293 A CN 117274293A CN 202311534168 A CN202311534168 A CN 202311534168A CN 117274293 A CN117274293 A CN 117274293A
Authority
CN
China
Prior art keywords
sliding window
target
connected domain
sliding
windows
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311534168.6A
Other languages
Chinese (zh)
Other versions
CN117274293B (en
Inventor
杨希
吕晓慧
张厂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Animal Science of Guangdong Academy of Agricultural Sciences
Original Assignee
Institute of Animal Science of Guangdong Academy of Agricultural Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of Animal Science of Guangdong Academy of Agricultural Sciences filed Critical Institute of Animal Science of Guangdong Academy of Agricultural Sciences
Priority to CN202311534168.6A priority Critical patent/CN117274293B/en
Publication of CN117274293A publication Critical patent/CN117274293A/en
Application granted granted Critical
Publication of CN117274293B publication Critical patent/CN117274293B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10056Microscopic image
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A50/00TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE in human health protection, e.g. against extreme weather
    • Y02A50/30Against vector-borne diseases, e.g. mosquito-borne, fly-borne, tick-borne or waterborne diseases whose impact is exacerbated by climate change

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Measuring Or Testing Involving Enzymes Or Micro-Organisms (AREA)

Abstract

The invention relates to the technical field of image analysis, in particular to an accurate bacterial colony dividing method based on image features. The method comprises the following steps: acquiring a gray image of the surface of a culture medium, and determining a colony area; carrying out connected domain analysis to determine a connected domain to be detected, dividing an initial sliding window, and selecting a target sliding window from the initial sliding window; determining a connected domain analysis index of the connected domain to be detected; screening out a target connected domain from the connected domain to be detected; taking all other target sliding windows except the outermost target sliding window in the target communication domain as sliding windows to be segmented; according to the distance between the sliding window to be segmented and other sliding windows to be segmented, selecting an edge sliding window from the sliding windows to be segmented; dividing the target communicating region according to the central point in the edge sliding window to obtain bacterial colonies, and taking each communicating region to be tested except the target communicating region as one bacterial colony. The invention can effectively improve the accuracy of bacterial colony division and ensure the accuracy and the reliability of bacterial colony division.

Description

Accurate bacterial colony dividing method based on image features
Technical Field
The invention relates to the technical field of image analysis, in particular to an accurate bacterial colony dividing method based on image features.
Background
Bacterial colonies are bacterial aggregates formed on a culture medium, and the types and relative amounts of bacteria present in a sample can be primarily known by observing and counting the distribution and abundance of different colonies. However, different colonies may have edge adhesion contact due to restriction of growth area. Colony partitioning is therefore required for different colonies.
In the related art, colony division is realized by using a color block analysis mode, under the mode, due to the influence of bacterial hypha at the edge, the edge characteristics of the edge of mutually adhered colonies are fuzzy, and the chromatic aberration of bacterial colonies of the same kind in the same culture medium is smaller, so that when the bacterial colonies are divided only according to the color block analysis mode, the connected domains with adhesion cannot be effectively divided, the accuracy of bacterial colony division is lower, and the accuracy and reliability of bacterial colony division are poorer.
Disclosure of Invention
In order to solve the technical problems that in the related art, the connected domain with adhesion cannot be effectively divided, the accuracy of bacterial colony division is low, and the accuracy and reliability of bacterial colony division are poor, the invention provides an accurate bacterial colony division method based on image characteristics, which adopts the following technical scheme:
the invention provides a bacterial colony accurate dividing method based on image characteristics, which comprises the following steps:
acquiring a culture medium surface gray level image, and determining a colony area of the culture medium surface gray level image based on a threshold segmentation mode;
carrying out connected domain analysis on the colony area, determining a connected domain to be detected, dividing the connected domain based on sliding windows which are not overlapped and have preset sizes, obtaining an initial sliding window, and selecting a target sliding window from the initial sliding window according to gray values of pixels in the initial sliding window and the connected domain to be detected;
determining a connected domain analysis index of each connected domain to be detected according to the area of each connected domain to be detected, the areas of all the target sliding windows in the connected domain to be detected and the position distribution of the target sliding windows; screening out a target connected domain from the connected domain to be detected according to the connected domain analysis index;
taking all other target sliding windows except the outermost target sliding window in the target communication domain as sliding windows to be segmented; according to the distance between the sliding window to be segmented and the nearest preset number of other sliding windows to be segmented, selecting an edge sliding window from the sliding windows to be segmented;
dividing the target communicating domain according to the central point in the edge sliding window to obtain bacterial colonies, and taking each communicating domain to be tested except the target communicating domain as one bacterial colony.
Further, the selecting a target sliding window from the initial sliding window according to the gray values of the pixels in the initial sliding window and the connected domain to be detected includes:
taking the normalized value of the gray value information entropy of all pixel points in the initial sliding window as the chaotic degree of the sliding window;
taking the average value of the gray values of all the pixel points in the initial sliding window as a sliding window average value, and taking the standard deviation of the gray values of all the pixel points in the initial sliding window as a sliding window standard deviation; calculating the product of the sliding window mean value and the sliding window standard deviation as a sliding window characteristic parameter;
taking the average value of the gray values of all the pixel points in the connected domain to be measured as the average value to be measured, and taking the standard deviation of the gray values of all the pixel points in the connected domain to be measured as the standard deviation to be measured; calculating the product of the mean value to be measured and the standard deviation to be measured as a characteristic parameter to be measured;
determining a sliding window mutation coefficient according to the sliding window characteristic parameter and the characteristic parameter to be detected;
calculating the product of the sliding window confusion degree and the sliding window mutation coefficient as a sliding window screening coefficient;
a target sliding window is selected from the initial sliding windows according to the sliding window screening coefficients of each initial sliding window.
Further, the determining the sliding window mutation coefficient according to the sliding window characteristic parameter and the characteristic parameter to be measured includes:
calculating the absolute value of the difference between the sliding window characteristic parameter and the characteristic parameter to be measured as a characteristic difference;
and determining a sliding window mutation coefficient according to the characteristic difference and the characteristic parameter to be detected, wherein the characteristic difference and the sliding window mutation coefficient are in positive correlation, the characteristic parameter to be detected and the sliding window mutation coefficient are in negative correlation, and the value of the sliding window mutation coefficient is a normalized value.
Further, the selecting a target sliding window from the initial sliding windows according to the sliding window screening coefficient of each initial sliding window includes:
and taking the initial sliding window with the sliding window screening coefficient larger than a preset screening coefficient threshold value as a target sliding window.
Further, determining the connected domain analysis index of the connected domain to be tested according to the area of each connected domain to be tested, the areas of all the target sliding windows in the connected domain to be tested and the position distribution of the target sliding windows, includes:
calculating the ratio of the area of the communication domain to be detected to the area of all the target sliding windows in the communication domain to be detected as an area influence coefficient;
taking any target sliding window in the communication domain to be analyzed as a sliding window to be analyzed; determining the center point of the target sliding window closest to the center point of the sliding window to be analyzed, and taking the normalized value of the distance value between the two center points as the distance index of the sliding window to be analyzed; taking the average value of the distance indexes of all the target sliding windows as a distance influence coefficient;
and taking a normalized value of the product of the area influence coefficient and the distance influence coefficient as the connected domain analysis index.
Further, the screening the target connected domain from the connected domain to be detected according to the connected domain analysis index includes:
and taking the connected domain to be detected, of which the connected domain analysis index is smaller than a preset index threshold value, as a target connected domain.
Further, the step of screening the edge sliding window from the sliding windows to be segmented according to the distance between the sliding window to be segmented and the nearest preset number of other sliding windows to be segmented includes:
taking the sum of the distances between a preset number of other sliding windows to be segmented, which are closest to any sliding window to be segmented, as a segmentation distance sum;
normalizing the segmentation distance and the value to obtain an edge selection index;
and screening the edge sliding window from the sliding windows to be segmented according to the edge selection indexes of all the sliding windows to be segmented.
Further, the step of screening the edge sliding window from the sliding windows to be segmented according to the edge selection indexes of all the sliding windows to be segmented includes:
and taking the sliding window to be segmented, of which the edge selection index is smaller than a preset edge threshold value, as an edge sliding window.
Further, the dividing the target communicating domain according to the edge line in the edge sliding window to obtain bacterial colonies includes:
connecting the center points of the two nearest edge sliding windows, dividing the target communicating region into at least two sub-regions, and taking each sub-region as a bacterial colony.
Further, the preset number is 10.
The invention has the following beneficial effects:
according to the invention, the colony area is determined by acquiring the gray level image on the surface of the culture medium, then, the connected domain is analyzed and the connected domain is segmented based on the sliding window which is not overlapped and is preset in size, so that an initial sliding window is obtained, a target sliding window is selected from the initial sliding window through the gray level values of pixels in the initial sliding window and the connected domain to be detected, it can be understood that bacterial colonies are scattered on the outer side and a plurality of colonies are adhered to each other, when the colonies are adhered to each other, the edge area in the middle is fuzzy due to the distribution of hypha, the corresponding edge information is less, and the effect obtained by directly using the color lump analysis processing is poor; because the single communicating domain to be detected can be a colony or a combination of a plurality of colonies, the invention combines the area information of the communicating domain to be detected and the number and position distribution of the target sliding windows in the communicating domain to be detected to determine the communicating domain analysis index, and screens the target communicating domain from the communicating domain to be detected, thereby accurately screening the target communicating domain containing a plurality of colonies, further determining the edge sliding window according to the distance between the sliding windows to be segmented in the target communicating domain, dividing the target communicating domain based on the edge sliding window, so that the mutually adhered colonies can be effectively divided, and combining the originally singly distributed communicating domain to be detected to obtain bacterial colonies.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for precisely dividing bacterial colonies based on image features according to one embodiment of the present invention;
fig. 2 is a schematic diagram of a sliding window to be divided according to an embodiment of the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of specific embodiments, structures, features and effects of the method for precisely dividing bacterial colonies based on image features according to the invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following specifically describes a specific scheme of the bacterial colony accurate dividing method based on image characteristics.
Referring to fig. 1, a flowchart of a method for precisely dividing bacterial colonies based on image features according to an embodiment of the present invention is shown, where the method includes:
s101: and acquiring a culture medium surface gray level image, and determining a colony area of the culture medium surface gray level image based on a threshold segmentation mode.
The invention provides a method for identifying and dividing colonies, which is characterized in that a using scene can be specifically, for example, collecting a culture medium surface gray level image, and carrying out colony identification on the culture medium surface gray level image based on an image analysis technology, and it can be understood that the condition that mutual adhesion and appearance are similar can exist among different colonies, only a small area among the colonies can have edge characteristics, and when edge detection is carried out, the edge characteristics which are too small are taken as normal areas, so that the effect of color block analysis is poor, the accuracy of identifying and dividing the colonies is poor, and the colonies cannot be accurately divided by the existing method.
In the embodiment of the invention, a high-resolution camera can be used for photographing and collecting the culture dish which is placed on a horizontal desktop with larger chromatic aberration, and an external light source or proper lighting equipment is used for obtaining high-quality images. And then preprocessing the acquired image, graying the obtained image in the RGB color format, removing image noise by using bilateral filtering, and extracting the image corresponding to the culture medium, thereby obtaining the gray image on the surface of the culture medium. The image preprocessing process is a technology well known in the art, and will not be described in detail.
After the acquisition of the culture medium surface gray level image, a colony area of the culture medium surface gray level image can be determined based on a threshold segmentation mode; it can be understood that, since the culture dish is placed on a horizontal table surface with larger chromatic aberration, namely the table surface, the culture medium and the bacterial colony can form obvious color layering, the distinguishing expression is obvious in the gray level image, and therefore, the blank culture medium area and the bacterial colony area, namely the bacterial colony area can be distinguished by using a threshold segmentation mode.
After determining the colony area, the embodiment of the invention can perform specific image analysis on the colony area, and the image analysis process is described in the following embodiments.
S102: and carrying out connected domain analysis on the colony area, determining the connected domain to be detected, dividing the connected domain based on sliding windows which are not overlapped and have preset sizes, obtaining an initial sliding window, and selecting a target sliding window from the initial sliding window according to the gray values of the pixels in the initial sliding window and the connected domain to be detected.
The preset size is the size of the initial sliding window, and it can be understood that the smaller the preset size is, the higher the corresponding fineness of performing colony image recognition is, so that the preset size is set to be 5×5, and of course, the preset size can be adjusted according to the actual detection requirement, and the embodiment of the invention is not limited.
In the embodiment of the invention, the colony area is subjected to connected domain analysis to determine the connected domain to be detected, wherein the connected domain analysis is a method for combining pixels with the same or similar gray values as one connected domain, the connected domain analysis can effectively divide the colony area, the connected domain analysis technology is a technology well known to a person skilled in the art, and the distributed discrete colony area can be identified and distinguished through the connected domain analysis treatment.
It can be understood that, because colonies are irregularly distributed in the culture dish and the shapes, sizes and positions of the colonies of different colonies are different, mutual adhesion between the colonies may occur.
Further, in some embodiments of the present invention, selecting a target sliding window from the initial sliding window according to gray values of pixels in the initial sliding window and the connected domain to be measured includes: taking the normalized value of the gray value information entropy of all pixel points in the initial sliding window as the chaotic degree of the sliding window; taking the average value of the gray values of all the pixel points in the initial sliding window as the average value of the sliding window, and taking the standard deviation of the gray values of all the pixel points in the initial sliding window as the standard deviation of the sliding window; calculating the product of the sliding window mean value and the sliding window standard deviation as a sliding window characteristic parameter; taking the average value of the gray values of all the pixel points in the connected domain to be measured as the average value to be measured, and taking the standard deviation of the gray values of all the pixel points in the connected domain to be measured as the standard deviation to be measured; calculating the product of the mean value to be measured and the standard deviation to be measured as a characteristic parameter to be measured; determining a sliding window mutation coefficient according to the sliding window characteristic parameter and the characteristic parameter to be measured; calculating the product of the chaotic degree of the sliding window and the mutation coefficient of the sliding window as a sliding window screening coefficient; and selecting a target sliding window from the initial sliding windows according to the sliding window screening coefficient of each initial sliding window.
In the embodiment of the invention, the normalized value of the gray value information entropy of all the pixel points in the initial sliding window can be used as the chaotic degree of the sliding window, and the larger the information entropy is, the more complex the gray distribution of the pixel points in the corresponding initial sliding window is, namely the more likely the pixel points contain edge information.
In the embodiment of the invention, the average value of the gray values of all the pixel points in the initial sliding window is taken as the average value of the sliding window, and the standard deviation of the gray values of all the pixel points in the initial sliding window is taken as the standard deviation of the sliding window; the product of the sliding window mean value and the sliding window standard deviation is calculated as a sliding window characteristic parameter, and a calculation formula corresponding to the sliding window characteristic parameter may specifically be, for example:
in the method, in the process of the invention,sliding window characteristic parameter representing the ith initial sliding window,/->Representing the gray value of all pixel points in the ith initial sliding windowValues, i.e. sliding window mean, +.>Representing the standard deviation of gray values of all pixel points in the ith initial sliding window.
In the embodiment of the invention, the gray average value and the standard deviation are used as the gray characteristics of the pixel points in the sliding window, so that the gray average value and the standard deviation are combined to obtain the sliding window characteristic parameters, and the subsequent characteristic analysis is conveniently carried out according to the sliding window characteristic parameters.
After the sliding window characteristic parameters are determined, the product of the to-be-measured mean value and the to-be-measured standard deviation can be used as the to-be-measured characteristic parameters, and the specific implementation process is similar to the sliding window characteristic parameters, and further description is omitted.
Further, in some embodiments of the present invention, determining the sliding window mutation coefficient according to the sliding window characteristic parameter and the characteristic parameter to be measured includes: calculating the absolute value of the difference between the sliding window characteristic parameter and the characteristic parameter to be measured as the characteristic difference; and determining a sliding window mutation coefficient according to the characteristic difference and the characteristic parameter to be detected, wherein the characteristic difference and the sliding window mutation coefficient have positive correlation, the characteristic parameter to be detected and the sliding window mutation coefficient have negative correlation, and the value of the sliding window mutation coefficient is a normalized value.
The positive correlation relationship indicates that the dependent variable increases along with the increase of the independent variable, the dependent variable decreases along with the decrease of the independent variable, and the specific relationship can be multiplication relationship, addition relationship, idempotent of an exponential function and is determined by practical application; the negative correlation indicates that the dependent variable decreases with increasing independent variable, and the dependent variable increases with decreasing independent variable, which may be a subtraction relationship, a division relationship, or the like, and is determined by the actual application.
It can be understood that the general colonies all have light color characteristics, such as milky white, pale yellow, etc., and the edges thereof are usually provided with gray abrupt changes, the color of the whole connected domain to be detected is the color of the colony itself, and the color of the region with abrupt changes at the edges is more similar to the background color, and the obvious color difference between the background and the colony can be based on the color differenceAnalysis was performed on the degree of sliding window mutation. The calculation formula corresponding to the sliding window mutation coefficient may specifically be, for example:
in the method, in the process of the invention,sliding window mutation coefficient indicating the ith initial sliding window,>indicating the (I) th initial sliding window is in the connected domain to be detected +.>Is a characteristic parameter to be measured; />A sliding window characteristic parameter representing an ith initial sliding window; />Represents a constant coefficient, optionally ++for a safety value set to prevent the denominator from being 0>;/>The representation takes absolute value; />The normalization process is represented. In one embodiment of the present invention, the normalization process may specifically be, for example, maximum and minimum normalization processes, and the normalization in the subsequent steps may be performed by using the maximum and minimum normalization processes, and in other embodiments of the present invention, other normalization methods may be selected according to a specific range of values, which will not be described herein.
Wherein,represents the i initial sliding window and the communication domain to be detected to which the i initial sliding window belongs +.>The characteristic difference of the sliding window is that the characteristic parameter to be detected and the characteristic parameter of the sliding window are the products of the corresponding sliding window mean value and the sliding window standard deviation, namely, the larger the characteristic difference is, the larger the gray value mean value difference of the pixel points in the communication domain to which the initial sliding window belongs is, the larger the gray value standard deviation is, namely, the larger the gray difference of the pixel points corresponding to the initial sliding window and the communication domain to be detected where the initial sliding window is located is, so that the probability that the pixel points of the initial sliding window are abrupt pixel points is higher, the ratio of the characteristic difference to the characteristic parameter to be detected is calculated, and normalization processing is carried out, so that the gray influence of different communication domains to be detected is eliminated, and the accuracy and the reliability of the abrupt coefficient of the sliding window are improved.
After the sliding window mutation coefficient is determined, the product of the sliding window confusion degree and the sliding window mutation coefficient can be calculated to serve as a sliding window screening coefficient; the sliding window screening coefficient is index data of the possibility that the initial sliding window contains different colony edges. The complexity of the gray value distribution of the pixel points in the sliding window is represented by the chaotic degree of the sliding window, the greater the chaotic degree of the sliding window is, the more complex the gray value distribution of the pixel points in the corresponding initial sliding window is, but the initial sliding window which normally contains colonies is smaller in change of the corresponding gray value and tends to be stable, so that the greater the chaotic degree of the sliding window is, the more information that the edges of the colonies are contained in the corresponding initial sliding window is represented; the sliding window mutation coefficient represents the mutation condition of the pixel points in the initial sliding window, and the larger the sliding window mutation coefficient is, the larger the gray value change of the pixel points in the corresponding initial sliding window is, and the larger the difference between the gray value change and the connected domain to be detected is, and further the sliding window mutation coefficient can represent that the sliding window contains background related information, namely the initial sliding window is more likely to be the sliding window corresponding to the colony edge. Therefore, the product of the sliding window confusion degree and the sliding window mutation coefficient is calculated, and the sliding window screening coefficient is obtained.
Further, in some embodiments of the present invention, selecting a target sliding window from the initial sliding windows according to the sliding window screening coefficient of each initial sliding window includes: and taking the initial sliding window with the sliding window screening coefficient larger than the preset screening coefficient threshold value as a target sliding window.
The target sliding window is a sliding window containing the edge of the colony, namely the position of the target sliding window is very likely to be the edge position of the colony.
Optionally, in the embodiment of the present invention, the preset screening coefficient threshold may specifically be, for example, 0.8, that is, an initial sliding window with a sliding window screening coefficient greater than 0.8 is used as the target sliding window. Of course, the preset screening coefficient threshold value can be adjusted according to the actual detection requirement, which is not limited.
After the target sliding window is determined, the target sliding window may be further analyzed in connection with its distribution, see the following examples for specific procedures.
S103: determining a connected domain analysis index of the connected domain to be detected according to the area of each connected domain to be detected, the areas of all target sliding windows in the connected domain to be detected and the position distribution of the target sliding windows; and screening out the target connected domain from the connected domain to be detected according to the connected domain analysis index.
Further, in some embodiments of the present invention, determining a connected domain analysis index of a connected domain to be measured according to an area of each connected domain to be measured, areas of all target sliding windows in the connected domain to be measured, and a position distribution of the target sliding windows, includes: calculating the ratio of the area of the communication domain to be detected to the area of all the target sliding windows in the communication domain to be detected as an area influence coefficient; taking any target sliding window in the communication domain to be detected as a sliding window to be analyzed; determining the center point of the target sliding window closest to the center point of the sliding window to be analyzed, and taking the normalized value of the distance value between the two center points as the distance index of the sliding window to be analyzed; taking the average value of the distance indexes of all the target sliding windows as a distance influence coefficient; and taking a normalized value of the product of the area influence coefficient and the distance influence coefficient as a connected domain analysis index.
The connected domain analysis index is analysis data of whether a plurality of colony adhesion edges exist in the connected domain to be detected, and a calculation formula corresponding to the connected domain analysis index may specifically be, for example:
in the method, in the process of the invention,communicating domain analysis index indicating the L th communicating domain to be measured,>represents the total area of the L-th connected domain to be measured, < > and>the area of N target sliding windows in the L-th communication domain to be detected is represented, and N represents the total number of the target sliding windows in the corresponding communication domain to be detected; n represents the index of the target sliding window, +.>Distance index indicating n-th target sliding window, ">The normalization process is represented.
In the method, in the process of the invention,the distance influence coefficient of the target sliding windows in the connected domain to be detected is represented, the distance influence coefficient represents the distribution condition of all the target sliding windows, the smaller the distance influence coefficient is, the more concentrated the distribution among the target sliding windows is, the greater the probability of the connected domain to be detected in the colony edge area is, and the greater the analysis index of the corresponding connected domain is. Since the edge area is larger and the gray scale is deeper in the colony communicating region than in the non-uniform growth region, the colony edge area corresponds to more target sliding windows than the non-uniform growth region. Thus->The smaller value of (2) represents that more target sliding windows exist in the connected domain to be detected, which indicates that the connected domain to be detected is more likely to have adhesion edges, namely the larger the analysis index value of the connected domain is.
Thus, in some embodiments of the present invention, screening a target connected domain from a connected domain to be tested according to a connected domain analysis index includes: and taking the connected domain to be detected, of which the connected domain analysis index is smaller than a preset index threshold value, as a target connected domain.
The preset index threshold is a threshold value of a connected domain analysis index, and in the embodiment of the present invention, the preset index threshold may specifically be, for example, 0.5, that is, a connected domain to be detected with a connected domain analysis index smaller than 0.5 is used as a target connected domain. Of course, the value of the preset index threshold can also be adjusted according to the actual detection requirement, and the method is not limited.
It can be understood that in the actual detection scene of the colonies, because the edge information among the mutually adhered colonies is less, when the connected domain analysis is performed, the area formed by a plurality of colonies is commonly used as one connected domain, so that the invention analyzes the situation, the connected domain to be detected, which has a plurality of different colonies, is screened out as the target connected domain by the connected domain analysis index, and other connected domains to be detected only contain one colony, thereby further analysis can be performed on the target connected domain, and the reliability of colony division is ensured.
S104: taking all other target sliding windows except the outermost target sliding window in the target communication domain as sliding windows to be segmented; and screening the edge sliding windows from the sliding windows to be segmented according to the distance between the sliding windows to be segmented and the nearest preset number of other sliding windows to be segmented.
In the embodiment of the invention, all other target sliding windows except the outermost target sliding window in the target communication domain can be used as the sliding window to be segmented, and it can be understood that the method can determine the outermost target sliding window by determining the center point of the target communication domain and then radiating outwards from the center point of the target communication domain, or can determine the outermost edge of the communication domain to be segmented, and the target sliding window overlapped with the outermost edge is used as the outermost target sliding window, and after all the target sliding windows remove the target sliding window, the method can be used as the sliding window to be segmented for specific analysis.
Further, in some embodiments of the present invention, selecting an edge sliding window from among the sliding windows to be segmented according to a distance between the sliding window to be segmented and a nearest preset number of other sliding windows to be segmented, includes: taking the sum of the distances between a preset number of other sliding windows to be segmented, which are closest to any sliding window to be segmented, as a segmentation distance sum; normalizing the division distance and the value to obtain an edge selection index; and screening the edge sliding window from the sliding windows to be segmented according to the edge selection indexes of all the sliding windows to be segmented.
In the embodiment of the present invention, the preset number may be specifically, for example, 10, or may be adjusted according to an actual detection requirement, which is not limited.
In the embodiment of the invention, the sliding windows to be segmented are specifically analyzed through the distance between the sliding windows to be segmented, namely, the sum of the distances between a preset number of other sliding windows to be segmented, which are closest to any sliding window to be segmented, is calculated as the segmentation distance sum, and normalized to obtain the edge selection index, when the edge selection index is larger, the distance between the corresponding sliding window to be segmented and the other sliding windows to be segmented is generally longer, namely, the sliding window to be segmented is in an isolated position, and the corresponding edge selection index is larger.
For example, as shown in fig. 2, fig. 2 is a schematic diagram of the distribution of sliding windows to be segmented according to an embodiment of the present invention, in fig. 2, sliding windows to be segmented, which are adhered between colonies, are distributed more densely, and sliding windows to be segmented, which are not edge, are distributed more discretely, so that edge sliding windows are analyzed specifically.
Further, in some embodiments of the present invention, selecting an edge sliding window from among the sliding windows to be segmented according to the edge selection indexes of all the sliding windows to be segmented includes: and taking the sliding window to be segmented, of which the edge selection index is smaller than a preset edge threshold value, as an edge sliding window.
The preset edge threshold may be, for example, specifically, 0.25, that is, the sliding window to be segmented with the edge selection index smaller than 0.25 is used as the edge sliding window, and of course, the preset edge threshold may be adjusted according to the actual detection requirement, which is not limited.
In the embodiment of the invention, the sliding windows to be segmented at the edges among the colonies have smaller distances from other sliding windows to be segmented, so that the distance among the sliding windows to be segmented is used for effective judgment, and the accuracy and the reliability of the final edge sliding window selection are ensured.
S105: dividing the target communicating region according to the central point in the edge sliding window to obtain bacterial colonies, and taking each communicating region to be tested except the target communicating region as one bacterial colony.
After confirming the edge sliding window, the invention can analyze specific bacterial colonies according to the position of the edge sliding window.
Further, in some embodiments of the present invention, dividing the target communicating region according to the edge line in the edge sliding window to obtain bacterial colonies includes: connecting the center points of the two edge sliding windows closest to each other, dividing the target communicating region into at least two sub-regions, and taking each sub-region as a bacterial colony.
In the embodiment of the invention, the center point of the edge sliding window can be used as the edge point for dividing the corresponding bacterial colony, then the center points of the two nearest edge sliding windows are connected, the target communicating region is divided into at least two sub-regions, and each sub-region is used as one bacterial colony.
Therefore, the to-be-detected communicating domain except the target communicating domain is taken as a single bacterial colony, the target communicating domain is the communicating domain with a plurality of bacterial colonies adhered, then the target communicating domain is divided, and the communicating domain with the adhesion is divided to obtain the corresponding bacterial colony, so that the bacterial colony can be more accurately and effectively divided.
According to the invention, the colony area is determined by acquiring the gray level image on the surface of the culture medium, then, the connected domain is analyzed and the connected domain is segmented based on the sliding window which is not overlapped and is preset in size, so that an initial sliding window is obtained, a target sliding window is selected from the initial sliding window through the gray level values of pixels in the initial sliding window and the connected domain to be detected, it can be understood that bacterial colonies are scattered on the outer side and a plurality of colonies are adhered to each other, when the colonies are adhered to each other, the edge area in the middle is fuzzy due to the distribution of hypha, the corresponding edge information is less, and the effect obtained by directly using the color lump analysis processing is poor; because the single communicating domain to be detected can be a colony or a combination of a plurality of colonies, the invention combines the area information of the communicating domain to be detected and the number and position distribution of the target sliding windows in the communicating domain to be detected to determine the communicating domain analysis index, and screens the target communicating domain from the communicating domain to be detected, thereby accurately screening the target communicating domain containing a plurality of colonies, further determining the edge sliding window according to the distance between the sliding windows to be segmented in the target communicating domain, dividing the target communicating domain based on the edge sliding window, so that the mutually adhered colonies can be effectively divided, and combining the originally singly distributed communicating domain to be detected to obtain bacterial colonies.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.

Claims (10)

1. A method for precisely dividing bacterial colonies based on image features, the method comprising:
acquiring a culture medium surface gray level image, and determining a colony area of the culture medium surface gray level image based on a threshold segmentation mode;
carrying out connected domain analysis on the colony area, determining a connected domain to be detected, dividing the connected domain based on sliding windows which are not overlapped and have preset sizes, obtaining an initial sliding window, and selecting a target sliding window from the initial sliding window according to gray values of pixels in the initial sliding window and the connected domain to be detected;
determining a connected domain analysis index of each connected domain to be detected according to the area of each connected domain to be detected, the areas of all the target sliding windows in the connected domain to be detected and the position distribution of the target sliding windows; screening out a target connected domain from the connected domain to be detected according to the connected domain analysis index;
taking all other target sliding windows except the outermost target sliding window in the target communication domain as sliding windows to be segmented; according to the distance between the sliding window to be segmented and the nearest preset number of other sliding windows to be segmented, selecting an edge sliding window from the sliding windows to be segmented;
dividing the target communicating domain according to the central point in the edge sliding window to obtain bacterial colonies, and taking each communicating domain to be tested except the target communicating domain as one bacterial colony.
2. The method for precisely dividing bacterial colonies based on image features according to claim 1, wherein selecting a target sliding window from the initial sliding window according to gray values of pixels in the connected domain to be measured and the initial sliding window comprises:
taking the normalized value of the gray value information entropy of all pixel points in the initial sliding window as the chaotic degree of the sliding window;
taking the average value of the gray values of all the pixel points in the initial sliding window as a sliding window average value, and taking the standard deviation of the gray values of all the pixel points in the initial sliding window as a sliding window standard deviation; calculating the product of the sliding window mean value and the sliding window standard deviation as a sliding window characteristic parameter;
taking the average value of the gray values of all the pixel points in the connected domain to be measured as the average value to be measured, and taking the standard deviation of the gray values of all the pixel points in the connected domain to be measured as the standard deviation to be measured; calculating the product of the mean value to be measured and the standard deviation to be measured as a characteristic parameter to be measured;
determining a sliding window mutation coefficient according to the sliding window characteristic parameter and the characteristic parameter to be detected;
calculating the product of the sliding window confusion degree and the sliding window mutation coefficient as a sliding window screening coefficient;
a target sliding window is selected from the initial sliding windows according to the sliding window screening coefficients of each initial sliding window.
3. The method for precisely dividing bacterial colonies based on image features according to claim 2, wherein determining a sliding window mutation coefficient according to the sliding window feature parameter and the feature parameter to be measured comprises:
calculating the absolute value of the difference between the sliding window characteristic parameter and the characteristic parameter to be measured as a characteristic difference;
and determining a sliding window mutation coefficient according to the characteristic difference and the characteristic parameter to be detected, wherein the characteristic difference and the sliding window mutation coefficient are in positive correlation, the characteristic parameter to be detected and the sliding window mutation coefficient are in negative correlation, and the value of the sliding window mutation coefficient is a normalized value.
4. The method of claim 2, wherein said selecting a target sliding window from said initial sliding windows based on said sliding window screening factor for each initial sliding window comprises:
and taking the initial sliding window with the sliding window screening coefficient larger than a preset screening coefficient threshold value as a target sliding window.
5. The method for precisely dividing bacterial colonies based on image features according to claim 1, wherein determining a connected domain analysis index of each connected domain to be measured according to an area of the connected domain to be measured, areas of all the target sliding windows in the connected domain to be measured, and a position distribution of the target sliding windows comprises:
calculating the ratio of the area of the communication domain to be detected to the area of all the target sliding windows in the communication domain to be detected as an area influence coefficient;
taking any target sliding window in the communication domain to be analyzed as a sliding window to be analyzed; determining the center point of the target sliding window closest to the center point of the sliding window to be analyzed, and taking the normalized value of the distance value between the two center points as the distance index of the sliding window to be analyzed; taking the average value of the distance indexes of all the target sliding windows as a distance influence coefficient;
and taking a normalized value of the product of the area influence coefficient and the distance influence coefficient as the connected domain analysis index.
6. The method for precisely dividing bacterial colonies based on image features according to claim 1, wherein the screening the target connected domain from the connected domain to be measured according to the connected domain analysis index comprises:
and taking the connected domain to be detected, of which the connected domain analysis index is smaller than a preset index threshold value, as a target connected domain.
7. The method for precisely dividing bacterial colonies based on image features according to claim 1, wherein the step of screening the edge sliding window from the sliding windows to be divided according to the distance between the sliding window to be divided and the nearest preset number of other sliding windows to be divided comprises the steps of:
taking the sum of the distances between a preset number of other sliding windows to be segmented, which are closest to any sliding window to be segmented, as a segmentation distance sum;
normalizing the segmentation distance and the value to obtain an edge selection index;
and screening the edge sliding window from the sliding windows to be segmented according to the edge selection indexes of all the sliding windows to be segmented.
8. The method for precisely dividing bacterial colonies based on image features according to claim 7, wherein the step of screening the sliding window for edges from the sliding window for segmentation according to the edge selection indexes of all the sliding windows for segmentation comprises the steps of:
and taking the sliding window to be segmented, of which the edge selection index is smaller than a preset edge threshold value, as an edge sliding window.
9. The method for precisely dividing the bacterial colony based on the image features as set forth in claim 1, wherein the dividing the target connected domain according to the edge line in the edge sliding window to obtain the bacterial colony comprises:
connecting the center points of the two nearest edge sliding windows, dividing the target communicating region into at least two sub-regions, and taking each sub-region as a bacterial colony.
10. The method for precisely dividing bacterial colonies based on image features according to claim 7, wherein the preset number is 10.
CN202311534168.6A 2023-11-17 2023-11-17 Accurate bacterial colony dividing method based on image features Active CN117274293B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311534168.6A CN117274293B (en) 2023-11-17 2023-11-17 Accurate bacterial colony dividing method based on image features

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311534168.6A CN117274293B (en) 2023-11-17 2023-11-17 Accurate bacterial colony dividing method based on image features

Publications (2)

Publication Number Publication Date
CN117274293A true CN117274293A (en) 2023-12-22
CN117274293B CN117274293B (en) 2024-03-15

Family

ID=89219943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311534168.6A Active CN117274293B (en) 2023-11-17 2023-11-17 Accurate bacterial colony dividing method based on image features

Country Status (1)

Country Link
CN (1) CN117274293B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117649407A (en) * 2024-01-29 2024-03-05 深圳三方圆检测监管服务有限公司 Food quality detection method, equipment, system and storage medium

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024259A (en) * 2010-12-24 2011-04-20 刘安安 Bacterial colony automatic detection method
CN102676633A (en) * 2012-03-08 2012-09-19 天津大学 Method for automatically counting bacterial colonies
CN109102514A (en) * 2018-08-16 2018-12-28 广东工业大学 A kind of image partition method, device, equipment and computer readable storage medium
CN111178173A (en) * 2019-12-14 2020-05-19 杭州电子科技大学 Target colony growth characteristic identification method
WO2020107716A1 (en) * 2018-11-30 2020-06-04 长沙理工大学 Target image segmentation method and apparatus, and device
CN112614062A (en) * 2020-12-17 2021-04-06 北京陆桥技术股份有限公司 Bacterial colony counting method and device and computer storage medium
CN113256580A (en) * 2021-05-20 2021-08-13 北京朴清科技有限公司 Automatic identification method for target colony characteristics
CN115131358A (en) * 2022-09-01 2022-09-30 南通永安纺织有限公司 Quilt cover suture defect identification method
CN115266736A (en) * 2022-09-29 2022-11-01 江苏宸洋食品有限公司 Quick identification method for mildew of murcott
CN115294044A (en) * 2022-07-28 2022-11-04 上海市农业科学院 Method for acquiring phenotype of edible fungus hyphae
CN115345893A (en) * 2022-09-15 2022-11-15 吉林大学中日联谊医院 Ovarian tissue canceration region segmentation method based on image processing
CN115578732A (en) * 2022-11-21 2023-01-06 山东爱福地生物股份有限公司 Label identification method for fertilizer production line
WO2023134792A2 (en) * 2022-12-15 2023-07-20 苏州迈创信息技术有限公司 Led lamp wick defect detection method
US20230252630A1 (en) * 2022-02-10 2023-08-10 Canon Kabushiki Kaisha Cell image analysis method and non-transitory storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024259A (en) * 2010-12-24 2011-04-20 刘安安 Bacterial colony automatic detection method
CN102676633A (en) * 2012-03-08 2012-09-19 天津大学 Method for automatically counting bacterial colonies
CN109102514A (en) * 2018-08-16 2018-12-28 广东工业大学 A kind of image partition method, device, equipment and computer readable storage medium
WO2020107716A1 (en) * 2018-11-30 2020-06-04 长沙理工大学 Target image segmentation method and apparatus, and device
CN111178173A (en) * 2019-12-14 2020-05-19 杭州电子科技大学 Target colony growth characteristic identification method
CN112614062A (en) * 2020-12-17 2021-04-06 北京陆桥技术股份有限公司 Bacterial colony counting method and device and computer storage medium
CN113256580A (en) * 2021-05-20 2021-08-13 北京朴清科技有限公司 Automatic identification method for target colony characteristics
US20230252630A1 (en) * 2022-02-10 2023-08-10 Canon Kabushiki Kaisha Cell image analysis method and non-transitory storage medium
CN115294044A (en) * 2022-07-28 2022-11-04 上海市农业科学院 Method for acquiring phenotype of edible fungus hyphae
CN115131358A (en) * 2022-09-01 2022-09-30 南通永安纺织有限公司 Quilt cover suture defect identification method
CN115345893A (en) * 2022-09-15 2022-11-15 吉林大学中日联谊医院 Ovarian tissue canceration region segmentation method based on image processing
CN115266736A (en) * 2022-09-29 2022-11-01 江苏宸洋食品有限公司 Quick identification method for mildew of murcott
CN115578732A (en) * 2022-11-21 2023-01-06 山东爱福地生物股份有限公司 Label identification method for fertilizer production line
WO2023134792A2 (en) * 2022-12-15 2023-07-20 苏州迈创信息技术有限公司 Led lamp wick defect detection method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
刘定操: "基于高光谱图像分割的固态发酵中不同杆菌的识别方法", 《现代食品科技》, vol. 35, no. 9, pages 317 - 321 *
李金燕 等: "罗伊氏菌素对产气荚膜梭菌的体外抑制作用", 《广东畜牧兽医科技》, vol. 48, no. 1, pages 29 - 34 *
蔡曼珊 等: "消毒剂种类和添加时间对鸡场水线消毒效果的比较 消毒效果的比较", 《中国家禽》, vol. 39, no. 23, pages 67 - 69 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117649407A (en) * 2024-01-29 2024-03-05 深圳三方圆检测监管服务有限公司 Food quality detection method, equipment, system and storage medium
CN117649407B (en) * 2024-01-29 2024-05-14 深圳三方圆检测监管服务有限公司 Food quality detection method, equipment, system and storage medium

Also Published As

Publication number Publication date
CN117274293B (en) 2024-03-15

Similar Documents

Publication Publication Date Title
CN115829883B (en) Surface image denoising method for special-shaped metal structural member
CN110097034B (en) Intelligent face health degree identification and evaluation method
AU2016250791B2 (en) Colony contrast gathering
CN115294113B (en) Quality detection method for wood veneer
CN108711158B (en) Pointer instrument image identification method based on contour fitting and radial segmentation
CN117274293B (en) Accurate bacterial colony dividing method based on image features
CN115018844B (en) Plastic film quality evaluation method based on artificial intelligence
CN115170572B (en) BOPP composite film surface gluing quality monitoring method
CN116092013B (en) Dangerous road condition identification method for intelligent monitoring
CN113723573A (en) Tumor tissue pathological classification system and method based on adaptive proportion learning
CN116645367B (en) Steel plate cutting quality detection method for high-end manufacturing
CN101162503A (en) Method for extracting and recognizing human ear characteristic by improved Hausdorff distance
CN103034838A (en) Special vehicle instrument type identification and calibration method based on image characteristics
CN115359053B (en) Intelligent detection method and system for defects of metal plate
CN115994907B (en) Intelligent processing system and method for comprehensive information of food detection mechanism
CN116137036B (en) Gene detection data intelligent processing system based on machine learning
CN116309599B (en) Water quality visual monitoring method based on sewage pretreatment
CN116246174B (en) Sweet potato variety identification method based on image processing
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN117557820B (en) Quantum dot optical film damage detection method and system based on machine vision
CN116758074B (en) Multispectral food image intelligent enhancement method
CN115018835B (en) Automobile starter gear detection method
CN118172380B (en) Orthopedics leg bone intelligent recognition segmentation method based on local threshold
CN107516315B (en) Tunneling machine slag tapping monitoring method based on machine vision
CN116757972A (en) Fabric defect detection method capable of resisting influence of shadow noise

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant