detection of femur fractures in x-ray images using intensity …leowwk/hyp/limsheree.pdf ·...

49
i Honours Year Project Report Detection of Femur Fractures in X-ray Images using Intensity Gradient Maps By Lim Sher Ee Dennis Department of Computer Engineering School Of Computing National University of Singapore 2003/2004

Upload: others

Post on 14-Feb-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

i

Honours Year Project Report

Detection of Femur Fractures in X-ray

Images using Intensity Gradient Maps

By

Lim Sher Ee Dennis

Department of Computer Engineering

School Of Computing

National University of Singapore

2003/2004

Page 2: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

ii

Honours Year Project Report

Detection of Femur Fractures in X-ray

Images using Intensity Gradient Maps

By

Lim Sher Ee Dennis

Department of Computer Engineering

School Of Computing

National University of Singapore

2003/2004

Project No: H40340

Advisor: A/Prof Leow Wee Kheng

Deliverables:

Report: 1 Volume

Page 3: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

iii

Abstract

Doctors inspect numerous x-ray images everyday. However, with only a low percentage

of the images actually showing fractures, the task is very tedious and exhausting, possibly

resulting in inaccurate diagnosis by the doctors. With the advent of digital x-rays, we are

now able to use computers to ease the doctors’ workload. An automated fracture

detection technique would be able to screen out all obvious cases, thus leaving only the

doubtful cases and final diagnosis for the doctors to handle. We implemented a method to

detect fractures from x-ray images using intensity gradient maps. With the focus of our

work being femur fractures, we adaptively segment the femur images into overlapping

regions. The intensity gradient direction of each region is ascertained and an intensity

gradient map is generated. The intensity gradient maps are then converted into difference

maps and then classified with a SVM classifier, with positive results. The results

complement existing algorithms, resulting in a multi-classifier that produces high fracture

detection rate and classification accuracy.

Subject Descriptors

I.4.7 Feature Measurement

I.4.9 Applications

Keywords:

Fracture detection, intensity gradient maps, adaptive sampling, classification

Implementation software and hardware

Intel Pentium 4 desktop PC, Windows XP Professional, Matlab 6.5r13

Page 4: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

iv

Acknowledgements

First and foremost, I would like to thank my supervisor, A/Prof Leow Wee Kheng, for his

support and help throughout the course of the project. His sound advice and excellent

suggestions allowed me to get through quite a few tight patches. His knowledge of the

subject at hand and innovative ideas on how to tackle problems are truly astounding

Next, I would like to thank Chen Ying for his sound guidance and help on matters of

implementation. Over the course of the project, I have troubled him numerous times with

my problems, and he has always been patient and always tried to help to the best of his

abilities.

I would also like to thank my fellow students who are working on the same main project.

Our discussions together with the professor about our research have been most

informative and the sharing of knowledge has indeed increased my knowledge on the

subject.

Next on the list are my friends in SoC. Some I have known for years, others for just a few

months. The fun and laughter that we shared has helped me this stressful period.

Last but not least, I would like to thank my girlfriend for all her support. I also thank her

for her understanding of the long periods of time when I was half buried in code and

paper.

Page 5: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

v

Table of Contents ABSTRACT.....................................................................................................................III

ACKNOWLEDGEMENTS ...........................................................................................IV

LIST OF FIGURES ...................................................................................................... VII

LIST OF TABLES .......................................................................................................VIII

CHAPTER 1: INTRODUCTION.................................................................................... 1

1.1 MOTIVATION.............................................................................................................. 1

1.2 STRUCTURE OF FEMUR............................................................................................... 2

1.2.1 The Upper Extremity (proximal extremity)........................................................ 3

1.2.1.1 The Head (caput femoris) ............................................................................... 3

1.2.1.2 The Neck (collum femoris) .............................................................................. 3

1.2.1.3 The Trochanters .............................................................................................. 4

1.2.2 The Trabeculae .................................................................................................. 4

1.3 BACKGROUND............................................................................................................ 5

1.4 RESEARCH OBJECTIVES ............................................................................................. 6

1.4.1 Analysis of femur x-ray ...................................................................................... 7

1.5 CONTRIBUTIONS TO RESEARCH .................................................................................. 8

1.6 ORGANIZATION OF REPORT........................................................................................ 9

CHAPTER 2: RELATED WORK ................................................................................ 10

2.1 OSTEOPOROSIS......................................................................................................... 10

2. 2 FRACTURE DETECTION ............................................................................................ 10

CHAPTER 3: FEATURE EXTRACTION .................................................................. 11

3.1 OVERVIEW................................................................................................................ 11

3.1.1 Noise Removal ................................................................................................. 11

3.1.2 Adaptive Sampling (Yap et al, 2003) ............................................................... 12

3.1.3 Extraction of intensity gradient direction from a sub-region .......................... 15

3.1.4 Compilation of Intensity Gradient Maps ......................................................... 16

Page 6: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

vi

3.2 IMPLEMENTATION DETAILS. ..................................................................................... 19

3.2.1 Median Filtering .............................................................................................. 19

3.2.2 Adaptive Sampling (Yap et al. 2003) ............................................................... 19

3.2.3 Extraction of intensity gradient direction from a sub-region .......................... 20

3.2.4 Compilation of Intensity Gradient Maps ......................................................... 22

CHAPTER 4: CLASSIFICATION ............................................................................... 23

4.1 CONVERT IG MAPS TO DIFFERENCE MAPS ................................................................ 23

4.2 NAÏVE BAYES CLASSIFIER ....................................................................................... 24

4.3 SVM CLASSIFIER ..................................................................................................... 26

CHAPTER 5: RESULTS ............................................................................................... 28

5.1 RESULTS FROM NAÏVE BAYES CLASSIFIER................................................................ 28

5.1.1 Left femur results with Bayes classifier. .......................................................... 28

5.1.2 Right femur results with Bayes classifier......................................................... 30

5.2 RESULTS FROM SVM CLASSIFIER............................................................................. 31

5.2.1 Left femur results with SVM classifier. ............................................................ 32

5.2.2 Right femur results with SVM classifier........................................................... 33

5.3 COMPARISON OF RESULTS FROM BOTH CLASSIFIERS................................................. 34

5.4 RESULTS FROM EXISTING CLASSIFIERS ..................................................................... 34

5.5 COMBINING CLASSIFIERS ......................................................................................... 35

5.6 PREVIOUSLY UNDETECTED FRACTURES FOUND BY INTENSITY-BASED APPROACH .... 36

5.7 PRESENTLY STILL UNDETECTED FRACTURES. ........................................................... 37

CHAPTER 6: FUTURE WORKS & CONCLUSION ................................................ 39

6.1 FUTURE WORKS....................................................................................................... 39

6.1.1 Improve Method for extraction of intensity gradient direction ....................... 39

6.1.2 Development of more complex methods of combining the classifiers ............. 39

6.1.3 Research into new techniques for fracture detection....................................... 39

6.2 CONCLUSION............................................................................................................ 40

REFERENCES................................................................................................................ 41

Page 7: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

vii

List of Figures Fig 1.1: The femur bone (left) and a close up of the upper

extremity (right) …………………………………………………………………………. 2

Fig 1.2: Neck-Shaft Angle ………………………………………………………………. 3

Fig 1.3: X-ray image (left) and diagram (right) showing the

trabeculae in the upper extremity ……………………………………………………….. 5

Fig 1.4: 2 x-ray images showing the consistency of intensity

changes across images …………………………………………………………………... 7

Fig 3.1: Algorithm flow diagram for feature extraction phase ………………………….11

Fig 3.2: A simple example of how noise could cause errors

in our algorithm ………………………………………………………………………….12

Fig 3.3: Examples of femur x-ray images, showing the variations

in shape and size ………………………………………………………………………..13

Fig 3.4: Results of adaptive sampling ………………………………………………….. 14

Fig 3.5: Healthy Femur Intensity Gradient Maps ……………………………………… 17

Fig 3.6: Fractured Femur Intensity Gradient Maps ……………………………………. 18

Fig 3.7: The diagrams above show the directions of the intensity

gradient. ………………………………………………………………………………... 21

Fig 5.1: Graph showing classification accuracy vs. number of principal

components …………………………………………………………………………….. 29

Fig 5.2: Graph showing fracture detection rate vs. number of principal

components …………………………………………………………………………….. 29

Fig 5.3: Graph showing classification accuracy vs. number of principal

components …………………………………………………………………………….. 30

Fig 5.4: Graph showing fracture detection rate vs. number of principal

components …………………………………………………………………………….. 31

Fig 5.5: Fracture that is only detected by intensity-based approach……………………. 37

Fig 5.6: Example of a difficult fracture to detect……………………………………….. 38

Page 8: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

viii

List of Tables Table 4.1: table showing the a priori probabilities and the number of principal

components used in this project ……………………………………………………….. 26

Table 4.2: Table showing the parameters used by the SVM classifier………………… 27

Table 5.1: Table showing left side results using different parameters…………………. 32

Table 5.2: Table showing right side results using different parameters. ………………. 33

Table 5.3: comparison of the 2 classifiers ……………………………………………... 34

Table 5.4: results from previous work …………………………………………………. 34

Table 5.5: Table showing some of the best results from combining the classifiers …….36

Page 9: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

1

Chapter 1: Introduction

1.1 Motivation

Osteoporosis is an ailment which is rated by the World Health Organisation as the second

greatest healthcare problem in the world, with 13 percent of all men and about 40 percent

of all women possibly suffering from an osteoporotic fracture. Everyday, doctors visually

inspect numerous hip x-ray images for signs of fracture. The actual numbers are daunting:

the number of hip fractures occurring due to osteoporosis alone was 1.7 million

worldwide in 1990 and this is expected to rise to 6.3 million by 2050 (International

Osteoporosis Foundation, 2002). However, as the above figures account only for a small

portion of all the x-ray images taken, we can see that the task quickly becomes tiring and

judgement errors may occur due to fatigue. With increasing life expectancy and

population increase, the doctors’ job can only become more daunting.

At the Singapore General Hospital, the doctors diagnose about 350 cases of hip fractures

annually. Statistics have shown that these fractured cases only take up approximately 11

percent of all the hip x-rays taken. For each x-ray, the doctors conduct two rounds of

visual examination before making a diagnosis. They make their diagnosis based on

certain rules which involve the shape, geometry and texture of the femur x-ray. So you

can see that the entire process is rather time-consuming and taxing on the doctors. It has

been found that due to fatigue, a doctor may misdiagnose a fracture. This could have

serious implications for the patient.

To help doctors with their task, we can employ a computer to take over some of the work

a doctor has to do. This is possible due to the advent of digital x-ray technology, which

opens up new possibilities in the storage, retrieval and analysis of x-ray images.

Computers are unaffected by fatigue and can thus maintain a high level of efficiency

indefinitely. They can also perform the fracture detection process faster, thus saving time.

Page 10: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

2

However, while a computer cannot totally supplant the experience and professional

knowledge of doctors, it can act as an aide. It can pre-screen all the images and classify

the more obvious cases, leaving the doctors with only the second examination and

possibly some of the less obvious cases which the program cannot classify accurately.

This will help alleviate some of the burden on the doctors.

Computer techniques that can detect fractures from x-rays are now available, but before

we go into more detail about them, we shall first have an overview of the structure of the

femur, which is the bone on which the fracture detection techniques have been focusing

on.

1.2 Structure of Femur

The femur is the longest and strongest bone in the skeleton. It is almost cylindrical in the

greater part of its extent. The femur, like other long bones, is divisible into a body and

two extremities. For our research, we shall focus on the upper extremity.

Fig 1.1: The femur bone (left) and a close up of the upper extremity (right)

Page 11: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

3

1.2.1 The Upper Extremity (proximal extremity).

The upper extremity presents for examination a head, a neck, a greater and a lesser

trochanter. See figure 1.1 for an illustration

1.2.1.1 The Head (caput femoris)

The head is globular and forms a hemisphere. It is directed upward and a little forward,

with the greater part of its convexity being above and in front. Its surface is smooth,

coated with cartilage in the fresh state, except over an ovoid depression, the fovea capitis

femoris, which is situated a little below and behind the center of the head. This is where

the ligament is attached to.

1.2.1.2 The Neck (collum femoris)

The neck is a flattened pyramidal process of bone, which connects the head with the body.

In an adult, the neck forms an angle of about 125° with the body. This angle is known as

the neck-shaft angle. In figure 1.2, the neck-shaft angle is represented by θ.

Fig 1.2: Neck-Shaft Angle

Page 12: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

4

1.2.1.3 The Trochanters

The trochanters are prominent processes which afford leverage to the muscles that rotate

the thigh on its axis. There are two of them, the greater and the lesser.

The Greater Trochanter (trochanter major) is a large, irregular, quadrilateral projection

which is situated at the junction of the neck with the upper part of the body. It is directed

a little lateralward and backward, and, in the adult, is about 1 cm. lower than the head. It

has two surfaces and four borders.

The Lesser Trochanter (trochanter minor) is a conical projection which varies in size in

different subjects; it projects from the lower and back part of the base of the neck.

1.2.2 The Trabeculae

Mathematical analysis (Koch, 1917) revealed the remarkable adaptation of the inner

structure of the bone to the mechanical requirements due to the load on the femur head

(Fig.1.3). The ability of the femur to bear the weight of the upper-body is due to two

main bundles of lines known as the trabeculae. Broadly, the trabeculae consist of the

medial (compressive) system and the lateral (tensile) system. The medial system of

trabeculae passes through the body near the lesser trochanter and spreads upwards and

outwards. The lateral system of trabeculae begins 1 inch below the lower border of the

greater trochanter, arching across the neck and ending in the lower portion of the head.

The two systems intersect at roughly right-angles at the neck. The trabeculae on all femur

bones possess the same pattern, regardless of age, shape or size.

Page 13: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

5

Fig 1.3: X-ray image (left) and diagram (right) showing the trabeculae in the upper extremity

1.2.3 The shaft and the lower extremity

The lower extremity and the shaft, also known as the body, form the rest of the femur.

The shaft is a cylindrical structure that is slightly arched, so as to be convex in front, and

concave behind. It is also known as the shaft. The lower extremity comes between the

lower part of the body and the tibia, forming the upper knee joint.

Now that we have a better understanding of the structure of the femur, we now go back to

see what techniques have been developed for x-ray fracture detection.

1.3 Background

As we mentioned in section 1.1, there exists techniques for detecting fractures from x-

rays. The first of such methods is the neck-shaft angle approach (Tian et al, 2003) which

measures the neck-shaft angle mentioned in section 1.2 in order to determine the presence

of a fracture. Another method is the texture orientation analysis approach (Yap et al,

Lateral system Medial system

Page 14: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

6

2003), which makes use of the trabeculae patterns to detect fractures. Both these methods

achieve satisfactory results individually and when combined into a multi-classifier system,

performed even better. The result for this is given in Yap et al. (2003) and proves that the

two classifiers are complementary to each other.

Although the combined classifiers showed good results, they were still unable to detect a

significant percentage of fractures. As such, another fracture detection technique is

needed to complement the two existing ones, so as to further boost the fracture detection

rate. This is one of the main motivations of this project. Also, this project as well as the

work done in Tian et al. (2003) and Yap et al. (2003) are part of a larger project whose

aim is to deliver a fracture detection system of high classification accuracy. Our project is

a joint venture by the School of Computing (SoC) and the Singapore General Hospital

(SGH). It is also supported by a grant from the National Medical Research Council

(NMRC/0759/2003). A provisional patent has also been filed for the approaches in Tian

et al (2003), Yap et al (2003) as well as this project.

1.4 Research Objectives

The main objective of this project is to create a fracture detection technique which would

help improve the overall classification accuracy of the main x-ray fracture detection

program. This can be split into two smaller objectives, which are:

1. Development of an algorithm for femur fracture detection in x-ray images

based on intensity gradient direction, which is complementary to existing

fracture detection algorithms.

2. Combining this algorithm with the existing algorithms to improve overall

performance.

Page 15: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

7

The intensity gradient direction of a region is defined as the direction with the largest

gradient magnitude in the region. If we want to develop a fracture detection technique

using intensity gradient direction, we must first take a closer look at some femur x-ray

images to increase our understanding of the subject.

1.4.1 Analysis of femur x-ray

Fig 1.4: 2 x-ray images showing the consistency of intensity changes across images

From the x-ray images in figure 1.4, we can see variations of intensity within the femurs.

This is due to the differences in thickness at the difference parts of the femur. For

example the edges of the shaft are relatively brighter, while the trochanters are darker.

Also the above mentioned characteristics are highly consistent across the range of healthy

femur x-rays. While the absolute intensity values of the points vary, the relative intensity

as compared to other points on the images is quite constant. Also, the intensity gradient

direction of the same region on different images is similar as well. This shows that we

Page 16: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

8

should be able to use intensity gradient direction as a means of detecting the presence of a

fracture in an image.

Furthermore, we must also look into ways of dealing with the problem of ensuring

correspondence between images. This is necessary because femurs are naturally

occurring shape and thus will exhibit slight variations in shape and size. This needs to be

overcome.

The extracted intensity features must also be represented in such a way that it does not

lose any information about the direction of the intensity gradient. At the same time, it

must be encoded in a format that readily allows for some sort of distance measure to be

formulated, as most classifiers use distance measure to classify a piece of test data.

Next, we need to develop an algorithm that can combine with existing algorithms to

boost the performance of the system. This implies that our algorithm must be

complementary to the existing algorithms. It must be able to correctly classify those

fractures that have been missed by the previous algorithms. Also, we have to consider

different approaches to combining the classifiers so as to give the best results.

1.5 Contributions to research

In our project, we make the following contributions to research in this area and to our

main project which is x-ray fracture detection.

• We developed an algorithm which uses intensity gradient direction to classify x-

ray images.

• We developed a sound representation of directions based on unit vectors.

• We developed an intensity gradient map which can adequately portray the femur

image as a combination of intensity gradient directions.

• We developed an algorithm which is complementary to the existing algorithms.

• We explored various methods of combining classifiers to obtain the best results.

Page 17: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

9

• We were able to obtain very significant improvement in the fracture detection

results through combining our classifier with existing classifiers.

1.6 Organization of Report

After the introduction, we will continue with an overview of the related works of this

project in chapter 2. This will be followed by a detailed explanation of the project: the

feature extraction phase in chapter 3 and the classification phase in chapter 4. Next,

results obtained via the methods implemented in this project will be shown, along with

the result of combining the intensity-based method with existing classifiers. These will be

done in chapter 5. Last but not least, we discuss any further improvements that can be

done in future and conclude in chapter 6.

Page 18: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

10

Chapter 2: Related Work

2.1 Osteoporosis

One of the main causes of hip fractures is osteoporosis. Much research has been made in

this region. The main approaches were the use of fractal analysis of x-ray images

(Ruttiman, Webber and Hazeirig, 1992) and texture analysis (T. Southard, K. Southard,

1996). However, these methods detect the onset of osteoporosis by determining the bone

density of the subject and do not actually look for factures.

2. 2 Fracture detection

While the use of x-rays for fracture detection only came about in recent years, the use of

computer aid techniques for fracture detection is nothing new. These earlier works were

mostly non-visual methods. Ryder, King, Olliff and Davies (1993) analyzed acoustic

pulses as they travel along the bone to detect the presence of a fracture. Kaufman et al.

(1990) analyzed mechanical vibrations based on a neural network model, while Singh

and Chauhan (1998) measured electrical conductivity.

The first automated fracture detection technique based on x-rays was work done by Tian

et al. (2003), who used computer vision techniques to measure the neck-shaft angle. This

method was proven to be very reliable for detection of fractures where there is significant

distortion of the neck-shaft angle. Another technique developed in Yap et al. (2003) used

Gabor filters to do a texture analysis on the femur x-rays. He extracted texture orientation

features from the texture pattern left by the trabeculae on the bone to create a texture

orientation map for each image and used a naïve Bayes classifier to classify them. As was

mentioned in section 1.3, these two algorithms complement each other, so the combined

classifier consisting of the two gave higher accuracies than any single algorithm.

Page 19: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

11

Chapter 3: Feature Extraction

The first part of our implementation is the feature extraction phase, in which we extract

the intensity gradient directions from the sub-regions in each image and compile them to

form intensity gradient maps. Reasons for each step and justifications on the methods

used are presented in section 3.1 while implementation details are highlighted in section

3.2

3.1 overview

The flow of processes is shown below in figure 3.1.

Fig 3.1: Algorithm flow diagram for feature extraction phase

3.1.1 Noise Removal

The first step in the intensity feature process is noise removal. This is an important step,

because ours is an intensity-based approach and hence is very susceptible to noise. Noise

Femur Image Femur Contour Points

Noise Removal

Adaptive Sampling

Extract Intensity Gradient Direction

Compile Intensity Gradient Directions

Intensity Gradient Map

Page 20: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

12

could cause our algorithm to wrongly calculate the intensity gradient direction. For

example, let’s suppose we have a region which looks like figure 3.2, with the black circle

representing noise. The correct intensity gradient direction is represented by the green

arrow. However, our algorithm may wrongly detect the direction due to the noise. This is

represented by the red arrow. We can see that noise has the potential to cause a lot of

errors, hence ultimately diminishing the accuracy of our classifier. Another potential

cause of errors is the trabeculae, which show up as light and dark ridges in x-ray images.

These may result in some error during the intensity gradient direction extraction phase as

well.

Fig 3.2: Here’s a simple example of how noise could cause errors in our algorithm

Our solution to these problems is to apply median filtering to the images. Median

filtering will remove most noise as well as smooth the lines caused by the trabeculae.

This will help to ensure that we more accurately calculate the intensity gradient direction.

3.1.2 Adaptive Sampling (Yap et al, 2003)

The femur is a naturally-occurring shape, which means that across a sample set, there will

be slight variations in shape and size, as can be seen below in fig 3.3. This is due to

various reasons such as the age and gender of the patient. A fracture is also likely to

distort the shape from the norm. Before we can perform intensity feature extraction on

the x-ray images, we must first be able to define regions on each image that correspond to

one on another. Only then will there be a fair and accurate comparison.

Page 21: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

13

Fig 3.3: Examples of femur x-ray images, showing the variations in shape and size

The most obvious and the easiest method of ensuring the correspondence of sub-regions

between images would be to normalise the size of the femurs on all the images, but this

will cause distortions to the images which may remove important information, thus

affecting accuracy. A slightly better method would be to fix the number of regions

column-wise and row-wise in the region of interest (ROI). For example, we can define a

bounding box around the femur and divide this into equal numbers of rows and columns

for all images. In this way, we have a form of correspondence of the sub-regions across

images. This is in fact the essence of the adaptive sampling method first developed in

Yap et al. (2003) to be described later. However, there are drawbacks to doing this: much

of the area in the bounding box is actually outside of the femur contour and hence should

Page 22: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

14

not be considered for intensity feature extraction. The regions we obtain should all lie

within the contours of the femur image.

This problem is overcome by adaptive sampling. Adaptive sampling only designates sub-

regions in the area bounded by the femur contour, thus removing those regions not within

the contours from any further computation. It also ensures the correspondence of sub-

regions between images. Furthermore, the sub-regions are overlapped so as to improve

coverage. The final result of adaptive sampling is shown in figure 3.4

Fig 3.4: Results of adaptive sampling.

Page 23: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

15

3.1.3 Extraction of intensity gradient direction from a sub-region

After the adaptive sampling phase, we now perform extraction of the intensity gradient

direction from the sub-regions. This phase is the reason why we had to implement the

noise removal phase mentioned in section 3.1.1. In this phase, we seek to determine the

direction of the maximum intensity gradient magnitude. This is the feature with which we

classify the images.

Since the noise removal phase has removed most anomalies from the sub-region, we find

the maximum intensity gradient magnitude by looking for the point in the image which

has the greatest magnitude difference compared to the centre of the sub-region. The

direction of the intensity gradient is then determined by the position of the point and its

value compared to the value of the centre of the sub-region. Here, we shall define the

direction as going from bright to dim.

The above algorithm is in fact an approximation to the actual formula for calculating

gradient magnitude in a two-dimensional space. That formula is given as

tyxfuyuxf

yxfDtu

),(),(lim),( 21

0

−∆+∆+=

→ (3.1)

where u = [u1,u2] is the unit vector indicating direction and f(x,y) is an equation that

represents the sub-region (Green et al. 2001). In order to obtain the function f(x,y), we

can use a surface-fitting algorithm to fit a polynomial function to the intensities in the

sub-region.

The main reason why this approach was not implemented is that it requires a significant

amount of time to calculate the polynomial function. The math required to compute the

gradient also takes up a fair amount of time. With hundreds of sub-regions in a single

image, the time taken would be too much for actual usage. Also, using the approximation

yielded fairly good results. However, implementation of the actual gradient formula

Page 24: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

16

would only improve the accuracy of the feature extraction, and hence can be considered

for future work on this subject.

3.1.4 Compilation of Intensity Gradient Maps

After obtaining the intensity gradient direction of the sub-region, we now compile them

into intensity gradient maps. The purpose of these maps is to give each sample a unique

representation in term of the intensity gradient directions in each of their sub-regions. Just

by viewing the intensity gradient maps, we can see certain patterns form. The directions

are represented by colour in the figures below. The colour wheel at the bottom left of

each table is to give a better idea of the direction. For example, red means 0◦ and cyan

represents 180◦. By using colour to represent the intensity gradient direction in each sub-

region, we provide a visual representation of the intensity gradient maps which a person

can understand easily. Looking at the colour maps, we can see with just a glance whether

there is correspondence or if a region differs from the norm.

From the healthy intensity gradient maps in figure 3.5, we can see a lot of similarities

from the three: The heads are mostly green, the left side of the shaft is mostly orange and

the greater trochanter and the right side of the shaft are rather purple. This proves our

theory that the intensity changes in a femur is consistent across all healthy images.

Next, we look at the fractured intensity gradient maps in figure 3.6. We can see some

differences as compared to the healthy ones. 73_left is deformed and the greater

trochanter is green instead of purple. The left side of the shaft for 82_left is purple and

green instead of orange. These differences are very obvious and will be picked up during

the classification phase. However, not all fractured images will show such differences.

For example, 153_left does not exhibit much difference from the healthy maps, which

could be why it is wrongly classified later.

Page 25: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

17

Original Image Intensity Gradient Map

1_left (Healthy)

18_left (Healthy)

48_left (Healthy)

Fig 3.5: Healthy Femur Intensity Gradient Maps

Page 26: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

18

Original Image Intensity Gradient Map

73_left (Fractured)

82_left (Fractured)

153_left (Fractured)

Fig 3.6: Fractured Femur Intensity Gradient Maps

Page 27: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

19

3.2 Implementation details.

3.2.1 Median Filtering

Median filtering is performed on the images prior to the other phases in order to remove

any noise in the region of interest, i.e. the femur. We performed this by applying a 3x3

mask on the image and designating the value of the point at the centre of the mask to be

the median value of the points in the filter.

3.2.2 Adaptive Sampling (Yap et al. 2003)

After performing noise removal, we applied the adaptive sampling algorithm to the

region of interest. First of all, we enclose the femur in a bounding box. The edges of the

bounding box are defined by the femur contour points of the image. The size of the

bounding box is defined by the values xmax, xmin, ymax, ymin, where P is the set of contour

points and

)5.3(,),(),(|

)4.3(,),(),(|)3.3(,),(),(|)2.3(,),(),(|

minminmin

maxmaxmax

maxminmin

maxmaxmax

yyPyxPyxy

yyPyxPyxyxxPyxPyxxxxPyxPyxx

≤∈∀∧∈

≥∈∀∧∈≤∈∀∧∈≥∈∀∧∈

Next we have to define the size of each region. This is dependent on the size femur in

each x-ray image and is given by

)7.3(1

12

)6.3(1

12

minmax

minmax

⎥⎥⎦

⎢⎢⎣

++−

=

⎥⎦

⎥⎢⎣

⎢+

+−=

yy

xx

nyy

s

nxx

s

Page 28: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

20

where nx, ny are the number of samples row-wise and column-wise respectively. By

defining Sx and Sy in this way for all the images, we ensure that the number of regions

column-wise and row-wise stays constant.

Next, we define the sub-regions in each image by creating regions of size Sx by Sy,

starting from the top-left corner which has coordinates (xmin, ymin), and checking whether

it lies entirely within the contours of the femur on the x-ray image. Only those regions

that satisfy this criterion are preserved, the rest are discarded. To generate the overlap of

the sub-regions, we advance by Sx/2 horizontally or Sy/2 vertically. In the texture

orientation approach (Yap et al, 2003), the values for nx and ny were nx = 14 and ny= 16.

This is to obtain larger sub-regions so as to have enough texture data to determine the

orientation. For our intensity gradient direction approach, we set nx = 28 and ny = 32, so

that the intensity gradient maps are more sensitive and can pick up changes that only

occur in a small area.

3.2.3 Extraction of intensity gradient direction from a sub-region

After applying adaptive sampling to the image, we now compute the point of greatest

magnitude difference to the centre of the sub-region. This is done by creating a new

matrix of the size of the sub-region, with values at each element of the matrix equal to the

value of the centre of the sub-region minus the value at that point in the sub-region.

Letting M be the matrix, and assuming an n by n sub-region:

(3.8)

Where aij is the intensity value at (i,j).

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

=

nnnnnn

center

n

n

n

centercentercentercentercenter

centercentercentercentercenter

centercentercentercentercenter

centercentercentercentercenter

aaaaaa

aaaaaaaaaa

aaaaa

aaaaa

aaaaaaaaaaaaaaa

M

...^...^

...^......^...

...^...

...^...^

...^...

...^...

...^...

4321

334333231

224232221

114131211

Page 29: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

21

Next we compute the absolute value of each element in M and obtain the value which is

the largest. The position of this value in the matrix is used to determine the orientation of

the intensity gradient direction. This is basically the angle between the straight-up

direction and a line passing through both the centre of the sub-region and the point that

we found. After determining the orientation, we look at the sign of the value at the point

to determine the direction. A positive sign means the direction is away from the centre, a

negative sign means the direction is towards the centre. This is shown in figure 3.7.

Fig 3.7: The diagrams above show the directions of the intensity gradient. Note that we define

direction as going from a brighter zone to a darker one, hence the arrow in the top image away

from the centre, while the one in the bottom image points towards it.

Now that we have obtained the intensity gradient directions, we now compile the

intensity gradient maps.

Page 30: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

22

3.2.4 Compilation of Intensity Gradient Maps

After obtaining the intensity gradient direction of the sub-region, we have to store it in a

format that the computer can understand. This is because the computer treats all values as

numbers, so it cannot make any sense of the data should we store the direction in degrees

or radians. For example, the computer cannot understand that 355◦ is nearer to 0◦ than 90◦.

To solve this, we used a two-dimensional unit vector to store the data. This vector is

denoted by

⎥⎥⎦

⎢⎢⎣

⎡=

ij

ijiju

θ

θ

cos

sin (3.9)

Where θ is the direction of the intensity gradient (0 degrees is defined as being directly

upwards).

Using the computed intensity gradient directions, an intensity gradient map is generated

via the combining all the various sub-regions into a single map, U = [uij]. After all the

images have been processed, the intensity gradient maps are then passed to the classifiers.

Page 31: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

23

Chapter 4: Classification

After the completion of the feature extraction process, we can now use the data we

obtained to detect the presence of fractures in the femur x-rays. This is done via the use

of classifiers which generally predict the presence of fractures in the femur images via

probabilistic or statistical means. In this project, we experimented with two different

classifiers. The first is a naïve Bayes classifier which was also used in Yap et al. (2003).

The second is a Support Vector Machine (SVM) classifier. Both these classifiers require

training data, so a set of images was designated the training set, while the rest comprise

the test set. However, before we can perform classification, we have to reformat the

intensity gradient maps of the samples. This is because the intensity gradient direction is

stored in a two dimensional unit vector, thus making the intensity gradient map a vector

map. In order to perform classification, we need to convert this into a scalar map. This is

done by converting the intensity gradient maps into difference maps.

4.1 Convert IG maps to difference maps

A difference map is a scalar map that expresses the difference between an intensity

gradient map and a mean intensity gradient map. The mean intensity gradient map is

obtained by taking the mean of the healthy samples in the training set. The formula is

(4.1)

where n is the number of healthy samples in the training set.

By applying the above formula, we obtain the following properties:

⎪⎩

⎪⎨

⎧>

= ∑ ∑= =

otherwise

ncifuumij

n

k

n

kijkijkij

0

2||||1 1

1

][ ijmM =

Page 32: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

24

• Each femur sample will vary slightly from the others and hence will contain sub-

regions which do not have a corresponding sub-region in other samples. Those

sub-regions that only appear in less than half of the samples are considered

insignificant and hence set to zero.

• The direction of a sub-region in the mean intensity gradient map is the sum of the

directions in the corresponding sub-regions in the healthy training samples.

After obtaining the mean intensity gradient map, we make use of it to obtain the

difference maps V for all the samples in both the training and test sets. The formula is

given as

⎪⎩

⎪⎨⎧

⋅−

====

otherwisemu

muifvvV

ijij

ijijijij ||1

00],[

(4.2)

The difference maps obtained will return low values at regions where the direction agrees

with that of the corresponding region in the mean intensity gradient map, and high values

should the directions disagree. Using these scalar maps, we perform classification to

detect those femurs that are fractured.

4.2 Naïve Bayes Classifier

The first of the classifiers we tried is the naïve Bayes classifier used in Yap et al. (2003).

To use this, we first need to perform PCA on the difference maps. The reason we perform

PCA is that we need to reduce the dimensionality of the data. This is because the Bayes

classifier needs to use the covariance matrix of the set of difference maps. If we use the

difference maps directly, the covariance matrix would be enormous.

After performing PCA, we now take a look at the Bayes classifier itself. A Bayes

classifier classifies sample data through the comparison of a posteriori possibilities. It

Page 33: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

25

models the two types of femur classifications – healthy and fractured – into two clusters

which follow a Gaussian distribution. These Gaussians can each be described by two

parameters: the mean class feature vector y and the class covariance matrix C. These are

defined as

}))({(},{ TyyyyECyEy −−== (4.3)

We can then calculate the conditional probability of a feature vector y, given that it

belongs to class c. The formula is

))()(21exp(

||)2(

1)|( 1 yyCyyC

cyP T

d−−−= −

π (4.4)

However, we want to compare the a posteriori possibilities, i.e. P(healthy | y) and

P(fractured | y). By applying Bayes’ rule, we can obtain the a posteriori possibilities,

which are

(4.5)

(4.6)

where P(healthy) and P(fractured) are the a priori possibilities which can be obtained by

calculating the percentages from the femur samples and P(y) is the probability of a

feature vector being y. the values for P(healthy) and P(fractured) can be found in the table

below (figure 4.1). The number of principal components also found in figure 4.1 is the

settings for which the best results were obtained for this Bayes classifier. Later in the

results section, we will show how we obtain these values. Using equations (4.5) and (4.6),

the condition for a feature vector y to be classified as fractured works out to be

)()()|()|(

)()()|()|(

yPfracturedPfracturedyPyfracturedP

yPhealthyPhealthyyPyhealthyP

=

=

Page 34: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

26

P(y | fractured) P(fractured) > P(y | healthy)P(healthy) (4.7)

and the condition for y to be classified as healthy becomes

P(y | healthy) P(healthy) > P(y | fractured)P(fractured) (4.8)

Left Femur Right Femur

a priori probabilities (healthy) 0.85 0.92

a priori probabilities (fractured) 0.15 0.08

No. of principal components 14 9

Table 4.1: table showing the a priori probabilities and the number of principal components used

in this project

4.3 SVM classifier

Support vector machines (SVM) were discussed in Vapnik et al. (1992) based on the

Structural Risk Minimization principle from statistical learning theory. They are a state-

of-the-art technique for classification and regression problems, and can also be applied to

clustering and principal component analysis. SVM classifiers work by remapping inputs

and then finding a decision hyper-plane. It then uses this hyper-plane to perform

classification. SVM classifiers are simple and efficient to train and use, making them

very popular amongst researchers.

The original SVM classifier was created as a linear classifier, so an optimal classification

would require linear separability of the classes. However, with femur fractures and all

fractures in general, the location of the fracture and the type of the fracture can vary in

countless ways, making it almost impossible to ensure linear separability. Fortunately,

one of the features of SVM classifiers is the use of kernel functions. Kernel functions are

Page 35: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

27

)||||exp()( 2

2

σµ−

=xxz

basically representations of the basis function. The first SVM classifier mentioned above

used a linear function for its kernel function. For our project, we need to use a non-linear

kernel function in order to find a decision hyper-plane which can correctly classify the

femur fractures

The kernel function we used in our implementation is the radial basis function (RBF). It

has the form

(4.9)

where x is an n-dimensional vector, µ is an n-dimensional vector called the centre of the

radial basis function, ||.|| denotes Euclidean distance, and σ is the width parameter. The

RBF kernel function provided the best classification results in our tests.

The SVM classifier we used was created by Anton Schwaighofer. It is a Matlab

implementation. Some parameters that we used are listed below. The width parameter

refers to the σ from equation (4.9). The weight parameters seen below are used to deal

with the imbalance training data set. It was mentioned that only about 11 percent of all

femur x-ray samples show fractures. This is also true in our training data. Hence we

assign different levels of importance to the healthy and fractured samples to offset this

imbalance. As with the number of principal components in figure 4.1, we will explain

how we obtain the parameters below later in chapter 5.

Left Femur Samples Right Femur Samples

Width Parameter (σ) 2 8

Weight (healthy) 15 8.2

Weight (fractured) 100 100

Table 4.2: Table showing the parameters used by the SVM classifier.

Using the classifiers, we obtained the results shown in the next chapter.

Page 36: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

28

Chapter 5: Results

For the training and testing of the classifiers, we had 324 training samples and 108 test

samples. The same training and testing sets are used for both the Bayes classifier and the

SVM classifier.

5.1 Results from naïve Bayes classifier

As we applied PCA to the difference maps to reduce the dimensionality of the data, we

need to ascertain the best number of principal components to use. This was done via trial

and error. In the following, we show the results of running the classifier using different

number of principal components. Section 5.1.1 shows the results on left femurs, while

section 5.1.2 shows the results of the right femurs. The ranges of principal components of

the two sections are chosen because they give mostly non-trivial results for the testing

images. The ranges are different for right and left femur samples because the make up of

the left and right sample sets are different.

5.1.1 Left femur results with Bayes classifier.

We present our results in two graphs. The first one plots the classification accuracy of the

classifier again the number of principal components used (figure 5.1) and the other plots

the fracture detection rate against the number of principal components (figure 5.2).

Page 37: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

29

Fig 5.1: Graph showing classification accuracy vs. number of principal components (left)

Fig 5.2: Graph showing fracture detection rate vs. number of principal components (left)

Training Samples

Test Samples

Test Samples

Training Samples

Page 38: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

30

We can see from the above figures that the classification accuracy for the test cases is

maximised with 13 or 14 principal components, and the fracture detection rate from 13 to

15 principal components. Hence, choosing 14 principal components is a good value for

this classifier.

5.1.2 Right femur results with Bayes classifier.

We present our results in two graphs, similar to the format in section 5.1.1. The first

graph shows the classification accuracy (figure 5.3) and the next shows the fracture

detection rate (fig 5.4).

The peak value for the classification accuracy of the test cases is at 9 principal

components. Also, fracture detection rate is highest at 7 to 9 principal components.

Therefore 9 is a good number of principal components to use for the right side femurs.

Fig 5.3: Graph showing classification accuracy vs. number of principal components (right)

Test Samples

Training Samples

Page 39: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

31

Fig 5.4: Graph showing fracture detection rate vs. number of principal components (right)

From the above, we justified our setting of the number of principal components to 14 and

9 for the left and right femurs respectively. The actual results obtained by using this set of

parameters will be discussed together with the results from the SVM classifier later on.

5.2 Results from SVM classifier

When using the SVM classifier, the parameters we need to set are σ, the width of the

radial basis function, and the weights for the healthy and fractured training samples. We

present our findings in 2 tables, one for left images (Table 5.1) and one for right (Table

5.2). Due to the infinite number of parameters, we shall only show here the range of

parameters which gave significant results.

Test Samples

Training Samples

Page 40: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

32

5.2.1 Left femur results with SVM classifier.

For both tables, we fix the weight of fractured samples at 100 and only change the weight

of the healthy samples. FDR means fracture detection rate, FAR is false alarm rate and

CA is classification accuracy.

Weight of healthy samples

σ 2 5 8 10 12 15 17 20

FDR 50 50 50 37.5 12.5 12.5 12.5 12.5

FAR 10.9 4.3 2.2 2.2 2.2 2.2 2.17 2.17

1

CA 83.3 88.9 90.7 88.9 85.2 85.2 85.2 85.2

FDR 100 50 50 50 50 50 50 50

FAR 80.4 6.5 4.3 4.3 2.2 2.2 2.2 2.2

2

CA 31.5 87 88.9 88.9 90.7 90.7 90.7 90.7

FDR 100 100 62.5 50 50 50 50 50

FAR 100 71.7 21.7 10.9 6.5 4.3 4.3 4.3

5

CA 14.8 38.9 75.9 83.3 87 88.9 88.9 88.9

FDR 100 100 100 75 62.5 50 50 50

FAR 100 100 60.87 30.4 19.6 8.7 6.5 4.3

7.5

CA 14.8 14.8 48.15 70.4 77.8 85.2 88.9 88.9

FDR 100 100 100 100 87.5 50 50 50

FAR 100 100 95.65 67.4 43.5 13 8.7 2.2

10

CA 14.8 14.8 18.52 42.6 61.1 81.5 85.19 90.7

FDR 100 100 100 100 100 100 87.5 12.5

FAR 100 100 100 100 100 95.65 52.17 0

20

CA 14.8 14.8 14.8 14.8 14.8 18.51 53.7 87

Table 5.1: Table showing left side results using different parameters. All numbers are percentages.

The shaded boxes denote the best results

Page 41: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

33

5.2.2 Right femur results with SVM classifier.

Weight of healthy samples

σ 6.5 7 7.5 8 8.5 9 9.5

FDR 80 60 20 20 20 20 0

FAR 14.3 6.1 0 0 0 0 0

7

CA 85.2 90.7 92.6 92.6 92.6 92.6 90.74

FDR 80 80 80 60 20 20 20

FAR 26.5 20.4 12.2 2 0 0 0

8

CA 74.1 79.6 87 94.4 92.6 92.6 92.6

FDR 100 100 80 80 80 20 20

FAR 46.9 30.6 26.5 14.3 6.1 0 0

9

CA 57.4 72 74 85.2 92.6 92.6 92.6

FDR 100 100 100 80 80 60 20

FAR 73.5 55.1 38.78 28.6 14 2 0

10

CA 33.3 50 64.8 72.2 85.2 94.4 92.6

FDR 100 100 100 100 80 80 20

FAR 85.71 73.5 57.1 44.9 28.6 10.2 0

11

CA 22.2 33.3 48.1 59.3 72.2 88.9 92.6

FDR 100 100 100 100 100 80 0

FAR 95.9 93.8 75.5 65 44.9 22.5 0

12

CA 12.96 16.6 31.5 40.7 59.3 77.8 90.7

Table 5.2: Table showing right side results using different parameters. All numbers are

percentages. The shaded boxes denote the best results

From the results in sections 5.2.1 and 5.2.2, we can see which combinations provide the

best results. Using these as a gauge, we tweak the parameters to try to get even better

results. In the case of the right femur images, we managed to reduce the false alarm rate

to zero percent through tweaking. We end up with σ = 2, healthy weight = 15 and

fractured weight = 100 for the left femur images and σ = 8, healthy weight = 8.2 and

fractured weight = 100 for the right femur images.

Page 42: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

34

5.3 Comparison of results from both classifiers

We combine the result of left and right femurs for each classifier and compare the overall

results with each other. The results are shown in the table in table 5.3

IG(Bayesian) IG(SVM)

Fracture detection rate 46.15% 53.85%

False alarm rate 3.15% 1.05%

Classification accuracy 90.74% 93.52%

Table 5.3: comparison of the 2 classifiers

IG(Bayesian) is the results of using the naïve Bayes classifier while IG(SVM) is that of

the SVM classifier. As we can see, the SVM classifier gave overall better results. Next

we take a look at results from previous work done by Tian et al. (2003) and Yap et al.

(2003). The table was compiled by Chen, Yap, Leow, Howe and Png (2004)

5.4 Results from existing classifiers

texture Combined NSA

Bayes SVM NSA

or

Bayes

NSA

or

SVM

Bayes

or

SVM

1 of 3 2 of 3

Fracture

detection rate

61.5% 46.2% 69.2% 76.9% 76.9% 76.9% 84.6% 61.5%

False alarm

rate

3.2% 0.0% 3.2% 3.2% 6.3% 3.2% 6.3% 0.0%

Classification

accuracy

92.6% 93.5% 93.5% 94.4% 91.7% 94.4% 92.6% 95.4%

Table 5.4: results from previous work

Page 43: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

35

Comparing the results of using the SVM classifier on the intensity gradient maps with the

neck-shaft angle (NSA) and texture results (Table 5.4), we can see that our intensity-

based method fares no worse, attaining a classification accuracy of 93.5% which equals

that of the texture methods. While our method attained a lower fracture detection rate

than the NSA and texture (SVM) methods, its false alarm rate is lower than theirs.

However this is not the main objective of this project. Our aim is to create a fracture

detection technique which can complement the existing techniques to increase overall

fracture detection rate and classification accuracy.

5.5 Combining Classifiers

With two classifiers developed in this project and three from previous work, we have five

classifiers with which to try and combine. There are various methods that can be used to

combine the results, ranging from simple schemes where a femur is declared fractured as

long as one of the classifiers classify it as such, to more complex schemes that use

penalties and other factors to classify samples. As such combination schemes are an area

of research by themselves; we leave them for future work. In this project, we try various

simple combination methods to see if we can improve on the results of the previous

classifiers, and hence meet one of our main objectives.

As there are many possible ways to combine 5 classifiers, we present a few that have

produced significant results. Shown below in Table 5.5 are some of the best results

obtained from the various possible combinations.

Page 44: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

36

1 of 2 [IG(SVM) +

texture(Bayes)]

1 of 3 [IG(SVM) +

texture(Bayes) +

texture (SVM)]

2 of 4 [IG(SVM) +

NSA +

texture(Bayes) +

texture (SVM)]

Fracture detection

rate

84.62% 92.31% 76.92%

False alarm rate 1.05% 4.21% 0.0%

Classification

accuracy

97.22% 95.37% 97.22%

Table 5.5: Table showing some of the best results from combining the classifiers

As can be seen from the table, the first two schemes produced results which are a great

improvement over the previous combined results shown in table 5.4. The first method

which is a combination of IG(SVM) and texture(Bayes), produced a classification

accuracy that outperforms the previous best result by almost two percent. Also, the

second scheme, consisting of IG(SVM), texture(Bayes) and texture (SVM), improved

fracture detection rate by eight percent. This combination will most likely be used for a

field test of the x-ray fracture detection project, barring any new discoveries in the near

future. Lastly, the 2 out of 4 scheme consisting of IG(SVM), NSA, texture(Bayes) and

texture (SVM) shows significant improvement over the previous 2 out of 3 scheme,

outperforming it in both fracture detection and classification accuracy.

From the results above, we have proven that our intensity-based approach is indeed

complimentary to the existing algorithms. Now let’s take a look at an example of a

fracture which was not detected by previous algorithms, but detected by ours.

5.6 Previously undetected fractures found by intensity-based approach

Below in figure 5.5 is an example of an image which can so far only be detected by our

intensity gradient technique.

Page 45: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

37

Fig 5.5: Fracture that is only detected by intensity-based approach.

The image above in figure 5.5 shows a fracture which is apparent only because there is a

sudden change in the intensity in the area. As you can see, the texture pattern in the

region remains the same, and the neck-shaft angle is similar to that of a normal bone.

Such a fracture would not be detected by any of the existing techniques, but it is quite

apparent when you view it from an intensity viewpoint. This is further proof that our

approach is complementary to the existing techniques.

However, there are still fractures which are not detected by any algorithm. Further work

would have to be carried out in this area so as to develop techniques which can correctly

classify these fractures. One example of such a fracture is shown below. (Figure 5.6)

5.7 Presently still undetected fractures.

In the image below(figure 5.6), the entire head was crushed into the neck in the direction

parallel to the orientation of the neck. This resulted in little change in the neck-shaft angle.

Also, as the trabeculae in the region run parallel to the neck as well, there is little change

in the texture orientation. As such, the existing techniques could not pick up the fracture.

Page 46: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

38

Also, there is no major change in the intensity in the region of the fracture, causing our

intensity gradient approach to misclassify it as a healthy bone. Therefore, other

techniques will have to be created in order to detect such fractures.

Fig 5.6: Example of a difficult fracture to detect.

Page 47: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

39

Chapter 6: Future Works & Conclusion

6.1 Future Works

6.1.1 Improve Method for extraction of intensity gradient direction

In section 3.1.3, we gave a reason for not using the more complex algorithm for the

extraction of the intensity gradient direction. While we strongly believe that program

execution time is important for a medical application of this kind, nevertheless we feel

that it is an area worthy of study. Perhaps with time spent on researching it and the proper

hardware, the time taken for executing such complex algorithms may shorten enough to

make it feasible to apply in real life. Use of a surface-fitting technique and the formula

for gradient in two dimensional space may improve the results for this project.

6.1.2 Development of more complex methods of combining the classifiers

At the time of this writing, we are still combining the classifiers using simple schemes. It

may be possible that a more complex scheme may further improve on the results we have

obtained thus far. A paper by Kittler, Hatef, Duin and Matas (1998) made comparisons of

various combination schemes. Research into this area would be of great help to the X-ray

fracture detection project on the whole.

6.1.3 Research into new techniques for fracture detection.

We have mentioned in chapter 5 that there are still some fractures which cannot be

detected using the fracture detection techniques we have now. Work will have to be done

to find new algorithms to detect such fractures.

Page 48: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

40

6.2 Conclusion

Fractures are serious afflictions which require careful diagnosis and prompt treatment.

Femur fractures, especially those caused by osteoporosis, are even more serious than

normal, often causing people to become bedridden or even resulting in death. With the

advent of medicine and ever improving quality of life, life expectancy can only be seen to

increase as the years go by. This and the rapidly growing world population only means

that doctors will have more fractures to examine as time goes by. Despite this, it is

nonetheless important to maintain a high level of accuracy in fracture detection, and

computer-aided techniques may be the key to ensuring that patients do not get a wrong

diagnosis. The neck-shaft angle approach (Tian et al, 2003) was the first step towards

using a computer to aid doctors in their work of screening x-ray images. This was

followed by a texture analysis approach (Yap et al, 2003). These two approaches

complemented each other to raise the fracture detection rate higher than what they were

individually capable of. Our method of using the intensity gradient directions for fracture

detection is complementary to these existing algorithms and when combined with them,

improved the performance of the system even more.

In conclusion, our approach of using the intensity gradient direction to determine the

occurrence of a fracture has proven to be successful in doing so, producing results which

are equal to the results obtained by the abovementioned approaches. More importantly,

combining our intensity-based approach with the existing methods has produced a multi-

classifier system which produces results that are significantly better than what could be

obtained in the past. This shows that our project has been able to meet the objectives that

we had set out to achieve. We have developed a technique to extract intensity features

from images, taking into account problems like noise and how we were to represent the

intensity gradient direction. This technique is also complementary to existing algorithms,

as can been seen from the results. Lastly we have successfully determined that our

technique can combine with existing algorithms to improve the performance of the

combined classifiers.

Page 49: Detection of Femur Fractures in X-ray Images using Intensity …leowwk/hyp/limsheree.pdf · 2007-04-09 · femur, which is the bone on which the fracture detection techniques have

41

References Green L. (2001). Functions of Several Variables and Partial Derivatives [On-line]

Available:http://ltcconline.net/greenl/courses/107/PartDeriv/PartDeriv.htm Gray Henry.(1918) Anatomy of the Human Body. Philadelphia: Lea & Febiger,

Bartleby.com, 2000. www.bartleby.com/107/ [Date of printout] IOF (2002). The facts about osteoporosis and its impact. [On-line].Available:

http://www.osteofound.org/press_centre/fact_sheet.html Kaufman, J.J., Chiabrera, A., Hatem, M., Hakim, N.Z., Figueiredo, M., Nasser, P.,

Lattuga, S., Pilla, A.A., Siffert, R.S. (1990). A neural network approach for bone fracture healing assessment. IEEE Engineering in Medicine and Biology, 9, 23–30.

Kittler J, Hatef M, Duin P.W. Robert and Matas J. (1998) On combining classifiers

IEEE Transactions on Pattern Analysis and Machine Intelligence Vol 20 Issue 3 Pages 226-239

Koch, J.C. (1917). The laws of bone architecture. American Journal of Anatomy, 21,

177–201. Ryder, D.M., King, S.L., Olliff, C.J., Davies, E. (1993). A possible method of monitoring

bone fracture and bone characteristics using a non-invasive acoustic technique. Proc. Int. Conf. on Acoustic Sensing and Imaging, pp. 159–163.

Singh, V.R., Chauhan, S.K. (1998). Early detection of fracture healing of a long bone for

better mass health care. Proc. Annual Int. Conf. of IEEE Engineering in Medicine and Biology Society, pp. 2911–2912.

Southard T., Southard K. (1996) Detection of simulated Osteoporosis in Maxillae Using

Radiographic Texture Analysis, IEEE Transactions on Biomedical Engineering Vol 43 Issue 2 Pages 123-132

Tian, T.P., Chen, Y., Leow, W.K., Hsu, W., Howe, T.S., Png, M.A. (2003). Computing

neck-shaft angle of femur for x-ray fracture detection. Proc. Int. Conf. on Computer Analysis of Images and Patterns (submitted).

Vapnik V. (1998) Statistical Learning Theory, Wiley, Chichester, Great Britain 1998 Yap W.H. Dennis (2003) Texture Analysis for Fracture Detection in X-ray Images. Honours thesis, National University of Singapore, Singapore, 2003