A Cell Segmentation Method Based on Improved Threshold
By improving the threshold segmentation method, cell regions are automatically identified, which solves the error caused by manual identification and improves the efficiency and accuracy of cell culture detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, the determination of cell growth status relies on manual identification, which is time-consuming, labor-intensive, and prone to subjective errors, thus affecting the quality of cell culture.
A cell segmentation method based on an improved threshold is adopted. The cell image is segmented into small patches, the average gray value is calculated for threshold segmentation, and morphological processing and contour analysis are combined to automatically identify cell regions and calculate the area ratio.
It enables automated cell identification, reduces subjective errors, improves detection efficiency and result consistency, and lowers labor costs.
Smart Images

Figure CN116051452B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image segmentation, in particular to a cell segmentation method based on improved threshold. BACKGROUND
[0002] The development process of inactivated virus vaccine is mainly to culture virus on cell matrix, and then to kill the infectious virus by physical or chemical method while maintaining the integrity of its antigen particles, so as to make it lose pathogenicity and retain antigenicity. Inactivated vaccine can be composed of whole virus or bacteria, or can be composed of their lysed fragments as split vaccine.
[0003] Stem cell transplantation therapy is to transplant healthy stem cells into patients to repair or replace damaged cells or tissues, so as to achieve the purpose of cure. Stem cell transplantation therapy has a wide range, which can generally treat nervous system diseases, immune system diseases and other surgical diseases. Stem cells are called "universal cells" in the medical field, which can differentiate into various functional cells or tissues. The stem cells cultivated in the APSC pluripotent cell laboratory have the characteristics of "infinite" proliferation, multi-directional differentiation potential, hematopoietic support, immune regulation and self-replication. The production of inactivated vaccine and cell therapy drug requires the cultivation of qualified cells. Only by improving the quality of cells can better products be produced.
[0004] The process of culturing cells is usually divided into lag phase, logarithmic phase, stationary phase and decline phase. Lag phase: the stage in which cells adapt to culture conditions, cells do not divide in this stage. Cells usually attach within 24 hours after initial culture, and the total length of this stage depends on the growth stage and inoculation density of the cells used at the beginning of culture. Logarithmic phase: cells actively divide in this stage, which is the best time for evaluating population growth and collecting general data. The late stage of logarithmic phase is the best time to pass the cells (subculture) before cell stress caused by excessive crowding. Stationary phase: as cells reach 100% confluence, cells grow slowly in this stage, and less than 1 / 10 of cells are in active cell cycle. Cells are most vulnerable in this stage, so careful observation is needed to ensure that cells are passed before or at the beginning of this stage. Decline phase: a natural part of the cell cycle. In this stage, the number of viable cell population decreases as cell death dominates.
[0005] To produce high-quality products, the best cell production cycle needs to be processed, such as the timing of virus strain inoculation for vaccine production and the timing of cell harvesting for cell therapy. Therefore, accurate judgment of cell growth status is crucial to the quality of the entire product production, because incorrect status judgment can lead to incorrect conclusions about cell health, resulting in a significant reduction in product quality or even unqualified products.
[0006] Because cells grow too quickly, their growth needs to be monitored regularly. Manual identification not only consumes a lot of manpower and time, but also results in inconsistent results from different inspectors. In addition, human eyes are prone to fatigue, and long hours of testing can easily lead to subjective errors in the inspectors' judgments. Summary of the Invention
[0007] To address the aforementioned technical problems, this invention provides an improved threshold segmentation method based on cell images that is simple in algorithm and has high segmentation accuracy.
[0008] The technical solution of this invention to solve the above-mentioned technical problems is: a cell segmentation method based on an improved threshold, comprising the following steps:
[0009] Step 1: Input a gray background image (img) of the cell culture data;
[0010] Step 2: Divide the gray background image into several equal smaller images using Im gSplit[z];
[0011] Step 3: Calculate the average gray level of the ImgSplit[z] gray background image to obtain the feature value meangray[z];
[0012] Step 4: Perform threshold segmentation on the ImgSplit[z] grayscale image based on meangray[z];
[0013] Step 5: Based on the original grayscale image, stitch the segmented ImgSplit[z] together to obtain the image ImgMerge;
[0014] Step 6: Denoise the image ImgMerge, fill in the segmented cells using morphological processing, and remove regions that do not satisfy the region of interest based on the contour size of each connected component in the segmentation binary image;
[0015] Step 7: Calculate the area ratio of cells based on the segmentation results.
[0016] In the above-mentioned improved threshold segmentation method based on cell images, in step two, the gray background image is a rectangle with a length of cols and a width of rows. The XY coordinate axis is established with the vertex of the lower left corner of the square gray background image as the origin. The axis containing the length of the square gray background image is the X-axis, and the axis containing the width is the Y-axis. According to formula (1), the gray background image is divided into 6 rows and 6 columns, totaling 36 equal parts. The z-th small image ImgSplit[z]:
[0017] ImgSplit[z]=Img(Rect(Img.cols / 6*m,Img.rows / 6*n,Img.cols / 6,Img.rows / 6)) (1)
[0018] Where Rect(Img.cols / 6*m,Img.rows / 6*n,mg.cols / 6,Img.rows / 6) represents the starting points of the horizontal and vertical axes of the z-th small image, which are Img.cols / 6*(m-1) and Img.rows / 6*(n-1) respectively, and the length and width are Img.cols / 6 and Img.rows / 6 respectively. m represents the number of columns, corresponding to the X-axis; n represents the number of rows, corresponding to the Y-axis, m, n∈[1,6], z∈[1,36].
[0019] In the above-mentioned improved threshold segmentation method based on cell images, the formula for calculating the feature value meangray[z] in step three is as follows:
[0020]
[0021] in To calculate the sum of the gray values of each pixel in ImgSplit[z](i,j), Let ImgSplit[z](i,j) be the sum of the pixels of the image, where ImgSplit[z](i,j) represents the z-th sub-image of the image, imgSplit[z].rows represents the number of pixels in the column of the z-th sub-image, and imgSplit[z].cols represents the number of pixels in the row of the z-th sub-image, i∈[0,imgSplit[z].rows), j∈[0,imgSplit[z].cols).
[0022] In the improved threshold segmentation method based on cell images described above, the threshold segmentation formula in step four is:
[0023] ImgSplit[z]=ImgSplit[z]<(meangray[z]-th1) 5 <th1<10 (3)
[0024] th1 represents the grayscale value, and the entire formula represents thresholding for each small image.
[0025] In the above-described improved threshold segmentation method based on cell images, the stitching formula in step five is:
[0026]
[0027] ImgSplit[z] divides Img into 36 equal parts. The order of each part in the original image position is from left to right and then from top to bottom. p represents the p-th row and q represents the q-th column. ImgMerge[p] means to vertically concatenate each row according to the order. p∈[1,6], q∈[1,6].
[0028]
[0029] ImgMerge means stitching p images together horizontally in order.
[0030] In the improved threshold segmentation method based on cell images described above, the formula for calculating the area ratio (areaRatio) in step seven is as follows:
[0031]
[0032] `imgSplit[z].rows` and `imgSplit[z].cols` represent the length and width of the image, respectively. `ImgMerge` is a binary image, and `ImgMerge(i,j)` represents the grayscale value of the binary image. The region of interest (i.e., the cell portion) is set to 1, and the background is set to 0. To calculate the sum of pixels in the region of interest of the image ImgMerge, To calculate the sum of pixels in the image ImgMerge.
[0033] The beneficial effects of this invention are as follows: First, the grayscale image of cell culture data is input and divided into several equally divided smaller images, ImgSplit[z]. Then, the average grayscale of the ImgSplit[z] images is calculated to obtain the feature value meangray[z]. Next, threshold segmentation is performed on the ImgSplit[z] images based on meangray[z]. Then, the segmented ImgSplit[z] images are stitched together based on the original grayscale image to obtain the image ImgMerge. Finally, the image ImgMerge is denoised, morphological processing is used to fill in the segmented cells, and contour methods are used to remove regions that do not meet the region of interest. The area ratio of cells is calculated based on the segmentation results. This invention achieves automated cell recognition, solving not only the errors caused by subjective human judgment but also the misjudgments caused by fatigue. Furthermore, the artificial intelligence approach is low-cost, fast, and provides consistent results. Attached Figure Description
[0034] Figure 1 This is the overall flowchart of the present invention.
[0035] Figure 2 This is the original gray background image.
[0036] Figure 3 This is a segmentation result diagram obtained by the method of the present invention.
[0037] Figure 4 The final image is obtained by filling in the segmented cells after a series of morphological processing and using the contour method.
[0038] Figure 5 The segmentation map is obtained by the level set algorithm.
[0039] Figure 6 This is an Otsu's method (OTSU) segmentation diagram.
[0040] Figure 7 This is a segmentation map obtained by thresholding using the average grayscale information of the entire image as the threshold.
[0041] Figure 8 for Figure 7 The final result image is obtained through morphology and contour methods. Detailed Implementation
[0042] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0043] like Figure 1 As shown, an improved threshold segmentation method based on cell images is characterized by the following steps:
[0044] Step 1: Input a grayscale image of the cell culture data, such as... Figure 2 As shown.
[0045] Step 2: Due to the uneven grayscale distribution of the image, the image segmentation effect is poor. The segmentation results of other algorithms are shown in the figure. Figures 3-7 As shown, uneven segmentation can lead to non-interested regions being segmented as cells or cells being identified as background. Figures 5-7 This involves segmenting the cells into the background. The gray background image is then divided into several equal smaller images: Im gSplit[z].
[0046] In step two, the gray background image is a rectangle with a length of cols and a width of rows. An XY coordinate axis is established with the vertex of the lower left corner of the square gray background image as the origin. The axis containing the length of the square gray background image is the X-axis, and the axis containing the width is the Y-axis. According to formula (1), the gray background image is divided into 6 rows and 6 columns, totaling 36 equal parts. The z-th small image ImgSplit[z]:
[0047] ImgSplit[z]=Img(Rect(Img.cols / 6*m,Img.rows / 6*n,Img.cols / 6,Img.rows / 6)) (1)
[0048] Where Rect(Img.cols / 6*m,Img.rows / 6*n,mg.cols / 6,Img.rows / 6) represents the starting points of the horizontal and vertical axes of the z-th small image, which are Img.cols / 6*(m-1) and Img.rows / 6*(n-1) respectively, and the length and width are Img.cols / 6 and Img.rows / 6 respectively. m represents the number of columns, corresponding to the X-axis; n represents the number of rows, corresponding to the Y-axis, m, n∈[1,6], z∈[1,36].
[0049] Step 3: Calculate the average gray level of the ImgSplit[z] gray background image to obtain the feature value meangray[z].
[0050] The formula for calculating the eigenvalue meangray[z] is:
[0051]
[0052] in To calculate the sum of the gray values of each pixel in ImgSplit[z](i,j), Let ImgSplit[z](i,j) be the sum of the pixels of the image, where ImgSplit[z](i,j) represents the z-th sub-image of the image, imgSplit[z].rows represents the number of pixels in the column of the z-th sub-image, and imgSplit[z].cols represents the number of pixels in the row of the z-th sub-image, i∈[0,imgSplit[z].rows), j∈[0,imgSplit[z].cols).
[0053] Step 4: Threshold segmentation of the ImgSplit[z] grayscale image based on meangray[z].
[0054] The formula for threshold segmentation is:
[0055] ImgSplit[z]=ImgSplit[z]<(meangray[z]-th1) 5 <th1<10 (3)
[0056] th1 represents the grayscale value, and the entire formula represents thresholding for each small image.
[0057] Step 5: Based on the original grayscale image, stitch the segmented ImgSplit[z] images together to obtain the image ImgMerge, as shown below. Figure 4 As shown.
[0058] The splicing formula is:
[0059]
[0060] ImgSplit[z] divides Img into 36 equal parts. The order of each part in the original image position is from left to right and then from top to bottom. p represents the p-th row and q represents the q-th column. ImgMerge[p] means to vertically concatenate each row according to the order. p∈[1,6], q∈[1,6].
[0061]
[0062] ImgMerge means stitching p images together horizontally in order.
[0063] Step 6: Denoise the image ImgMerge, fill in the segmented cells using morphological processing, and remove regions that do not satisfy the region of interest based on the contour size of each connected component in the segmentation binary image.
[0064] Step 7: Calculate the area ratio of cells based on the segmentation results.
[0065] The formula for calculating the area ratio is:
[0066]
[0067] `imgSplit[z].rows` and `imgSplit[z].cols` represent the length and width of the image, respectively. `ImgMerge` is a binary image, and `ImgMerge(i,j)` represents the grayscale value of the binary image. The region of interest (i.e., the cell portion) is set to 1, and the background is set to 0. To calculate the sum of pixels in the region of interest of the image ImgMerge, To calculate the sum of pixels in the image ImgMerge, The formula can be understood as ImgMerge.rows * ImgMerge.cols.
[0068] The level set algorithm partitions the graph as follows: Figure 5 As shown, this method primarily identifies cell outlines. It can be observed that data with uneven color distribution and no clear boundaries generally fails to reveal cell outlines. The Otsu method (OTSU) segmentation diagram is shown below. Figure 6 As shown, this method completely identifies cells as background, with only a very small number of cells identified as regions of interest. The segmentation map obtained by thresholding using the average grayscale information of the entire image as the threshold is shown below. Figure 7 The image shows that most cells can be found, but a small number of cells cannot be found, such as... Figure 8 The data shown is obtained through morphological and denoising processing. It can be seen that the segmentation effect is very unsatisfactory for data without clear boundaries and with uneven grayscale distribution; some data misidentifies cells as background and vice versa.Figure 3 As shown, through a series of processes, cells can be accurately segmented.
Claims
1. A method for cell segmentation based on improved threshold, characterized in that, The method comprises the following steps: Step 1: input the gray background image img of cell culture data; Step 2: divide the gray background image into several equal small images ImgSplit[z]; Step 3: calculate the average gray value of the gray background image ImgSplit[z] to obtain a characteristic value meangray[z]; Step 4: perform threshold segmentation on the gray background image ImgSplit[z] according to the characteristic value meangray[z]; Step 5: splice the segmented ImgSplit[z] according to the original gray background image to obtain an image ImgMerge; The splicing formula is as follows: (4); Img is divided into 36 equal sub-images The arrangement order of each sub-image on the original image position is from left to right and then from top to bottom, p represents the pth row, and q represents the qth column, represents that each row is longitudinally spliced together according to the order, , ; (5); represents that p pictures are stitched together according to the order horizontally; Step 6: perform denoising on the image ImgMerge, and adopt morphological processing to fill the segmented cells and remove the regions not satisfying the region of interest according to the contour size of each connected domain of the segmented binary image; Step seven: calculate the area proportion of the cell according to the segmentation result, and the calculation formula of the area proportion is: (6); 、 respectively represent the size of the long, wide of the image, ImgMerge is a binary image, represent the gray value size of the binary image, the region of interest, i.e. the cell part is 1, and the background is 0, is the pixel sum of the region of interest of the image ImgMerge, is the pixel sum of the image ImgMerge.
2. The improved threshold-based cell segmentation method of claim 1, wherein, In the second step, the gray base map is a rectangle, the length of which is , and the width of which is . An X-Y coordinate axis is established with the top point of the lower left corner of the square gray base map as the origin, the axis of the length of the square gray base map as the X axis, and the axis of the width of the square gray base map as the Y axis. The gray base map is divided into 6 rows and 6 columns, i.e., 36 equal small maps, according to formula (1). The zth small map is ImgSplit[z]: (1); wherein represents the starting point of the horizontal axis and the vertical axis of the z-th small figure taken, respectively , the length and width are , represents the number of columns, corresponding to the X axis; n represents the number of rows, corresponding to the Y axis, .
3. The improved threshold-based cell segmentation method of claim 2, wherein, In the step 3, the calculation formula of the characteristic value meangray[z] is as follows: (2); wherein is calculated the sum of the gray values of each pixel point, is the pixel sum of the image, denotes the z-th sub-image of img, denotes the number of pixels of the z-th sub-image column, denotes the number of pixels of the z-th sub-image row, .
Citation Information
Patent Citations
Single-cell image segmentation method
CN107808381A
Intelligent cell identification method based on laser confocal microscopy technology
CN111767809A