You are on page 1of 1

Automated Lung Field Segmentation in CT images

using Mean Shift Clustering and Geometrical Features

Chanukya Krishna Chama
, Sudipta Mukhopadhyay
, Prabir Kumar Biswas
, Ashis Kumar Dhara
Mahendra Kasuvinahally Madaiah
and Niranjan Khandelwal

Lung field segmentation is the task of separating the lung region from other
anatomical parts of the body in computed tomography (CT) scans of thorax
Automated lung field segmentation with a minimal amount of user
interaction is a precondition for designing an efficient nodule and interstitial
lung disease pattern detection system
Armato and Sensakovic[1] illustrated the importance of accurate
segmentation as a preprocessing step in a computer aided diagnosis (CAD)
I ntroduction

Dept. of Electronics & Electrical Communication Engineering, Indian Institute of Technology Kharagpur, W.B 721302, INDIA
This work has been supported by Department of Information Technology (DIT), Govt. of India. The authors are grateful
to team of radiologists at PGIMER, Chandigarh, Dr. Pinakpani Bhattacharya, Quadra Medical Pvt. Ltd., Kolkata and Dr.
Anup sadhu, EKO CT & MRI Scan Centre, Calcutta Medical College, Kolkata for providing chest CT data along with
their radiology interpretations and Prof. R. M. Rangayyan at University of Calgary, Canada for valuable advice to our
research work.
False negatives are created due to high density abnormalities viz.
consolidation, fibrosis, ground glass opacity, nodules etc
For the convex part of the lung, the convex hull is found and the MS clusters
from the label map with more than 50% overlap are included to the lung
This operation is limited within 80% depth of the lung slice from the costal
end. For this purpose, the cumulative positions inside the lung segmentation
are employed as described in [3]
* If I am absent please find me at presentation no. 8670-108
[1] Armato III, S. G., and Sensakovic, W. F., Automated lung segmentation for thoracic CT: Impact
on computer-aided diagnosis, Academic Radiology, 11(9), 1011 - 1021 (2004)
[2] Lee, S. L. A., Kouzani, A. Z. and Hu, E. J., Empirical evaluation of segmentation algorithms for
lung modelling, Proc. IEEE International Conference on Systems, Man and Cybernetics, 719 - 724
[3] Van Rikxoort, E. M., De Hoop, B., Viergever, M. A., Prokop, M., and Van Ginneken, B.,
Automatic lung segmentation from thoracic computed tomography scans using a hybrid approach
with error detection," Medical Physics, 36(7), 2934 - 2947 (2009)
[4] Comaniciu, D., and Meer, P., Mean shift: A robust approach toward feature space analysis,"
IEEE Trans. Pattern Analysis Machine Intelligence, 24(5), 603 - 619 (2002)
[5] Hu, S., Hoffman, E. A., and Reinhardt, J. M., Automatic lung segmentation for accurate
quantitation of volumetric x-ray CT images, IEEE Trans. Medical Imaging, 20(6), 490 - 498 (2001)
Proposed mean shift clustering and geometric features based method is robust to
high dense abnormalities viz. pleural nodules, consolidation and fibrosis and
provides scope of improvement in case of severe abnormalities viz. pleural
effusion, honey combing, severe fibrosis etc
(f) (j)
(a) (b) (c) (d) (e)
(g) (h) (i)
Figure 2. Illustration of the proposed method, (a) Lung CT image, (b)
Pseudo color MS label map, (c) MS segmentation, (d) Removal of objects
connected to border, (e) MS segmented image with overlaid lung ROI, (f)
MSR I mask, (g) convex hull of costal right lung, (h) convex hull of costal
left lung, (i) MSR II mask, (j) Lung field contour ( ) and ground truth
contour () overlaid on input image
In case of fused lung (shown in
Figure 3), fused lung separation
is performed to eliminate pleura
(FPs) attaching both the lungs by
iterative thresholding
The effect of lower threshold is
limited to small rectangular region
around vertical central line
Fused lung separation
Mean Shift Segmentation [2,4] is performed for edge preserving smoothing
(with spatial bandwidth h
=5, range bandwidth h
=20 and minimum size of final output
regions M=30) to obtain an over segmented image and label map. Otsu
thresholding [5] is performed on the image to create binary mask of lung.
Mean Shift Segmentation
Connected component labeling
Connected component labeling (with 8-neighbours) is performed to find
number of objects present in binary mask and to calculate various
features of those objects
Removal of bordering objects
Background objects (FPs) connected to image border are removed. The
result at the end of this stage will be referred as mentioned as MS result.
Detection of theobjects with in lung ROI
Detection of the objects with in lung ROI is performed to find the lung
objects (TPs)
Detection of fused lung
If the pleura between the two lungs are thin and low intensity, the two lungs
may be fused after the mean shift segmentation resulting FP
Figure 1. Flow of the proposed automated lung field segmentation algorithm
Figure 3. (a),(d) are Lung CT image; (b),(e)
are MS Segmentation output of fused
lungs and overlaid lung ROI; (c),(f) are
MSR I mask
(a) (b) (c)
(e) (f)
In MS, FP occurs due to low intensity regions viz. bed, trachea, bronchus
and liver in the costal regions.
To eliminate the FP connected component labeling is performed on the
above mask and for various objects, region features such as Eccentricity,
Solidity, Area and Centroid are calculated.
Eccentricity is defined in terms of eccentricity of the ellipse that has the same
second-moments as the object and is calculated as follows

where a is the length of semi-major axis and b is the length of semi-
minor axis.
The value of eccentricity is between 0 and 1. An ellipse whose eccentricity is
0 is a circle, while an ellipse whose eccentricity is 1 is a line segment.
Solidity is defined as the proportion of the pixels in the convex hull that
are also in the object.
Solidity = (Area of the object) / (Convex area of the object)
The value of solidity is between 0 and 1. Any convex shape objects such as
rectangle, circle without holes/concavities will have solidity of 1, while objects
with spikes, holes and non-circular will have low solidity
Eccentricity feature (>0.9) within lung ROI is used to remove part of bed
High solidity (>0.4) and small area (< 720 mm
) are used to remove trachea,
bronchus, liver.

The result at the end of this stage will be referred as mentioned as MSR I
(Mean shift segmentation result after FP reduction).
Figure 4. Illustration of costal lung
convex hull generation. (a),(f) Lung CT
image; (b),(g) MSR I segmented lung
mask (c),(h) cumulative x-positions
inside lung; (d),(i) costal lung; (e),(j)
convex hull
(d) (a) (b) (c) (e)
(i) (f) (g) (h) (j)
The cumulative position of
a point (x, y) inside a lung is
defined as follows

where A is the total number of
pixels in the lung, I is the lung mask
which is 1 inside the lung and 0
elsewhere, and X, Y are
dimensions of the image.
( , ) x y
( ) ( , )
0 0
x x I x y dx dy
Y x (
' ' ' ' =
} }
( ) ( , )
0 0
y y I x y dx dy
y X (
' ' ' ' =
} }
Composition of Test database

Database Name Normal Abnormal
Subjects Images Subjects Images
ILD Database 15 79 26 196
LIDC-IDRI Database 17 54 17 100
Total 32 133 43 296
Lung ROI is created using 281 images from 2 normal
subjects out of 435 images in LIDC-IDRI database which
are not used for evaluation of proposed algorithm as
shown in Figure 5.
Ground truths for quantitative evaluation of segmentation
algorithms are prepared using human guided scribble
based interactive segmentation tool
Figure 5. Lung ROI
created from symmetric
centroid map
Qualitative results of MS, MSR I, MSR II are shown in first, second and third column respectively. The
segmented contour and ground truth contour are shown in green ( ) and red () respectively. The
results with 10 lung CT patterns corresponding to normal, excavated mass, pleural nodule, ground glass
opacity (GGO) with mass, fibrosis, spicular solitary pulmonary nodule (SPN), cystic bronchiectasis, pleural
effusion with septal thickening, septal thickening and fibrosis respectively are shown in (a)-(j)
Methods Category
Performance Metrics
(in mm) DSC
(Comaniciu et al. 02)
Normal 7.91 7.89 0.9725 0.0154 0.9759 0.0134 0.9966 0.0018
Abnormal 10.66 9.57 0.8747 0.1486 0.8243 0.1896 0.9955 0.0047

Normal 2.91 4.85 0.9833 0.0288 0.9723 0.0434 0.9993 0.0011
Abnormal 8.37 8.76 0.8771 0.1641 0.8158 0.2037 0.9984 0.0023
(Proposed method)
Normal 1.47 4.31 0.9854 0.0288 0.9771 0.0433 0.9991 0.0014
Abnormal 6.23 9.00 0.8954 0.1498 0.8468 0.1908 0.9969 0.0061
Block Diagram
The flow of the proposed algorithm is shown in Figure 1. The description of
each important steps are given below.

Modified Hausdorff Distance,
Dice Similarity Coefficient,
True positive fraction
The result at the end of this stage will be referred as mentioned as MSR II
(Mean shift segmentation result after FP reduction and FN reduction).

Aimof thepaper
Automated lung field segmentation in CT images based on mean shift
clustering and geometric features which is robust to high dense
abnormalities attached to lung boundary
Lung region of interest (ROI) created from symmetric centroid map of
two normal subjects, false positives (FP) reduction module (using
eccentricity, solidity, area, centroid features) and false negatives (FN)
reduction module (using overlap feature between clusters from MS
label map and convex hull of costal lung) are used for accurate and
automated segmentation.
Lung CT
Mean shift
Removal of
objects connected
to image border
FN reduction
Lung field
lungs ?
Fused lungs
FP reduction
Detection of
objects within
lung ROI
Lung ROI
Dept. of Radiodiagnosis, Postgraduate Institute of Medical Education & Research, Chandigarh 160012, INDIA