High-precision rod-shaped bacterial cell length measuring method

By employing the Omnipose algorithm and smooth curve skeleton technology, the accuracy and efficiency issues in measuring the length of rod-shaped bacterial cells have been resolved, enabling high-precision, rapid, and automated cell length measurement and advancing cell biology research.

CN121933335APending Publication Date: 2026-04-28广州一微生物科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
广州一微生物科技有限公司
Filing Date
2024-04-17
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing technologies for measuring the length of rod-shaped bacterial cells suffer from low accuracy, cumbersome operation, and high cost, especially for adhesive cells and cells of different morphologies, where measurement results are prone to errors.

Method used

The Omnipose algorithm is used to segment bacterial cell images to obtain mask and flow field images. The length of the cytoskeleton is calculated by extending a smooth curve skeleton to the cell edge. Combined with the Prim algorithm and curve fitting algorithm, high-precision automated measurement is achieved.

Benefits of technology

This paper presents a high-precision, rapid, and automated method for measuring the length of rod-shaped bacterial cells, which is suitable for batch processing, improves measurement efficiency and accuracy, and supports cell morphology research.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121933335A_ABST
    Figure CN121933335A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of cell measurement, and discloses a high-precision rod-shaped bacterial cell length measurement method, which comprises the following steps: S101, segmenting an image containing bacterial cells to be measured to obtain a mask image and a flow field image; s102, separating a mask and a flow field of each bacterial cell in the mask image and the flow field image to obtain a mask of a single bacterial cell and a flow field of a single bacterial cell; s103, respectively acquiring a smooth curve skeleton of each bacterial cell based on the mask and the flow field; s104, extending the smooth curve skeleton to the edge of the cell to obtain a cytoskeleton; and S105, calculating the length of the cytoskeleton. The high-precision rod-shaped bacterial cell length measurement method provides a high-precision, rapid and automatic solution for rod-shaped bacterial cell length measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cell measurement, and more particularly to a high-precision method for measuring the length of rod-shaped bacterial cells. Background Technology

[0002] A crucial part of detecting cell size and morphology is measuring cell length, which is also an important parameter in cell morphology research and is of great significance for understanding cell structure, function, and physiological state.

[0003] Currently, there are various methods for measuring cell length. One method is to observe and measure cell length using an optical microscope. This involves measuring cell length under a microscope using an eyepiece and objective lens. However, this requires staining or optical sectioning to observe cell morphology, affecting cell viability and morphology; measurement accuracy requires high microscope resolution, and the process involves human intervention, is cumbersome, and accuracy is difficult to guarantee and is easily affected by human factors such as fatigue and misreading.

[0004] Flow cytometry is an instrument that measures cell properties by observing the flow of cells in a liquid. Flow cytometry can acquire a wealth of cell information, including length. This method is suitable for high-throughput measurements of large numbers of cells. However, it requires specialized equipment such as a flow cytometer, which is costly; it is not suitable for observing cell morphology; and the measurement results may have some errors for adherent cells and cells of different morphologies.

[0005] Therefore, there is an urgent need for a high-precision method for measuring the length of rod-shaped bacterial cells to meet the requirements of high precision, high efficiency, and ease of operation. Summary of the Invention

[0006] The purpose of this invention is to disclose a high-precision method for measuring the length of rod-shaped bacterial cells, thereby solving the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] This invention provides a high-precision method for measuring the length of rod-shaped bacterial cells, comprising:

[0009] S101, the image containing the bacterial cells to be measured is segmented to obtain a mask image and a flow field image;

[0010] S102, Separate the mask and flow field of each bacterial cell in the mask image and flow field image to obtain the mask and flow field of a single bacterial cell;

[0011] S103, based on mask and flow field, obtains the smooth curve skeleton of each bacterial cell;

[0012] S104 extends the smooth curved skeleton to the cell edge to obtain the cytoskeleton;

[0013] S105, calculate the length of the cytoskeleton.

[0014] Optionally, S101 includes:

[0015] S1011 is used to stain bacterial cells, and the stained bacterial cells are photographed to obtain bright-field fluorescence images;

[0016] S1012 uses the Omnipose algorithm to calculate the bright-field fluorescence image, obtaining the mask image and flow field image.

[0017] Optionally, S1011 includes:

[0018] Cultured bacterial cells were stained with DAPI nuclear staining and FM4-64 membrane staining. Bright-field fluorescence images were obtained by photographing the stained bacterial cells using a microscope camera.

[0019] Optionally, S102 includes:

[0020] S1021, Segment the mask image and obtain the set of coordinates of the mask for each bacterial cell in the mask image;

[0021] S1022, In the flow field image, the region consisting of the pixels corresponding to the coordinates of the mask coordinates of each bacterial cell is taken as the flow field corresponding to that bacterial cell.

[0022] Optionally, S103 includes:

[0023] S1031, clear the pixels in the flow field to obtain the flow field after pixel clearing;

[0024] S1032, Perform pixel inversion processing on the pixels in the mask to obtain an inverted mask;

[0025] S1033, the pixel-cleared flow field is subtracted from the inverted mask to obtain a central skeleton composed of continuous scattered points;

[0026] S1034 uses the Prim algorithm to process the scattered points and obtain a smooth curve skeleton.

[0027] Optionally, S1034 includes:

[0028] Using the distance between scattered points as the weights of the Prim algorithm, the scattered points are connected using the Prim algorithm to obtain a smooth curve skeleton.

[0029] Optionally, S104 includes:

[0030] S1041, determine each point in the smooth curve skeleton and obtain the endpoints;

[0031] S1042, each endpoint is processed as follows to obtain the cytoskeleton:

[0032] A curve fitting algorithm is used to fit points near the endpoints to obtain a fitted curve, and the fitted curve is extended to the cell edge.

[0033] Optionally, S1041 includes:

[0034] For a point b in the skeleton of a smooth curve, the process of determining whether b is an endpoint is as follows:

[0035] Points in the smooth curve skeleton whose distance from b is less than one-tenth of the length of the smooth curve skeleton are considered as adjacent points of b.

[0036] Calculate the angle between the vectors formed by each adjacent point and b;

[0037] If all included angles are less than the preset angle threshold, then b is an endpoint; otherwise, b is not an endpoint.

[0038] Optionally, S105 includes:

[0039] A contour extraction algorithm is used to calculate the cytoskeleton and obtain the cytoskeleton contour;

[0040] Calculate the length of the cytoskeleton outline.

[0041] Beneficial effects:

[0042] This invention provides a high-precision, rapid, and automated solution for measuring the length of rod-shaped bacterial cells. This innovative method allows for batch processing of large numbers of rod-shaped bacterial cell images and precise calculation of cell length. The application of this method will provide a convenient, efficient, and reliable tool for cell morphology research and related experiments. Accurate measurement of cell length is crucial for understanding cell structure, function, and physiological state. The precise length information obtained through this method helps reveal the correlation between cell morphological changes and functional properties, thus advancing research in the field of cell biology. Attached Figure Description

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

[0044] Figure 1 This is a schematic diagram of a high-precision method for measuring the length of rod-shaped bacterial cells according to the present invention. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0046] like Figure 1 As shown in one embodiment, the present invention provides a high-precision method for measuring the length of rod-shaped bacterial cells, comprising:

[0047] S101, the image containing the bacterial cells to be measured is segmented to obtain a mask image and a flow field image;

[0048] S102, Separate the mask and flow field of each bacterial cell in the mask image and flow field image to obtain the mask and flow field of a single bacterial cell;

[0049] S103, based on mask and flow field, obtains the smooth curve skeleton of each bacterial cell;

[0050] S104 extends the smooth curved skeleton to the cell edge to obtain the cytoskeleton;

[0051] S105, calculate the length of the cytoskeleton.

[0052] The above-described process enables high-precision measurement of bacterial cell length in batches, effectively improving measurement efficiency.

[0053] Optionally, S101 includes:

[0054] S1011 is used to stain bacterial cells, and the stained bacterial cells are photographed to obtain bright-field fluorescence images;

[0055] S1012 uses the Omnipose algorithm to calculate the bright-field fluorescence image, obtaining the mask image and flow field image.

[0056] The Omnipose algorithm is an advanced deep neural network image segmentation algorithm designed to solve the problem of high-precision segmentation of bacterial cells while maintaining independence from cell morphology. This algorithm is particularly suitable for handling samples that pose a challenge to existing algorithms, such as mixed bacterial cultures, antibiotic-treated cells, and cells with elongated or branched morphologies.

[0057] The core of the Omnipose algorithm lies in its unique network outputs, such as the gradient of the distance field. This allows it to accurately segment cells, even when current algorithms, including its predecessor Cellpose, produce errors. The distance field is a scalar field that describes the shortest distance from any point in a bounded region to the boundary. Omnipose uses this distance field to define a new flow field, which is used within the Cellpose framework to improve the identification and segmentation of cell boundaries.

[0058] The field is uniformly transmitted from the periphery to the center of the cell along the cell boundary and completely coincides with the skeleton defined by the static point at the distance of the field.

[0059] Optionally, S1011 includes:

[0060] Cultured bacterial cells were stained with DAPI nuclear staining and FM4-64 membrane staining. Bright-field fluorescence images were obtained by photographing the stained bacterial cells using a microscope camera.

[0061] Optionally, the Omnipose algorithm is used to calculate the mask image from the bright-field fluorescence image, including:

[0062] The bright-field fluorescence image is preprocessed to obtain a preprocessed image;

[0063] The Omnipose algorithm is used to calculate the mask image from the preprocessed image.

[0064] Preprocessing before acquiring the mask image can effectively reduce and avoid the impact of noise in the image on the calculation process of the Omnipose algorithm, thus obtaining a more accurate mask image.

[0065] Optionally, the bright-field fluorescence image is preprocessed to obtain a preprocessed image, including:

[0066] Obtain the grayscale image P corresponding to the bright-field fluorescence image;

[0067] Perform boundary detection on P to obtain the set of pixels UE that belong to the image boundary;

[0068] The set of boundaries obtained based on the UE is called UEG;

[0069] Obtain the filtered values:

[0070]

[0071] ordval represents the filtered value, NUEG represents the number of boundaries in UEG, NUE represents the number of pixels in UE, and length... iλ represents the length of boundary i in UEG, mslength represents the average length of the boundaries in UEG, and λ represents the set calculation weight.

[0072] Determine the filter type for each pixel in P;

[0073] Each pixel in P is filtered based on the filter type and the calculated filter value to obtain a preprocessed image.

[0074] The preprocessing process of this invention differs from existing processes. In existing technologies, after obtaining P, a filtering algorithm is typically used directly to filter P to obtain a preprocessed image. However, this algorithm does not consider the continuity of boundaries in P, potentially leading to filtering of areas far from image boundaries (i.e., cell edges in this invention). This results in a lack of effective reference data, affecting the accuracy of the filtering. Therefore, this invention comprehensively determines the filtering order and the specific filtering algorithm used by considering both the calculated filtering value and the filtering type. This ensures that pixels filtered first receive more effective reference data, leading to a more accurate filtering result.

[0075] Specifically, the filter calculation value is obtained by comprehensively calculating the number of boundaries and the variance of the boundary length. The more boundaries there are and the greater the variance of the boundary length, the more severe the breakage of cell edges caused by noise. This allows the present invention to further combine the filter type to select a suitable filter algorithm for correct filtering.

[0076] Optionally, the weight is calculated as 0.4.

[0077] Optionally, the set of boundaries obtained by the UE, UEG, includes:

[0078] Use interconnected pixels in the UE as a boundary, and store the resulting boundary in the set UEG.

[0079] Since most of the pixels in the image boundary are pixels at the cell edge, the edge of each bacterial cell can form at least one boundary.

[0080] Optionally, determine the filtering type for each pixel in P, including:

[0081] For pixel q in P, calculate the filter type parameter typval of q. q :

[0082]

[0083] Nbg qNeg represents the number of pixels with gray values ​​smaller than q within a square area of ​​length H centered at q. q Dteg represents the number of pixels belonging to the UE contained within a square area of ​​length H centered at q. q represents the minimum distance between q and the pixel in UE, K represents the length of P, and d1, d2 and d3 represent the first quantity weight, the second quantity weight and the distance weight set respectively;

[0084] If typval q If the value is greater than the set filter type parameter threshold, then the filter type of q is the first type; otherwise, the filter type of q is the second type.

[0085] The filter type parameter is calculated by combining two factors: the difference in grayscale values ​​between the pixel and its surrounding pixels, and the degree of influence of image boundaries on the pixel's filtering effect. q The larger the value of Dteg, the better. q The smaller the value, the greater the influence of image boundaries on pixel filtering. The greater the difference in grayscale values, the greater the influence of image boundaries on pixel filtering; therefore, a larger filter type parameter indicates that filtering is performed more preferentially. This allows pixels with more effective reference data to be filtered earlier, providing more effective parameter data for the filtering process of pixels using other filter types, resulting in more accurate filtering results.

[0086] Optionally, the first quantity weight, the second quantity weight, and the distance weight are 0.4, 0.3, and 0.3, respectively.

[0087] Optionally, the threshold for the filter type parameter can be set to 0.8.

[0088] Optionally, each pixel in P is filtered based on the filter type and the calculated filter value to obtain a preprocessed image, including:

[0089] If the calculated filtered value is less than or equal to the set threshold for the calculated filtered value, then:

[0090] In P, the NL-means algorithm is used to filter the pixels of the first type to obtain image PO;

[0091] A linear filtering algorithm is used to filter the pixels of type 2 in the image PO to obtain a preprocessed image;

[0092] If the calculated filtered value is greater than the set threshold for the calculated filtered value, then:

[0093] In P, a guided filtering algorithm is used to filter the pixels of type 1 to obtain image PO;

[0094] The Gauss filtering algorithm is used to filter the pixels of type 2 in the image PO to obtain the preprocessed image.

[0095] This invention selects different types of filtering algorithms for pixels of different filtering types based on the filtered calculation value. The smaller the filtered calculation value, the lower the degree of noise in the image.

[0096] The larger the calculated value, the lower the filtering efficiency but the stronger the filtering capability is. The smaller the calculated value, the higher the filtering efficiency but the weaker the filtering capability is. This achieves a balance between filtering efficiency and filtering accuracy.

[0097] Optionally, the threshold value for the filter calculation can be set to 0.6.

[0098] Optionally, boundary detection is performed on P, including:

[0099] The Prewitt algorithm is used to perform boundary detection on P.

[0100] Optionally, S102 includes:

[0101] S1021, Segment the mask image and obtain the set of coordinates of the mask for each bacterial cell in the mask image;

[0102] S1022, In the flow field image, the region consisting of the pixels corresponding to the coordinates of the mask coordinates of each bacterial cell is taken as the flow field corresponding to that bacterial cell.

[0103] The mask output by the fluorescent cell image corresponds one-to-one with the position of a single bacterial cell in the flow field. The flow field of a single bacterial cell can be better segmented through the mask.

[0104] Optionally, the mask image is segmented to obtain a set of coordinates of the mask for each bacterial cell in the mask image, including:

[0105] Obtain connected components from the mask image;

[0106] The connected components are classified according to the gray values ​​of the pixels in the connected components. The connected components with a gray value of 0 are stored in set U1, and the connected components with a gray value of 255 are stored in set U2.

[0107] Let N1 and N2 represent the number of connected components in U1 and U2, respectively. If N1 is greater than N2, then the connected components in U1 are used as a mask for bacterial cells.

[0108] If N1 is less than N2, then the connected components in U2 are used as a mask for bacterial cells;

[0109] If N1 equals N2, then the following judgment is made:

[0110] If the largest connected component is in U1, then the connected component in U2 is used as the mask for the bacterial cell; if the largest connected component is in U2, then the connected component in U1 is used as the mask for the bacterial cell.

[0111] Obtain the set of coordinates of the mask for each bacterial cell.

[0112] In a mask image, pixels have a grayscale value of either 0 or 255. Existing segmentation techniques generally default to using pixels with a grayscale value of 255 as the mask region's pixels. However, this approach does not consider the possibility that pixels with a grayscale value of 0 might also be used as mask region pixels. Therefore, the above segmentation process improves upon existing methods. Regardless of the grayscale value of the pixels used as mask region pixels, this invention can correctly identify the mask region, and it is not limited by the specific form of the mask image, thereby expanding the applicability of this invention.

[0113] Specifically, since this invention measures the length of multiple bacterial cells simultaneously, the number of bacterial cell masks in the mask image is significantly greater than 1. Therefore, by comparing masks with different gray values, the set with the most connected components is the set where the bacterial cell mask is located, thereby determining which gray value pixel was used as the pixel of the connected component.

[0114] In addition, the present invention also takes into account the situation where, due to inaccurate acquisition process, holes appear inside the mask of bacterial cells during the acquisition of mask images, resulting in an abnormal number of connected components. Therefore, by comparing the areas of connected components, the region belonging to the background in the mask image is the largest connected component, thereby accurately determining the region of the mask corresponding to the bacterial cell.

[0115] Optionally, S103 includes:

[0116] S1031, clear the pixels in the flow field to obtain the flow field after pixel clearing;

[0117] S1032, Perform pixel inversion processing on the pixels in the mask to obtain an inverted mask;

[0118] S1033, the pixel-cleared flow field is subtracted from the inverted mask to obtain a central skeleton composed of continuous scattered points;

[0119] S1034 uses the Prim algorithm to process the scattered points and obtain a smooth curve skeleton.

[0120] Specifically, in S1031, the changes in pixel gradients in the flow field were observed, with the pixel color depth changing from the cell edges to the skeleton. Thresholds were selected based on different gradients, and the differences in pixel removal effects were analyzed. The optimal threshold was chosen, and the flow field underwent final pixel removal processing. The pixel removal method used is existing technology.

[0121] Optionally, S1034 includes:

[0122] Using the distance between scattered points as the weights of the Prim algorithm, the scattered points are connected using the Prim algorithm to obtain a smooth curve skeleton.

[0123] The central skeleton is composed of a large number of continuous scattered points. To connect the skeleton into a smooth curved skeleton, the Prim algorithm is used to connect the scattered points.

[0124] Randomly select a scattered point. Divide this point into the connected set, and divide the remaining scattered points into the unconnected set.

[0125] By iterating through the coordinates of the scattered points in the two sets and applying the distance formula, we obtain the distance set between the scattered points in the two sets, and then obtain the coordinates of the two points that generate the minimum distance.

[0126] Update the set and repeat the operation until the connection order of all scattered points is generated.

[0127] Connect all the scattered points in the obtained connection order to generate a smooth curve skeleton.

[0128] Optionally, S104 includes:

[0129] S1041, determine each point in the smooth curve skeleton and obtain the endpoints;

[0130] S1042, each endpoint is processed as follows to obtain the cytoskeleton:

[0131] A curve fitting algorithm is used to fit points near the endpoints to obtain a fitted curve, and the fitted curve is extended to the cell edge.

[0132] Specifically, linear fitting is used, and the equation of the best-fit line is determined by the least squares method.

[0133] Iterate through the two endpoints, obtain the coordinates of adjacent points, and perform a line fitting using the least squares method based on the obtained pixel coordinates, then calculate the slope of the fitted line. Calculate the four points where the resulting line equation intersects the lines x = width, y = height, x = 0, and y = 0, where width and height are the width and height of the image, respectively. Also calculate the vectors between endpoint A and its nearest point B. The vectors of the endpoints and the four points C to be found The cosine of the angle between the two vectors is used to determine the extension direction, indicating that the angle must be greater than the angle threshold. This eliminates two points outside the extension direction. Finally, the closer point among the remaining two is selected as the image edge extension point. The cell boundary map is extracted from the mask. The point where the line connecting the endpoints of the skeleton and the image extension point intersects the cell boundary is the final extension point. Finally, the endpoints and the final extension point are connected to obtain the final cytoskeleton.

[0134] Optionally, points near the endpoints are those whose distance from the endpoints is less than one-tenth of the length of the smooth curve skeleton.

[0135] Optionally, S1041 includes:

[0136] For a point b in the skeleton of a smooth curve, the process of determining whether b is an endpoint is as follows:

[0137] Points in the smooth curve skeleton whose distance from b is less than one-tenth of the length of the smooth curve skeleton are considered as adjacent points of b.

[0138] Calculate the angle between the vectors formed by each adjacent point and b;

[0139] If all included angles are less than the preset angle threshold, then b is an endpoint; otherwise, b is not an endpoint.

[0140] Optionally, S105 includes:

[0141] A contour extraction algorithm is used to calculate the cytoskeleton and obtain the cytoskeleton contour;

[0142] Calculate the length of the cytoskeleton outline.

[0143] In the above process, the calculated length is the length of the bacterial cell.

[0144] When calculating the length, the minimum bounding rectangle of the cytoskeleton outline can be obtained, and the length of the minimum bounding rectangle can be used as the length of the cytoskeleton outline.

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

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

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

[0148] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope parameters of the technical solutions of the embodiments of the present invention.

Claims

1. A high-precision method for measuring the length of rod-shaped bacterial cells, characterized in that, include: S101, the image containing the bacterial cells to be measured is segmented to obtain a mask image and a flow field image; S102, Separate the mask and flow field of each bacterial cell in the mask image and flow field image to obtain the mask and flow field of a single bacterial cell; S103, based on mask and flow field, obtains the smooth curve skeleton of each bacterial cell; S104 extends the smooth curved skeleton to the cell edge to obtain the cytoskeleton; S105, calculate the length of the cytoskeleton.

2. The high-precision method for measuring the length of rod-shaped bacterial cells according to claim 1, characterized in that, S101 includes: S1011 is used to stain bacterial cells, and the stained bacterial cells are photographed to obtain bright-field fluorescence images; S1012 uses the Omnipose algorithm to calculate the bright-field fluorescence image, obtaining the mask image and flow field image.

3. The method for measuring the length of rod-shaped bacterial cells according to claim 2, characterized in that, S1011 includes: Cultured bacterial cells were stained with DAPI nuclear staining and FM4-64 membrane staining. Bright-field fluorescence images were obtained by photographing the stained bacterial cells using a microscope camera.

4. The high-precision method for measuring the length of rod-shaped bacterial cells according to claim 1, characterized in that, S102 includes: S1021, Segment the mask image and obtain the set of coordinates of the mask for each bacterial cell in the mask image; S1022, In the flow field image, the region consisting of the pixels corresponding to the coordinates of the mask coordinates of each bacterial cell is taken as the flow field corresponding to that bacterial cell.

5. The high-precision method for measuring the length of rod-shaped bacterial cells according to claim 1, characterized in that, S103 includes: S1031, clear the pixels in the flow field to obtain the flow field after pixel clearing; S1032, Perform pixel inversion processing on the pixels in the mask to obtain an inverted mask; S1033, the pixel-cleared flow field is subtracted from the inverted mask to obtain a central skeleton composed of continuous scattered points; S1034 uses the Prim algorithm to process the scattered points and obtain a smooth curve skeleton.

6. The high-precision method for measuring the length of rod-shaped bacterial cells according to claim 5, characterized in that, S1034 includes: Using the distance between scattered points as the weights of the Prim algorithm, the scattered points are connected using the Prim algorithm to obtain a smooth curve skeleton.

7. The high-precision method for measuring the length of rod-shaped bacterial cells according to claim 1, characterized in that, S104 includes: S1041, determine each point in the smooth curve skeleton and obtain the endpoints; S1042, each endpoint is processed as follows to obtain the cytoskeleton: A curve fitting algorithm is used to fit points near the endpoints to obtain a fitted curve, and the fitted curve is extended to the cell edge.

8. The method for measuring the length of rod-shaped bacterial cells according to claim 1, characterized in that, S1041 includes: For a point b in the skeleton of a smooth curve, the process of determining whether b is an endpoint is as follows: Points in the smooth curve skeleton whose distance from b is less than one-tenth of the length of the smooth curve skeleton are considered as adjacent points of b. Calculate the angle between the vectors formed by each adjacent point and b; If all included angles are less than the preset angle threshold, then b is an endpoint; otherwise, b is not an endpoint.

9. The high-precision method for measuring the length of rod-shaped bacterial cells according to claim 1, characterized in that, S105 includes: A contour extraction algorithm is used to calculate the cytoskeleton and obtain the cytoskeleton contour; Calculate the length of the cytoskeleton outline.