Medical imaging is a relevant field of application of image processing algorithms. In particular, the analysis of white blood cell (WBC) images has engaged researchers from fields of medicine and computer vision alike. Since WBCs can be approximated by a quasicircular form, a circular detector algorithm may be successfully applied. This paper presents an algorithm for the automatic detection of white blood cells embedded into complicated and cluttered smear images that considers the complete process as a circle detection problem. The approach is based on a natureinspired technique called the electromagnetismlike optimization (EMO) algorithm which is a heuristic method that follows electromagnetism principles for solving complex optimization problems. The proposed approach uses an objective function which measures the resemblance of a candidate circle to an actual WBC. Guided by the values of such objective function, the set of encoded candidate circles are evolved by using EMO, so that they can fit into the actual blood cells contained in the edge map of the image. Experimental results from blood cell images with a varying range of complexity are included to validate the efficiency of the proposed technique regarding detection, robustness, and stability.
Natureinspired computing is a field of research that is concerned with both the use of biology as an inspiration for solving computational problems and the use of the natural physical phenomena to solve real world problems. Moreover, natureinspired computing has proved to be useful in several application areas [
On the other hand, white blood cells (WBCs) also known as leukocytes play a significant role in the diagnosis of different diseases. Although digital image processing techniques have successfully contributed to generate new methods for cell analysis, which, in turn, have lead into more accurate and reliable systems for disease diagnosis, however, high variability on cell shape, size, edge, and localization complicates the data extraction process. Moreover, the contrast between cell boundaries and the image’s background may vary due to unstable lighting conditions during the capturing process.
Many works have been conducted in the area of blood cell detection. In [
Since blood cells can be approximated with a quasicircular form, a circular detector algorithm may be handy. The problem of detecting circular features holds paramount importance for image analysis, in particular for medical image analysis [
As an alternative to Hough transformbased techniques, the circle detection problem has also been handled through optimization methods. In general, they have demonstrated to deliver better results than those based on HT considering accuracy, speed, and robustness [
Although detection algorithms based on the optimization approaches present several advantages in comparison to those based on the Hough transform, they have been scarcely applied to WBC detection. One exception is the work presented by Karkavitsas and Rangoussi [
In this paper, the WBC detection task is approached as an optimization problem, and the EMObased circle detector [
The EMObased circle detector uses the encoding of three edge points that represent candidate circles in the edge map of the scene. The quality of each individual is calculated by using an objective function which evaluates if such candidate circles are really present in the edge map of the image. The better a candidate circle approximates the actual edge circle, the more the objective function value decreases. Therefore, the detection performance depends on the quality of the edge map as it is obtained from the original images. However, since smear images present different imaging conditions and staining intensities, they produce edge maps partially damaged by noisy pixels. Under such conditions, the use of the EMObased circle detector cannot be directly applied to WBC detection.
This paper presents an algorithm for the automatic detection of blood cell images based on the EMO algorithm. The proposed method modifies the EMObased circle detector by incorporating a new objective function. Such function allows to accurately measure the resemblance of a candidate circle with an actual WBC on the image which is based on the information not only from the edge map but also from the segmentation results. Guided by the values of the new objective function, the set of encoded candidate circles are evolved using the EMO algorithm so that they can fit into actual WBC on the image. The approach generates a subpixel detector which can effectively identify leukocytes in real images. Experimental evidence shows the effectiveness of such method in detecting leukocytes despite complex conditions. Comparison to the stateoftheart WBC detectors on multiple images demonstrates a better performance of the proposed method.
The main contribution of this study is the proposal of a new WBC detector algorithm that efficiently recognizes WBC under different complex conditions while considering the whole process as a circle detection problem. Although circle detectors based on optimization present several interesting properties, to the best of our knowledge, they have not yet been applied to any medical image processing up to date.
This paper is organized as follows. Section
Initially designed for bound constrained optimization problems, the EMO method [
Similar to the electromagnetism theory for charged particles, each point
The attractionrepulsion mechanism in EMO states that points holding more charge attract other points in
A local search is used to explore the neighborhood of each
(1) Input parameters: the maximum number of iterations
search parameters such as
(2) Initialize: set the iteration counter
and identify the best point in
(3) while
(4)
(5)
(6)
(7)
(8) End while
In order to detect circle shapes, candidate images must be preprocessed first by the wellknown Canny algorithm which yields a singlepixel edgeonly image. Then, the (
In order to construct each particle
Circle candidate (charged particle) built from the combination of points
In order to model the fitness function, the circumference coordinates of the circle candidate
The test
The objective function
A value of
Procedure to evaluate the objective function
The implementation of the proposed algorithm can be summarized into the following steps.
The Canny filter is applied to find the edges and store them in the
The objective function
The charge between particles is calculated using expression (
The particles are moved according to their force magnitude. The new particle’s position
For each
The new particles
The
The best
From the original edge map, the algorithm marks points corresponding to
Finally, the best particle
Figure
An analogy to the Coulomb’s law.
In order to detect WBC, the proposed detector combines the EMObased circle detector presented in Section
To employ the proposed detector, smear images must be preprocessed to obtain two new images: the segmented image and its corresponding edge map. The segmented image is produced by using a segmentation strategy whereas the edge map is generated by a border extractor algorithm. Both images are considered by the new objective function to measure the resemblance of a candidate circle with an actual WBC.
The goal of the segmentation strategy is to isolate the white blood cells (WBCs) from other structures such as red blood cells and background pixels. Information of color, brightness, and gradients is commonly used within a thresholding scheme to generate the labels to classify each pixel. Although a simple histogram thresholding can be used to segment the WBCs, in this work, the diffused expectationmaximization (DEM) has been used to assure better results [
DEM is an expectationmaximization (EM) based algorithm which has been used to segment complex medical images [
For the WBCs segmentation, the DEM has been configured considering three different classes (
Preprocessing process: (a) original smear image, (b) segmented image obtained by DEM, and (c) the edge map obtained by using the morphological edge detection procedure.
Once the segmented image has been produced, the edge map is computed. The purpose of the edge map is to obtain a simple image representation that preserves object structures. Optimizationbased circle detectors [
Other example is presented in Figure
The circle detection approach uses the encoding of three edge points that represent candidate circles in the image. In the original EMObased circle detector, the quality of each individual is calculated by using an objective function which evaluates the existence of a candidate circle considering only information from the edge map (shape structures). The better a candidate circle approximates the actual edgecircle, the more the objective function value decreases. Therefore, the detection performance depends on the quality of the edge map that is obtained from the original images. However, since smear images present different imaging conditions and staining intensities, they produce edge maps partially damaged by noisy pixels. Under such conditions, the use of the EMObased circle detector cannot be directly applied to WBC detection.
In order to use the EMObased circle detector within the context of WBC detection, it is necessary to change the fitness function presented in (
To illustrate the functionality of the new objective function, Figure
WBC detection procedure. (a) Smear image. (b) Segmented image. (c) Edge map. (d) Detected circle by using the original objective function. Red points show the coincidences between the candidate circle and the edge map. (e) Detected circle by using the new objective function. Yellow points represent the edge pixels without coincidence. (f) Final result.
Table
EMO parameters used for leukocytes detection in medical images.






50  3  5  4  4 
Under such assumptions, the complete process to detect WBCs is implemented as follows.
Segment the WBCs using the DEM algorithm.
Get the edge map from the segmented image by using the morphological edge detection method.
Start the circle detector based on EMO over the edge map while saving best circles (Section
Define parameter values for each circle that identify the WBCs.
In order to present the algorithm’s stepbystep operation, a numerical example has been set by applying the proposed method to detect a single leukocyte lying inside of a simple image. Figure
Detection numerical example: (a) The image used as example. (b) Segmented image. (c) Edge map. (d) Initial particles. (e) Forces exerted over
The EMObased circle detector is executed using information of the edge map and the segmented image (for the sake of easiness, it only considers a population of three particles). Like all evolutionary approaches, EMO is a populationbased optimizer that attacks the starting point problem by sampling the search space at multiple, randomly chosen, initial particles. By taking three random pixels from vector
Experimental tests have been developed in order to evaluate the performance of the WBC detector. It was tested over microscope images from blood smears holding a
Figure
Resulting images of the first test after applying the WBC detector: (a) original image, (b) image segmented by the DEM algorithm, (c) edge map, and (d) the white detected blood cells.
Resulting images of the second test after applying the WBC detector: (a) original image, (b) image segmented by the DEM algorithm, (c) edge map, and (d) the white detected blood cells.
A comprehensive set of smearblood test images is used to test the performance of the proposed approach. We have applied the proposed EMObased detector to test images in order to compare its performance to other WBC detection algorithms such as the boundary support vectors (BSVs) approach [
To evaluate the detection performance of the proposed detection method, Table
Comparative leukocyte detection performance of the BSV approach, the IO method, the Wang algorithm, the BGA detector, and the proposed EMO method over the data set which contains 30 images and 426 leukocytes.
Leukocyte type  Method  Leukocytes detected 
Missing  False alarms  DR  FAR 

Bright leukocytes (222)  BSV  104  118  67  46.85%  30.18% 
IO  175  47  55  78.83%  24.77%  
Wang  186  36  42  83.78%  18.92%  
BGA  177  45  22  79.73%  9.91%  
EMO  211  11  10  95.04%  4.50%  
 
Dark leukocytes (204)  BSV  98  106  54  48.04%  26.47% 
IO  166  38  49  81.37%  24.02%  
Wang  181  23  38  88.72%  18.63%  
BGA  170  34  19  83.33%  9.31%  
EMO  200  4  6  98.04%  2.94%  
 
Overall (426)  BSV  202  224  121  47.42%  28.40% 
IO  341  85  104  80.05%  24.41%  
Wang  367  59  80  86.15%  18.78%  
BGA  347  79  41  81.45%  9.62%  
EMO  411  15  16  96.48%  3.75% 
Experimental results show that the proposed EMO method, which achieves 96.48% leukocyte detection accuracy with 3.75% false alarm rate, is compared favorably against other WBC detection algorithms, such as the BSV approach, the IO method, the Wang algorithm, and the BGA detector.
Images of blood smear are often deteriorated by noise due to various sources of interference and other phenomena that affect the measurement processes in imaging and data acquisition systems. Therefore, the detection results depend on the algorithm’s ability to cope with different kinds of noises. In order to demonstrate the robustness in the WBC detection, the proposed EMO approach is compared to the BSV approach, the IO method, the Wang algorithm and the BGA detector under noisy environments. In the test, two different experiments have been studied. The first inquest explores the performance of each algorithm when the detection task is accomplished over images corrupted by salt and pepper noise. The second experiment considers images polluted by Gaussian noise. Salt and Pepper and Gaussian noise are selected for the robustness analysis because they represent the most compatible noise types commonly found in images of blood smear [
Comparative WBC detection among methods that considers the complete data set of 30 images corrupted by different levels of salt and pepper noise.
Noise level  Method  Leukocytes detected 
Missing  False alarms  DR  FAR 

5% salt and pepper noise 
BSV  148  278  114  34.74%  26.76% 
IO  270  156  106  63.38%  24.88%  
Wang  250  176  118  58.68%  27.70%  
BGA  306  120  103  71.83%  24.18%  
EMO  390  36  30  91.55%  7.04%  
 
10% salt and pepper 
BSV  101  325  120  23.71%  28.17% 
IO  240  186  78  56.34%  18.31%  
Wang  184  242  123  43.19%  28.87%  
BGA  294  132  83  69.01%  19.48%  
EMO  374  52  35  87.79%  8.21% 
Comparative WBC detection among methods that considers the complete data set of 30 images corrupted by different levels of Gaussian noise.
Noise level  Method  Leukocytes detected 
Missing  False alarms  DR  FAR 


BSV  172  254  77  40.37%  18.07% 
IO  309  117  71  72.53%  16.67%  
Wang  301  125  65  70.66%  15.26%  
BGA  345  81  61  80.98%  14.32%  
EMO  397  29  21  93.19%  4.93%  
 

BSV  143  283  106  33.57%  24.88% 
IO  281  145  89  65.96%  20.89%  
Wang  264  162  102  61.97%  23.94%  
BGA  308  118  85  72.30%  19.95%  
EMO  380  46  32  89.20%  7.51% 
Examples of images included in the experimental set for robustness comparison. (a) Image contaminated with 10% of salt and pepper noise and (b) image polluted with
In order to compare the stability performance of the proposed method, its results are compared to those reported by Wang et al. in [
The Wang algorithm is an energyminimizing method which is guided by internal constraint elements and influenced by external image forces, producing the segmentation of WBCs at a closed contour. As external forces, the Wang approach uses edge information which is usually represented by the gradient magnitude of the image. Therefore, the contour is attracted to pixels with large image gradients, that is, strong edges. At each iteration, the Wang method finds a new contour configuration which minimizes the energy that corresponds to external forces and constraint elements.
In the comparison, the net structure and its operational parameters, corresponding to the Wang algorithm, follow the configuration suggested in [
Figure
Comparison of the EMO and Wang’s method for white blood cell detection in medical images. (a) Original image. (b) Detection using the Wang’s method. (c) Detection after applying the EMO method.
The Wang algorithm uses the fuzzy cellular neural network (FCNN) as an optimization approach. It employs gradient information and internal states in order to find a better contour configuration. In each iteration, the FCNN tries, as contour points, different new pixel positions which must be located nearby the original contour position. Such fact might cause the contour solution to remain trapped into a local minimum. In order to avoid such a problem, the Wang method applies a considerable number of iterations so that a near optimal contour configuration can be found. However, when the number of iterations increases, the possibility to cover other structures increases too. Thus, if the image has a complex background (as smear images), the method gets confused so that finding the correct contour configuration from the gradient magnitude is not easy. Therefore, a drawback of Wang’s method is related to its optimal iteration number (instability). Such number must be determined experimentally as it depends on the image context and its complexity. Figure
Result comparison for the white blood cells detection showing (a) Wang’s algorithm after 400 cycles and (b) EMO detector method considering 1000 cycles.
In order to compare the accuracy of both methods, the estimated WBC area, which has been approximated by both approaches, is compared to the actual WBC size considering different degrees of evolution, that is, the cycle number for each algorithm. The comparison acknowledges only one WBC because it is the only detected shape in Wang’s method. Table
Error in cell’s size estimation after applying the EMO algorithm and the Wang’s method to detect one leukocite embedded into a bloodsmear image. The error is averaged over twenty experiments.
Algorithm  Iterations  Error % 

Wang  60  70% 
200  1%  
400  121%  
 
EMO proposed  60  8.22% 
200  10.1%  
400  10.8% 
This paper has presented an algorithm for the automatic detection of white blood cells that are embedded into complicated and cluttered smear images by considering the complete process as a circle detection problem. The approach is based on a natureinspired technique called the electromagnetismlike optimization (EMO) which is a heuristic method that follows electromagnetism principles for solving complex optimization problems. The EMO algorithm is based on electromagnetic attraction and repulsion forces among charged particles whose charge represents the fitness solution for each particle (a given solution). The algorithm uses the encoding of three noncollinear edge points as candidate circles over an edge map. A new objective function has been derived to measure the resemblance of a candidate circle to an actual WBC based on the information from the edge map and segmentation results. Guided by the values of such objective function, the set of encoded candidate circles (charged particles) are evolved by using the EMO algorithm so that they can fit into the actual blood cells that are contained in the edge map.
The performance of the EMOmethod has been compared to other existing WBC detectors (the boundary support vectors (BSV) approach [
The second author acknowledges The National Council of Science and Technology of Mexico (CONACyT) for partially support this research under the doctoral grant number: 215517.