You are on page 1of 10

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

net/publication/264837386

Automated Gram-staining characterisation of bacterial cells using colour


and cell wall properties

Article  in  International Journal of Biomedical Engineering and Technology · October 2011


DOI: 10.1504/IJBET.2011.043298

CITATIONS READS

3 667

2 authors:

Prakash Hiremath Parashuram Bannigidad


Gulbarga University Rani Channamma University Belgavi
159 PUBLICATIONS   1,769 CITATIONS    25 PUBLICATIONS   108 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Historical Kannada Handwritten Script Recognition View project

A Study on Aluminum Nano Porous Images Using Digital Image Processing Techniques View project

All content following this page was uploaded by Parashuram Bannigidad on 16 May 2015.

The user has requested enhancement of the downloaded file.


Int. J. Biomedical Engineering and Technology, Vol. 7, No. 3, 2011 257

Automated Gram-staining characterisation of


bacterial cells using colour and cell wall properties

P.S. Hiremath and Parashuram Bannigidad*


Department of Computer Science,
Gulbarga University,
Gulbarga 585 106, Karnataka, India
E-mail: hiremathps53@yahoo.com
E-mail: parashurambannigidad@gmail.com
*Corresponding author

Abstract: In this paper, the Gram-staining technique is used as a tool for the
differentiation of Gram-positive and Gram-negative bacteria, as a first step to
determine the identity of a particular bacterial sample. The automated
image analysis has been developed for the monitoring of the Gram-staining
characteristics of bacteria based on their colour and cell wall structure.
The experimental results are compared with manual results obtained by
microbiological expert. The results demonstrate the efficiency of the proposed
method.

Keywords: Gram-staining; colour image analysis; thresholding; histogram


entropy; edge detection; cell wall.

Reference to this paper should be made as follows: Hiremath, P.S. and


Bannigidad, P. (2011) ‘Automated Gram-staining characterisation of bacterial
cells using colour and cell wall properties’, Int. J. Biomedical Engineering and
Technology, Vol. 7, No. 3, pp.257–265.

Biographical notes: P.S. Hiremath obtained his MSc Degree in 1973 and
PhD Degree in 1978 in Applied Mathematics from Karnatak University,
Dharwad. He had been in the Faculty of Mathematics and Computer Science of
various Institutions in India, namely, National Institute of Technology,
Surathkal (1977–1979), Coimbatore Institute of Technology, Coimbatore
(1979–1980), National Institute of Technology, Tiruchirapalli (1980–1986),
Karnatak University, Dharwad (1986–1993) and has been presently working as
Professor of Computer Science in Gulbarga University, Gulbarga (1993
onwards). His research areas of interest are image processing and pattern
recognition, computational fluid dynamics and optimisation techniques. He has
published 120 research papers in peer reviewed International Journals.

Parashuram Bannigidad obtained his MSc (Information Technology) Degree in


2003 and MPhil (Computer Science) Degree in 2006. He is presently
pursuing doctoral research work in Computer Science. His research areas
of interest are image processing and pattern recognition. He has published
15 research papers in peer reviewed International Journals and Proceedings of
Conferences.

Copyright © 2011 Inderscience Enterprises Ltd.


258 P.S. Hiremath and P. Bannigidad

1 Introduction

The most important differential stain used in bacteriology is Gram-stain, which was
discovered by Danish Bacteriologist Hans Christian Gram (Pekzar et al., 1982). It is the
only procedure based on staining technique, which divides bacteria into two large groups,
namely Gram-positive and Gram-negative. Gram-staining (or Gram’s method) is the
most important and fundamental orthodox method for bacterial identification. It is
an empirical method of differentiating bacterial species into two large groups
(Gram-positive and Gram-negative) based on the chemical and physical properties of
their cell walls. The basic difference in the Gram-Positive and Gram-Negative bacteria
is in the form of their cell wall structure, which is shown in Figure 1.
The Gram-positive cell wall is characterised by the presence of a very thick
peptidoglycan layer, which is responsible for the retention of the crystal violet dyes
during the Gram-staining procedure. On the contrary, the Gram-negative cell wall
contains a thin peptidoglycan layer adjacent to the cytoplasmic membrane. This is
responsible for the cell wall’s inability to retain the crystal violet stain upon
decolourisation with ethanol during Gram-staining. While Gram-staining is a valuable
diagnostic tool in both clinical and research settings, not all bacteria can be definitively
classified by this technique, thus forming Gram variable and Gram indeterminant groups
as well.

Figure 1 Properties of Gram-positive and Gram-negative cell walls

Gram-staining is a common procedure in the traditional bacteriological laboratory. The


technique is used as a tool for the differentiation of Gram-positive and Gram-negative
bacteria, as a first step to determine the identity of a particular bacterial sample.
Generally, the amount of Gram-positive or Gram-negative bacteria, as stained by the
classical technique, is estimated by visual inspection and manual counting under a simple
optical microscope. This procedure can be facilitated by automated image analysis.
For Gram colour images, Saida et al. (1998) have proposed a photometric
characterisation (by Gram-Stain Index (GSI)) for bacterial population in various aquatic
environments, where the bacteria were deposited on a membrane. Pandolfi and Pons
(2004) have proposed Gram-staining characterisation of activated sludge filamentous
bacteria by automated colour analysis in HSI colour space. Hiremath and Bannigidad
(2009) have investigated automated Gram-staining characterisation of digital bacterial
cell images using colour segmentation techniques.
Comparison of the eSwab collection and transportation system to an amies gel
transystem for Gram-stain of clinical specimens using statistical analysis has been studied
Automated Gram-staining characterisation of bacterial cells 259

(Fontana et al., 2009). A simple image analysis algorithm for evaluation of extended
filaments length based on the enhanced digitised image using statistical analysis is
proposed (Kima et al., 2008). GSI of bacterial and archaeal cells in the natural microbial
communities of slightly and extremely saline environments has been proposed (Saida
et al., 2001). Digital image analysis of actinomycetes colonies as a potential aid for rapid
taxonomic identification has been investigated (Velho-Pereira and Kamat, 2010).
Characterisation of PHB storage in activated sludge extended filamentous bacteria by
automated colour image analysis has been examined (Pandolfi et al., 2007). Manual and
automated instrumentation for identification of enterobacteriaceae and other aerobic
Gram-negative bacilli is proposed (O’Hara, 2005). These research efforts lead to an
automated Gram-staining-based cell classification and cell growth studies. Hiremath and
Bannigidad (2010) have studied the automatic identification and classification of bacilli
bacterial cell growth phases.
The main objective of this study is to develop a method of automated image analysis
for Gram-stain characterisation of bacteria based on their colour and cell wall properties.
The Gram-positive bacteria would appear in blue colour and Gram-negative bacteria
species would appear red. The cell wall of Gram-positive bacteria would be very thick,
whereas that of Gram-negative bacteria would be very thin. The experimental results
demonstrate the efficacy of the proposed method.

2 Material and methods

A smear of bacteria was deposited on a glass slide and thoroughly air-dried. It was
stained for 1 min in crystal violet solution, 1 min in iodine solution, washed for 10 s in
ethanol and finally, counterstained with safranin for 1 min. The glass slide was examined
under oil immersion at 100× – 250× magnification with direct illumination in a Dialux 20
microscope equipped with a 3 CCD Sony colour camera and connected to a PC. We have
considered 100 colour images for this study using the above-mentioned set-up (Demchick
and Koch, 1996; Madigan et al., 2005).
The Gram-stain technique is a differential staining procedure and its conceptual
model is illustrated in Figure 2 (Pommerville, 2010). All bacterial cells stain with
the crystal violet and iodine, but only Gram-negative cells lose the colour when alcohol is
applied. Subsequently, these bacterial cells stain with the safranin dye. Gram-positive
cells remain blue-purple.

Figure 2 Conceptual model of manual Gram-staining procedure


260 P.S. Hiremath and P. Bannigidad

3 Proposed method

The purpose of the automated image analysis of digital bacterial cell images is to identify
the type of bacteria, whether it is Gram-positive or Gram-negative based on their colour
features and its chemical and physical properties of their cell wall structure.
The YCbCr colour space is used (Gonzalez and Woods, 2002). This colour space is
widely used for digital video. In this format, luminance information is stored as single
component (Y), and chrominance information is stored as two colour-difference
components (Cb and Cr). The Cb represents the difference between the blue component
and a reference value. The Cr represents the difference between the red component and
a reference value. These features are defined for video processing purposes and so are not
meaningful concerning human experience.
The following equations transform RGB in [0, 1] to YCbCr in [0, 255].
Y = 16 + 65.481 R + 128.553 G + 24.966 B
Cb = 128 – 37.797 R – 74.203 G + 11.000 B
Cr = 128 + 112.000 R – 93.786 G – 18.214 B.
The proposed method for the Gram-staining characterisation based on colour image
analysis in YCbCr colour space is given in Algorithm 1:

Algorithm 1: Gram-staining characterisation based on colour

Input: Digital Gram-stained bacterial cell images.


Output: Gram-stain characterisation (Gram-positive or Gram-negative)
Step 1: Input cell image (RGB colour)
Step 2: Convert the RGB image into YCbCr colour space
Step 3: Enhance Luminance (Y) component by histogram equalisation
Step 4: Perform global thresholding on Y based on histogram entropy yielding binary
image (i.e., 0 for background and 1 for objects (bacteria + debris))
Step 5: Apply morphological operations, namely erosion, reconstruction and dilution to
remove debris
Step 6: Skeletonise the image of Step 5 and superimpose skeleton image on original
input image.
Step 7: Classify non-background pixels as Red pixels or Blue pixels using the criteria:
a pixel in YCbCr image is a Red pixel if its R-value > B value; otherwise, it is a
Blue pixel.
Step 8: Obtain the border pixels from the image of Step 5
Step 9: The bacteria corresponding to a fragment in image of Step 7 is Gram-negative
if (i) number of Red pixels > number of Blue pixels, and (ii) more than 60% of
border pixels are Red pixels; otherwise, the bacteria is Gram-positive.
Automated Gram-staining characterisation of bacterial cells 261

The proposed method for the Gram-staining characterisation of digital bacterial cells
based on their cell wall properties is given in Algorithm 2:

Algorithm 2: Gram-staining characterisation based on cell wall properties

Input: Digital Gram-stained bacterial cell images.


Output: Gram-stain characterisation (Gram-positive or Gram-negative)
Step 1: Input cell image (RGB colour).
Step 2: Convert the RGB image into greyscale image.
Step 3: Binarise the greyscale image using global thresholding.
Step 4: Apply Gaussian filtering technique to remove debris in the binarised image.
Step 5: Compute the border distance using Euclidean distance transformation
of the binary image.
Step 6: Obtain the edge of the image on Step 5 using Canny’s method. The double
edge response from the canny edge detection operation provides the cell wall
thickness.
Step 7: Obtain the border thickness from the image of Step 6 (i.e., cell wall thickness).
Step 8: The bacteria corresponding to a fragment in image of Step 7 is Gram-positive
if total number of pixels in the border (along the cell wall thickness) >10;
otherwise, the bacteria is Gram-negative.
Algorithm 1 is used for low magnification digital cell images of the bacteria in which cell
wall is not discernible. Algorithm 2 is used for very high (i.e., 30,000) magnification
digital bacterial cell images, in which the cell wall of the bacteria is clearly seen and,
normally, contains a single cell. Thus, the proposed method combines these two
algorithms in the sense that Algorithm 1 is applied for low magnification cell images for
Gram-staining characterisation based on colour information, while Algorithm 2 is applied
for very high magnification cell images for Gram-staining characterisation based on cell
wall properties. The decision matrix is shown in Table 1. In case of indeterminacy,
manual decision needs to be adopted.

Table 1 Decision matrix for Gram-staining characterisation by Algorithms 1 and 2


262 P.S. Hiremath and P. Bannigidad

4 Experimental results and discussions

For the purpose of experimentation, 100 digital colour images of Gram-stained


bacterial cells of both types, i.e., Gram-positive and Gram-negative, are considered.
The implementation is done on a Pentium P-IV 1.0 GHz machine using MATLAB 7.9.
Method 1
We use Algorithm 1. The input colour bacterial image (Figure 3(a)) is transformed from
RGB into YCbCr colour space and luminance (Y) primitive is enhanced by histogram
equalisation to increase the image contrast (Figure 3(b)). Automated thresholding based
on histogram entropy is applied on the contrast image and the result is a binary image
with two grey levels, i.e., 0 for the background and 1 for the region of the interest, i.e.,
objects (Figure 3(c)). Then, the skeletonised image has been obtained by performing
morphological operations (Figure 3(d)). All the skeleton fragments shorter than 5 pixels
and containing a branch end are eliminated from the skeletonised image using
morphological operations. Then, the skeletonised image is superimposed on original
image and the skeleton-overlapping pixels are extracted (Figure 3(e)). These pixels are
considered to be blue (B) when its level on the blue primitive of image is higher than its
level on the red (R) primitive. Inversely, a pixel is considered to be red when R-level is
greater than B-level. Next, we obtain the border pixels from thresholding binary image
(Figure 3(f)). Finally, we classify the bacteria corresponding to a fragment in skeletonised
image using the criteria, namely: the bacteria is Gram-negative if
• number of Red pixels are greater than (>) number of Blue pixels
• more than 60% of border pixels are Red pixels; otherwise, the bacteria
is Gram-positive.
The experimentation is also done by a change of colour space to, namely, CIE Lab colour
space (Hiremath et al., 2007).

Figure 3 (a) Original colour image (RGB); (b) contrast image (luminance plane) of (a); (c) binary
image of (b); (d) skeletonised image of (c); (e) superimposed image of (d) on (a) and
(f) border image of (c), for (i) Gram-positive and (ii) Gram-negative bacterial cells
Automated Gram-staining characterisation of bacterial cells 263

Figure 3 (a) Original colour image (RGB); (b) contrast image (luminance plane) of (a); (c) binary
image of (b); (d) skeletonised image of (c); (e) superimposed image of (d) on (a) and
(f) border image of (c), for (i) Gram-positive and (ii) Gram-negative bacterial cells
(continued)

Method 2

We use Algorithm 2. The input colour bacterial image (Figure 4(a)) is converted into
greyscale image (Figure 4(b)). Then, convert the greyscale image into binary image using
global thresholding, and next, apply the Gaussian filtering technique (Gonzalez and
Woods, 2002) using a rotationally symmetric Gaussian low-pass filter of neighbourhood
size of 15 × 15 with standard deviation sigma value of 0.96 to remove small debris and
artefacts. Further, compute the Euclidean distance transform of the binary image. Find
the edge of a binary image using Canny’s edge operator to calculate the distance of
border pixels, i.e., cell wall thickness (Figure 4(c)). Finally, based on the total number
of pixels with the border thickness, we decide that the bacteria is Gram-positive if the
total number of border pixels >10; otherwise, the bacteria is Gram-negative.

Figure 4 (a) Original cell wall images of both Gram-positive and Gram-negative; (b) greyscale
image and (c) segmented image showing the cell wall thickness
264 P.S. Hiremath and P. Bannigidad

To validate both the methods, the results of the automated Gram analysis are compared
with those obtained by manual assessment by microbiological expert. The experimental
results are in good agreement with the visual inspection by the microbiological expert.
The comparison of the identification performance of proposed and manual method along
with other fundamental structural and chemical attributes of bacterial cell walls is given
in Table 2. It is observed that the Gram-stain characterisation results are better in YCbCr
colour space than that in RGB or CIE Lab colour space. The misidentification of cells can
be further resolved based on their cell wall properties by using higher magnification
images, because the cell wall properties of the bacteria can only be seen in higher
resolution at single cell level.

Table 2 Comparison of identification performance of proposed method with other methods

Total no. Misidentification


Method of images Gram-positive Gram-negative (Indeterminate)
Proposed (YCbCr) 100 58 34 8
Proposed (CIE Lab) 100 60 30 10
Denish Pandolfi et al. (2004)
100 56 30 14
(HSI)
Proposed (cell wall properties) 50 27 23 –
Manual 100 58 42 –

5 Conclusion

In this paper, an automated image analysis procedure has been developed to identify the
characteristics of Gram-staining bacterial cell image based on their colour and cell wall
properties. The experimental results are compared with the visual inspection done by
a microbiologist and are found to be in good agreement with manual results. In case of
indeterminacy, manual decision needs to be adopted. The automated Gram-staining
techniques save time and enable standardisation and accuracy of results. Traditional
Gram-staining is a cumbersome procedure that lacks reliability and reproducibility.
The future work leads to automated Gram-staining-based cell classification and cell
growth phases. In addition, efforts need to be done to minimise indeterminacy in decision
matrix.

Acknowledgements

The authors are grateful to the referees for their valuable comments and suggestions.
Further, the authors are grateful to Dr. A. Dayanand, Professor of Microbiology,
Gulbarga University, Gulbarga, and Dr. Ramakrishna, Department of Microbiology,
Government Degree College, Gulbarga, for providing Gram-stained bacterial images
and assessing the visual inspection of the images.
Automated Gram-staining characterisation of bacterial cells 265

References
Demchick, P. and Koch, A.L. (1996) ‘The permeability of the wall fabric of Escherichia coli and
Bacillus subtilis’, J. Bacteriol., Vol. 178, No. 3, pp.768–773.
Fontana, C., Favaro1, M., Limongi, D., Pivonkova, J. and Favalli, C. (2009) ‘Comparison of the
eSwab collection and transportation system to an amies gel transystem for Gram-stain of
clinical specimens’, BMC Research Notes, Vol. 2, No. 244, pp.1–6.
Gonzalez, R.C. and Woods, R.E. (2002) Digital Image Processing, Pearson Education Asia, India.
Hiremath, P.S. and Bannigidad, P. (2009) ‘Automated Gram-staining characterization of digital
bacterial cell images’, 2nd Intl. Conf. on Signal and Image Processing (ICSIP-2009), Mysore,
12–14 February, pp.209–211.
Hiremath, P.S. and Bannigidad, P. (2010) ‘Automatic identification and classification of bacilli
bacterial cell growth phases’, IJCA Special Issue on Recent Trends in Image Processing and
Pattern Recognition (RTIPPR-2010), Vol. 1, No. 2, pp.48–52.
Hiremath, P.S., Iranna, Y.H. and Pujar, D.J. (2007) ‘Classification of squamous cell carcinoma
based on color and textural features in microscopic images of esophagus tissues’, Journal of
Computer Science, Vol. 3, No. 7, pp.567–574.
Kima, Y.J., Choib, Y.G. and Chunga, T.H. (2008) ‘A simple image analysis algorithm for
evaluation of extended filaments length based on the enhanced digitized image’, Journal of
Environmental Science and Health Part A, Vol. 43, pp.1489–1494.
Madigan, M.T., Martinko, J.M. and Brock, T.D. (2005) Brock Biology of Microorganisms,
11th ed., Pearson Prentice-Hall, Upper Saddle River, NJ, ISBN 0-13-196893-9.
Madigon, M.T., Mortino, J.M. and Porker, J. (1999) Biology of Microorganism, 8th ed., McGraw
Hill Inc., New York.
O’Hara, C.M. (2005) ‘Manual and automated instrumentation for identification of
Enterobacteriaceae and other aerobic Gram-negative bacilli’, Clinical Microbiology Reviews,
Vol. 18, No. 1, pp.147–162.
Pandolfi, D., Pons, M-N. and da Motta, M. (2007) ‘Characterization of PHB storage in activated
sludge extended filamentous bacteria by automated colour image analysis’, Biotechnol. Lett.,
Vol. 29, pp.1263–1269.
Pandolfi, D. and Pons, M-N. (2004) ‘Gram-staining characterization of activated sludge
filamentous bacteria by automated color analysis’, Biotechnology Letters, Vol. 26,
pp.1841–1846.
Pekzar, M.J., Chen, E.C.S. and Krieg, N.R. (1982) A Textbook of Microbiology, McGraw-Hill
Book Company, New York.
Pommerville, J.C. (2010) Alcamo’s Fundamentals of Microbiology Body Systems Edition,
Jones and Bartlett Publishers, USA.
Saida, H., Kamekura, M., El-Sayed, W.S.M., Abu-Shady, M., Abe, Y., Yamaguchi, T., Yang, P.,
Maekawa, T. and Seki, H. (2001) ‘Gram Stain Index (GSI) of bacterial and archaeal cells in
the natural microbial communities of slightly and extremely saline environments’, Journal of
Oceanography, Vol. 57, pp.109–113.
Saida, H., Yrow, N. and Seki, H. (1998) ‘Photometric application of the Gram stain method
to characterize natural bacterial populations in aquatic environments’, Applied and
Environmental, Microbiology, Vol. 64, No. 2, pp.742–747.
Velho-Pereira, S. and Kamat, N. (2010) ‘Digital image analysis of actinomycetes colonies as a
potential aid for rapid taxonomic identification’, Nature Preceding: doi:10.1038/npre.
2010.4209.1, pp.1–13.

Website
http://en.wikipedia.org/wiki/Gram-staining/

View publication stats

You might also like