Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Systematic segmentation method based on PCA of image hue features for white blood cell counting

  • Farid Garcia-Lamont ,

    Roles Conceptualization, Investigation, Methodology, Software, Writing – original draft, Writing – review & editing

    fgarcial@uaemex.mx

    Affiliation Universidad Autónoma del Estado de México, Centro Universitario UAEM Texcoco, Texcoco-Estado de México, México

  • Matias Alvarado,

    Roles Funding acquisition, Investigation, Validation, Writing – original draft, Writing – review & editing

    Affiliation Centro de Investigación y de Estudios Avanzados del IPN, Departamento de Computación, México city, CDMX-México, México

  • Jair Cervantes

    Roles Investigation, Validation, Writing – review & editing

    Affiliation Universidad Autónoma del Estado de México, Centro Universitario UAEM Texcoco, Texcoco-Estado de México, México

Abstract

Leukocyte (white blood cell, WBC) count is an essential factor that physicians use to diagnose infections and provide adequate treatment. Currently, WBC count is determined manually or semi-automatically, which often leads to miscounting. In this paper, we propose an automated method that uses a bioinspired segmentation mimicking the human perception of color. It is based on the claim that a person can locate WBCs in a blood smear image via the high chromatic contrast. First, by applying principal component analysis over RGB, HSV, and L*a*b* spaces, with specific combinations, pixels of leukocytes present high chromatic variance; this results in increased contrast with the average hue of the other blood smear elements. Second, chromaticity is processed as a feature, without separating hue components; this is different to most of the current automation that perform mathematical operations between hue components in an intuitive way. As a result of this systematic method, WBC recognition is computationally efficient, overlapping WBCs are separated, and the final count is more precise. In experiments with the ALL-IDB benchmark, the performance of the proposed segmentation was assessed by comparing the WBC from the processed images with the ground truth. Compared with previous methods, the proposed method achieved similar results in sensitivity and precision and approximately 0.2% higher specificity and 0.3% higher accuracy for pixel classification in the segmentation stage; as well, the counting results are similar to previous works.

Introduction

White blood cell (WBC) count is used by physicians to diagnose illnesses and to assess and identify adequate treatment [15]; the WBC counting process is performed as follows: a blood smear (BS) sample is extracted from the patient and the sample is stained so that the WBCs become visible; a hematologist then counts the WBCs in the sample using an optic microscope. Usually, the WBC count is not automated slow process, and the counting precision depends on the fatigue level of the hematologist after analyzing several samples. This could lead to involuntary miscounting. With an automated vision system implemented to perform this task, more samples could be analyzed with quick accuracy. Moreover, automation of WBC count would enable physicians to focus on providing a correct diagnosis that could prevent the expansion of the infection.

In artificial vision systems addressing WBC counting [614], an essential stage in the process is the segmentation: precise counting depends on isolating WBCs from other elements of the BS, and separating overlapping WBCs. Image segmentation is defined as the union of sets that contains the pixels coordinates with a specific feature. That is, let be the segmented image, such that , where n is the number of segments and Rk = {(i,j)∈ℕ2|I(i,j) = δk}, being I(i,j) the value of the pixel located in (i,j) of the input image I and δk is the kth threshold value [15].

The previous related studies primarily attended the development of WBC segmentation techniques in BS images [24, 7, 9, 10, 1222, 24], with color data employed [4, 7, 13, 14, 1820, 22, 23, 24]. However, through these methods, color is not processed as a feature because the color components, as if they were intensity channels, are decoupled and processed separately. Furthermore, the color components or channels are intuitively operated within a type of trial-and-error approach. We attempt to overcome this weakness and propose a systematic operational method.

Our segmentation proposal is bioinspired because it mimics the human perception of color. We claim that any person can differentiate WBCs from other elements of the BS based on their color characteristics. Considering the BS images in Fig 1, although captured under different staining, scale, and illumination conditions, it is easy for a human to locate the WBCs within the image because the color of the WBCs contrasts with the colors of the other elements of the BS. We propose segmenting the WBCs by selecting pixels with high chromatic variance when compared with the average color.

thumbnail
Fig 1. Blood smear images captured with different cameras and under different staining, scale, and illumination conditions.

The image (a) is acquired with a magnification larger than the magnification of the image (b); hence the WBCs shown in image (a) look bigger than the WBCs of the image (b). The image (a) is brighter than the image (b), notice that the hue of the WBCs in both images is similar, but the hue of the background is different between the images (a) and (b). The size of image (a) and image (b) is 1368 × 1712 pixels and 1944 × 2592 pixels, respectively.

https://doi.org/10.1371/journal.pone.0261857.g001

The contribution of this study is the systematic operational method for WBC counting. The WBCs are segmented by selecting pixels with high chromatic variance via PC analysis to maximize the variance, and a technique for separating overlapping WBCs is proposed.

The remainder of the paper is organized as follows: The next section is on Previous Related works; the methodology of segmentation and counting of WBC is introduced in the Materials and method section; the Experiments setup precedes the Results section, that is followed with the Discussion, and the Conclusions closes the paper.

Previous related works

In this section we present the state-of-the-art on segmentation and counting of WBCs in blood smear images.

Abdulhay et al. [3] developed a strategy for segmentation of blood leucocytes to identify abnormal and normal cells in images of smear pictures; for this purpose, the Fourier transform is utilized for removing the noise via destroying high recurrence subgroups, and the image is enhanced by applying a median filter and an adaptive weighted median filter; the learning process for segmentation is not automated: The end-user needs to select border and not border samples by drawing rectangles manually on the images; after extraction of morphological features, an SVM classifier is trained to segment the test images automatically.

In the literature hue is not treated as a proper feature. In [7], a not automated color correction process uses the L*a*b* color space: the red blood cells and background, using Otsu thresholding, and a combination of RGB, CMYK, and HSV color space analysis were applied to segment WBCs; the noise was removed using a morphological filter and connected component labeling, and the circle Hough Transform was applied to detect overlapping cells. Di Ruberto et al. [8, 10] segmented WBCs with a support vector machine and used pixels taken from manually segmented ALL-IDB2 images to train the support vector machine; after the training phase, the classifier produced a labeled image with a different label for each image component.

Nazlibilek et al. [12] employ the Otsu method to convert the grayscale input to a binarized image, with morphological operators applied by a disc-shaped structure; the connected components with an axis length 30% smaller than the average are removed from the binary image. Prinyakupt and Pluempitiwiriyawej [14] highlighted the WBC nucleus in the image by the sum of the R and B channels of the RGB space and divided the result by the value of channel G; the histogram equalization technique was applied, and the image was binarized with the Otsu method; the resulting image was used to segment the nucleus, and morphological operators were used to join the segmented nucleus with the lobes to remove noise and fill gaps.

Liu et al. [18] located WBCs using multiple windows obtained by scoring multiscale cues to extract a rectangular region; the location window covered the entire WBC, and the segmented sub-images were obtained with a replacement procedure taken as initialization and the GrabCut algorithm. Cao et al. [19] computed the dissimilarity measure between areas to cover all classes of the diameters of WBCs by applying a statistical analysis and K-means algorithm to color contrast (using L*a*b* space), edge density, gradient contrast, features based on color, canny edge, and gradient; these values were considered to set the size of the sliding windows.

Zheng et al. [20] presented an unsupervised initial segmentation and supervised segmentation refinement; in the first stage, the overall foreground region was extracted from the cell image using the K-means algorithm, and then a coarse WBC region was generated and used to train a support vector machine classifier; this classifier classified each pixel of an image to improve segmentation; median color features were introduced.

Another meta-heuristic for white blood cell segmentation was COFA (Chaotic Optimal Foraging Algorithm), developed by Sayed et al [21]; COFA is inspired by chaotic theory and the foraging behavior of the animals. Chaos is considering as a simulation of nonlinear systems that work dynamically. During foraging, animals solve how to find the best pitch with abundant prey; the emulation of the strategy of foraging can help to solve optimization problems. COFA for image segmentation outperforms other heuristics until 2019.

Cao et al. [22] considered the use of RGB and HSI color spaces for WBC count; they created images that were linear combinations of G, H, and S components that highlight the region of the leukocyte nucleus; this approach was used for the segmentation of peripheral blood leukocytes. Hedge et al. [23] presented an algorithm for the classification of WBCs based on the features of the nuclei; the R, G, and B components of a color image were separated, and the R component was replaced with a contrast-enhanced G component to enrich the color of the nucleus; the segmentation of the image was performed using the TissueQuant method.

Mishra et al. [4] pre-processed the input images using the Y component of the CMYK image and a triangle method of thresholding; they employed a discrete orthonormal S-transform to extract the texture features to classify WBCs, and the dimensionality was reduced using linear discriminant analysis. Sudha and Geetha [24] mapped the input RGB image to the HSV image; from the S component, the borders were obtained using the gradient method, and the image was binarized by thresholding the gradient magnitudes; the border strength location windows were processed by describing the extent to which each pixel is connected to its neighborhood; pixels may have background and foreground nodes.

The approach applied by Lopez-Puigdollers et al [25], avoid segmentation by using local image descriptors (oFAST, SIFT and CenSurE), along with an SVM as classifier; although local image descriptors are robust against the background, they may not work well in cell images, as pointed by Cao et al. [19]. An algorithm that reduces the calculation time is proposed by Cao et al. [26], this is achieved by first computing all the possible regions of WBCs; therefore, it only needs to deal with pixels in these possible regions, which reduces the computational burden; along with this, that method uses a combination of the optimal thresholding method, and the manifold-based low-rank representation technique to cluster the pixels; this method can segment the cell nucleus well; however, the contours of the WBC need to be manually drawn by an expert during training.

In the next Section the difference to treat hue as a proper feature in our method is presented, in addition to the quantitative advantages being described in the Section of Results.

Materials and methods

In the proposed approach we maximize the chromatic variance of the pixels by projecting the hue of the pixels to the eigenspace created from the principal components (PCs) computed with the hue data of the given image. Therefore, the data are uncorrelated, and they are oriented to obtain the highest variance. This results in an improved precision of segmentation, as we show below.

PC analysis takes a dataset {x1,…,xm}⊂ℝn and finds a new orthonormal basis Λ = [v1,…,vn] with its axes ordered, called PCs. This new basis is rotated in such a way that the first axis is oriented along the direction in which the data have their highest variance. Consequently, these axes have associated decreasing “indices” λ1<λ2<⋯<λn, corresponding to the variance of the dataset when projected on the axes. PCs are ordered according to their corresponding eigenvalues or variances [27].

The vectors of the set {x1,…,xm} are projected to the eigenspace as (1)

The column vectors yk are the respective projections to the eigenspace of the vectors of the original dataset, where .

The methodology consists of the following steps. First, the RGB image is mapped to another color space. In this study, we performed experiments using the HSV and L*a*b* spaces. The hue component is extracted and projected to the eigenspace built with the PCs computed with the hue data; these projections are mapped back to the RGB space. These “new” RGB color vectors are projected to the eigenspace generated by the PCs obtained with these RGB color vectors (Fig 2). Thereby, the WBCs are enhanced. After the WBCs are segmented, overlapping WBCs are separated. Then, the resulting image is binarized, and connected component labeling is employed to count the WBCs.

thumbnail
Fig 2. Flow chart of proposed segmentation methodology: To maximize the chromatic variance of the pixels, the WBCs are segmented by color features on a set of projections of the chromaticity components.

First, the RGB colors of the given image are mapped to the (different) color space HSV and L*a*b* spaces; then, the hue components of colors are extracted to form the vectors ψk; from the vectors ψk, the PCs are computed and ψk projected to the eigenspace generated by the PCs; the projected vectors substitute the hue components of the vectors φk, obtaining the vectors that, in turn are mapped to the RGB space; the vectors obtained are normalized and their PCs computed. Finally, the normalized vectors are projected to the eigenspace, obtaining the color vectors that shape the WBCs.

https://doi.org/10.1371/journal.pone.0261857.g002

Color has two features: chromaticity or hue, and brightness or intensity. In the Hue-Saturation-Vale (HSV) and L*a*b* color spaces the hue is represented in the H, and a* and b* components, respectively. While the brightness is represented in the V and L* channels, respectively. In the red-green-blue (RGB) space the colors are represented with three-element vectors, where the chromaticity and the brightness are modeled by the orientation and magnitude of the vectors, respectively [28].

Although the RGB space is often employed to represent colors, it is not adequate for color processing because the color differences cannot be computed using the Euclidean distance [28]. Thus, we performed experiments using the L*a*b* and HSV color spaces to process the chromaticity. These color spaces are adequate for color processing, and the representation resembles the human perception of color because the chromaticity and intensity are decoupled [28]. In addition, we propose to separate overlapping WBCs: the intensity gradient and chromatic difference of the pixels are employed for border detection, improving the accuracy of the WBC count as well.

Segmentation method

The segmentation proposal consists of the following steps:

  1. Let {ϕ(i,j)|∀(i,j)∈T}⊂ℝ3 be the set of RGB color vectors of the given image, where T = {1,…,n}×{1,…,m}, and n and m are the numbers of rows and columns of the input image, respectively. The color vectors are mapped to a different color space, obtaining the set of vectors {φ(i,j)|∀(i,j)∈T}⊂ℝ3.
  2. The hue component is extracted and represented by the vectors of the set {ψ(i,j)|∀(i,j)∈T}⊂ℝ2. A new eigenspace is built with these vectors by computing the PCs. The vectors ψ(i,j) are projected to this eigenspace, obtaining the set of vectors .
  3. The hue component of the vectors φ(i,j) is substituted by the respective vectors to obtain the set of vectors .
  4. The vectors are mapped to the RGB space to obtain the set of vectors , which are normalized with and placed in the set . The PCs {v1, v2, v3}⊂ℝ3 and the respective eigenvalues λ1<λ2<λ3 are computed from the vectors .
  5. The vectors are projected to the eigenspace:

(2) where, is the mean of the vectors . Experimentally, we found that depending on the color space used and the proportion of the accumulative variance contained by the largest eigenvalue, the segmentation of the WBCs is obtained by projecting the vectors with the first or the second PC; that is, (3) Here, δλ = 0.9 when the L*a*b* space is employed and δλ = 0.75 when the hue is processed in the RGB and HSV spaces.

Hue extraction

In Step 2 of the segmentation approach, the chromaticity is extracted as follows. In the L*a*b* space, components a and b are used to characterize the hue with (4) Once the vectors are projected to the eigenspace, , they are substituted in the vectors , which are then mapped to the RGB space.

In the HSV space, component h is employed, and the hue is characterized by (5) Once the vectors are projected to the eigenspace, , the orientation of the vectors is computed in terms of the HSV space with (6) The value of is substituted in the vectors , then they are mapped to the RGB space. Reference [28] shows the mathematical operations to map the colors between the RGB, L*a*b*, and HSV spaces.

WBC counting

The image obtained with vector projections ω(i,j), Eq (2), is binarized as follows. (7) The WBCs are counted using the connected component labeling to the binary image B(i,j).

Before the WBCs are counted, the overlapping WBCs are separated by computing their borders using the gradient method. We include the chromatic difference between pixels by obtaining the orientation difference between the color vectors represented in the RGB space. A pixel is set to zero if detected as a border: (8) where ∇ω(i,j) is the intensity gradient of the channel created with the projections ω(i,j) using the Prewitt masks; and are the orientation difference of the color vectors in the vertical and horizontal directions, respectively, computed as follows: (9) (10) The separation approach is only applied to large objects; however, before the overlapping WBCs are separated, small objects are deleted.

Quantitative evaluation

We conducted a pixel-level segmentation evaluation by comparing the segmented images with their corresponding ground truths. These ground truth images are hand-segmented by human experts [29]. The quantitative evaluation was computed using the metrics: accuracy (Ac), specificity (Sp), precision (Pr), sensitivity (Se), f-score (f), Jaccard similarity coefficient (J), and kappa index (K). The value of 1) accuracy refers to the quality of the classified pixels, both the WBC and background pixels; 2) specificity refers to the segmentation quality of the background in the images; 3) precision refers to the quality of the segmented images in that the pixels of the background are not classified as part of WBC; and 4) sensitivity refers to the quality of the segmented images, in that the pixels of the WBC are not classified as part of the background. See Eqs (11)–(17). (11) (12) (13) (14) (15) (16) (17) where (18)

The accuracy level in relation to K is classified as follows [30]: poor (K≤0.2), reasonable (0.2<K≤0.4), good (0.4<K≤0.6), very good (0.6<K≤0.8), and excellent (K>0.8).

Table 1 summarizes the pixel classification of true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN).

thumbnail
Table 1. Definition of pixels classified as true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN).

https://doi.org/10.1371/journal.pone.0261857.t001

Fig 3 shows the corresponding ground truth of the images in Fig 1.

After the segmented image was binarized with Eq (8), connected component labeling was applied to count the WBCs. The counting precision was computed using Eq (19): (19) where N is the number of correctly detected WBCs, and M is the total number of detected WBCs [29].

In state-of-the-art image segmentation, the algorithms are usually validated regarding the ground truth, using the probabilistic random index (PRI), variation of information (VOI), and global consistency error (GCE) [28]. Studies addressing segmentation of WBCs validate the algorithms by evaluating the classification at the pixel level of the segmented images, but with this approach, the object-based evaluation of segmentation cannot be performed. With the PRI, VOI, and GCE metrics, it is possible to conduct an object-based evaluation of the segmented images.

Let I and S be the ground truth and segmentation provided by the algorithm, respectively. PRI measures the similarity between the two data clusters as follows: (20) where n is the number of pixels; ci,j is a Boolean function: ci,j = 1 if and ci,j = 0 otherwise; is the label of pixel xi in the ground truth; is the label of pixel xj in the segmented image; and pi,j is the expected value of the Bernoulli distribution for the pixel pair.

The VOI index measures the sum of the loss and gain of information between the two clusters belonging to the lattice of possible partitions as follows: (21) where ni is the number of points belonging to the ith cluster, and c is the number of clusters. F is the mutual information between the two clusters, defined as (22) where ni,j is the number of points in the intersection of cluster i of S and j of I, and cs and cI are the numbers of clusters of S and I, respectively.

The GCE computes the extent a segmented image is viewed as a refinement of the other. A measure of the error at each pixel xi can be written as (23) where is the cardinality, \ is the set difference, and R(S, xi) is the set of pixels belonging to the region in segmentation S containing pixel xi.

The ranges of the PRI, VOI, and GCE metrics are [0, 1], [0, ∞), and [0, 1], respectively. The higher the value of PRI, the better the segmentation, and the lower the value of VOI and GCE, the better the segmentation with respect to the ground truth.

Experiments

We employed the well-known Acute Lymphoblastic Leukaemia Image Database (ALL-IDB), (https://homes.di.unimi.it/scotti/all/) which is a benchmark database used to test algorithms for counting, cancer detection, and classification of WBCs. The ALL-IDB contains 108 color images of BS samples: a set of 33 images of 1368 × 1712-pixel size and a set of 75 images of 1944 × 2592-pixel size. Images (a) and (b) of Fig 1 belong to the first and second sets, respectively. Most of the images of the ALL-IDB contain more than one WBC and several of the WBCs overlap. The respective ground truths of the ALL-IDB image can be downloaded in this repository (https://drive.google.com/drive/folders/1F7kZ1SRWUD9R6aHLMkj3wsjcHnvlGuwP?usp=sharing).

Where the threshold value in Eq (7) is δω = 37, and the threshold values of Eq (8) set to δI = 0.2 and δθ = 2.5°. For the first 33 images and last 75 images, objects smaller than 3500 and 5000 pixels, respectively, were deleted. Analogously, the separation approach was applied to objects larger than 13,000 and 21,000 pixels for the first 33 images and the last 75 images, respectively.

Results

Table 2 shows the results obtained using Eqs (11)–(17). Notice that the highest performance is obtained by processing the chromaticity in the L*a*b* space: K = 0.8589, and the accuracy level, in relation to K, is classified as excellent: K>0.8.

thumbnail
Table 2. Results obtained by comparing the resulting images with the ground truth.

https://doi.org/10.1371/journal.pone.0261857.t002

Figs 4–6 show the segmented images obtained by processing the hue in the RGB, HSV, and L*a*b* spaces, respectively, of the images in Fig 1, see S1 Appendix.

Images (a)–(d) and (e)–(h) of Fig 7 are extracted from the first 33 and last 75 images of the ALL-IDB, respectively. Fig 8 shows the ground truth of the images of Fig 7 and the resulting images by applying our approach to the images in Fig 7, where the hue is processed in the RGB, HSV, and L*a*b* spaces, respectively, see S1 Appendix.

Table 3 shows the counting results.

thumbnail
Table 3. Counting precision obtained using the RGB, HSV, and L*a*b* spaces and separating overlapping WBCs.

https://doi.org/10.1371/journal.pone.0261857.t003

Segmentation and counting

References [7, 10, 24, 29] are the only previous works we found that reported quantitative evaluation of their resulting images regarding the ALL-IDB ground truth. Table 4 shows the results reported in these works and ours.

thumbnail
Table 4. Quantitative evaluation comparison of segmented images regarding the ALL-IDB ground truth, using different methods.

https://doi.org/10.1371/journal.pone.0261857.t004

The results presented in [7 and 10] were obtained by processing only the first 30 and 33 images of the ALL-IDB, respectively. In reference [24], the hue features were not employed for segmentation, and only the S channel was used after mapping the given RGB image to the HSV space. Shahzad et al. [29] used a deep convolutional encoder-decoder network for semantic segmentation, which was fed with grayscale images; thus, they did not use color features.

Our proposed method outperforms the previous methods in specificity and accuracy (Table 4), and thus improves the quality of the segmentation regarding the background and the entire WBC image content.

Table 5 shows the average PRI, VOI, and GCE values obtained by evaluating the segmented images.

thumbnail
Table 5. Average PRI, VOI, and GCE values of the resulting images.

https://doi.org/10.1371/journal.pone.0261857.t005

The results obtained with the PRI, VOI, and GCE metrics cannot be compared with related works addressing WBC segmentation because these metrics have not been used to evaluate the resulting images in these works. However, given the results shown in Table 5 notice that the object-based evaluation similitude between the segmented images and the ground truth is high. The best results for PRI and VOI were obtained with the L*a*b* space, while the best value for GCE was obtained with the RGB space, but the respective value obtained with the L*a*b* space is very close.

It is important to note that most of the ground truth WBCs are segmented with the cytoplasm, whereas with our approach, the WBCs are segmented without the cytoplasm, only the nucleus. Therefore, the cytoplasm pixels were classified as the background; hence, sensitivity achieved the lowest value. Nevertheless, the WBC count was not affected since WBCs were detected.

In Table 6 we compare the counting precision obtained with our approach with previous works that use the ALL-IDB.

thumbnail
Table 6. Counting precision comparison of different works.

https://doi.org/10.1371/journal.pone.0261857.t006

Regarding accuracy and specificity, our proposal on WBC segmentation is better compared with previous works. Although, the counting precision is slightly lower: the separation approach of overlapped WBCs cells does not overcome the works results in Table 6. For improving the WBC counting, different techniques to extract shape features need to be tried for separating overlapped WBCs. This is part of future work.

Our segmentation approach is unsupervised, human-inspired on the perception of color; to locate the WBCs in blood smear images, the chromatic difference between the WBCs and the other blood elements is used; the pixels with high chromatic variance are selected to shape the WBCs; using principal component analysis, the chromatic variance is maximized. Hence, our approach is robust to deal with the hue and brightness variations; also, to upgrade scale, since our method successfully segmented the images of the ALL-IDB. As we mentioned in the Experiments Section, the size of the first 33 images of the ALL-IDB are 1368 × 1712-pixel and the rest of the images of 1944 × 2592-pixel; moreover, the images of these two image sets were captured under different magnifications, brightness and hue staining. Note that the results in [7] and [10] were obtained by processing only the first 33 and 30 images, less than 50% of the ALL-IDB, respectively. It is relevant say that the present proposal is of general purpose, not focused to recognize a specific color as other works do [7, 8, 10].

Hue as a feature

Although different studies employ color data to segment WBCs, the color is not processed as a feature, but the color components are processed separately. The WBCs are segmented by performing mathematical operations between the color components or in a specific color channel as if they were intensity channels; therefore, the chromaticity is not processed adequately because the hue components are uncorrelated. A major limitation is that the color channels are selected intuitively.

Table 7 summarizes the color spaces and color components employed in previous studies. In all of them, the color components are separated and intuitively treated in an essay - error manner.

thumbnail
Table 7. Color spaces and color components employed in related works.

https://doi.org/10.1371/journal.pone.0261857.t007

In our proposal, chromaticity was processed without separating the hue components because the hue of the pixels was represented as a vector, preserving the correlation between the hue components. The vectors were processed using matrix operations. The staining and illumination conditions of the first 33 images of the ALL-IDB are different from the conditions of the last 75 images (Fig 7). Our proposal is robust for staining and illumination variations, and is competitive with respect to previous works (Tables 4 and 6). Most of the studies have been developed to segment WBCs in cropped images; hence, such approaches may not be suitable for segmenting several WBCs within an image.

Furthermore, several of the methods listed in Table 7 employ clustering techniques that tend to create groups with the same size or number of elements for image segmentation. However, small parts within the image are not segmented successfully, and the performance of the clustering techniques depends on the initial values of the centers. In addition, they require an a priori number of groups to group the data (pixels), but the number of groups depends on the image conditions.

Discussion

We present a systematic formal method for leukocyte counting within blood smear images. The WBC segmentation is performed by selecting, via specific combinations of principal component analysis, pixels with a high chromatic variance that contrast with the average hue of the images. The best quantitative evaluation of this segmentation is obtained when the chromaticity is processed in the L*a*b* space. The segmentation performance is classified as excellent because the kappa index is greater than 0.8. Our method efficiently separates overlapping leukocytes by computing the intensity gradient and chromatic difference separately. The white blood cells were counted by applying connected component labeling to the binary version of the segmented image. Our proposal is competitive because the results of the quantitative evaluation and counting precision over the ALL-IDB benchmark are similar in precision and sensitivity and better in specificity and accuracy than those of related studies.

Furthermore, this method achieved similar results to previous in precision and f-score, and higher for specificity and accuracy; this is because the color is processed as a proper feature, not decoupled in a trial-and-error experimental handling of components, as is usually done in the previous approaches. From the perspective of artificial intelligence, our method is bioinspired because it mimics the human perception of color.

Recent studies that used convolutional neural networks to segment WBCs [3133] performed experiments with their private image databases, without the use of standard benchmarks, so their results cannot be compared with the ones from previous studies and the present. The main contrast is that the computational load of convolutional neural networks is usually high, whereas the computational load of our implementation is low. Moreover, the size of the convolutional neural networks is fixed depending partially on the size of the input images. Owing to the different sizes of the images in the three image databases employed for experiments, the images must be resized to fit the size of the input layer of the convolutional neural network. The limitation of this approach is that the quality of the image may be degraded. In our approach, image resizing is not necessary.

According to Table 6, the performance of our proposal is close to the results reported in the cited works. However, the results in [7, 10] were obtained by processing only the first 33 and 30 images of the ALL-IDB, respectively; while we obtained 94.08% and 94.24% precision for the respective image sets. We claim that our approach is competitive for WBC counting regarding the results in Tables 4 and 6.

The other relevant omitted aspect is that the average computing time per image is not reported in previous works. This time depends on the algorithm complexity O(n) for linear, O(nm) for not linear and O(an), for exponential time: O(n)≪O(nm)≪O(an), m, a≥2 natural numbers, an the exponential function. This issue is not reported by any of the works reviewed, nor the features of the used hardware. Our proposal used principal component analysis, that involves linear mathematical operations of sums and multiplications, with low computational load O(n). The mapping of colors between RGB and L*a*b* color spaces, involve non-linear mathematical operations. Again, the computational load is not high at all, because, as well, most of the mathematical operations to process the images are sums and multiplications with complexity O(n). Therefore, our proposal to process the images is quite computational competitive to detect and segment WBCs.

Our segmentation approach obtained competitive results, but the WBC counting did not achieve the results reported by the authors cited in Table 6; our proposal to separate overlapped WBCs was not always successful. This issue can be improved if more feature data, mainly shape features, are included to separate successfully overlapped WBCs, thereby, the counting precision is improved. The separation of overlapped WBCs need be addressed as part of the future work.

Conclusions

The white blood cell count WBC, as an essential factor for physicians to diagnose infections and adequate treatment, currently is miscounting error exposed. We proposed an automated method that mimics the human perception of color, so locate WBCs in a blood smear image via the high chromatic contrast. This is by applying principal component analysis over usual spaces, choice pixels of WBC with high contrast with the average hue of the other blood smear elements. Besides, chromaticity is processed as a feature, without separating hue components in a trial-and-error approach -as mostly used in the state-of-the-art automation. As a result, WBC recognition is computationally efficient, overlapping WBCs are separated, and the final count is more precise. In experiments with the ALL-IDB benchmark, the performance of the segmentation proposal was assessed by comparing the WBC from the processed images with the ground truth. From the comparison with previous methods, our method reached similar results in sensitivity and precision and around 0.2% higher specificity and 0.3% higher accuracy.

Supporting information

S1 File. Script (matlab): Image processed in RGB space.

https://doi.org/10.1371/journal.pone.0261857.s001

(M)

S2 File. Script (matlab): Image processed in HSV space.

https://doi.org/10.1371/journal.pone.0261857.s002

(M)

S3 File. Script (matlab): Image processed in Lab space.

https://doi.org/10.1371/journal.pone.0261857.s003

(M)

S4 File. Script (matlab): Compare segmentations.

https://doi.org/10.1371/journal.pone.0261857.s004

(M)

References

  1. 1. Tsai MH, Yu SS, Chan YK, Jen CC. Blood smear image based malaria parasite and infected-erythrocyte detection and segmentation. J Med Syst. 2015;39: 118. pmid:26289625
  2. 2. Jan Z, Khan A, Sajjad M, Muhammad K, Rho S, Mehmood I. A review on automated diagnosis of malaria parasite in microscopic blood smears images. Multimed Tool Appl. 2018; 77: 9801–9826.
  3. 3. Abdulhay E, Mohammed MA, Ibrahim DA, Arunkumar N, Venkatraman V. Computer aided solution for automatic segmenting and measurements of blood leucocytes using static microscope images. J Med Syst. 2018;42(4): 58. pmid:29455440
  4. 4. Mishra S, Majhi B, Sa PK. Texture feature based classification on microscopic blood smear for acute lymphoblastic leukemia detection. Biomed Signal Process Control. 2019;47: 303–311.
  5. 5. Liu H, Cao H, Song E. Bone marrow cells detection: a technique for microscopic image analysis. J Med Syst. 2019;43: 82. pmid:30798374
  6. 6. Chung J, Ou X, Kulkarni RP, Yang C. Counting white blood cells from a blood smear using Fourier ptychographic microscopy. PloS ONE. 2015;10(7): e0133489. pmid:26186353
  7. 7. Safuan SS, Tomari M, Zakaria W. White blood cell (WBC) counting analysis in blood smear images using various color segmentation methods. Measurement. 2018;116: 543–555.
  8. 8. Di Ruberto C, Loddo A, Putzu L. A leucocytes count system from blood smear images. Mach Vis Appl. 2016;27: 1151–1160.
  9. 9. Di Ruberto C, Loddo A, Putzu L. A multiple classifier learning by sampling system for white blood cells segmentation. Computer Analysis of Images and Patterns. CAIP 2015. Lecture Notes in Computer Science, vol 9257. 2015. Pp. 415–425.
  10. 10. Di Ruberto C, Loddo A, Putzu L. Learning by sampling for white blood cells segmentation. Image Analysis and Processing — ICIAP 2015. Lecture Notes in Computer Science, vol 9279. 2015. Pp. 557–567
  11. 11. Alomari Y, Abdullah SH, Azma RZ, Omar K. Automatic detection and quantification of WBCs and RBCs using iterative structured circle detection algorithm. Comput Math Method Med. 2014;2014(979302): 1–17. pmid:24803955
  12. 12. Nazlibilek S, Karacor D, Ercan T, Sazli MH, Kalender O, Ege Y. Automatic segmentation, counting, size determination and classification of white blood cells. Measurement. 2014;55: 58–65.
  13. 13. Ghosh P, Bhattacharjee D, Nasipuri M. Blood smear analyzer for white blood cell counting: a hybrid microscope image analyzing technique. Appl Soft Comput. 2016;46: 629–638.
  14. 14. Prinyakupt J, Pluempitiwiriyawej C. Segmentation of white blood cells and comparison of cell morphology by linear and naïve Bayes classifiers. Biomed Eng Online. 2015;14: 63. pmid:26123131
  15. 15. Cheng HD, Jiang XH, Sun Y, Wang J. Color image segmentation: advances and prospects. Pattern Recognit. 2001; 34(12):2259–2281
  16. 16. Cuevas E, Diaz M, Manzanares M, Zaldivar D, Perez-Cisneros M. An improved computer vision method for white blood cells detection. Comput Math Method Med. 2013;2013(137392): 1–14. pmid:23762178
  17. 17. Dorini LB, Minetto R, Leite NJ. Semiautomatic white blood cell segmentation based on multiscale analysis. IEEE J Biomed Health Inform. 2013;17(1): 250–256. pmid:22855228
  18. 18. Liu Y, Cao F, Zhao J, Chu J. Segmentation of white blood cells image using adaptive location and iteration. IEEE J Biomed Health Inform. 2017;21(6): 1644–1655. pmid:27834657
  19. 19. Cao F, Liu Y, Huang Z, Chu J, Zhao J. Effective segmentations in white blood cell images using ɛ-SVR-based detection method. Neural Comput Appl. 2019;31: 6767–6780.
  20. 20. Zheng X, Wang Y, Wang G, Liu J. Fast and robust segmentation of white blood cell images by self-supervised learning. Micron. 2018;107: 55–71. pmid:29425969
  21. 21. Sayed GI, Solyman M, Hassanien AE. A novel chaotic optimal foraging algorithm for unconstrained and constrained problems and its application in white blood cell segmentation. Neural Comput Appl. 2019;31: 7633–7664.
  22. 22. Cao H, Liu H, Song E. A novel algorithm for segmentation of leukocytes in peripherical blood. Biomed Signal Process Control. 2018;45: 10–21.
  23. 23. Hedge RB, Prasad K, Hebbar H, Singh BK. Development of a robust algorithm for detection of nuclei and classification of white blood cells in peripherical blood smear images. J Med Syst. 2018;42(6): 110. pmid:29721616
  24. 24. Sudha K, Geetha P. A novel approach for segmentation and counting of overlapped leukocytes in microscopic blood images. Biocybern Biomed Eng. 2020;40(2): 1–10.
  25. 25. Lopez-Puigdollers D, Traver VJ, Pla F (2019). Recognizing white blood cells with local image descriptors. Expert Syst Appl, 115:695–708.
  26. 26. Cao F, Cai M, Chu J, Zhao J, Zhou Z (2017). A novel segmentation algorithm for nucleus in white blood cells based on low-rank representation. Neural Comput Appl, 28:503–511.
  27. 27. Janos A, Balazs F. Cluster analysis for data mining and system identification. Birkhäuser Verlag; 2007.
  28. 28. Garcia-Lamont F, Cervantes J, Lopez A, Rodriguez L. Segmentation of images by color features: a survey. Neurocomputing. 2018;292: 1–27.
  29. 29. Shazad M, Umar AI, Khan M, Shirazi SH, Khan Z, Yousaf W. Robust method for semantic segmentation of whole-slide blood cell microscopic images. Comput Math Method Med. 2020;2020: 4015323.
  30. 30. Landis R, Koch G. The measurement of observer agreement for categorical data. Biom. 1977;33(1): 159–174. pmid:843571
  31. 31. Hedge RB, Prasad K, Hebbar H, Singh BMK. (2019) Comparison of traditional image processing and deep learning approaches for classification of white blood cells in peripheral blood smear images. Biocybern Biomed Eng, 39:382–392
  32. 32. Zhao J, Zhang M, Zhou Z, Chu J, Cao F. (2017) Automatic detection and classification of leukocytes using convolutional neural networks. Med Biol Eng Comput, 55:1287–1301 pmid:27822698
  33. 33. Kutlu H, Avci E, Özyurt F (2020) White blood cells detection and classification based on regional convolutional neural networks. Med Hypotheses, 135:109472 pmid:31760248