Keywords

1 Introduction

In the middle of the 19th century, the invention of microscope made people can study on human fundamental biological processes at the cellular or organism level. Nowadays, computer-assisted automatic morphological analysis of cells and tissues from microscopy images, such as cell size, cell morphology, density of staining, and so on, are useful methods to reduce hand data recording and user’s errors for the detection and diagnosis of some diseases [1, 2] or some special vivo cell phenomenon [3]. But for cell microscopy images, problems remain for image segmentation, shape description and analysis, especially the automatic border detection of cell object boundaries as well as surface contours is still a difficult problem [4, 5]. All difficulties are due to the distinguishing qualities of microscopy imaging. It is known that:

  • There is a very low contrast in microscopy image, so that objectives are hard to be separated from background.

  • Cell edge in microscopy images is fuzzy and smooth, and moreover, cells may be contiguous and overlapped.

  • Noises such as salt and pepper noise, Gaussian white noise and remarkable electrical noise are worse than any other digital system.

  • Dust, little bubble, blink point, and blur may be zoomed in by microscopy views, so that cell images may be confused in microscopy images.

For the characters of microscopy images, numerous segmentation methods have, up to now, been proposed; their performances depend largely on the type of images to be processed and on the a priori knowledge relative to the object features. These methods can be roughly classified into several categories, according to the nature of handled features: threshold-based methods, contour-based methods, region-based methods, and methods based on the integration of these techniques.

The threshold-based methods [6, 7] try to separate pixels within or without cell bodies base on the histogram threshold of cell gray-scale. For example, double threshold way, minimum-error way, adaptive threshold way, Otsu way, and so on. Calculations are simple but poor quality images and complex backgrounds may affect the separation result.

The contour-based methods generally deal with the detection and localization of edge points by differential operators and associated regularization processes [810], Such as Laplacian operator, Sobel operator, LOG operator, Canny operator, and so on. But they often result in many unclosed frontiers, when they are applied to highly textured objects or weakly contrasted images. Recently, wavelets provide a powerful tool to let microscopy images be studied in nonlinear multiresolution [11, 12]. But, poor quality images and complex algorithms are still problems.

The region-based methods try to detect the areas sharing one or many homogeneity criteria [13, 14], for example, fuzzy C-means, K-means, Mean-Shift, and so on. But they often suffer from their poor localization of boundaries and from over-segmentation. Another interesting region-based technique is based on mathematical morphology [1517], which is a branch of image analysis based on algebraic, set-theoretic and geometric principles. It is particularly useful in providing basic building blocks to more sophisticated imaging applications. Using mathematical morphology, image is filtered to either preserve or remove features of interest, sizing transformations can be constructed, and information relating to shape, form and size can be easily applied.

Among the mixed methods, one has to mention the integration of two or more methods to conquer the shortage oneself. Integration of threshold and region growing algorithm [18], integration of active contours and mathematical morphology tools [19], integration of wavelet and mathematical morphology algorithm [20, 21], and so on, can perform well.

Our approach in this paper is based on the integration of a region-based method (mathematical morphology) and an active threshold-based method for low quality microscopy images (non-uniform illumination, low contrast, blur or faint image). We based our work on this technique because it is very fast and requires lower computing power. So the final system can run on a very poor computer system, even on an embedded computer-based (such as FPGA, DSP) mini system.

2 Basic Operations in Mathematical Morphology

Morphology processing is a nonlinear filter, its basic concept is to use construction element called as probe to search image information and do morphological transform according to requirement, and so it can be called as morphological filtering. The basic morphological operations are erosion and dilation. Based on them, some important combined operations, such as opening, closing, opening residue and closing residue are defined. They are described as following [15, 16].

A binary image A (i, j) consists of a set of points with the value 1 or 0 at the point (i, j). Usually, let A be an input image, and B a structuring element.

$$ \text{Dilation}:A \to A \oplus B = \cup \{ A + b:b \in B\} $$
(1)
$$ \text{Erosion}:A \to A\Theta B = \cup \{ A - b:b \in B\} $$
(2)

Where the symbols \( \oplus \) and \( \Theta \) are the dilation and erosion operators. The erosion is also expressed by the dilation as:

$$ \text{Erosion}:A \to A\Theta B = (A^{C} \oplus B)^{C} $$
(3)

The superscript C means the complement of the set. The important applications of the basic operations, the opening and the closing of a set A by a set B, are the following:

$$ \text{Opening}:A \to A\text{O}B = (A\Theta B) \oplus B = (A^{C} \oplus B)^{C} \oplus B $$
(4)
$$ {\text{Closing: }}A \to A \bullet B{ = }\left( {A \oplus B} \right)\Theta B = \left( {\left( {A \oplus B} \right)^{c} \oplus B} \right)^{c} $$
(5)

Where the symbols and are the opening and the closing operators, respectively. It is clear that an opening operation is anti-extensive, which has the ability to remove positive impulses and peaks smaller than the diameter of structuring element, and a closing operation can remove negative impulses and valleys.

3 Relevant Algorithms and Application

The overall procedure of identification of cell morphological features is demonstrated in Fig. 1.

Fig. 1.
figure 1

Procedure of the identification of cell morphological features

3.1 Pre-processing

The red, green and blue (RGB) space of the original image is usually got, so images must be transformed to gray-scale first. The gray image (blood cell) is obtained and shown in Fig. 2(a). High noises and very low contrast usually exist, as discussed in Sect. 1. So, it is necessary to pre-process cell images to get rid of the drawbacks exposed above.

Fig. 2.
figure 2

The procedure of rough segmentation from cell microscopy image

A mixed smooth filter is designed to remove background noises. Linear smooth filter can eliminate Gaussian noise and uniformly distributed noises effectively, but may import image blurring. And, median filter can suppress high-frequency noises, but not suit for eliminating Gaussian noise22. So, a combined filter mentioning the integration of a linear filter and a median filter is designed not only for eliminating the aforementioned noises and some kinds of additive noises, but also for reducing calculation volume. For the filter, a 5*5 model is designed, as shown in Eq. (6), and the combined filter can be expressed in Eq. (7). In equations, ai,j is the gray value at (i, j) in image; g(x, y) is the medium value of 5 elements; and MED is a sampling medium value operator.

$$ \left[ {\begin{array}{*{20}c} {} & {} & {a_{i - 2,j} } & {} & {} \\ {} & {} & {a_{i - 1,j} } & {} & {} \\ {a_{i,j - 2} } & {a_{i,j - 1} } & {a_{i,j} } & {a_{i,j + 1} } & {a_{i,j + 2} } \\ {} & {} & {a_{i + 1,j} } & {} & {} \\ {} & {} & {a_{i + 2,j} } & {} & {} \\ \end{array} } \right] $$
(6)
$$ g(x,y) = MED\left\{ {\frac{1}{2}(a_{i,j - 2} + a_{i,j - 1} ),\frac{1}{2}(a_{i,j + 1} + a_{i,j + 2} ),a_{i,j} ,\frac{1}{2}(a_{i - 2,j} + a_{i - 1,j} ),\frac{1}{2}(a_{i + 1,j} + a_{i + 2,j} )} \right\}.$$
(7)

In the pre-processing, smooth filtering is along the cross directions as shown in Eq. (6). This filter model can keep the details in horizontal and vertical directions and eliminate the details in diagonal line, which corresponds with man’s visual sense. After smooth filtering, g(x, y) is set as the new gray value at (i, j). Repeatedly, filtering is carried out in whole images. Base on this method, both effective noise suppression and simplifying calculation are satisfying. After smooth filtering, operate histogram equalization to increases the contrast of the image. The pre-processing result is as shown in Fig. 2(b).

3.2 Segmentation

The segmentation is in two steps, in the context of morphological segmentation, the initialization is achieved by means of active threshold-based method first to get the binary image by a primary segmenting, and the second step relates to the localization of boundaries by applying the morphological operators.

After applying pre-processing, the threshold value is calculated by a iteration process, as following:

① Getting initial threshold \( T_{0} \): \( T_{0} = \frac{1}{2}(Z_{\hbox{max} } + Z_{\hbox{min} } ) \)\( Z_{\hbox{max} } \) and \( Z_{\hbox{min} } \) are maximum gray value and minimum gray value of images individually.

② Dividing image into background and foreground based on \( T_{k} \), and calculating the mean gray values of background and foreground, \( E_{a} \) and \( E_{b} \), individually.

③ Getting next new threshold \( T_{k + 1} \): \( T_{k + 1} = (E_{a} + E_{b} )/2 \).

④ If \( T_{k + 1} = T_{k} \), the best threshold is obtained, else turn to ② to continue the iterative loop. End the iterative operation, best threshold \( T_{n} \) is obtained:

$$ T_{n} = (\frac{{\sum\limits_{{i < T{}_{n - 1}}} {P_{i} } \times i}}{{\sum\limits_{{i < T{}_{n - 1}}} {P_{i} } }} + \frac{{\sum\limits_{{i > T{}_{n - 1}}} {P_{i} } \times i}}{{\sum\limits_{{i > T{}_{n - 1}}} {P_{i} } }})/2 $$
(8)

In Eq. (8), i (i = 0, 1…, 255) is the gray value of a certain pixel; is the amount of the pixels, where the gray value is i; and is the n time and n-1 time iterative results individually.

Base on the best threshold, rough cells segmentation from background is done, and a binary image is shown in Fig. 2(c). The process can be expressed in Eq. (9):

$$ BW(i,j) = \left\{ {\begin{array}{*{20}c} {1,\begin{array}{*{20}c} {} & {T(i,j) \ge T_{n} } \\ \end{array} } \\ {0,\begin{array}{*{20}c} {} & {T(i,j) < T_{n} } \\ \end{array} } \\ \end{array} } \right. $$
(9)

\( T(i,j) \) is the gray value at \( (i,j) \) in the image; \( BW(i,j) \) is the result of binary operation at this point.

The second step of segmentation is mathematical morphological operation. In Fig. 2(c), it is clearly to see that some discontinuous concave convenes exist at the edge of cells, conglutination or overlap phenomenon appears among the cells, and fracture frontiers are still at cell edges. Moreover, holes in cells and specks in background are in wide distribution. So obeying Eqs. (4) and (5), an opening operation of basic morphological operations is applied (Structuring element is “disk, 4*4”), and a closing operation is executed subsequently (“disk, 2*2”). The result is shown in Fig. 3(a). But still, it is found that bigger holes in cells and bigger specks still exist. So, Morphological reconstructions are operated to solve these problems. Border objects are removed firstly. Next, 8-connected domain is selected to search the boundary of cells and the background, then set background as “0” and the other as “1” to finish the segmentation, as shown in Fig. 3(b).

Fig. 3.
figure 3

Morphological operation results

3.3 Morphological Analysis

Obeying the 4-neighbourhood rule to explore the whole binary image to identify the separate connected regions (set cell regions to “1”, set background to “0”), numbered 1~N, N is the total amount of cell regions. Counting the pixels amount of “1” (named n) to calculate the average area of cells m, m = n/N. If the area of a separate connected region is smaller than 1/3 m (Depend upon the given cell species), this region should be regarded as a false cell and set to “0” to be removed. After removing false cells, new real amount and average area of all cell regions are computed, marked N1, \( \overline{m} \). The following step is to get morphological features of cells. Gravity model approach is adopted to get the center point of each cell, which is significant for position finding and tracing of cells (Fig. 4(a)). For example, if one cell region numbered n, center point \( (x_{n} ,y_{n} ) \) is got from Eq. (10).

Fig. 4.
figure 4

Identification of cell contours

$$ x_{n} = {{\sum {x_{i} } } \mathord{\left/ {\vphantom {{\sum {x_{i} } } {S_{n} }}} \right. \kern-0pt} {S_{n} }},y_{n} = {{\sum {y_{i} } } \mathord{\left/ {\vphantom {{\sum {y_{i} } } {S_{n} }}} \right. \kern-0pt} {S_{n} }} $$
(10)

Next, counting the areas of all close regions, if one is bigger than \( 5/3\overline{m} \) (Depend upon the given cell species), which is regarded as a remarkable cell. After that, cell information such as serial number, location of the center point, and area is recorded. This information may indicate abnormal cells or cell proliferation. Finally, 8-connected domain is selected to extract the cell contour, as shown in Fig. 4.

4 Results and Comparisons

Cell morphological features are obtained after the proposed mathematical morphological operation in Sect. 3. For the experimental cell image, information is got as following: Pixels: 512*512; Amount: 47 cells; Average area of cells: 1554; Biggest area: 3469, No. 20, (207, 384). Abnormal cells: No. 20, 24, 38 and 46. Moreover, base on the algorithm, lots of other cell morphological features can be learned easily, such as cell tracing, cell growth analysis and so on.

In this paper, it is confirmed that identification of cell f morphological features from microscopy images applying proposed mathematical morphological algorithm is better than of the conventional methods. The comparison is show in Fig. 5.

Fig. 5.
figure 5

Comparison between proposed algorithm and some conventional methods

In Fig. 6, all results are processed from Fig. 2. Hereinto, (a) is got by applying the Sobel operation, (b) is got by applying the Laplacian operation, (c) is got by applying the Canny operation, and (d) is got by applying the proposed method. It is easy to see that (a) and (b) do not got the cell edges for the potential reasons of low contrast and smooth edges in microscopy images. And, (c) represents too many edges and unclosed frontiers for the potential reasons of terrible noises and interferences such as dust, little bubble, blink point, and blur in microscopy images. In (d), by applying the proposed method, clear cell edges are detected and cell morphological features are identified. It is indicated that the proposed method can perform much better for the identification of cell morphological features from microscopy images than the others do obviously.

Fig. 6.
figure 6

Identification of endothelial cells based on the same method

To prove the universal property of method, another experiment is done for the identification of one endothelial cell image. The result is shown in Fig. 6. Figure 6(a) is the original image of endothelial cells, and (b), (c) are the results by applying the same proposed method. It is clear to see that the proposed method performs well too.

5 Conclusions and Expectations

For the identification cell morphological features from microscopy images with poor qualities, we proposed an attractive mathematical morphological approach combining with an active threshold-based method. This method can be taken into both account some shortages of microscopy image and morphological characters of cells. By applying some simple morphological operations, such as opening, closing and filling, the cell morphological features are identified. The results not only demonstrate the validity of this approach for the identification of cell morphological features from microscopy images, but also highlight the need for techniques such as these by illustrating the ambiguity associated with the conventional and manual measurement of such properties. Especially, the algorithm is very fast and requires lower computing power. So that, a mini automatic imaging and analysis system (FPGA&DSP-based) based on the algorithm is under design.