Assessment of erythrocytes and leucocytes in thin blood films can be used as an inexpensive diagnostic aid in a series of disease states, e.g. infections, anemia and hematological malignancies. Manual counting of cells is still considered the gold standard for example to establish the level of parasitemia in malaria. However, manual cell counting is time consuming and subject to variability . We here propose an image analysis method that is a combination of adaptive histogram thresholds and morphologic characteristics for the segmentation of red blood cells (RBCs) and white blood cells (WBCs) in digitized thin blood films. The method is implemented on a virtual microscopy platform, the Webmicroscope .
Ten Giemsa stained thin blood films were digitized with a microscopy slide scanner (Axio Imager Z2, Carl Zeiss MicroImaging, Jena controlled by Metafer software, MetaSystems, Altlussheim) using a 63x objective with a numerical aperture (NA) of 1.4 (Plan-Apochmat, Carl Zeiss, Jena) and oil immersion. Image acquisition was performed with a monochrome CCD camera with a 1360x1024 pixel sensor and a pixel size of 6.45 µm (CoolCube 1, MetaSystems, Altlussheim), a 1.0 camera adapter and illumination with an RGB illuminator (MetaLED Z, red 619 nanometer, green 515 nanometer, blue 465 nanometer, MetaSystems, Altlussheim). The pixel size in the digital images was approximately 0.10µm and the original TIFF images were converted into a wavelet format (Enhanced Compression Wavelet, ERDAS/Intergraph, Norcross, GA) and transferred to a virtual microscopy image server (http://fimm.webmicroscope.net/Research/Momic/tp2012 webcite) . Approximately five-hundred (473 – 505) fields of view from each blood film sample were captured and stored in the database. Five of the samples were infected with Plasmodium falciparum and five were non-infected control samples.
The described method (Fig. 1.) involves 1) separation of background and foreground, 2) recognition of objects that compose the foreground and 3) cell counting (i.e. RBCs and WBCs).
Figure 1. Flowchart showing the cell segmentation process Overview of the cell segmentation and counting process for red and white blood cells. From the original image the green channel is selected and smoothed. Dynamic thresholding allows the separation of the image in foreground and background. The foreground is split in to RoundCells, WBC Candidates, FoundCells and the remaining part being deformed red blood cells and clumps of red blood cells. These subimages are used to count the objects of interest i.e. red blood cells and white blood cells.
As a preprocessing step for each thin blood film sample, the green channel was selected from the original RGB image  and smoothed by applying a median filter 3X3 to reduce the' salt and pepper' noise . The green channel is extracted using a color deconvolution between the original image and a vector [0,1,0].
Adaptive histogram thresholds
Let each pixel of the preprocessed image have intensity levels in [0, 1, 2, …, L-1] with L= 256. The number of pixels with intensity level i is denoted by ni, ∀ i=0, 1, 2,…, L-1, where is the total amount of pixels. We defined the histogram distribution as p(i) = ni/N, p(i) ≥0, where .
For any monolayer stained blood film, the histogram is bimodal. A typical histogram shape for a monolayer thin blood film is shown in Fig. 2.
Figure 2. Bimodal histogram depicting adaptive thresholds location, background intensity range and heavily stained objects range A gray level histogram that corresponds to the green channel of a typical field of view after applying a median filter (3X3). The mode of the histogram are located at m1 and m2. B and H are the adaptive thresholds. l1 is a line defined between the modes of the histogram and l2 is a line defined between the origin of the histogram and the mode at m1.
There are two local maxima located at m1 and m2, where m2 <m1 and P = p(m2) <p(m1) = Q.
A threshold to differentiate the background from the foreground B, is defined by finding the maximum distance between the histogram and the line l1 described between (m1, P) and (m2, Q) as shown in Fig. 2.
In a similar manner, a threshold to find heavily stained objects H, was defined by finding the maximum distance between the histogram distribution and the line l2 described between (0, R) and (m1, P), with R= p(0);
The image background is given by Eq. (1), while the heavily stained objects are described by Eq. (2).
where = gray level Image.
Using the image histogram and based on its bimodal shape, two important thresholds were extracted (Fig. 2). The first threshold (B) defines a binary separation between the image background and foreground. From the image foreground, all objects with roundness bigger than 0.6 were selected and the area of each of the objects was measured. The mean diameter to be 7.52µm and standard deviation of 0.06µm for the whole set of objects was calculated. Finally, only the subset of objects with an area equal to m+/-σ (3848+/-688 pixels) was chosen and defined as RoundCells. From this set of round objects of similar size, the average diameter was calculated and used to define a representative red blood cell, designated as AvgRBC (diameter ~7µm) and to establish limit diameters for WBCs (~7-21 µm) and platelets (~2-3µm).
The second threshold (H), defines the heavily stained objects in the foreground (i.e. WBC, platelets, artifacts and debris). The heavily stained objects larger than AvgRBC are the FoundWBCs.
Detection of circular shapes by Hough transform
Hough transform is calculated on gray level images that contain only the regions of interest while the remaining is set to zero. The region of interest is composed by foreground without RoundCells, FoundWBCs and debris. The maximization of Hough transform for a radius interval is performed, where r = radius (AvgRBC). The result is a set of accumulations of hits (votes). The accumulations are concentrated around the centers of the circular shapes. Hough transform detected cells are filtered by selecting the pixel with the maximum vote and deleting all the pixels with less than 20% of the votes. Thus the selection of nearly circular shapes is ensured. Finally, a morphological opening is performed to discard accumulations with less than 50 pixels. The remaining objects are centers of FoundCells.
After subtracting the RoundCells and the heavily stained objects from the original image, to compensate for the holes left from the subtraction of the platelets, debris and parasites, a morphologic filling was performed. By using Hough transform, circular shapes were detected in the grayscale image and designated as FoundCells, resolving the center positions of the nearly circular objects. A second representative red blood cell AvgRBC2 was defined from the area of FoundCells.
After subtracting the RoundCells, the FoundWBCs and the FoundCells, the remaining image contains fragments of RBCs and deformed RBCs which Hough transform was not able to define as circular shapes. The total area covered by these objects, named ApproxCells was divided by the area of AvgRBC2 which is estimation for the number of cells that still remain without being counted #ApproxCells.
Finally, the total number of RBCs in the image is calculated by summing up the partial results;
Results and discussion
RBCs were manually annotated in 30 fields of views per thin blood film and WBCs were annotated in the entire data set (Table 1). The results from the manual counting and automated counting are shown (Table 1.) Using the annotated fields of view, automated quantification of RBCs and WBCs was compared against the manual annotations and RBCs showed an overall error rate of 0.06%, WBCs counting showed an overall error rate of 0.21%. A test for the automated counting of RBCs and WBCs was performed on whole slides of thin blood films and approximately half a million red blood cells and 477 white blood cells were counted (Table 2.). Previously published studies have addressed the separation and counting blood cells, but fixed thresholds for colors, sizes and intensity values restrict the use to particular data sets [6-10]. Here, we make use of adaptive thresholds for size and intensity values, which converges to a solution.
The segmentation of RBCs and WBCs is an easy task for a human observer. Humans have the ability of distinguishing large number of colors, shades and hues, also estimating shapes and size similarities while referring to prior knowledge, making global and local comparisons simultaneously. However, performing large scale quantification is a time consuming and tedious task.
We present an unsupervised tool for separating the foreground from the background in Giemsa stained thin blood films and an automated cell counter for RBCs and WBCs. The segmentation of blood cells in thin blood films can be used as a pre-processing step to specify the regions of interest for a secondary algorithm, e.g. the detection of malaria parasites in RBCs, morphological analysis of RBCs and WBCs and follow-up during treatment of hematological malignancies or measurement of response to chemotherapy.
List of abbreviations
RBC: Red blood cell; WBC: White blood cell; #: Number of cells in
The authors declare that they have no competing interests.
The authors wish to thank Elisabet Tyyni for sample preparation and analysis. The study was kindly supported by the national Biomedinfra and Biocenter Finland projects.
PLoS Negl Trop Dis 2008, 2(10):e315.
Epub 2008 Oct 22PubMed Abstract | Publisher Full Text | PubMed Central Full Text
Computer Vision, Graphics and Image Processing 1984, 25:151-168. Publisher Full Text