You are on page 1of 7

See

discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/221579756

An Image-Processing Based Automated


Bacteria Colony Counter

Conference Paper September 2009


DOI: 10.1109/ISCIS.2009.5291926 Source: DBLP

CITATIONS READS

18 895

2 authors, including:

Omer N. Gerek
Anadolu University
149 PUBLICATIONS 1,354 CITATIONS

SEE PROFILE

All content following this page was uploaded by Omer N. Gerek on 09 October 2014.

The user has requested enhancement of the downloaded file. All in-text references underlined in blue are added to the original document
and are linked to publications on ResearchGate, letting you access and read them immediately.
An Image-Processing Based Automated Bacteria Colony Counter

Hseyin Ate mer Nezih Gerek

e-mail: hates@anadolu.edu.tr e-mail: ongerek@anadolu.edu.tr

Department of Electrical and Electronics Engineering, Anadolu University. 26555 Eskisehir Turkey.

AbstractThis paper presents an image


processing based automated counting system to
detect the number of bacteria colonies that develop
in Petri dishes of microbiology laboratories. The
visible colonies represent the initial number of
bacteria present in the aqueous environment. The Figure 1: Colony types according to their form.
counting system contains shape based segmentation
and classification algorithms. Colonies are Naturally, the most encountered type (by
considered as (possibly overlapping with some
experimenting E.coli) is the circular colony.
Consequently, circular colonies are examined
amount of amorphous deviations from) discs and
in this study. This selection reduces the
classified as a cluster of bacteria with respect to
analysis to a worst case circle detection
their compactness ratio. The system is implemented
problem. However, the problem is kept not to
using Matlab, and tested using ground truth data assume any information about Petri dish image
provided from Anadolu University, Dept. of such as image degradation and noise, size of
Environmental Engineering microbiology colonies, color, etc.
laboratory. Results are presented. Some automated counters detect
colonies very sensitively by using special
1. Introduction growth medium contains fluorogenic substrates
[9]. The method is very useful for detecting
A colony counter is a tool used for colonies but fluorogenic substrates are costly.
counting colonies of bacteria or other In recent studies regarding image processing
microorganisms growing on an agar plate (also based colony counters (in fact, circular object
called a Petri dish). Classically, the non- counters), transform based methods, such as
automated counting process consists of Hough transform based methods are mostly
marking off with a felt-tipped pen on the outer used in order to extract circular shapes and
surface of the plate and keeping the marked curves[2-4].
number [1]. This manual process is a long and In this paper, we introduce a robust,
laborious process that depends on the visual efficient, automated, software-centered and
ability and care of human who counts the low-cost counting system. Unlike the previous
colonies. In addition, especially for very high methods, Hough transform based methods
number of colonies, manual counting results were not adopted because of the indistinctness
can differ among different biologists. This is and deviation of colony size, making the initial
due to the fact that, highly populated colony estimate of the colony radius hard to
counting methods mostly use estimation determine. Size of a colony is directly
methods, utilizing a small portion of the plate. proportional the amount of food in medium
Bacteria colony is a group of bacteria and the distribution of the initial bacteria.
cells which develop from a single bacteria cell. Typically, size of colony can vary in wide
Different types of bacteria produce differently range (see Figure 6-b).
shaped colonies with specific color, structure, As a result of deciding against shape
margin, and elevation. In general, colony based transforms, a new two-pass iterative
shapes are classified to four fundamental method is developed. Initially, a simple
groups; circular, irregular, filamentous and binarization is applied using histogram based
rhizoid, according to their forms. threshold determination (here, this step is
notated as Pattern Detector). Following the

September 14-16, 2009


978-1-4244-5023-7/09/$25.00 2009 IEEE METU
18 Northern Cyprus Campus
Figure 2: Colony counter flow graph.
Engineering Department of Anadolu
binarization process, isolated binary objects are University. Results are compared to the tags
analyzed according to their size and generated by an expert microbiologist and
compactness ratio to determine how close results of freely available software colony-
the shapes are to the ideal circular colonies (the counter [8].
operation is denoted by Pattern Classifier in
this work). If a binary shape fails the 2. Proposed System
compactness test, then the watershed algorithm The proposed system is illustrated in
is applied to split the corresponding original Figure 2. The system has two main parts;
(gray) shape to possible colonies (the operation pattern detector and counter. Counter is kept as
is denoted by the term Cluster Splitter). a separate module to obtain a scalable and re-
There is a possibility that the result of the usable system. Modifications can be applied to
watershed splitting may still not correspond to the pattern detector part.
circular colonies. The compactness test is,
therefore, applied again. In this second pass, if 2.1 Pattern Detector
the test fails again, then the watershed Pattern detector is the first step of the
parameters are refined and splitting is applied system. It has three missions; Petri dish
again. The proposed algorithm stops applying boundary detection, noise removal, and colony
watershed splitting at this point. However, if candidate pattern detection. Petri dish
the compactness ratio test continues to fail, an boundary detection is not fully automated. The
alternative analysis tool is invoked where the program interface asks user for three points on
final (non circular) shapes are considered to the boundary of the dish. The parameters of the
consist of combinations of colony shapes with circle which encapsulates the dish can be found
known areas ( AC ). Consequently, the number by solving the circle equation which passes
of colonies inside a non-circular shape with through the three points (P1:(x1,y1); P2:(x2,y2) ;
P3:(x3,y3)), producing a circle center, (x0, y0),
area ( A ) is assumed to be N A AC in the
and radius, r as the following equations:
module notated as Resulter. The average E1: (x1-x0)2 + (y1-y0)2= r 2
colony area is assumed to be the arithmetic E2: (x2-x0)2 + (y2-y0)2= r 2
mean of every other colony shape that has been E3: (x3-x0)2 + (y3-y0)2= r 2
successfully recognized in the first pass. Our data set is consist of about 2-3
Application of watershed algorithm twice megapixel photos taken by an amateur-grade
according to the compactness ratio test is found digital camera with a fair amount of mis-focus
to be more accurate than a single watershed and grain noise. Median filtering is used for
segmentation. The accuracy is tested in better noise removal as pre-processing.
detail in Section 3. Colony candidate detection is a
Over 300 sample Petri images were thresholding process. Otsus threshold
tagged to form the ground truth data in the algorithm [6] is used for this process.
microbiology laboratory of the Environmental

19
final compactness test is applied, but, this time,
its output is no further processed by the
watershed algorithm. Instead, if the
compactness test still fails, indicating non
circular clusters, they are marked as non-
Figure 3: Pattern detector steps separable, and they are sent to the module of
resulter, which calculates an estimate
2.2 Counter number of colonies using division of the area
Counter is the encapsulating part of the to a normal colony area. Due to personal
system which performs iterative splitting and communications with biologists, this kind of an
counting operations. The pattern detector estimation process was recommended as a
produces raw candidates and its output is far common practice for real life applications.
from being accurate. In fact, the main
detection process is embedded into the
counter part for better accuracy.
The critical and difficult problem is
caused by the fact that, the initial outputs
(clusters) may not always correspond to a
single colony (see Figure 5). The outputs of the
pattern detector (thresholding) are observed to
be fine initial points of the watershed algorithm
which is used to better segment clusters.
Despite this improved accuracy, many of the
relatively large clusters (with more than two
actual colonies) may not be topologically split
into the real colonies using watershed.
Besides, watershed algorithm does not Figure 4: 1-3: colony, 4-5: cluster
guarantee not to separate a colony into two or
more fake colonies, either. As seen in Figure 2, 2.2.2 Cluster Splitter
three states method is developed as a remedy Clusters are split into sub regions by
to such circumstances. Each block in figure is the cluster splitter module where sub regions
presented in the following sub sections. are assumed as colony. Here, the watershed
segmentation algorithm is adopted. A case of
2.2.1 Pattern Classifier watershed segmentation is illustrated in Figure
The examined bacteria colonies have 5. If the cluster consists of a few colonies,
circular shape. The pattern classifier tests this algorithm usually produces plausible
whether a binary shape corresponds to a colony results.
or a cluster according to its, so called,
compactness ratio, also known as the
circularity ratio. The definition of circularity
ratio is the ratio of the area of the closed shape
to the area of a circle (the most compact shape)
having the same perimeter, mathematically
given as;
CR = 4 (area) / (perimeter) 2.
As a shape deviates from circle to rather non-
convex shapes, the value decreases [7]. By
thresholding this ratio for each shape, the
pattern classifier module separates patterns into Figure 5: Watershed segmentation for two merged
2 group; colonies, and clusters of colonies. colonies
In order to improve efficiency, the
pattern classifier test is applied a second time 2.2.2 Resulter
after feeding to the watershed algorithm, which Resulter is the last module of the
splits the non-circular shaped cluster to finer counter. It gets colonies from the previous
colony shapes. Following the second pass, a modules and finds the number of colonies for

20
two cases: If the input shape is small and
circular, then the shape is assigned to a single
colony. For larger and non-circular shapes
(non-separable clusters), the number of actual a b
colonies is estimated as the ratio of cluster area
to an average colony area. The average colony
area was automatically recognized by
obtaining the size magnitude corresponding to
the most populated colony sizes, as
suggested by the microbiologists. Integer
division is applied one by one to all
c d
inseparable clusters to minimize error.

3. Experimental Results
In our experiments, we used over 300
images which were taken in different times
using completely different consumer grade
compact digital cameras at resolutions of
3264x2448 and 2048x1536. Dataset is e f
provided from Department of Environmental
Engineering Microbiology Laboratory,
Anadolu University in Eskisehir. All Petri
dishes included colonies grown from the E.coli
bacteria (samples are shown in Figure 6).
The results are compared with (i)
ground truth data, (ii) freely available colony Figure 6: Some sample colony images
counter (clono-counter), and (iii) one-shot corresponding to six different colony formations.
watershed segmentation based counting
method. In order to better visualize the
performance of the methods under different Table I: Colony numbers found by various
circumstances, the data set is split into six sub methods over colony formations indicated in Fig.6.
categories with different colony shape Clono- One-shot Proposed Ground
characteristics. The categories are exemplified counter watershed method truth
by the six sample images in Figure 6, notated
from (a) to (f). a 172 29 32 37
Colony number results are presented in
Table I. A quick inspection of this table b 222 194 282 225
indicates that the proposed two-pass method
c 211 119 149 141
gives plausible results as compared to the
single pass output. Surprisingly, the popular d 347 1018 1375 1825
clono-counter gives unacceptable results in
e 932 527 626 660
several of the cases, making the search for
alternative image processing based methods a f 191 423 431 513
necessary work.

4. Packaging of the algorithm. Despite the difference in the running


In this study, the project is environment, a detailed comparison is made
implemented and tested on Matlab over image processing and/or machine vision
environment because of its flexibility and libraries which are under a freely distributable
rather intensive library. Obviously, such an all license like GPL, LGPL, MIT etc. The
purpose platform is not suitable to develop a platform capability, efficiency, usability and
distributable, fast and user-friendly program. documentation are listed as follows:
Therefore, an executable version of the
program will eventually be developed.

21
AForge: work has started using .net based and Qt based
Compatible Language: CLR capable application structures with openCV libraries.
languages (Visual c++, C# VB.net etc.)
Platform: Windows (Common Language 5. Conclusions and Future Work
Runtime) In this paper, a new image processing
Documentation: Complete API documentation based method is proposed for robust, efficient,
with few example project and article. and automated counting of colonies in Petri
Usability: Easy to use and learn. dishes. The system is purely software-centered
Efficiency: too slow. and depends on the digital images produced by
consumer grade (cheap) digital cameras. The
IPL98: proposed system can handle colonies in fairly
Compatible Language: C, c++ noisy images with occasional focus problems.
Platform: Cross-platform The main problem of concern was the
Documentation: Complete API documentation existence of clusters of colonies which cannot
only be visually split into individual colonies.
Usability: Hard to use and learn. Application of more than one method over the
Efficiency: Not tested. same image produced reasonable performance
in such circumstances.
CVIPTools: As a future work, full automation of
Compatible Language: C, c++ the overall process (including detection and
Platform: Cross-platform extraction of the plate region) will be
Documentation: Complete API documentation developed. It is also desired to generalize and
with example projects and a book. develop methods that are not solely specific to
Usability: Hard to use and learn. circular colony shapes, in order to handle more
Efficiency: Not tested. than one type of bacteria colony.

OpenCV: 6. References
Compatible Language: C, c++
Platform: Cross-platform [1] M. Goyal Machine Vision Based
Documentation: Complete API documentation Bacteria-Colony Counter, Thesis, Electrical
with several projects and pages on internet. and Instrumentation Department, Thapar
Usability: Hard to use University.
Efficiency: Very efficient and extensible with
available modules. [2] J. M. Bewes ,N. Suchowerska , D. R.
Mckenzie Automated cell colony counting
EmguCV: EmguCV is .net wrapper of and analysis using the circular Hough image
openCV so it has nearly all advantages of transform algorithm (CHiTA), Physics in
openCV. Medicine and Biology 2008, vol. 53, no. 21,
Compatible Language: CLR capable pp. 5991-6008.
languages (Visual c++, C# VB.net etc.)
Platform: Windows (Common Language [3] P. R. Barber, B. Vojnovic, J. Kelly, C. R.
Runtime), cross-platform capable using Mayes, P. Boulton, M. Woodcock, M. C.
mono-project. Joiner, Automated counting of mammalian
Documentation: Complete API documentation cell colonies, Physics in Medicine and
Usability: Easy to use and learn. Biology, 2001, vol. 46, no.1, pp. 63-76.
Efficiency: Similar to openCV.
[4] Shih-Hsuan Chiu , Jiun-Jian Liaw, An
It can be noticed that the algorithms effective voting method for circle detection,
used in our method (such as Otsus Pattern Recognition Letters, vol.26 no.2,
thresholding, watershed segmentation, median pp.121-133.
filter, edge detection etc.) are also available in
several free license libraries. Therefore the [5] Meyer, Fernand, Topographic distance
transformation of our method to executable and watershed lines, Signal Processing, Vol.
form is clearly possible. Initial compilation 38, July 1994,pp. 113-125.

22
[6] N. Otsu, A Threshold Selection Method
from Gray-Level Histograms, IEEE
Transactions on Systems, Man, and
Cybernetics, Vol. 9, No. 1, 1979, pp. 62-66.

[7] Compactness measure of a shape, online


http://en.wikipedia.org/wiki/Compactness_mea
sure_of_a_shape.

[8] M. Niyazi , I. Niyazi and C. Belka,


Counting colonies of clonogenic assays by
using densitometric software, Radiation
Oncology 2007, 2:4 doi:10.1186/1748-717X-2-
4.

[9] Colifast, online at http://www.colifast.no/

[10] AForge.Net Framework, online at


http://www.aforgenet.com.

[11] Image Processing Library 98, online at:


www.mip.sdu.dk/ipl98/.

[12]CVIPTools, online at:


www.ee.siue.edu/CVIPtools/

[13] OpenCV Wiki, online at:


http://opencv.willowgarage.com/.

[14] Emgu CV, online at:


http://www.emgu.com/.

[15] Qt software, online at:


http://www.qtsoftware.com/.

23
View publication stats

You might also like