In the inspection of treated water samples under microscope, knowing the average number of parasite (oo)cysts like Giardia and Cryptosporidium that exist in the samples is crucial as it tells whether the water is safe for consumption. Here, we introduce a new approach using a bidirectional contour tracing technique to segment and enumerate overlapping Cryptosporidium and Giardia (oo)cysts in microscopic images of treated water samples. First the image is denoised and edge detection is performed to detect the boundary of the (oo)cysts using Kirsch operator. The greyscale image is then binarized to identify the position of the (oo)cysts before it is Otsu thresholded to separate weak edge from strong edge. Then bidirectional contour tracing is implemented to isolate overlapping objects where the boundary of the (oo)cysts is traced in two different directions simultaneously. After boundary tracing, a modified ellipse fitting is executed where partial or broken ellipses can be combined to form completed ellipses that represent (oo)cysts. The proposed technique is tested on 40 FITC microscopic images containing overlapping Cryptosporidium and Giardia (oo)cysts in treated water samples. The performance of the technique is comparable to better than those of four well-known ellipse detection methods. The technique is also tested on images containing overlapping blood cells, Cryptosporidium oocysts in dirty background and rice grains, and the results are excellent. 
Segmentation of overlapping Cryptosporidium and Giardia (oo)cysts using bidirectional contour tracing