An algorithm for detection of Tuberculosis bacilli in Ziehl-Neelsen sputum smear images

Christian del Carpio, Erwin Dianderas, Mirko Zimic, Patricia Sheen, Jorge Coronel, Roberto Lavarello, Guillermo Kemper

Research output: Contribution to journalArticlepeer-review

3 Scopus citations


This work proposes an algorithm oriented to the detection of tuberculosis bacilli in digital images of sputum samples, inked with the Ziehl Neelsen method and prepared with the direct, pellet and diluted pellet methods. The algorithm aims at automating the optical analysis of bacilli count and the calculation of the concentration level. Several algorithms have been proposed in the literature with the same objective, however, in no case is the performance in sensitivity and specificity evaluated for the 3 preparation methods. The proposed algorithm improves the contrast of the colors of interest, then thresholds the image and segments by labeling the objects of interest (bacilli). Each object then has its geometrical descriptors and photometric descriptors. With all this, a characteristic vector is formed, which are used in the training and classification process of an SVM. For the training 225 images obtained by the 3 preparation methods were used. The proposed algorithm reached, for the direct method, a sensitivity level of 93.67% and a specificity level of 89.23%. In the case of the Pellet method, a sensitivity of 92.13% and a specificity of 82.58% was obtained, while for diluted Pellet the sensitivity was 92.81% and the specificity 83.61%.

Original languageEnglish (US)
Pages (from-to)2968-2981
Number of pages14
JournalInternational Journal of Electrical and Computer Engineering
Issue number4
StatePublished - 2019
Externally publishedYes


  • Baciloscopy
  • Image processing
  • Sputum smear
  • Tuberculosis
  • Ziehl-Neelsen

ASJC Scopus subject areas

  • Computer Science(all)
  • Electrical and Electronic Engineering


Dive into the research topics of 'An algorithm for detection of Tuberculosis bacilli in Ziehl-Neelsen sputum smear images'. Together they form a unique fingerprint.

Cite this