- Open Access
Novel coarse-to-fine dual scale technique for tuberculosis cavity detection in chest radiographs
© Xu et al.; licensee Springer. 2013
Received: 14 December 2011
Accepted: 28 November 2012
Published: 8 January 2013
Although many lung disease diagnostic procedures can benefit from computer-aided detection (CAD), current CAD systems are mainly designed for lung nodule detection. In this article, we focus on tuberculosis (TB) cavity detection because of its highly infectious nature. Infectious TB, such as adult-type pulmonary TB (APTB) and HIV-related TB, continues to be a public health problem of global proportion, especially in the developing countries. Cavities in the upper lung zone provide a useful cue to radiologists for potential infectious TB. However, the superimposed anatomical structures in the lung field hinder effective identification of these cavities. In order to address the deficiency of existing computer-aided TB cavity detection methods, we propose an efficient coarse-to-fine dual scale technique for cavity detection in chest radiographs. Gaussian-based matching, local binary pattern, and gradient orientation features are applied at the coarse scale, while circularity, gradient inverse coefficient of variation and Kullback–Leibler divergence measures are applied at the fine scale. Experimental results demonstrate that the proposed technique outperforms other existing techniques with respect to true cavity detection rate and segmentation accuracy.
Chest radiographs or chest X-ray (CXR) images are widely used to diagnose lung diseases such as lung cancer, tuberculosis (TB), and pneumonia. Due to the superimposed anatomical structures in the human chest, the CXR images are generally noisy and the diagnosis requires careful examination by experienced radiologists. Computer-aided detection (CAD) systems in chest radiography have therefore been developed to reduce the workload of radiologists. Ginneken et al. reviewed the CAD technological development in 2001  and 2009 . Developing a single system that looks into all abnormalities on a chest radiograph is practically impossible due to the widely different characteristics of abnormalities, and specific focus of the image processing algorithms. Therefore, the current CAD systems often aim at a single aspect, e.g., detection of lung cancer nodules. This strategy has been proved to be successful, and many effective algorithms have been developed for routine diagnostic procedures .
Nodule detection has been the main focus in current CXR CAD systems. However, as Ginneken et al. pointed out , there are other diseases, e.g. TB, that rely heavily on chest radiograph examination can benefit from the CAD systems. Infectious TB is still a public health problem in many countries . Therefore, our research focus is on developing a CAD system for the diagnosis of infectious TB. The TB can be identified based on different radiographic patterns, such as cavity, airspace consolidation, and interstitial opacities . A few existing CAD systems use texture analysis to detect interstitial changes . However, the interstitial pattern is not a reliable radiographic cue for infectious TB. According to a recent research article on TB , cavitation in the upper lung zone (ULZ) is a typical radiographic feature of APTB. So far, insufficient research has been done for efficient detection of TB cavities. Shen et al.  recently proposed a hybrid knowledge-guided (HKG) framework for TB cavity detection, which contains three major steps. In Step 1, the cavity candidates are detected using adaptive thresholding on the mean-shift clustered CXRs. In Step 2, a segmentation technique is applied to the candidates to generate contours of important objects present in the CXR image. In Step 3, the contour-based circularity and gradient inverse coefficient of variation (GICOV) features are extracted for the final cavity classification using a Bayesian classifier. Although, this technique provides a good performance, it has several limitations. First, due to cavity size variation and the occlusion from neighboring superimposed anatomical structures, the mean shift cluster result is sensitive to the parameter values used. Second, the adaptive threshold, which is a quadratic polynomial of GICOV score, does not perform well when the cavity boundary is weak. These two limitations lead to a high missing rate (MR) of true cavities. To overcome these problems, we propose a dual scale feature classification strategy for TB cavity detection in chest radiographs. First, a coarse feature classification step is performed to detect the cavity candidates by capturing the geometric, textural, and gradient features in the lung field. Second, a Hessian matrix-based technique is applied to enhance the cavity candidates, which leads to a more accurate contour segmentation. Finally, fine features based on the shape, edge, and region are extracted from the segmented contours for the final cavity classification. Experimental results show that the performance of the proposed candidates detection, segmentation, and cavity classification modules is superior compared to the results obtained using other related CAD systems.
The rest of this article is organized as follows. Section 2 explains the cavity pattern in CXRs. Section 3 describes our proposed method in detail. Section 4 reports and analyzes the performance of the proposed technique. Conclusion and future work are presented in Section 5.
2. Manifestation of cavity in chest radiographs
3. Proposed technique
The template matching (TM) is a widely used technique in pattern recognition, where the presence of a pattern in an image is detected by comparing different parts of an image with a reference pattern known as template. In many TM techniques, instead of comparing a given template directly, a transformation of the template is matched with similar transformation of a candidate region using a similarity measure. Normalized cross correlation is often used to measure similarity because of its fast implementation using the fast Fourier transform. Since traditional TM is sensitive to rotation and scale, rotation and scale invariant transform such as Fourier–Mellin transform , or ring-projection transform  can be incorporated into TM. However, these transforms provide good results only when a cavity shape/size deviates very little from the template shape/size. To avoid missing true cavities, a solution is to use a large set of templates covering different cavity sizes and rotation angles.
Although the proposed GTM module works well for cavities of typical shape and intensity, it is difficult to detect cavities obscured by anatomical structures or some other abnormalities in the lung field. To address this issue, we combine the LBP and HOG features, which have been shown to be useful in human detection in handling partial occlusion . The LBP  is a hybrid texture feature widely used in image processing. It combines the traditionally divergent statistical and structural models of texture analysis. The LBP feature has some key advantages, such as its invariance to monotonic gray level changes and computational efficiency. The HOG feature , similar to Lowe’s scale-invariant feature transform feature, is regarded as an excellent descriptor to capture the edge or local shape information. It has a great advantage of being robust to changes in illumination or shadowing. These two features are expected to complement well the GTM technique, especially in blurred regions containing cavities, to detect TB cavity candidates.
In the LHFC module, a feature vector, which combines the LBP and HOG features, is calculated for each candidate window. The feature vector is then fed to a classifier, which is trained offline using ground-truth (cavity and non-cavity) training data. The classifier will assess the windows as cavity candidates (positive samples) or not (negative samples). The candidate windows are generated using a sliding-window paradigm where an image is scanned from the top left to the bottom right with overlapping rectangular sliding windows. The windows are scanned row wise. The window size is consistent with the template size in GTM, i.e., each window has a size of 75 × 75. The overlap between two consecutive windows is 2/3 of the window size.
The computation of these two features and the classification using support vector machine (SVM)  are explained in the following sections.
3.2.1. Computation of the LBP feature
3.2.2. Computation of HOG feature
For computational convenience, we first resize each 75 × 75 image window into a 64 × 64 window using bicubic interpolation. The HOG feature for each resized window is then calculated as follows.
Step 1. Gradient computation: The gradient of each pixel in the window is calculated using two filter kernels: [−1, 0, 1] and [−1, 0, 1] T . Let the magnitude and orientation of the gradient of the i th pixel (1 ≤ i ≤ 4096) be denoted by m i and φ i , respectively.
Step 2. Orientation histogram: Each window is first divided into non-overlapping cells of equal dimension, e.g., a rectangular cell of 8 × 8. The orientation histogram is then generated by quantizing φ i into one of the nine major orientations: , 1 ≤ k ≤ 9. The vote of the pixel is weighted by its gradient magnitude m i . Thus, a cell orientation histogram H c is a vector with dimension of 1 × 9.
The HOG feature vector of an image window (with 49 blocks) is a concatenated vector of all 49 normalized block orientation histogram (), and will have a dimension of 1 × 1764 in our case. Figure 7c shows the plot of the HOG feature vector of the image window shown in Figure 7a.
Combining the LBP and HOG features, a feature vector of size 1 × 1770 is obtained for each image window. These features vectors are fed to the SVM classifier, explained in the following section, for cavity candidates detection.
3.2.3. Classification using SVM
Although SVM can perform both linear and nonlinear classifications, the basic SVM is a non-probabilistic binary linear classifier . It is commonly used in machine learning as a supervised learning technique for recognizing patterns. Our goal is to use a pattern’s feature vectors to identify which class it belongs to. The classification decision is based on the value of a linear combination of these feature vectors. Researchers use SVM classifiers in applications because of its efficiency in handling both linear and nonlinear classification problems. Once the separating hyperplane is obtained after the training step and the classification accuracy is satisfied, the given task (data) could linearly be separated in a high-dimensional feature space using this hyperplane.
where Γ(·) denotes a kernel function . Linear, polynomial, radial basis function (RBF), and sigmoid are widely used as SVM kernels. In our tasks, we use the RBF kernel function which performs better than other kernels.
where α k is the Lagrange multiplier. If , it means belongs to class y = 1, and if , it means belongs to class y = −1.
As shown in Figure 9b, the GTM + LHFC detects a large number of cavity candidates some of which may be false positives (e.g., C1 and C3 shown in Figure 9b). In this section, we present a technique to enhance the cavity feature in a candidate, which will help in reducing the number of false positives. In order to reduce the effect of noise and irrelevant anatomical structures or abnormalities, we apply the HIE to enhance the candidates. Note that the Hessian matrix has been applied in the literature to enhance local patterns such as plate-like, line-like, or blob-like structures . The proposed HIE has three steps, which are described below.
Step 1. Laplacian of Gaussian smoothed image: In this step, three Laplacians (in three directions) of a Gaussian smoothed image, at scale σ, are obtained by convolving a cavity candidate with the second derivative of Gaussians as follows.
where L xy (x i , y i , σ) = L yx (x i , y i , σ). A known problem of multi-scale analysis using Hessian matrix is that over-blurring can occur during the multi-scale smoothing, which may increase false detections . Therefore, in this article, we set the σ value equal to the object scale calculated using the method described in . The object scale at every pixel is defined as the radius of the largest hyperball centered at the pixel such that all pixels within the ball satisfied a predefined image intensity homogeneity criterion. Object scale represents the geometric information (size) of the local structure. Object scale at the center of a blob-like structure is approximately equal to the radius of the blob in pixel size.
where λ 1 and λ 2 are eigenvalues of H σ (x i , y i ), and |λ 1| ≥ |λ 2|. The intuition in Equation (9) of using only the largest eigenvalue for cavity enhancement is based on the fact that the Hessian matrix has a strong edge effect (for those strong edge points, |λ 1| >> |λ 2| ≈ 0) . Although cavities are usually embedded in noisy surroundings due to the neighboring necrosis caused by cavitation, the inside of a cavity (filled with air or fluid or both) still has lower intensity than the background. Thus, the strong edge between the inside and outside of a cavity gives a good clue to indentify the contour of cavity. Different techniques of edge enhancement were evaluated in this study, such as contrast-limited adaptive histogram equalization , fuzzy C means , and speckle reducing anisotropic diffusion technique , and the proposed HIE technique achieves the best performance.
The enhanced window candidates C1–C3 are shown in Figure 9d. It is observed that the annular ring-like structure is greatly enhanced.
Active contours or deformable models are generally divided into two types: parametric active contours (typically known as snakes) and geometric active contours (level set). The snake-based techniques are often faster than level sets in virtue of efficient numerical methods. In addition, the level sets produce more false detections due to its multiple objects capturing ability. Therefore, in this article, we use a snake-based technique known as IFVF . In this technique, a snake contour represented by v evolves through the candidate window to reach a force balance equation F int(v) + F ext(v) = 0, where F int(v) is the internal force constraining contour’s smoothness, and F ext(v) is the external force attracting the contour toward image features.
By comparing the edge map points to the current snake contour points (snaxels), a new control point (x c ,y c ) is selected by considering the point which contributes more to the distance between snake contour and object boundary . We use the Hausdorff distance to find such a point. Assuming two sets of points S and O, the Hausdorff distance is then defined as where d(s o) is the Euclidean distance between a snaxel s and a object boundary point o. So, the control point is chosen as the point on the object boundary which has the Hausdorff distance value.
- 3.For any pixel (x,y) on the contour v, its F dynamic(x,y) is then calculated as follows(12)
where δ = ±1 controls the outward or inward direction. In this article, we use δ = 1, as the initial contour is automatically set as a small circle in the center of the window image with radius of 3 pixels. d’(x,y) is the Euclidean distance between points (x,y) and (x c ,y c ). Note that the term (1 − B) makes the F dynamic zero for those points which already reach edges. Based on the edge map generated from the enhanced candidates images using HIE, the IFVF segmentation result of these candidates C1–C3 are shown in Figure 9e. The stopping criterion of the evolution is determined by computing the difference in locations (defined by the x and y coordinates) of the corresponding contour points between two consecutive iterations. If it is less than a convergence threshold t, the active contour evolution will be stopped. In our experiments, t is empirically set to 0.05. Based on our tests, there is no significant improvement even if t is smaller than 0.05.
- 1.Assuming a contour has one centroid, L points are selected from the contour in L cardinal directions. The circularity of the contour is then calculated as scaled variance as follows(13)
Based on the observation that the inner boundary of a cavity often has dark-to-bright transition, the GICOV value of L points on the contour is calculated as follows
For the contour point (x i ,y i ) in the i th direction, its gradient in normal direction g n (x i ,y i ) is calculated as , where is the unit outward normal vector at this point.
The mean and standard deviation of g n , denoted by m and s, are then calculated as and
- (c)The GICOV value of the contour is finally achieved using following equation:(14)
- 3.Given the probability distributions, P and Q, of the pixel intensity values inside and outside the cavity, respectively, the KLD for a candidate window is calculated as follows(15)
where B is the number of bins in the histogram span by P and Q. The KLD compares the difference in gray level distribution between the pixels inside and outside the contour.
Fine feature values of three contours in Figure 9e
4. Performance evaluation
In this section, we evaluate our proposed coarse-to-fine dual scale technique with respect to three aspects: the effectiveness of candidate selection, the accuracy of contour segmentation, and the accuracy of final cavity detection.
4.1. Experimental dataset and parameters configuration
Parameters configuration in the proposed technique
75 × 75 pixels
Wall thickness σ
Aspect ratio a/b
Rotation angle θ
75 × 75 pixels
8 × 8 pixels
2 × 2 cells
Default values in LIBSVM software 
Snake evolution direction δ
Convergence threshold t
Default values in LIBSVM software 
4.2. Effectiveness of candidate selection
The above test results show that combining the LBP and HOG features for capturing the texture and gradient information around the cavity region, and using the GTM for shape recognition, contributes to the low MR of the proposed coarse feature classification technique.
4.3. Accurate contour segmentation
where R c denotes the region enclosed by the contour generated by the segmentation techniques, such as DBC-GVF  and our IFVF ; R g denotes the region of a TB cavity that is enclosed by the ground-truth contour manually drawn by radiologists; and ‖.‖ denotes the cardinality (number of pixels). TMM = 0 indicates that the segmented contour has no intersection with the ground truth, while TMM = 1 indicates that the segmented contour is identical to the exact cavity. To improve the segmentation accuracy, we apply the HIE on the candidates before segmentation.
Segmentation accuracy evaluation
DBC-GVF without HIE (%)
DBC-GVF with HIE (%)
IFVF without HIE (%)
IFVF with HIE (%)
Average of TMM
Standard division of TMM
Mean of TMM
4.4. Accuracy of final cavity detection
Cavity detection evaluation
Circularity + GICOV 
Circularity + GICOV + KLD
Cavity detection evaluation of E-Group
Circularity + GICOV 
Circularity + GICOV + KLD
Cavity detection evaluation of D-Group
Circularity + GICOV 
Circularity + GICOV + KLD
In this article, we proposed an efficient coarse-to-fine dual scale feature classification technique for TB cavity detection in chest radiographs. Experimental results demonstrate that the proposed technique outperforms existing methods in three aspects. First, a lower MR is achieved because in the proposed method local cavity region-related coarse features, such as geometric, textural, and gradient features, are taken into consideration. Second, edge-based segmentation becomes more accurate by incorporating HIE to enhance the contours. Third, the final cavity detection accuracy is greatly increased by introducing the fine scale feature classification using three types of contour-related features, which includes shape, edge, and region. This study contributes in the development of CAD systems for infectious TB diagnosis, because of the higher detection rate and lower MR compared to other techniques. Future work will focus on exploring novel algorithms to model other characteristics of infectious TB.
- Ginneken BV, Romeny BMTH, Viergever MA: Computer-aided diagnosis in chest radiography: a survey. IEEE Trans. Med. Imag. 2001, 20(12):1228-1241. 10.1109/42.974918View ArticleGoogle Scholar
- Ginneken BV, Hogeweg L, Prokop M: Computer-aided diagnosis in chest radiography: beyond nodules. Eur. J. Radiol. 2009, 72(2):26-30.Google Scholar
- Hardie RC, Rogers SK, Wilson T, Rogers A: Performance analysis of a new computer aided detection system for identifying lung nodules on chest radiographs. Med. Image Anal. 2008, 12(3):240-258. 10.1016/j.media.2007.10.004View ArticleGoogle Scholar
- World Health Organization, Epidemiology: Global Tuberculosis Control: Epidemiology, Strategy, Financing. WHO Press, Geneva; 2009:6-33.Google Scholar
- Long R, Ellis E, et al.: Canadian Tuberculosis Standards. 6th edition. Public Health Agency of Canada; 2007.Google Scholar
- Lau A, Long R, et al.: The public health consequences of smear positive pulmonary tuberculosis in patients with typical and atypical chest radiographs. In 15th Annual International Union Against Tuberculosis and Lung Disease. North American Region Conference, Vancouver, BC; 2011.Google Scholar
- Shen R, Cheng I, Basu A: A hybrid knowledge-guided detection technique for screening of infectious pulmonary tuberculosis from chest radiographs. IEEE Trans. Biomed. Eng. 2010, 57(11):2646-2656.View ArticleGoogle Scholar
- Reddy BS, Chatterji BN: An FFT-based technique for translation, rotation, and scale-invariant image registration. IEEE Trans. Image Process. 1996, 5(8):1266-1271. 10.1109/83.506761View ArticleGoogle Scholar
- Lin YH, Chen CH: Template matching using the parametric template vector with translation, rotation and scale invariance. Pattern Recognit. 2008, 41(7):2413-2421. 10.1016/j.patcog.2008.01.017View ArticleGoogle Scholar
- Wang X, Han TX, Yan S: An HOG-LBP Human Detector with Partial Occlusion Handling. in Proceedings of the ICCV, Kyoto; 2009:32-39.Google Scholar
- Ojala T, Pietikainen M, Harwood D: A comparative study of texture measures with classification based on feature distributions. Pattern Recognit. 1996, 29(1):51-59. 10.1016/0031-3203(95)00067-4View ArticleGoogle Scholar
- Dalal N, Triggs B: Histograms of oriented gradients for human detection. In in Proceedings of the IEEE CVPR. Vol. 1 edition. San Diego; 2005:886-893.Google Scholar
- Cortes C, Vapnik V: Support-vector networks. Mach. Learn. 1995, 20(3):273-297.Google Scholar
- Li B, Meng M: Computer-aided detection of bleeding regions for capsule endoscopy images. IEEE Trans. Biomed. Eng. 2009, 56(4):1032-1039.View ArticleGoogle Scholar
- Sato Y, Nakajima S, et al.: 3D multiscale line filter for segmentation and visualization of curvilinear structure in medical images. Med. Image Anal 1998, 2: 143-168. 10.1016/S1361-8415(98)80009-1View ArticleGoogle Scholar
- Liu J, White JM, Summers RM: Automated Detection of Blob Structures by Hessian Analysis and Object Scale. Proceedings of the ICIP, Hong Kong; 2010:841-844.Google Scholar
- Saha PK, Udupa JK: Scale-based image filtering preserving boundary sharpness and fine structure. IEEE Trans. Med. Imag. 2001, 20: 1140-1155. 10.1109/42.963817View ArticleGoogle Scholar
- Zhang H, Wan M, Bian Z: Complementary tensor-driven image coherence diffusion for oriented structure enhancement. EURASIP J. Adv. Signal Process. 2011., 70(2011):Google Scholar
- Zuiderveld K: Contrast limited adaptive histogram equalization. In Chapter VIII.5, Graphics Gems IV. Academic Press, Cambridge, MA; 1994:474-485.View ArticleGoogle Scholar
- Gil M, Sarabia EG, et al.: Fuzzy c-means clustering for noise reduction, enhancement and reconstruction of 3D ultrasonic images. In Proceedings of the ETFA. Barcelona; 1999:465-472.Google Scholar
- Yu Y, Acton ST: Speckle reducing anisotropic diffusion. IEEE Trans. Image Process. 2002, 11(11):1260-1270. 10.1109/TIP.2002.804276MathSciNetView ArticleGoogle Scholar
- Xu T, Cheng I, Mandal M: An Improved fluid vector flow for cavity segmentation in chest radiographs. In Proceedings of the ICPR. Istanbul; 2010:3376-3379.Google Scholar
- Sum KW, Cheung PYS: Boundary vector field for parametric active contours. Pattern Recognit. 2007, 40(6):1635-1645. 10.1016/j.patcog.2006.11.006View ArticleGoogle Scholar
- Canny J: A computational approach to edge detection. IEEE Trans. Pattern Anal. Mach. Intell. 1986, 8(6):679-714.View ArticleGoogle Scholar
- Di Ruberto C, Dempster A: Circularity measures based on mathematical morphology. Electron. Lett. 2000, 36(20):1691-1693. 10.1049/el:20001191View ArticleGoogle Scholar
- Dong G, Ray N, Acton S: Intravital leukocyte detection using the gradient inverse coefficient of variation. IEEE Trans. Med. Imag. 2005, 24(7):910-924.View ArticleGoogle Scholar
- Bishop C: Pattern Recognition and Machine Learning, Chap. 1. Springer, New York; 2006.Google Scholar
- Chang CC, Lin CJ: LIBSVM: A Library for Support Vector Machines. 2011.http://www.csie.ntu.edu.tw/~cjlin/libsvm/ available atGoogle Scholar
- Hastie T, Tibshirani R, Friedman J: The Elements of Statistical Learning: Data Mining, Inference, and Prediction, Chap. 7. 2nd edition. Springer, New York; 2009.View ArticleGoogle Scholar
- Xu T, Cheng I, Mandal M: Automated cavity detection of infectious pulmonary tuberculosis in chest radiographs. In Proceedings of the IEEE EMBC. Boston; 2011:5178-5181.Google Scholar
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.