A cell image segmentation method and device
By combining gradient and grayscale information to segment cell images, the problem of inaccurate boundary identification caused by uneven illumination and local excessive darkness in microscope cell images is solved, and more accurate cell boundary identification is achieved.
Patent Information
- Application Number
- CN202010890325.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-29
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-08-29
AI Technical Summary
Cell boundary identification based on microscope cell images in the prior art has problems of uneven illumination and local excessive darkness, resulting in inaccurate cell boundary identification.
The gradient information is used to preliminary binarize the cell image to obtain the cell area, and then the grayscale information is used to further binarize the cell area. The gradient and grayscale information are combined to segment the cell image to overcome the problems of uneven illumination and local excessive darkness, and obtain More accurate cell boundaries.
Through the combination of gradient and grayscale information, the identification accuracy of cell boundaries is significantly improved, overcoming the problems of uneven illumination and local over-darkness, making cell boundary identification more accurate.
Smart Images

Figure CN112102341B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition, and in particular to a cell image segmentation method and device thereof. Background Art
[0002] Cell boundary identification is a commonly used function in biological research and a prerequisite for calculating cell parameters. Accurate cell boundary identification is very important for experimental evaluation. Currently, cell boundary identification based on microscope cell images is one of the mainstream methods. Cell images often have uneven lighting or are too dark in some areas. In the prior art, the cell boundaries obtained by processing methods such as image pyramids have a certain deviation from the actual cell boundaries, and the cell boundary identification is not accurate enough. Summary of the invention
[0003] The embodiment of the present invention provides a cell image segmentation method, aiming to solve the problem of inaccurate cell boundary identification in the prior art.
[0004] In a first aspect, a cell image segmentation method is provided, comprising:
[0005] Performing a first binarization process on the first cell image according to the gradient information of the first cell image to obtain a second cell image including a cell region;
[0006] The first cell image is subjected to a second binarization process according to the position of the cell region to obtain a third cell image containing a cell boundary.
[0007] In a second aspect, a cell image segmentation device is provided, comprising:
[0008] A first binarization unit, configured to perform a first binarization process on the first cell image according to the gradient information of the first cell image, so as to obtain a second cell image including a cell region;
[0009] The second binarization unit is used to perform a second binarization process on the first cell image according to the position of the cell region to obtain a third cell image containing the cell boundary.
[0010] The embodiment of the present invention first binarizes the first cell image according to the gradient information of the first cell image to obtain a plurality of cell regions, and then binarizes the plurality of cell regions according to the grayscale information of the first cell image to obtain the final true cell boundary, and uses the gradient information to segment the entire first cell image and uses the grayscale information to segment the cell regions in the first cell image, thereby overcoming the problem of uneven illumination or local darkness of the cell image, and making the cell boundary identification more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0012] Figure 1 is a flow chart of a cell image segmentation method provided in Embodiment 1 of the present invention;
[0013] Figure 2 is the original first cell image taken and provided in the first embodiment of the present invention;
[0014] Figure 3 is a flow chart of segmenting a first cell image using gradient information provided in the first embodiment of the present invention;
[0015] Figure 4A is the gradient image provided by the first embodiment of the present invention;
[0016] Figure 4B is a gradient binarized image provided by the first embodiment of the present invention;
[0017] Figure 4C is the second cell image provided by Example 1 of the present invention;
[0018] Figure 5 is a flow chart of segmenting a cell region in a first cell image using grayscale information provided in Embodiment 1 of the present invention;
[0019] Figure 6 is the third cell image provided by the first embodiment of the present invention;
[0020] Figure 7 The first cell image showing highlighted cell boundaries provided by the first embodiment of the present invention;
[0021] Figure 8 It is a structural block diagram of a cell image segmentation device provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0022] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar modules or modules with the same or similar functions. The embodiments described below by reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limitations of the present invention. On the contrary, embodiments of the present invention include all changes, modifications and equivalents that fall within the spirit and connotation of the appended claims.
[0023] The embodiment of the present invention first binarizes the first cell image according to the gradient information of the first cell image to obtain a plurality of cell regions, and then binarizes the plurality of cell regions according to the grayscale information of the first cell image to obtain the final true cell boundary, and uses the gradient information to segment the entire first cell image and uses the grayscale information to segment the cell regions in the first cell image, thereby overcoming the problem of uneven illumination or local darkness of the cell image, and making the cell boundary identification more accurate.
[0024] Embodiment 1
[0025] Figure 1 : is a flow chart of the cell image segmentation method provided by the first embodiment of the present invention. Figure 1 As shown, the method includes:
[0026] Step S101: performing a first binarization process on the first cell image according to the gradient information of the first cell image to obtain a second cell image including a cell region.
[0027] In the embodiment of the present invention, for the cell image, the grayscale information or gradient information thereof can be used for binarization processing. The processed cell image is a black and white image, and the white area represents a single cell or a cell cluster. Figure 2 The first cell image is the original image taken. The image is a grayscale image, which contains living cells.
[0028] As an embodiment of the present invention, the process of segmenting the first cell image using gradient information is as follows: Figure 3 As shown, the method includes:
[0029] Step S301: obtaining a gradient image according to the grayscale information of the first cell image.
[0030] In the embodiment of the present invention, a gradient image is acquired according to the grayscale information of the first cell image, and the gradient image can describe the rate of change of the grayscale of the first cell image. Figure 4A Is Figure 2 The obtained gradient image shows that the grayscale changes are more obvious at the cell boundary, while the grayscale changes are smaller inside the cell and in the background.
[0031] Usually, a gradient template is used for convolution to calculate the grayscale change rate. Commonly used gradient templates include but are not limited to Laplace operator, Sobel operator, Robinson operator or absolute gradient.
[0032] Step S302: binarize the gradient image to obtain a gradient binarized image.
[0033] In the embodiment of the present invention, the binarization threshold can be obtained by methods such as Otsu's method and iterative method, which are not limited here. Figure 4B Is Figure 4A The resulting gradient binary image contains only black and white values. The white area represents the cell boundary, and the black area represents the cell interior or background.
[0034] Step S303: Filling the gradient binary image to obtain a second cell image containing a cell region.
[0035] In the embodiment of the present invention, the black part inside the white area in the gradient binary image is filled, that is, the black pixels inside the white area are set to white. Figure 4C The second cell image shown, Figure 4C It contains six white areas, and each independent white area can be considered as a cell area, which contains one or more cells.
[0036] Step S102: performing a second binarization process on the first cell image according to the position of the cell region to obtain a third cell image including the cell boundary.
[0037] Since there is a grayscale change in the area near the cell boundary, the boundary of the white area in the second cell image deviates from the actual cell boundary. Figure 2 and Figure 4C By comparison, some cells that were originally unconnected have become connected.
[0038] As an embodiment of the present invention, the process of segmenting the cell region in the first cell image using grayscale information is as follows: Figure 5 As shown, the method includes:
[0039] Step S501: Mapping the position of the cell region to the corresponding position of the first cell image.
[0040] In an embodiment of the present invention, the cell region contained in the second cell image is mapped to the corresponding position of the first cell image. Figure 4C The white area in the Figure 2 , and get Figure 2 The grayscale of the corresponding pixel in .
[0041] Step S502: performing a second binarization process on the corresponding position of the first cell image according to a preset threshold value to obtain a cell region image.
[0042] In the embodiment of the present invention, the grayscale of the corresponding position of the first cell image is binarized, and the preset threshold of binarization can be a fixed value, or obtained by Otsu's method, iterative method, etc., which is not limited here. Figure 2 The grayscale of the corresponding pixel in is binarized to obtain a cell area image containing only black and white values.
[0043] As an embodiment of the present invention, when the second cell image includes multiple cell regions, the preset threshold value for binarization is also multiple different values corresponding to the multiple cell regions respectively.
[0044] Using different thresholds for binarization of different cell regions makes the judgment of the grayscale distribution in a single cell region more independent, which can effectively overcome the problem of uneven illumination or local darkness in cell images.
[0045] Step S503: Mapping positions outside the cell region to corresponding positions of the third cell image and setting preset values, and combining the cell region image to obtain a third cell image including the cell boundary.
[0046] In the embodiment of the present invention, the position outside the cell region in the second cell image is mapped to the corresponding position of the third cell image and set to black to represent the background. At the same time, the cell region image is placed in the third cell image to obtain the third cell image containing the cell boundary. Figure 6 As shown, the outer boundary of the white area is the outer boundary of the cell. Figure 2 , Figure 4C and Figure 6 By comparison, we can see that Figure 6 The outer border of the midcell is closest to the true cell boundary.
[0047] The embodiment of the present invention uses gradient information to process the entire first cell image and uses grayscale information to process a local area of the first cell image, making full use of the characteristics of gradient information and grayscale information, and can effectively overcome the problem of uneven illumination or local darkness of the cell image.
[0048] Step S103: Mapping the position of the cell boundary to the corresponding position of the first cell image and highlighting it on the first cell image.
[0049] In order to facilitate observation by users during experiments, in an embodiment of the present invention, the outer boundaries of cells in the third cell image are mapped to corresponding positions in the first cell image, and these outer boundaries of cells are highlighted on the first cell image. Figure 7 As shown, the user can directly observe the cell boundary mark on the original first cell image taken, and quickly judge the accuracy of the experimental results.
[0050] The embodiment of the present invention first binarizes the first cell image according to the gradient information of the first cell image to obtain a plurality of cell regions, and then binarizes the plurality of cell regions according to the grayscale information of the first cell image to obtain the final true cell boundary, and uses the gradient information to segment the entire first cell image and uses the grayscale information to segment the cell regions in the first cell image, thereby overcoming the problem of uneven illumination or local darkness of the cell image, and making the cell boundary identification more accurate.
[0051] Embodiment 2
[0052] Figure 8 The structure block diagram of the cell image segmentation device provided in the second embodiment of the present invention is as follows: Figure 8 As shown, the device includes: a first binarization unit 81 and a second binarization unit 82.
[0053] The first binarization unit 81 is used to perform a first binarization process on the first cell image according to the gradient information of the first cell image to obtain a second cell image containing a cell region.
[0054] The second binarization unit 82 is used to perform a second binarization process on the first cell image according to the position of the cell region to obtain a third cell image including the cell boundary.
[0055] Preferably, the first binarization unit 81 includes:
[0056] The gradient calculation subunit is used to obtain a gradient image according to the grayscale information of the first cell image.
[0057] The gradient binarization subunit is used to binarize the gradient image to obtain a gradient binarization image.
[0058] The filling subunit is used to fill the gradient binary image to obtain a second cell image containing a cell region.
[0059] Preferably, the second binarization unit 82 includes:
[0060] The mapping subunit is used to map the position of the cell region to the corresponding position of the first cell image.
[0061] The grayscale binarization subunit is used to perform a second binarization process on the corresponding position of the first cell image according to a preset threshold value to obtain a cell region image.
[0062] The combining subunit is used to map the position outside the cell region to the corresponding position of the third cell image and set a preset value, and combine the cell region image to obtain the third cell image containing the cell boundary.
[0063] Preferably, when there are multiple cell regions, the preset threshold is a plurality of different values corresponding to the multiple cell regions respectively.
[0064] Furthermore, the cell image segmentation device also includes a display unit, which is used to map the position of the cell boundary to a corresponding position of the first cell image and highlight it on the first cell image.
[0065] The cell image segmentation method executed in the cell image segmentation device corresponds one to one with the method described in the first embodiment, and will not be described in detail here.
[0066] The embodiment of the present invention first binarizes the first cell image according to the gradient information of the first cell image to obtain a plurality of cell regions, and then binarizes the plurality of cell regions according to the grayscale information of the first cell image to obtain the final true cell boundary, and uses the gradient information to segment the entire first cell image and uses the grayscale information to segment the cell regions in the first cell image, thereby overcoming the problem of uneven illumination or local darkness of the cell image, and making the cell boundary identification more accurate.
[0067] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.
Claims
1. A cell image segmentation method, characterized in that: The method comprises: Performing a first binarization process on the first cell image according to the gradient information of the first cell image to obtain a second cell image including a cell region; performing a second binarization process on the first cell image according to the position of the cell region to obtain a third cell image including a cell boundary; Performing a first binarization process on the first cell image according to the gradient information of the first cell image to obtain a second cell image containing a cell region includes: Obtaining a gradient image according to the grayscale information of the first cell image; Binarizing the gradient image to obtain a gradient binarized image; Filling the gradient binary image to obtain a second cell image containing a cell region; Performing a second binarization process on the first cell image according to the position of the cell region to obtain a third cell image containing a cell boundary includes: Mapping the position of the cell region to a corresponding position of the first cell image; Performing a second binarization process on the grayscale of the corresponding position of the first cell image according to a preset threshold value to obtain a cell region image; The positions outside the cell region are mapped to corresponding positions of the third cell image and preset values are set, and the third cell image including the cell boundary is obtained by combining the cell region image.
2. The method according to claim 1, characterized in that When there are multiple cell regions, the preset threshold is multiple different values, respectively corresponding to the multiple cell regions.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: The position of the cell boundary is mapped to the corresponding position of the first cell image and highlighted on the first cell image.
4. A cell image segmentation device, characterized in that: The device comprises: A first binarization unit, configured to perform a first binarization process on the first cell image according to the gradient information of the first cell image, so as to obtain a second cell image including a cell region; A second binarization unit, used for performing a second binarization process on the first cell image according to the position of the cell region to obtain a third cell image containing a cell boundary; The first binarization unit comprises: A gradient calculation subunit, used for obtaining a gradient image according to the grayscale information of the first cell image; A gradient binarization subunit, used for binarizing the gradient image to obtain a gradient binarization image; A filling subunit, used for filling the gradient binary image to obtain a second cell image containing a cell region; The second binarization unit comprises: a mapping subunit, used for mapping the position of the cell region to a corresponding position of the first cell image; A grayscale binarization subunit, configured to perform a second binarization process on the grayscale of the corresponding position of the first cell image according to a preset threshold value to obtain a cell region image; The combining subunit is used to map the position outside the cell area to the corresponding position of the third cell image and set a preset value, and combine the cell area image to obtain the third cell image containing the cell boundary.
5. The device according to claim 4, characterized in that When there are multiple cell regions, the preset threshold is multiple different values, corresponding to the multiple cell regions respectively.
6. The device according to claim 4 or 5, characterized in that: The device also includes: A display unit is used to map the position of the cell boundary to a corresponding position of the first cell image and highlight the position on the first cell image.
Citation Information
Patent Citations
Morphology based method for separating cells
CN101692282A
Image processing method and device
CN104794710A
Image segmentation method and system, and cell image segmentation method and system
CN105160668A
Visible component classification method based on SVM
CN105654107A
Recognition and counting method for cells
CN106056118A
