# Automatic *Cryptosporidium* and *Giardia* viability detection in treated water

- Shahriar Badsha
^{1}, - Norrima Mokhtar
^{1}Email author, - Hamzah Arof
^{1}, - Yvonne Ai Lian Lim
^{2}, - Marizan Mubin
^{1}and - Zuwairie Ibrahim
^{3}

**2013**:56

https://doi.org/10.1186/1687-5281-2013-56

© Badsha et al.; licensee Springer. 2013

**Received: **17 May 2013

**Accepted: **10 October 2013

**Published: **31 October 2013

## Abstract

In the automatic detection of *Cryptosporidium* and *Giardia* (oo)cysts in water samples, low contrast and noise in the microscopic images can adversely affect the accuracy of the segmentation results. An improved partial differential equation (PDE) filtering that achieves a better trade-off between noise removal and edge preservation is introduced where the compass operator is utilized to attenuate noise while retaining edge information at the cytoplasm wall and around the nuclei of the (oo)cysts. Then the anatomically important information is separated from the unwanted background noise using the Otsu method to improve the detection accuracy. Once the (oo)cysts are located, a simple technique to classify the two types of protozoans using area, roundness metric and eccentricity is implemented. Finally, the number of nuclei in the cytoplasm of each (oo)cyst is counted to check the viability of individual parasite. The proposed system is tested on 40 microscopic images obtained from treated water samples, and it gives excellent detection and viability rates of 97% and 98%, respectively.

## Keywords

## 1. Introduction

*Cryptosporidium parvum* and *Giardia lamblia* are two common waterborne parasites infecting humans worldwide [1]. In infected humans, the organisms normally attack the small intestine after being ingested [2, 3]. They are found mostly in surface waters, where their concentration is related to the level of faecal pollution or human use of the water [4–6]. *Cryptosporidium* and *Giardia* parasites can also be found in infected sheep, cattle and many other animal species such as cat, beaver, deer and flies. Besides diarrhoea, other symptoms of giardiasis and cryptosporidiosis are slight fever, fatigue and myalgia. In rare cases, these parasites may infect the lungs and trachea, resulting in cough, dehydration and extreme weight loss [7–9].

The impact of epidemic *Cryptosporidium* and *Giardia* outbreaks has motivated many researchers to find measures to prevent them from recurring worldwide. As a result, studies related to the transmission, detection and life cycle of the parasites have proliferated. The process of detecting the presence of *Cryptosporidium* and *Giardia* (oo)cysts in water and wastewater samples involves filtration, isolation, staining and microscopy. In microscopy, direct visual inspection under a microscope is performed by an expert to detect the presence of *Cryptosporidium* and *Giardia* (oo)cysts. This manual inspection is tedious and time-consuming. Attempts have been made to implement automatic detection of (oo)cysts in microscopic images to increase the efficiency of the process. Widmer et al. used an artificial neural network (ANN) algorithm to accurately identify *Cryptosporidium* and *Giardia* (oo)cyst images. Back-propagation technique was employed in the training process, and adjustment of weights was made within the neuron layers. The aim was to minimize the error between the predicted and the correct solution [10]. Fernandez-Canque et al. implemented an algorithm that detected *Cryptosporidium* oocysts using shape and colour features in fluorescein isothiocyanate (FITC)-stained images [11].

In this paper, an automation detection system is developed to detect the presence of *Cryptosporidium* and *Giardia* (oo)cysts in samples of treated water concentrate. The system employs a modified partial differential equation (PDE) filter to denoise FITC- and 4′,6-diamidino-2-phenylindole (DAPI)-stained images. The modified fourth-order PDE filter uses the compass operator instead of the common Laplacian operator so that more edge information is preserved. In addition, roundness metric, nucleus counting and viability measure are also incorporated as additional features. This paper is organized as follows. Section 2 contains details of the steps involved in the system, and Section 3 describes the experimental results of implementing it on 40 stained images. Finally, conclusion is presented in Section 4.

## 2. Proposed system

*Cryptosporidium*and

*Giardia*(oo)cysts are identified using roundness metric and eccentricity. The post-processing part consists of viability checking and nucleus counting.

### 2.1 Pre-processing

After greyscale conversion, it is observed that the greyscale images contain significant noise. As a result, small nuclei appear almost similar to background noise in the image. Therefore, the noise in the DAPI images needs to be filtered while important edge information must be preserved. Preserving the orientation of anatomically significant edges while detecting the nuclei is a challenging task. For this purpose, a modified fourth-order PDE diffusion filter is used.

where *E*(*I*) is the energy function, |∇^{2}
*I*| is the absolute value of the Laplacian of *I* and Ω is the support domain in the image (*I*). Since *f*(|∇^{2}
*I*|) is an increasing function of |∇^{2}
*I*|, its global minimum is at |∇^{2}
*I*| = 0. The Laplacian of an image at a pixel is zero if the image is planar in its neighbourhood. Therefore, the minimization of the functional is equivalent to smoothing the image to piecewise planar.

The coefficient of the Laplacian operator is *c*(|∇^{2}
_{
I
}|). Dissipation can be measured by this coefficient. The Laplacian operator is isotropic or uniform to the orientations; therefore, the compass operator has been used as it is free from the orientations. So the coefficient of the new PDE will be *c*(*|O*
_{
k
}
*I|*).

*O*is the compass operator and

*k*is the direction of the compass that generates the maximum gradient at the pixel in image

*I*. The diffusion coefficient

*c*(

*|O*

_{ k }

*I|*) is given by

### 2.2 Thresholding

Using the Otsu thresholding, the greyscale image is converted into a binary image [14]. The process is described as follows:

*N*pixel with grey levels from

*1*to

*L*. The number of pixels with grey level

*i*is denoted by

*g*

_{ i }. Therefore, the probability of grey level

*i*in an image is given by

*C*

_{1}and

*C*

_{2}, where the grey levels are [1,…,

*t*] and [

*t*+ 1,…,

*L*]. Now the grey level probability distributions are

*T*is chosen. The binary image

*I*(

*x*,

*y*) is obtained after applying the following Equation 14. Figure 4a shows an example of the original image, and Figure 4b shows the converted binary image.

### 2.3 Identification

*Cryptosporidium*and

*Giardia*(oo)cysts in the binary image.

*Cryptosporidium*oocysts are circular and smaller in size whereas

*Giardia*cysts are bigger but elliptical. The calculation of area, roundness metric and eccentricity of an object starts with obtaining the perimeter. Consider a discrete binary image, which contains one or more objects, where the object pixels are 1 and the background pixels are 0. Basically, the perimeter of each object is the total number of pixels at the boundary around the object. The counting starts at an arbitrary initial pixel at the boundary of the object. After traversing and adding the total pixels around the object, the count should end at the initial pixel. The area of an object is the number of pixels in the object after its parameter is fixed. Figure 5 shows an example of how the perimeter and area of an object are calculated.

where *A* and *P* are the area and perimeter of the object, respectively.

*α*is the distance from the centre to a focus point on the major axis and

*c*is the distance from the focus point to a vertex on the minor axis.

*F1*and

*F2*are the two focus points called foci. The foci always lie on the major (longest) axis of an ellipse, spaced equally on each side of the centre. The value of eccentricity is greater than 1 for an elliptical object but is less than 1 for a circular object.

## 3. Post-processing

An (oo)cyst is considered viable if there are nuclei inside its body. The positions of the (oo)cysts are highlighted in the FITC, but their nuclei can only be seen clearly in the DAPI image. Therefore, the FITC and DAPI binary images have to be merged to see whether the nuclei lie within the (oo)cysts. Since the area and perimeter of each (oo)cyst are already known, if there are no nuclei within the area of the (oo)cyst in the merged image, it is regarded as nonviable.

From the resultant image, nucleus counting is done for viability confirmation. Counting nuclei is similar to counting objects in the image. The number of objects/nuclei can be counted by the following steps [15].

*I*containing several objects (nuclei) where the pixels of the nuclei have a value of 1 and the background has a value of 0.

- 1.
Set the number of nuclei to 0.

- 2.Scan the image until we locate a pixel (
*x*,*y*) belonging to a nucleus, i.e.*f*(*x*,*y*= 1).- (a)
Increase the number of nuclei by 1.

- (b)
Find all pixels connected to pixel (

*x*,*y*), i.e. find the entire object. - (c)
Remove the object from the image by setting all its pixel values to 0.

- (a)
- 3.
Continue scanning (back to step 2) until we reach the end of the image.

*n*+ 1}, where

*n*equals the number of objects in the image. Each pixel of an object will now have the same integer value as shown in Figure 7.

## 4. Experimental results

*Cryptosporidium*and

*Giardia*(oo)cysts extracted from samples of treated water concentrate obtained from the Department of Parasitology, University of Malaya. Table 1 shows the decision rule adopted to differentiate the

*Cryptosporidium*and

*Giardia*(oo)cysts. Figures 8 and 9 display the detected

*Cryptosporidium*and

*Giardia*(oo)cysts in a sample image, respectively.

**Decision system to identify the**
Cryptosporidium
**and**
Giardia

Decision | Condition |
---|---|

| Roundness ≥ 0.9 ∩ area ≤ 1.0 |

| Eccentricity > 1 ∩ area ≥ 1.0 |

*Cryptosporidium*and

*Giardia*(oo)cysts for the 40 images.

**Performance evaluation in terms of detection and checking the viability of**
Cryptosporidium

Accuracy | Result (average, %) |
---|---|

Detection | 98 |

Viability | 98.3 |

Nucleus calculation | 99.16 |

**Performance evaluation in terms of detection and checking the viability of**
Giardia

Accuracy | Result (average, %) |
---|---|

Detection | 97 |

Viability | 98 |

Nucleus calculation | 98.16 |

Figure 8a,b displays the FITC and DAPI images which contain both *Cryptosporidium* and *Giardia* (oo)cysts, respectively. Figure 8c shows the position of the detected *Cryptosporidium* oocyst, and Figure 8d shows the value of its roundness metric. Figure 8e confirms the viability of the oocyst and the number of nuclei residing in it. Similarly, Figure 9a,b shows the DAPI and FITC images containing both types of (oo)cysts. Figure 9c shows the location of the detected *Giardia* cyst, and Figure 9d shows the value of its eccentricity. Finally, Figure 9e confirms the viability of the cyst and the number of nuclei within it.

## 5. Conclusions

In this work, a robust technique is presented for image filtering of DAPI- and FITC-stained images for *Cryptosporidium* and *Giardia* (oo)cyst detection using compass operator with fourth-order PDE. Roundness metric and eccentricity are utilized to differentiate *Cryptosporidium* and *Giardia* (oo)cysts in 40 images. The performance of the system is measured in terms of detection, viability and nucleus counting rates and compared against those of the human observer. Excellent rates of more than 97% are achieved for both parasites on all measures. In the future, segmentation and identification of overlapping and occluded nuclei and (oo)cysts in clean and dirty images will be considered.

## Declarations

### Acknowledgements

This research is fully supported by Exploratory Research Grant Scheme (ER031-2011A) under the Ministry of Higher Education, Malaysia.

## Authors’ Affiliations

## References

- Smith AH, Lopipero PA, MN Bates CM: Steinmaus, Arsenic epidemiology and drinking water standards.
*Sci.*2002, 296: 2145-2146. 10.1126/science.1072896View ArticleGoogle Scholar - Carmena D: Waterborne transmission of
*Cryptosporidium*and*Giardia*: detection, surveillance and implications for public health. In*Current Research, Technology and Education Topics in Applied Microbiology and Microbial Biotechnology, vol. 20*. Edited by: Mendez-Vilas A. Formatex, Badajoz; 2010:3-4.Google Scholar - Robertson LJ, Johannessen GS, Gjerde BK, Loncarevic S: Microbiological analysis of seed sprouts in Norway.
*Int. J. Food Microbiol.*2002, 75: 119-126. 10.1016/S0168-1605(01)00738-3View ArticleGoogle Scholar - LeChevallier MW, Norton WD, Lee RG: Occurrence of
*Giardia*and*Cryptosporidium*spp. in surface water supplies.*Appl. Environ. Microbiol.*1991, 57: 2610-2616.Google Scholar - Meisel J, Perera D, Meligro C, Rubin C: Overwhelming watery diarrhea associated with a cryptosporidium in an immunosuppressed patient.
*Gastroenterol.*1976, 70: 1156.Google Scholar - Hansen JS, Ongerth JE: Effects of time and watershed characteristics on the concentration of
*Cryptosporidium*oocysts in river water.*Appl. Environ. Microbiol.*1991, 57: 2790-2795.Google Scholar - Fayer R, Ungar B:
*Cryptosporidium*spp. and cryptosporidiosis.*Microbiol. Rev.*1986, 50: 458.Google Scholar - Ungar BL: Cryptosporidiosis in humans (
*Homo sapiens*). In*Cryptosporidiosis of Man and Animals*. Edited by: Dubey JP, Speer CA, Fayer R. CRC Press, Boca Raton; 1990:59-82.Google Scholar - McClellan P:
*Sydney Water Inquiry, Final Report*. Government of New South Wales, Sydney; 1998.Google Scholar - Widmer KW, Srikumar D, Pillai SD: Use of artificial neural networks to accurately identify
*Cryptosporidium*oocyst and*Giardia*cyst images.*Appl. Environ. Microbiol.*2005, 71: 80-84. 10.1128/AEM.71.1.80-84.2005View ArticleGoogle Scholar - Fernandez-Canque H, Beggs B, Smith E, Boutaleb T, Smith H, Hintea S: Micro-organisms detection in drinking water using image processing.
*Cell.*2006, 15: 4.2.Google Scholar - Lysaker M, Lundervold A, Tai X-C: Noise removal using fourth-order partial differential equation with applications to medical magnetic resonance images in space and time.
*IEEE Trans. Image Process.*2003, 12: 1579-1590. 10.1109/TIP.2003.819229View ArticleGoogle Scholar - You Y-L, Kaveh M: Fourth-order partial differential equations for noise removal.
*IEEE Trans. Image Process.*2000, 9: 1723-1730. 10.1109/83.869184MathSciNetView ArticleGoogle Scholar - Liao P-S, Chen T-S, Chung P-C: A fast algorithm for multilevel thresholding.
*J. Inf. Sci. Eng.*2001, 17: 713-728.Google Scholar - Pratt WK:
*Digital Image Processing*. Wiley, Hoboken; 2001.View ArticleGoogle Scholar

## Copyright

This article is published under license to BioMed Central Ltd. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.