Cell segmentation is an important topic in medicine. A cell image segmentation algorithm based on morphology is proposed. First, some morphological operations, including top-hat transformation, bot-hat transformation, erosion operation, dilation operation, opening operation, closing operation, majority operation, skeleton operation, etc., are applied to remove noise or enhance cell images. Then the small blocks in the cell image are deleted as noise, the medium blocks are removed and saved as normal cells, and the large blocks are segmented as overlapping cells. Each point on the edge of the overlapping cell area to be divided is careful checked. If the shape of the surrounding area is a corner and its angle is smaller than the specified value, the overlapping cell will be divided along the midline of the corner. The length of each division is about a quarter of the diameter of a normal cell. Then small blocks are deleted, and medium blocks are removed and saved, after the edges of all blocks are smoothed. This step is repeated until no dividing point is found. The last remaining image, plus the saved blocks, is the final segmentation result of the cell image. The experimental results show that this algorithm has high segmentation accuracy for lightly or moderately overlapping cells.

Cells are the basic unit of biological tissues. State analysis of cells is an important subject in medicine. Researchers study the shape, life cycle, position, speed, trajectory and other information of cells by observing the morphology of cells. For the research of cells’ behavior, it is necessary perform quantitative analysis of cells, such as cell size measurement, cell counting, and cell tracking, etc. The accuracy of cell segmentation operation will affect the results cell counting and cell tracking.

With the advancement of microscopic imaging technology, researchers can easily obtain a large number of high-quality cell images, which also provides a basis for cell analysis. However, data analysis of medical cell images usually encounters the following difficulties:

Cell images have low resolution and are difficult to segment. Therefore, cell images usually require preprocessing.

Overlapping cells often appear in cell images, which look like a large cell and lead to under-segmentation.

For cell images with uneven background distribution, high noise, and dense cell populations, it is difficult for traditional image segmentation algorithms to obtain accurate segmentation results.

The acquisition cost of cell images is higher than that of ordinary images, so training samples may be insufficient.

Due to the richness, heterogeneity and complexity of cell images, it is difficult to manage, process and analyze them. With the development of image processing technology based on computer vision, automatic analysis of biomedical images has become possible and has gradually become the key to the development of cell biology. In this article, morphological methods will be used for quality enhancement and edge segmentation of overlapping cell images.

The purpose of cell image segmentation is to simplify cell images and extract interesting information from them, and to provide a basis for subsequent image analysis and understanding. Image segmentation is the process of dividing an image into several meaningful areas. The cell image segmentation algorithm can realize cell segmentation and detection, and prepare for cell tracking and cell counting.

Current imaging tools and medical image processing and analysis platforms are developing rapidly, such as Cell Profiler [

At present, thousands of image segmentation algorithms have been proposed, but the development of cell segmentation algorithms is relatively lagging. Most cell segmentation algorithms are designed for specific types of cells. Therefore, there is currently no universal cell segmentation algorithm.

In order to find the most suitable segmentation method for the target cell image and improve the accuracy of cell segmentation and classification, it is necessary to fully understand the characteristics of various algorithms and the characteristics of cell images, and comprehensively consider the factors of cell structure. The hardware platform, the running speed of the algorithm, the segmentation accuracy of the algorithm, the generalization ability of the algorithm, the training speed of the sample, the difficulty of making the sample, etc.

Common segmentation algorithms include threshold segmentation methods [

Based on the Otsu algorithm, Cseke [

Rezatofighi et al. [

Hou et al. [

Arteta et al. [

Dimopoulos et al. [

In 2012, Mohapatra et al. [

Huang et al. [

Wang et al. [

Gu et al. [

Ding et al. [

Hou et al. [

Wang et al. [

Ruberto et al. [

Hou et al. [

Qu et al. [

In summary, there are some algorithms for overlapping cell segmentation, but their segmentation effect needs to be further improved.

Mathematical morphology was proposed in 1964 by Tan et al. [

Mathematical morphology has a complete foundation of mathematical theory. The most notable feature is that it can be directly used to process the geometric structure of the image surface. Compared with spatial domain or frequency domain algorithms, mathematical morphology algorithms have obvious advantages in image processing and analysis. For example, in the process of image restoration, a morphological filter based on mathematical morphology can effectively reduce the noise in the image, while using prior recognition of features and morphological operators to retain important information in the image.

Mathematical morphology can be used to process binary images. The gray value in a binary image has only two values, 0 and 1, which are used as background pixels and target pixels, respectively. Binary morphological processing is the process of transforming structural elements in an image and completing operations such as intersection and union. In binary morphology, the two basic operations of erosion and dilation can be combined to produce many other actual morphological operations.

Before using mathematical morphology to process binary images, it is necessary to design a structural element to collect the information in the image. Structural elements can usually be represented by some small and relatively simple sets, such as of spherical, linear, rectangular, etc. Different image processing results can be obtained by selecting structural elements of different scales or shapes.

The erosion operation of the binary image is the most basic operation in mathematical morphology. Most mathematical operations are based on the erosion operation. The erosion of the set

In

The role of the erosion operation of the binary image in image processing is to eliminate the target points in the image that are smaller than the structural elements, and to disconnect the narrow connection between the two targets.

Set

In ^{C}

The erosion operation is based on the “subtraction” operation, and all morphological calculations given later are based on the erosion calculation.

The dilation operation will smooth and filter the outer boundary of the target image.

The dilation operation with appropriate structural elements can fill holes in the image that are smaller than the selected structural element and connect two objects closer together.

The process of performing dilation operation and then erosion operation on the target image is called open operation. The opening operation can remove the tiny connections between the image target areas, such as some small burrs and protrusions, to make the image smoother.

Opening operation processing can be expressed as

In

The opening operation can remove isolated small areas in the target area of the image and smooth the burrs on the target boundary while hardly change the size of the target area. Since expansion and erosion are not mutually operated, they can be cascaded together as a new operation.

It is also possible to perform the erosion operation and then the expansion processing, which means the closing operation. The closing operation can remove the small holes in the image target or the concave part at the boundary to smooth the outer boundary of the target area.

Closing operation processing can be expressed as

In

The closing operation can fill the small holes in the target area, connect adjacent areas, and smooth the boundary of the area while hardly change the size of the target area.

Both the binary open operation and the binary close operation can effectively remove the details of the image that are smaller than the structural elements.

The result obtained by subtracting the morphological gray-scale opening operation from the original gray-scale image is called Top-hat transformation, and its mathematical expression is:

The Top-hat transformation process can extract the sharp peaks in the original gray-scale image, and the result of the Bot-hat transformation is the low value in the original gray-scale image. Generally, the contrast of the original gray image can be enhanced by adding the high-hat transform result and subtracting the Bot-hat transform result.

The Bot-hat transformation is the difference between the gray-scale image and the original image after the morphological gray-scale closing operation. Its mathematical expression is:

Top-hat transformation and the Bot-hat transformation are also used to correct the unevenly illuminated image. The Top-hat transform is mainly used to extract bright objects in the dark background area, while the Bot-hat transform is usually used to extract dark objects in the bright background area.

Filling holes can complete the hole filling effect in the area. The process of area filling starts from a point on the boundary. The 8-connected boundary points in the neighborhood of the point that meet the filling conditions are filled with 1.

In _{0}_{k}_{k}

Boundary extraction can be expressed as

In

The edge of image

Keep a pixel set to 1 if 5 or more pixel(the majority) in its 3-by-3, 8-connected neighborhood are set to 1; otherwise, set the pixel to 0.

Skeleton is an important topological description of image geometry, which can maintain the topological characteristics of the original target. It has the same number of connections and holes as the original target.

The morphological skeleton of the binary image

In _{n}

Since the sets (

Knowing the skeleton of the image, the original image can be reconstructed by the method of morphological transformation. This is actually the inverse process of finding the skeleton. The image _{n}

In _{n}_{n}

Observing the cell image shown in

The cell spacing is very small, and it is easy to overlap.

The cell shape is close to circle.

The color of the edge of the unit is darker, which is completely different from the background and is easy to distinguish.

The nucleus is a bright area. The brightness of the cell nucleus has a small difference from the background, so it can easily be mistaken for the background.

Based on the above characteristics of cells, threshold-based image segmentation algorithms and region-based image segmentation algorithms can be used for cell image segmentation, which will also cause a lot of over-segmentation and under-segmentation.

When two round cells overlap each other, the junction should be an acute or obtuse angle.

Each edge pit in the cell image is a potential cell dividing point. However, edge pits may also be caused by cell deformation, noise and other factors. Severely overlapping cells are difficult to identify because the connecting part is very similar to the deformed part of the single cell edge. Obviously, the lower the overlap, the easier it is to find the dividing point. Therefore, this article is limited to the study of the recognition and segmentation of lightly overlapping cell images and moderately overlapping cell images.

Let _{i}

Let _{i} _{i}

Let _{i} _{i}

Let _{i}_{i}

Let

Once the position of

For the convenience of expression, the following symbols are defined as shown in

Symbol | Definition |
---|---|

Average area of cell | |

Average diameter of cell | |

Minimum area of cell | |

Maximum area of cell | |

Split length |

Comments:

The basic steps of segmentation algorithm for overlapping cells based on morphology are as follows:

Step 1: Read the cell image and convert it to gray-scale image format.

Step 2: Enhance the cell image with Top-hat and Bot-hat transformation.

Step 3: Convert the cell image from a gray-scale image into a binarized image.

Step 4: Remove small blocks with area less than 0.5*

Step 5: Remove small blocks with area less than 0.25*

Step 6: Erode the blocks first and then dilate the blocks to smooth the edge of blocks. An opening operation can also achieve the same effect.

Step 7: A majority operation is applied to every pixel to reduce false dividing points, and thus increase the accuracy of searching the dividing points of overlapping cells in the cell image.

Step 8: Remove small blocks. Small blocks with area less than

Step 9: Search the dividing points from edge of blocks.

Step 10: Segment blocks. After calculating the dividing direction, set all pixels with the distance from the dividing point less than

Step 11: According to the area size of each block, blocks are treated in three categories. Medium blocks with area between

Repeat step 9–11 until no dividing points are found.

Step 12: The last remaining image, plus the saved blocks, is the final segmentation result of the cell image Output the final segmentation result.

The flow chart of proposed algorithm is shown in

A program is compiled to perform overlapping cell separation operations on the cell image shown in

First, the cell image is transformed by Top-hat and Bot-hat transformation, and the result is shown in

Then the cell image is converted into a binary image, and the result is shown in

Small isolated blocks are eliminated in the cell image, including scatter dots on the cells and noise in the background. The result is shown in

Tiny noises in the cell image such as lines are eliminated with an erosion operation, as shown in

A dilation operation is performed on the cell image to smooth the cell edge, as shown in

The cell image is ready to start cell edge segmentation after a majority operation is executed and small blocks are deleted, as shown in

The cell image is separated into two images according to the area size. The area of normal cells is moderate, as shown in

Next the potential dividing points of overlapping cells are found. Since the cells are round, all the connecting parts of the overlapping cells must be concave, as point A in

For the dividing point of overlapping cells, perform cell segmentation along the midline, as shown in

Overlapping cells may be divided into multiple pieces. Note that too small an area may be noise and should be deleted. Divide the segmentation target into two parts according to the size of the area, and the area with a larger area needs to be segmented continuously, as shown in

The dividing process proceeds until no cells can be divided, as shown in

Perform the erosion operation on the final cell image and remove blocks less than 2000, as shown in

A dilation operation is excuted to smooth remaining cells, as shown in

Combine the result of dilation operation with the cell area confirmed and saved to obtain the final cell image, as shown in

In order to verify the effectiveness of the algorithm proposed in this paper, it is compared with the segmentation results of the distance transformation algorithm and the limit corrosion algorithm. Since the proposed algorithm does not obtain accurate cell edges, the accuracy of cell counting is used as an evaluation measure for cell segmentation. The proposed algorithm is applied to the segmentation and counting of 300 cell images. The segmentation accuracy rates of cells with overlapping degrees of 0%, 15%, 30%, 45%, and 60% were respectively counted, as shown in

Algorithms | 0% | 15% | 30% | 45% | 60% |

Distance transformation algorithm | 98.7 | 98.1 | 97.3 | 92.8 | 88.9 |

Limit corrosion algorithm | 96.7 | 94.6 | 90.5 | 88.7 | 83.9 |

Proposed algorithm | 99.3 | 98.8 | 97.5 | 92.4 | 86.1 |

It can be seen from

This paper proposes a cell image segmentation algorithm based on morphology, which uses morphological operations such as erosion and dilation to accurately segment and count cell images. The experimental results show that when the proposed algorithm is applied to segment lightly or moderately overlapping cells, the accuracy is very high. And when it is used to segment heavily overlapping cells, the effect is normal. However, it must be pointed out that since the algorithm in this paper eliminates part of the edge information in the process of cell segmentation, further processing is needed to obtain accurate cell edge information.