You are on page 1of 8

Detection of Rib Borders on X-ray Chest

Radiographs
Rui Moreira1 , Ana Maria Mendonca1,2 , and Aurelio Campilho1,2
1

INEB Instituto de Engenharia Biomedica, Laborat


orio de Sinal e Imagem
Biomedica
Universidade do Porto, Faculdade de Engenharia, Dep. Eng. Electrotecnica e de
Computadores
Porto Portugal

Abstract. The purpose of the research herein presented is the automatic detection of the rib borders in posterior-anterior (PA) digital chest
radiographs. In a computer-aided diagnosis system, the precise location
of the ribs is important as it allows reducing the false positive in the detection of abnormalities such as nodules, rib lesions and lung lesions. We
adopted an edge based approach aiming at detecting the lower border
of each rib. For this purpose, the rib geometric model is described as a
parabola. For each rib, the upper limit is obtained using the position of
the corresponding lower border.

Introduction

X-ray images are a valuable mean for the diagnosis of the pulmonary condition,
as they can provide a general indication of the patient pathological status. From
these images it is also possible to obtain specic information related with some
diseases, as the pulmonary nodules. However, some relevant diagnostic features
are often superimposed by other anatomical structures, as the ribs or the heart
[1]. The precise location of these superimposing structures is important to adapt
the procedures to the specic changes produced by these structures.
In this paper, we focus our attention in the automatic detection of the rib borders in posterior-anterior chest radiographs, in order to segment these anatomical structures and to determine their precise location. This problem has been
addressed by other authors using distinctive approaches. Vogelsang et al. [1] dened a parabola as a suitable model for the rib borders. To describe completely
each rib, they have used four parabolas, two for the left and right borders of the
ventral edges and two for the lower and upper borders of the dorsal ribs. This
method achieved a suitable detection, but in some cases manual corrections of
the detected rib borders were necessary. In [2], authors have extracted the rib
edges using a Canny edge detector and a connectivity method, called 4 way
with 10 neighbors. The reported rate for rib labeling was about 60%. These
results were obtained with a database containing some images with an unclear
presentation of the ribs. A statistical shape model for the complete rib cage was
A. Campilho, M. Kamel (Eds.): ICIAR 2004, LNCS 3212, pp. 108115, 2004.
c Springer-Verlag Berlin Heidelberg 2004


Detection of Rib Borders on X-ray Chest Radiographs

109

presented by Ginneken in [3]. Instead of detecting rib border candidates locally


and applying rules to infer the rib cage from these candidates, the global rib
cage was tted. Each posterior rib was modeled by two parallel parabolas, one
for the lower rib border and the other for the upper one.
In the work described in this paper an edge based technique is used to detect
the lower borders of the ribs. A set of candidate points is obtained and a set of
rules is applied aiming at selecting the correct rib border points. The geometrical
model adopted to describe each rib border is a parabola. The upper rib limit is an
equidistant version of the parabola associated with the lower one. The distance
between the two curves is measured on the direction of the perpendicular to the
tangent of the lower parabola.
Section 2 reports the methodology used for detecting the lower borders of
the ribs. The detection of the upper borders is described in Sect. 3. Some results
and conclusions are presented in Sect. 4 and 5, respectively.

Detection of the Lower Borders of the Ribs

A set of 30 X-ray chest images is the database used in this work, containing
images with contrasted rib borders, but also including images with less contrasted rib borders. Before applying the rib border detection procedure, images
are processed for automatically locate the lung eld areas. The two main results
of this procedure are used in dierent phases of the rib segmentation process.
Further details concerning these methods were described elsewhere [4], [5]. This
initial step is required in order to make the rib segmentation task easier and
to reduce the processing time. The results of the lung eld region of interest
(ROI) detection and boundaries delineation is illustrated on Fig. 1a) and 1b),
respectively.
The rib borders detection task is accomplished in three main phases. In the
rst phase, each lung ROI is ltered using two dierential lters to obtain edge
points that are expected to belong to the lower borders of the ribs. The two
images that result from the ltering step are processed separately aiming at getting candidate border segments that will be joined together, or eliminated, in the
second phase. In the third phase, the upper borders of the ribs are determined.
To obtain useful edge points, two dierent directional lters were selected.
The choice of the lter kernels was directed to the adaptation of the lter maximal response to the expected rib slope. The kernels of these lters are represented
in Fig. 2.
For each lter, the result is a gray-level image which is binarized to allow
the skeleton determination. Binarization is performed using the well-known Otsu
method [6]. This method was chosen because it is a fully automatic procedure and
the results were, in general, good. The subsequent thinning process is required
to get one pixel wide segments that are expected to belong to the lower borders
of the ribs. Some results of this processing sequence are shown in Fig. 3b), 3c)
and 3d), for the original image presented in 3a).

110

R. Moreira, A.M. Mendonca, and A. Campilho

a)

b)

Fig. 1. a) Original image with ROI limits overlapped; b) Original image with automatically detected lung boundaries overlapped.

a)

b)

Fig. 2. a) Kernel 1; b) Kernel 2.

From the analysis of Fig. 3d), it can be observed that some segments must
be removed, as they correspond to the clavicle or to anterior ribs. Because their
slope is known to vary approximately in the range of 60 to 160 degrees, the
Radon Transform was used to detect and remove these segments. The result of
this cleaning step is illustrated in Fig. 3e). The processing sequence is continued
with a region labeling operation that assigns a distinct label to each individual
connected set of edge points.
To obtain a description of a particular rib border, the thinned segments that
result from the previous steps need to be linked together or eliminated. For this
purpose, each connected set of points is approximated by a second-degree polynomial function. Then every pair of connected segments is compared in order
to decide if the two segments belong to the same rib border. To accomplish this
linking phase, a measure of the number of coincident points between two specic segments was specied. This measure can be understood as the number of
consecutive points in the two compared segments such that the vertical distance
between the two approximation polynomials is less than an established threshold. In order to decide which connected sets must be join together to dene
a particular rib, this measure is combined with the distance between the end
points of the two curves that are being compared.
Figure 4a) shows the curves that are obtained after approximating the connected edge segments by second-degree polynomials. The union of these curves
using the referred criteria is presented in Fig. 4b). As can be observed in this gure, because these criteria were not able to insure all the expected connections, a
linear approximation of the curves is further used to improve the linking phase.

Detection of Rib Borders on X-ray Chest Radiographs

a)

b)

d)

111

c)

e)

Fig. 3. a) Original right lung ROI; b) Image ltered with kernel 2; c) Binary image;
d) Thinned image; e) Cleaned image.

In this step, if the crossing point of the two linear approximations is contained in
the rectangular area dened by the terminal points of the curves, as illustrated
in Fig. 4c), the original sets of edges are also joined together. At this point, a
last tentative to join segments is made, this time using a smaller limit for the
number of coincident points. Although this is a less restrictive criterion, it can
only be applied when the two compared curves have a small distance between
their end points. The nal result of this operation is presented in Fig. 4e).
As was mentioned before, the previously described processing sequence is
applied independently to the binary images that result from the two dierential
lters. In order to get a nal result, the segments from each image are combined
using principles similar to those that were adopted for each individual image.
Each curve from one image is compared with a curve from the other image
using the number of coincident points criterion. However, for each particular
curve, the position of each vertex is also calculated and the curves are only
linked together if the dierence between their vertex row index is smaller than
a specied value. The linear approximation step is also applied to improve the
nal results. Figures 5a) and 5b) show the rib segments obtained with the two
lters, and their combination to produce the nal result is presented in Fig. 5c).
The application of the methods described before to the image test-set revealed two problems, namely missing ribs and the occurrence of rib curves that
were not completely dened. The rst problem is overcome by measuring the

112

R. Moreira, A.M. Mendonca, and A. Campilho

a)

b)

d)

c)

e)

Fig. 4. a) Approximation of the sets of connected points by second-degree polynomials;


b) Union of connected segments; c) Linear approximation of the connected segments;
d) Union of the connected segments using the linear approximation; e) Union of the
connected segments with a low number of coincident points.

distance between consecutive ribs; if the distance is twice the expected, a new
curve is included. To improve the detection accuracy, this new curve is adjusted
using the positions of the edge points where the dierential lters produced the
highest values. To solve the second problem, the detected segments are extended
using a recursive algorithm. A few points are extrapolated from the curve and
it is adjusted again. The extrapolation/adjusting processes are repeated until
the whole rib segment is reconstructed. Figures 6a), 6b) and 6c) illustrate the
two mentioned problems; in Fig. 6c) there is a missing detection case and most
curves should be extended. In Fig. 6d), a new curve was included between the
fth and the last rib and all the other curves were extended to their maximal
extension, as limited by the lung border detection algorithm.

Detection of the Upper Borders of the Ribs

The upper border for each detected rib is obtained using the lower border information. In this work, the lower and the upper borders are equidistant parabo-

Detection of Rib Borders on X-ray Chest Radiographs

a)

b)

113

c)

Fig. 5. a) Curves obtained with the rst lter; b) Curves obtained from the second
lter; c) Detected lower borders of the ribs.

a)

b)

c)

d)

Fig. 6. a) Curves obtained with the rst lter; b) Curves obtained from the second
lter; c) Combination of results; d) Final result after curve inclusion and curve extension.

las. The distance is measured on the perpendicular to the tangent to the lower
parabola. In Fig. 7 the arrows show the dierence between distances measured
on perpendicular and vertical directions.
As the lters were designed to have a maximal response on the lower borders
of the ribs, minimal responses are achieved on the upper limit of the ribs. As a
result, the upper borders are adjusted using the positions of the local minimal
values that result from the initial ltering phase.

Results

The proposed method was tested in a set of 30 images and, in general, the obtained results can be considered good. Figure 8 illustrates some useful results
obtained with this method. Some images produced less satisfactory results because, frequently, some rib borders are not totally segmented or some detected
curves do not correspond to a real rib.

114

R. Moreira, A.M. Mendonca, and A. Campilho

Fig. 7. Dierence between distances measured on the vertical and on the perpendicular
directions.

Other problems, such as the missing detection of the lowest ribs were also
observed. In Fig. 9a) an example of this situation is presented. This result is a
consequence of the weak response of the lters in that area. Figure 9b) illustrates
an incorrect detection due to the presence of a superimposing white shadow
that produces a disturbing response from the lters and does not allow a correct
extension of the curve. The lowest rib is not detected because of the low image
contrast in that region.

Fig. 8. Some good results obtained with the proposed method.

Conclusions

In this paper, a novel approach to automate the process of rib border detection
in digital chest radiographs is presented. An edge based technique was used to
detect the lower limit of each rib. The upper borders of ribs are obtained using
the lower border information.
The identied limitations of the proposed method are the occurrence of missing ribs and incorrect positioning of the curves, mainly in the extreme regions of

Detection of Rib Borders on X-ray Chest Radiographs

a)

115

b)

Fig. 9. Some bad results obtained with the proposed method.

the lung elds. These problems are frequently a consequence of the low contrast
between ribs and the soft tissue. In some cases, the lowest rib is not detected.
However, this situation can easily be overcame by measuring the distance from
the lowest detected rib border to the bottom of the lung. The measured distance
can be compared with the mean dierence between the detected rib borders, to
estimate the number of missing ribs, as well as their locations.
These results are expected to improve some automatic procedures for the
analysis of pulmonary condition related with some diseases, namely the detection
of lung nodules.

References
1. Volgelsang, F., Weiler, F., Dahmen, J., Kilbinger M., Wein, B., G
unther, R.W.,
Detection and compensation of rib structures in chest radiographs for diagnose assistance, Proceedings of SPIE, 3338:774-785, 1998
2. Park M., Jin, J.S., Wilson L.S., Detection and labeling ribs on expiration chest
radiographs, The Phisics of Medical Imaging Conference, SPIE , pp 1021-1031, 1520 Feb 2003
3. Ginneken, B., Romeny, Bart M. H., Automatic delineation of ribs in frontal chest
radiographs, in Medical Imaging 2000:Image Processing, Proceedings of SPIE,
3979:825-836, 2000
4. Monteiro, M., Mendonca, A.M., Campilho, A., Lung eld detection on chest radiographs, Proceedings of VIIP02, IASTED International Conference on Visualization,
Imaging and Image Processing, 367-372, Spain, 2002
5. Mendonca, A.M., Silva, J., Campilho, A., Automatic delimitation of lung elds on
chest radiographs, Proceeding of ISBI04, IEEE International Symposium on Biomedical Imaging, Arlington, USA, 2004
6. Otsu, N., A threshold selection method from gray-level histograms, IEEE Transactions on Systems, Man, and Cybernetics, vol.9, no. 1, pp. 62-66, 1979

You might also like