Top Banner
Speckle Reduction and Tumor Detection in Medical Ultrasound Images Engineers: Rand F. Al-Fayez and Dou’a S. Al -Qhaiwi Supervised By Prof. Mahmoud Hassan Submitted in partial fulfillment of the requirements for the degree of BACHELOR OF SCIENCE in Electronic Engineering And Computer Engineering at Princess Sumaya University for Technology Amman, Jordan FIRST SEMESTER 2011
50

Final Senior Project Documentation

Jan 18, 2016

Download

Documents

Speckle Reduction and Tumor Detection in Medical Ultrasound Images
Software written Using Matlab
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Final Senior Project Documentation

Speckle Reduction and Tumor Detection in Medical Ultrasound Images

Engineers:

Rand F. Al-Fayez and Dou’a S. Al-Qhaiwi

Supervised By

Prof. Mahmoud Hassan

Submitted in partial fulfillment of

the requirements for the degree of

BACHELOR OF SCIENCE

in

Electronic Engineering

And

Computer Engineering

at

Princess Sumaya University for Technology

Amman, Jordan

FIRST SEMESTER

2011

Page 2: Final Senior Project Documentation

Speckle Reduction and Tumor

Detection in Ultrasound Images

Senior Project

by

Rand F. Al-Fayez

and

Dou’a S. Al-Qhaiwi

Supervised by:

_________________________________, Electronics Engineering Dept

[Prof. Mahmoud Hassan]

Evaluated by:

__________________________________, Electronics Engineering Dept

Dr. Daifaallah Al-Dalabieh

__________________________________, Electronics Engineering Dept

Dr. Ahmad Al-Tawayha

__________________________________, Electronics Engineering Dept

Dr. Fadi Shahroury

Date 20/1/2011

Page 3: Final Senior Project Documentation

ABSTRACT

Removing noise from the original image is still a challenging research in

image processing. Speckle is the random granular texture that obscures anatomy in

ultrasound images and is usually described as “noise”. Speckle is created by a

complex interference of ultrasound echoes made by reflectors spaced closer

together than the ultrasound system‟s resolution limit. Considerable work has been

done to reduce speckle in ultrasound systems but with marginal results.

Generally there is no common enhancement approach for noise reduction.

This project proposes two parts : enhancement to different filtering techniques

based on several methods for the removal of speckle noise, and the uses of

ultrasound

in tumor detection.

Page 4: Final Senior Project Documentation

To our parents

Page 5: Final Senior Project Documentation

ACKNOWLEDGMENTS

Writing the acknowledgments is a great pleasure for us. Not only because it

means that we are getting close to the end of the documentation process, but also

because it gives us the opportunity to thank a number of people who have been

very supportive to us.

We would like to express our sincere gratitude to our supervisor Dr.

Mahmoud Hassan for his help and support through this project. We are grateful to

you for all your efforts and help.

we were extremely fortunate to have Eng. Iyad Al-Dosouqi in our side who helped

us with his experience and worked with us till the end of this project.

Thanks to all.

Rand F. Al-Fayez

Dou’a S. Al-Qhaiwi

Page 6: Final Senior Project Documentation

TABLE OF CONTENTS

Page

Abstract iii

Acknowledgment v

List of Tables......................................................................................................................... viii

List of Figures ......................................................................................................................... ix

Introduction……………………………………………………………………….……………1

Chapter

1. INTRODUCTION TO DIGITAL IMAGES .................................................................... 3

1.1 Introduction ........................................................................................................... 3

1.1.1 Digital Image Processing ...................................................................... 3

1.1.2 Medical Ultrasound Images .................................................................. 7

1.2 Types of Noise in an Image ................................... 11

1.2.1 Additive White Gaussian Noise ......................................................... 11

1.2.2 Salt and Pepper noise .......................................................................... 12

1.2.3 Speckle noise ....................................................................................... 13

1.2.4 Periodic noise ...................................................................................... 14

1.2.5 Quantization noise ............................................................................... 14

1.3 Noise-Reduction Filters....................................................................................... 15

1.3.1 Median Filter ...................................................................................... 15

1.3.2 Wavelet Filter ...................................................................................... 15

1.3.3 Wiener Filter ....................................................................................... 16

2. SPECKLE REDUCTION IN ULTRASOUND IMAGES ............................................... 17

2.1 Origins of Speckle Noise .................................................................................... 17

2.1.1 Speckle in Ultrasound Imaging ........................................................... 17

2.1.2 Need for Despeckling .......................................................................... 18

2.2 Our Algorithm to Reduce Speckle ...................................................................... 18

Page 7: Final Senior Project Documentation

3. TUMOR DETECTION IN ENHANCED US IMAGES .................................................. 22

3.1 Edge Detection Methods ..................................................................................... 22

3.1.1 Robert operator – based edge detector ................................................ 22

3.1.2 Sobel operator – based edge detector .................................................. 23

3.1.3 Prewitt operator – based edge detector ............................................... 24

3.1.4 Canny‟s edge detector ......................................................................... 26

3.2 Our Algorithm to Detect Tumors ....................................................................... 28

4. RESULTS AND CONCLUSIONS ................................................................................... 31

4.1 Results of Our Work ............................................................................................ 31

4.2 Comparison with Other Works ............................................................................ 32

4.3 Future Work ......................................................................................................... 34

Appendix A MATLAB Code .............................................................................................. 35

Appendix B Zero Crossing Detector ................................................................................... 38

References ............................................................................................................................ 41

Page 8: Final Senior Project Documentation

LIST OF TABLES

Page

1. Table 1.1 : Examples of image processing applications within various fields. .................. #

2. Table 4.1. List of measures.................................................................................................. #

3. Table 4.2 . Comparison between all methods ..................................................................... #

Page 9: Final Senior Project Documentation

LIST OF FIGURES

Page

1- Figure 1.1: The electromagnetic spectrum. . . ........................................................................ #

2- Figure 1.2 : A digital image processing system. . . ................................................................ #

3- Figure 1.3 :The relationship between an analog image and a digitized image. . . ................. #

4- Figure 1.4: Schematic diagram of a typical clinical ultrasound beam. (After Wolbarst, 1993, p.

408.) . . ....................................................................................................................................... #

5- Figure 1.5 : The returning echo pulse suffers continuous attenuation along its path, and an

abrupt change in intensity on reflection at the interface. (After Wolbarst, 1993, p. 408.) . . .... #

7- Figure 1.6: Ultrasonic imaging system. . . ............................................................................. #

8- Figure 1.7: Gaussian noise. . . ................................................................................................ #

9- Figure 1.8: Salt and Pepper noise. . . ..................................................................................... #

10- Figure 1.9: Speckle noise. . . ................................................................................................ #

11- Figure 1.10: Example on median filter . . ............................................................................ #

12- Figure 2.1 Ultrasound pulses. . ............................................................................................ #

13- Figure 3.1 : Operation done to each pixel. . . ....................................................................... #

14- Figure 3.2 :Overall block diagram of the proposed algorithm. . . ........................................ #

15- Figure 3.3 : Original image. . . ............................................................................................. #

16- Figure 3.4 : Speckled image. . ............................................................................................. #

17- Figure 3.5 : Our denoising method. . . ................................................................................. #

18- Figure 4.1 : Sobel masks to compute (a) gradient G, and (b) gradient G. . . ....................... #

19- Figure 4.2 :Image using Sobel operator (a) Original image, edge detection using threshold

value (b) 110, (c) 90, (d) 70. . . .................................................................................................. #

20- Figure 4.3: Prewitt masks in 90' successive rotations. . . ..................................................... #

Page 10: Final Senior Project Documentation

21- Figure 4.4 : Prewitt results with thresholds (a) 110, (b) 90, (c) 70 (d) 50. . ....................... #.

22- Figure 4.5 :(a) Original image, (b) edge image by Canny's edge detector. . ........................ #

23- Figure 4.6 : Block diagram of our detection algorithm. . ..................................................... #

24- Figure 4.7 : Processes done on the original image to detect tumors. . ................................. #

25- Figure 4.8 : The result of our algorithm. .............................................................................. #

Page 11: Final Senior Project Documentation

INTRODUCTION

Medical images are often deteriorated by noise due to various sources of

interferences and other phenomena that affect the measurement processes in an imaging and

acquisition system.

Speckle noise is a random mottling of the image with bright and dark spots, which

obscures fine details and degrades the detectability of low-contrast lesions. Speckle noise

occurrence is often undesirable, since it affects the tasks of human interpretation and

diagnosis. On the other hand, its texture carries important information about the tissue being

imaged. Speckle filtering is thus a critical pre-processing step in medical ultrasound imagery,

provided that the features of interest for diagnosis are not lost. In ultrasound images, the

speckle energy is comparable to the signal energy in a wide range of frequency bands.

Several speckle reduction techniques are applied to ultrasound images in order to reduce the

noise level and improve the visual quality for better diagnoses. Several methods have been

proposed for speckle reduction.

We chose to enhance the ultrasound image using statistical models for both noise and

signal. Some other methods use an adaptive technique and others use a statistical approach

based on wavelet transform. Some other methods using contrast enhancement were applied

to treat multiplicative noise. Wavelet speckle reduction in ultrasound was recently tackled ,

but the approaches used in these methods are based on statistical models, which is costly

from a computational and modeling estimation viewpoint.

This project has two parts: first part presents a despeckling method, based on taking

the mean of eight neighbors of a pixel , for medical ultrasound images. The proposed method

has been compared with the median filter and the Wavelet filter. By means of experimental

results it has been shown that the present method yields far better results than the two others.

For the image quality performance measure we used mean absolute error (MAE) and signal-

to-noise ratio (SNR), as they are better measurements for speckle noise. Because of the

limited capability of a display system, the optical imaging noises, and many other factors, the

acquired medical images usually have poor quality. Image enhancement is the procedure

used to alter the appearance of an image or the subset of the image for better contrast or

visualization of certain features and to facilitate the subsequent image-based medical

diagnosis.

Page 12: Final Senior Project Documentation

The second part is about diagnostic ultrasound which is one of the newer modalities

available to the clinician for evaluating patients for tumor staging. We developed our own

method to detect tumors in an US image.

First, the presence or absence of a mass can be determined. Multiple or solitary masses can

be localized. A differential diagnosis can be projected based on these finding. This will help

to streamline the diagnostic workup with prompt and appropriate treatment.

Page 13: Final Senior Project Documentation

Chapter 1

Introduction to digital images

1.1 Introduction

This chapter, introduces the fundamentals of the image processing techniques, and also

provides a window to the major medical imaging modalities to understand the diagnostic

tasks for which images are needed and the typical distortions and artifacts associated with

each modality.

1.1.2 Digital Image Processing We are in the middle of an exciting period of time in the field of image processing.

Most of this information is designed for visual consumption in the form of text, graphics, and

pictures, or integrated multimedia presentations. Digital images are pictures that have been

converted into a computer readable binary format consisting of logical 0s and 1s.

Digital images are usually obtained by converting continuous signals into digital

format, although „direct digital‟ systems are becoming more prevalent. Likewise, digital

images are viewed using diverse display media, included digital printers, computer monitors,

and digital projection devices. The frequency with which information is transmitted, stored,

processed, and displayed in a digital visual format is increasing rapidly, and as such, the

design of engineering methods for efficiently transmitting, maintaining, and even improving

the visual integrity of this information is of heightened interest.

Another rich aspect of digital imaging is the diversity of image types that arise, and

which

can derive from nearly every type of radiation. There is an amazing availability of radiation

to be sensed, recorded as images, and viewed, analyzed, transmitted, or stored. In our daily

experience, we think of “what we see” as being “what is there,” but in truth, our eyes record

very little of the information that is available at any given moment. As with any sensor, the

human eye has a limited bandwidth. The band of electromagnetic (EM) radiation that we are

able to see, or “visible light,” is quite small, as can be seen from the plot of the EM band in

Fig. 1.1.

The human eye is receptive to only a very narrow range of frequencies within the

electromagnetic spectrum . Nowadays there are sensors capable of detecting electromagnetic

radiation outside this narrow range of “visible” frequencies, ranging from γ-rays and x-rays,

through ultraviolet and infrared, to radio waves.

Page 14: Final Senior Project Documentation

Figure 1.1: The electromagnetic spectrum.

A complete digital image processing system (Fig. 1.2) is a collection of hardware

(equipment) and software (computer programs) that can:

(1) Acquire an image, using appropriate sensors to detect the radiation or field and capture

the features of interest from the object in the best possible way. If the detected image is

continuous, i.e. analog, it will need to be digitized by an analog-to-digital converter (ADC).

(2) Store the image, either temporarily in a working image store using read/write memory

devices known as random access memory (RAM) or, more permanently, using

magnetic media (e.g. floppy disks or the computer hard disk memory), optical media

(e.g. CD-ROMs or DVDs) or semiconductor technology (e.g. flash memory devices).

(3) Manipulate, i.e. process, the image; and

(4) Display the image, ideally on a television or computer monitor, which comprises

lines of continuously varying, i.e. analog, intensity. This requires the production of

an analog video display signal by a digital-to-analog converter (DAC).

Page 15: Final Senior Project Documentation

Figure 1.2 : A digital image processing system.

Once the image signal is sensed, it must be converted into a computer-readable,

digital format. By digital we also mean two things: that the signal is defined on a discrete

(space/time) domain, and that it takes values from a discrete set of possibilities. Before digital

processing can commence, a process of analog-to-digital conversion (A/D conversion) must

occur. A/D conversion consists of two distinct subprocesses: sampling and quantization.

Figure 1.3 :The relationship between an analog image and a digitized image.

Sampling is the process of converting a continuous-space (or continuous-space/time)

signal into a discrete-space (or discrete-space/time) signal. The sampling of continuous

signals is a rich topic that is effectively approached using the tools of linear systems theory.

The other part of image digitization is quantization. Quantization is the process of converting

a continuous valued image that has a continuous range (set of values that it can take) into a

discrete-valued image that has a discrete range.

Page 16: Final Senior Project Documentation

Table 1.1 : Examples of image processing applications within various fields.

Field Examples

Medical diagnostic imaging Projection radiography and x-ray computed tomography (CT)

using transmission of x-rays through the body; digital subtraction

angiography (DSA) produces enhanced images of the blood vessels

by subtracting “pre-contrast” and “post-contrast” images; and

mammography produces images of the soft tissue in the breast.

Nuclear medicine using emission of gamma rays from radiotracers

injected into the body; includes planar scintigraphy and emission

computed tomography (SPECT and PET).

Ultrasound imaging using reflection of ultrasonic waves within the

body.

Magnetic resonance imaging (MRI) using the precession of spin

systems in a large magnetic field; including functional MRI

(fMRI).

Registration of multi-modal images

Biological imaging Analysis, classification and matching of 3-D genome topology. Automatic counting and classification of cell types and morphology. Growth rate measurements using time-lapse image sequences. Motility assay for motion analysis of motor proteins.

Automation and robotics Vision systems for automatic part recognition, quality inspection and process monitoring. Virtual and augmented reality

Document processing Scanning, archiving, compression and transmission in order to store documents in large, relational, databases. Optical character recognition (OCR) to convert scanned documents, e.g. bank cheques, into editable text files.

Remote sensing Land cover analysis of multi-spectral images to analyze crop yields and assess environmental damage. Weather observation and prediction using images taken in the visible and infrared bands of the spectrum.

Communications File compression. Teleconferencing, image phones.

Page 17: Final Senior Project Documentation

1.1.2 Medical Ultrasound Images

Diagnostic medical ultrasound uses high-frequency sound and a simple pulse–echo

technique. When an ultrasound beam is swept across a volume of interest, a crosssectional

image can be formed from a mapping of echo intensities. Current medical ultrasound

imaging systems are based on envelope detection, and therefore only display intensity

information. Despite this shortcoming, ultrasound imaging has become an important and

widely accepted modality for non-invasive imaging of the human body because of its ability

to produce real-time images, its low cost and its low risk to the patient.

Ultrasonic imaging uses high-frequency (~1–10 MHz) sound waves and their echoes

to produce images that can demonstrate organ movement in real time. Unlike

electromagnetic waves, such as x-rays and γ-rays, ultrasound is non-ionizing and, as such, is

considered safe at the intensities used in clinical imaging systems. Ultrasound images are

constructed by calculating the time taken for ultrasound pulses to travel into the body and

return, after reflection off a tissue surface.

Ultrasound pulses, generally 1–5 μs long, are generated from an ultrasound transducer

comprising a piezoelectric crystal, such as lead zirconate titanate (PZT), sandwiched

between a pair of electrodes. A small sinusoidal voltage applied to the crystal causes it to

resonate, producing sound waves as its surfaces move backwards and forwards; the crystal

also detects ultrasound waves by producing a varying electrical signal. A typical pulse, just

over 1 μs in duration with a frequency of 5MHz, contains 5 cycles of the wave (Fig. 1.4).

Pulses might be separated by perhaps 1 ms, resulting in a pulse repetition rate of 1000 Hz;

they travel through soft tissue at a speed of about 1540ms−1 compared with the speed of

sound in air of about 330ms−1.

Figure 1.4: Schematic diagram of a typical clinical ultrasound beam. (After Wolbarst, 1993, p. 408.)

Page 18: Final Senior Project Documentation

A pulse of ultrasound, which is what is often used in medical ultrasound rather than a

continuous wave, actually comprises a range of frequencies: the shorter the pulse the larger

the range of frequencies comprising it. Luckily, the velocity of sound in a medium is nearly

independent of frequency or wavelength, otherwise the pulse would spread out as it traveled

leading to pulse blurring. This behavior is different from that of light: the speed of light in a

medium depends on wavelength, which is why prisms split sunlight into its constituent

colors.

When an ultrasound wave encounters a tissue surface, separating tissues with different

acoustical properties, a fraction of the wave is backscattered and detected by the transducer

on its return. Generally, only those waves that reflect back through about 180° can contribute

to an ultrasound image. By measuring the delay between pulse transmission and pulse

reception, and knowing the speed of propagation, the depth of the feature can be calculated.

For example, if the time delay is 160 μs and the pulse is passing through soft tissue with a

speed of 1540ms−1, the round-trip path is 24.6 cm and the tissue depth is 12.3 cm.

The intensity of the echo is used to determine the brightness of the image at the reflecting

tissue surface (Fig. 1.5).

Figure 1.5 : The returning echo pulse suffers continuous attenuation along its path, and an abrupt change in intensity on reflection at the interface. (After Wolbarst, 1993, p. 408.)

Page 19: Final Senior Project Documentation

Figure 1.6: Ultrasonic imaging system

How does it work :

A thin layer of jelly is placed between the probe and the skin to make sure all the

sound enters the body.

The probe contains a transmitter and a receiver.

A pulse of ultrasound is sent out by the transmitter.

The pulse is reflected from a surface and returns to the receiver.

The ultrasound machine measures how long it takes for the pulse to return .

Millions of sound waves are transmitted every second.

As the waves reflected at different times, the computer in the ultrasound machine calculates

how far the wave travelled before being reflected (using distance=velocity*time).

Using this information the computer builds up an image of the inside of the patient.

Page 20: Final Senior Project Documentation

1.2 Types of Noise in an Image

Here we present some types of noise in digital images:

1.2.1 Additive White Gaussian Noise:

Each pixel in an image is disturbed by a Gaussian random variable with zero mean and

variance 2.

WjHiNjiN

jiNjiXjiY

1,1),,0(~),(

),,(),(),(

2

X: noise-free image, Y: noisy image

Fig 1.7 : Gaussian noise

Page 21: Final Senior Project Documentation

1.2.2 Salt – and – pepper noise

Each pixel in an image has the probability of p/2 (0<p<1) being contaminated by

either a white dot (salt) or a black dot (pepper).

p-1 ofy probabilitwith ),(

p/2 ofy probabilitwith 0

p/2 ofy probabilitwith 255

),(

jiX

jiY

WjHi 1,1 X: noise-free image, Y: noisy image

. Fig 1.8 : salt and pepper noise

Noisy pixels

Clean pixels

Page 22: Final Senior Project Documentation

1.2.3 Speckle noise:

This noise is, in fact, caused by errors in data transmission . The corrupted pixels are

either set to the maximum value, which is something like a snow in image or have single bits

flipped over. This kind of noise affects the ultrasound images . Speckle noise has the

characteristic of multiplicative noise . Speckle noise follows a gamma distribution and is

given as

a

g

eg

a !)1( F(g)

1

Where, variance is a2 α and g is the gray level.

Fig 1.9 : speckle noise

Page 23: Final Senior Project Documentation

1.2.4 Periodic noise:

This arises typically from electrical interference, especially in he presence of a strong

mains power signal during image acquisition. It is spatially dependent and generally

sinusoidal at multiplies of a specific frequency. It is recognizable as pairs of conjugates spots

in the frequency domain, and can be conveniently removed either manually or by using a

notch (narrow band reject ) filter.

1.2.5 Quantization noise :

It is inherent in the amplitude quantization process and occurs in the analog – to –

digital converter, ADC, when sampled values are fitted to a finite number of levels. The

noise is additive and independent of the signal when the number of bits are n≥ 4.

Page 24: Final Senior Project Documentation

1.3 Noise-Reduction Filters

To reduce the effect of the noise on the digital images many types of filters are used

depending on the type of the noise. If the noise was periodic noise, which gives rise to

particular frequencies in the Fourier domain, it can be removed by using a narrow band-

reject filter which known as notch filter. The median masks are efficient to remove the

impulse or salt – pepper noise etc.

1.3.1 Median filter:

It is normally used to reduce the noise in an image, this filter considers each pixel in

the image in turn and looks at its nearby neighbors to decide whether or not it is

representative of its surroundings, then the pixel value will be replaced by the median value

of those values. The median is calculated by first sorting all the pixel values from the

surrounding neighborhood into numerical order and then replacing the pixel being

considered with the middle pixel value. The figure below shows a calculated example on it .

Fig 1.10 : example on median filter

1.3.2 Wavelet Filter

We use the wavelet transform in order to view and process the digital images at

multiple resolution, in addition for being an efficient, highly intuitive framework for the

representation and storage of multiresolution images, the discrete wavelet transform (DWT),

provides powerful insight into an image‟s spatial and frequency characteristics. it is more

suitable in image processing than other transforms such as Fourier, because wavelet

transform dissect the signal into their frequencies and vary the scale at which the component

frequencies are analyzed. Wavelet denoising involves three stages :

1. compute the discrete wavelet transform (DWT).

2. threshold details wavelet coefficient.

3. compute inverse discrete wavelet transform (IDWT).

Page 25: Final Senior Project Documentation

1.3.3 Wiener Filter

Wiener filter equation in frequency domain is written as:

wwss

ss

SSgg

Sg

*.

* W

Where g is the filter convolve the input image, Sww is the power spectrum of the noise,

Sss is the power spectrum of the input image. In this problem, we only assume the input

image is only added with noise, so the filter g=1 in frequency domain. The Wiener filter

now is simplified into:

wwss

ss

SS

S W

The power spectrum of the input image Sss is unknown.

we simulate the noise pattern and directly calculate the power spectrum of the noise.

In detail, the noise pattern image is firstly zero-meaned, and then the image is divided into

small region (pixel size 128*128), for each region, we calculate the power spectrum, and

average power spectrums of all regions of the noise pattern image. This operation makes the

power spectrum smoother.

1.3.4 Homomorphic filter:

This filter normalizes the brightness across an image and increases contrast, and also

it is used for removing the multiplicative and speckle noise. The illumination and the

reflectance of the image are combined multiplicatively , these components are made additive

by taking the logarithm of the image intensity so that these multiplicative components of the

image can be separated linearly in the frequency domain. An image,f(x,y), can be expressed

as the product of illumination, i(x,y), and reflectance, r(x,y) components:

F(x,y) = i(x,y) * r(x,y)

We can separate the illumination and reflectance components by taking the logarithm of

these components,

Z (x,y) = ln i(x,y) + ln r(x,y)

The new image is separable in the Fourier domain,

F (Z(x,y)) = F (ln i(x,y) + ln r(x,y))

Now the H (u,v) filter can now operate on them separately.

Page 26: Final Senior Project Documentation

Chapter 2

SPECKLE REDUCTION IN ULTRASOUND IMAGES

2.1 Origins of Speckle Noise

Ultrasound suffers from an inherent imaging artifact called speckle. Speckle is the

random granular texture that obscures anatomy in ultrasound images and is usually described

as “noise”. Speckle is created by a complex interference of ultrasound echoes made by

reflectors spaced closer together than the ultrasound system‟s resolution limit. [1]

2.1.1 Need for despeckling

Thus, speckle is considered as the dominant source of noise in ultrasound imaging and

should be processed without affecting important image features.The main purposes for

speckle reduction in medical ultrasound imaging are:

1. To improve the human interpretation of ultrasound images ; speckle reduction makes an

ultrasound image cleaner with clearer edges.

2. Despeckling is a preprocess step for many ultrasound image processing tasks such as

segmentation and registration ; speckle reduction improves the speed and accuracy of

automatic segmentation and applications such as automatic detection.

2.1.2 Speckle Reduction Approaches

There have been many attempts to reduce or eliminate speckle. Current approaches

fall into three broad categories including Resolution Enhancement Approaches, Averaging

Approaches, and Post-Processing Approaches.

Resolution Enhancement Approaches

Previous sections describe how speckle is a result of interference between ultrasound

pulses from closely spaced reflectors. It follows that if the resolution of ultrasound systems is

increased, speckle would be reduced. Techniques for improving system resolution include:

Higher frequency operation, Coded-excitation, Matrixarray transducers, and harmonics.

Figure 2.1 illustrates how a higher operating frequency shortens the pulse length and avoids

complex interference due to closely spaced reflectors.

Page 27: Final Senior Project Documentation

Higher operating frequency would progressively reduce speckle,

but the pulse would have to be short enough to resolve the 20

micron cellular structure to completely eliminate speckle.

This would require an operating frequency of 100 MHz, resulting

in prohibitively high attenuation, and therefore not be practical.

Averaging Approaches

A number of averaging techniques have been used to reduce speckle. These methods include

temporal averaging, spatial compounding and frequency compounding. These methods all

average multiple decorrelated frames[3]. Decorrelation is obtained through tissue or probe

motion in temporal averaging, beam transmitting and receiving at different angles in spatial

compounding, and image formation at different frequencies in frequency compounding.

Decorrelated frames have different speckle patterns, but the same feature information,

so speckle gets reduced and feature information is comparatively strengthened. Averaging

techniques suffer from limited speckle reduction effects – speckle is reduced by 1√n, where

n is the number of frames. Additionally, the multiple frames in averaging techniques reduce

the frame rate, making the techniques of limited practical use.

Post-Processing Approaches

Many different post-processing, (advanced image processing), approaches have been

proposed for speckle reduction. The most common categories of approaches are: median

filters[4], Weiner filters[5], diffusion filters[6] and wavelet filters[7]. There are also some

proprietary techniques that are commercially available, most notably are Philips‟ XRES8 and

ContextVision[9].

Figure 2.1 Ultrasound pulses

Page 28: Final Senior Project Documentation

2.2 Our Algorithm to Reduce Speckle

Median filtering is similar to using an averaging filter, in that each output pixel is set

to an average of the pixel values in the neighborhood of the corresponding input pixel.

However, with median filtering, the value of an output pixel is determined by the median of

the neighborhood pixels, rather than the mean.

What we did here is very close to the median filtering , that we replaced each pixel

with the average of the 8-connected neighborhood of the corresponding input pixel.

Figure 2.1 : Operation done to each pixel

This denoising schema results in a much better enhancement than both the median and

wavelet filtering results and a higher PSNR . And the execution time for this algorithm is less than

the others ; means it gives the results faster .

Page 29: Final Senior Project Documentation

Figure 2.2 :Overall block diagram of the proposed algorithm.

After reading the input (noise free ) image I, we added a multiplicative noise to the

image I, using the equation J = I+n*I, where J is the speckled image , n is uniformly

distributed random noise with mean 0 and variance v. The value used for v is 0.25.

The next page will show the tested image speckled and despeckled using our

algorithm.

Original Image

Speckled Image

Perform 8 pixel averaging for each pixel

Perform any speckle reduction filtering

Enhanced and speckle reduced image with higher PSNR

Better diagnosis

Page 30: Final Senior Project Documentation

Figure 2.3 : Original image

Figure 2.4 : Speckled image

Figure 2.5 : Our denoising

method

Page 31: Final Senior Project Documentation

Chapter 3

TUMOR DETECTION IN ENHANCED US IMAGES

3.1 Edge Detection Methods

An ideal edge detector is required to detect an edge point precisely in the sense that a

required edge point in an image should not be missed, while nonexistent edge point should

not be detected. These two requirements often conflict with each other. The decision of the

existence of an edge point is based on a threshold.

Thus if the magnitude of the gradient is greater than a threshold, then we infer that an

edge point exists at that point, else there is no edge point. If the selected threshold is large,

then there is a possibility that true edge points may be undetected, while if the threshold is

low, many noisy points may be falsely detected as edge points. The goal of an ideal edge

detector is to choose the threshold as required.

A number of edge detectors based on a single derivative have been developed by

various researchers. Amongst them most important operators are the Robert operator, Sobel

operator, Prewitt operator, Canny operator, Krisch operator , etc. In each of these operator-

based edge detection strategies, we compute the gradient magnitude . If the magnitude of the

gradient is higher than a threshold, then we detect the presence of an edge. Below we discuss

some of these operators.

3.1.1 Robert Operator-Based Edge Detector

The Robert Cross operator is a simple gradient operator based on a 2 x 2 gradient

operator. This operator provides the simplest approximation of the gradient magnitude given

as

The convolution mask for the Robert‟s operator is shown below. Since the Robert

kernel is only a 2 x 2 mask, it is quite sensitive to noise.[1]

Page 32: Final Senior Project Documentation

3.1.2 Sobel Operator-Based Edge Detector

Sobel operator is a 3 x 3 neighborhood based gradient operator. The convolution

masks for the Sobel operator are defined by the two kernels shown in Figure 4.1. The two

masks are separately applied on the input image

Figure 3.1 : Sobel masks to compute (a) gradient G, and (b) gradient G.

to yield two gradient components G, and G, in the horizontal and vertical orientations

respectively.

G = [ f ( i - 1 , j - 1) + 2 f ( i - 1,j) + f ( i - 1,j + I)] -

[ f (i+ 1, j- 1) + 2 f ( i + 1,j)+ f ( i+ 1,j+ I)]

And

G = [ f ( i - 1 , j - 1) + 2 f ( i , j - 1) + f ( i + 1 , j - I)] -

[ f ( i- 1,j+ 1) + 2 f ( i , j + 1) + f ( i+ 1 , j+ l)]

The gradient magnitude is usually computed as

The result of an edge image generated by the Sobel operator is shown in Figure 4.2.

The edge images have been computed using threshold values 110, 90 and 70. It may be

observed from the images that as the threshold value is decreased, more and more number of

non edge points become edge points.[1]

Page 33: Final Senior Project Documentation

Figure 3.2 :Image using Sobel operator (a) Original image, edge detection using threshold value (b) 110, (c) 90, (d) 70.

3.1.3 Prewitt Operator-Based Edge Detector

The Prewitt operator is defined by a set of eight masks, four of which are shown in

Figure 4.3. Others can be generated by rotation of 90' successively. The mask that produces

maximal response yields the direction of the gradient.The magnitude and direction of the

edge gradients can be computed in a similar fashion as in the Sobel operator. The result of an

edge image generated by the Prewitt operator is shown in Figure 4.4.[1]

Page 34: Final Senior Project Documentation

Figure 3.3: Prewitt masks in 90' successive rotations.

Figure 3.4 : Prewitt results with thresholds (a) 110, (b) 90, (c) 70 (d) 50.

Page 35: Final Senior Project Documentation

3.1.4 Canny's Edge Detector

Canny's edge detector ensures good noise immunity and at the same time detects true

edge points with minimum error . Canny has optimized the edge detection process by:

1. Maximizing the signal-to-noise ratio of the gradient.

2. An edge localization factor, which ensures that the detected edge is

localized as accurately as possible.

3. Minimizing multiple responses to a single edge.

The signal-to-noise ratio of the gradient is maximized when true edges are detected

and false edges are avoided. Thus by discarding the false responses when there are multiple

number of responses to a single edge, the noise corrupted edges may be removed.

The result of an edge image generated by the Canny's edge detector is shown in

Figure 3.5. [3]

Figure 3.5 :(a) Original image, (b) edge image by Canny's edge detector.

Page 36: Final Senior Project Documentation

3.2 Our Algorithm to Detect Tumors

Figure 3.6 : Block diagram of our detection algorithm

Page 37: Final Senior Project Documentation

Figure 3.7 : Processes done on the original image to detect tumors.

Page 38: Final Senior Project Documentation

Figure 3.8 : The result of our algorithm

Page 39: Final Senior Project Documentation

Chapter 4

RESULTS AND CONCLUSIONS

4.1 Results of Our Work

In this work we have introduced two methods :

A method for removal or reduction of speckle while preserving or enhancing edge

information of an ultrasound image. The proposed technique outperforms the speckle filters,

Wavellet filter ,Median methods. However, by our method inspection it is evident that the

denoised Image, while removing a substantial amount of noise, suffers practically no

degradation in sharpness and details. Experimental results show that our proposed method

yields significantly improved visual quality as well as better SNR compared to the other

techniques in the denoising literature.

And a method for tumor detection (in the liver) with a very high accuracy ; detecting

all tumors with different shapes and color ; and thus we will have a better diagnosis. Our

method is based on detecting the level of intensity of the tumor which is faster than other

methods based on segmentation and is with the same efficiency and better.

Page 40: Final Senior Project Documentation

4.2 Comparison with Other Works

Performance Measure

To quantify the performance improvements of the speckle reduction method various

measures are used. The commonly preferred measures are mean squared error (MSE),

, peak signal to noise ratio (PSNR), The definition and parameters of measures are listed in

Table I.

Table 1. List of measures

Measure Definition Parameter

MSE

NM

ft

ftSftSNM

*

1),(

2^

)),(),((*

1

S : Reference image

^

S : Filtered images

PSNR

MSE

25520 log

10

MSE : Mean Square Error.

From Tables 2 we can see that our method outperforms the others. And performs with a

less execution time.

Table 2 . Comparison between filters

Filter Type Time

(Seconds) PSNR

Our Filter 0.077507 72.637

Median Filter 0.552632 69.842

Ehanced Median 0.630139 73.618

Waveler Filter 3.909373 64.812

Ehanced Wavelet 3.98688 72.653

Page 41: Final Senior Project Documentation

Table 2 . Comparison between methods used to detect tumors in a

liver ultrasound image that contains multiple tumors (12 mass).

Detection Type Time

(Seconds)

Result

(All)

Efficiency

(Hit)

Error

(Overhead)

Error

(Miss)

Original Image

Our Detection 1.119 12 12 1 0

Watershed Detection 2.774 12 9 1 3

With our Filter

Our Detection 1.196507 12 12 1 0

Watershed Detection 2.851507 12 8 1 4

Median Filter

Our Detection 1.671632 12 10 1 2

Watershed Detection 3.326632 12 8 1 4

Wavelet Filter

Our Detection 5.028373 12 11 1 1

Watershed Detection 6.683373 12 9 1 3

Page 42: Final Senior Project Documentation

4.3 Future Work

In the future , we can develop our method to help in the detection of breast cancer

(tumor); by changing the intensity level and improving the code to be compatible with breast

tumor appearance and color to be automatically detected by the computer.

Page 43: Final Senior Project Documentation

APPENDIX A

MATLAB Code

Our Enhancement Code:

clear all

close all

% read a grayscale liver image

IMG=imread('m3.jpg');

IMG=rgb2gray(IMG);

IMG=double(IMG);

% Add speckle noise to the liver image with variance =.25

Speckled=imnoise(IMG1,'speckle',.25);

Speckled=mat2gray(Speckled);

[r cc]=size(Speckled);

% perform our enhancement code (averaging)

for r=2:r-1

for c=2:cc-1

Speckled(r,c)=( Speckled(r-1,c-1) +

Speckled(r-1,c) + Speckled(r,c-1)+ Speckled(r,c+1)+

Speckled(r+1,c) + Speckled(r+1,c+1) + Speckled(r+1,c-1) +

Speckled(r-1,c+1))/8;

end

end

Enhanced= Speckled;

figure; imshow(Enhanced);title(‘Enhanced Image’)

Page 44: Final Senior Project Documentation

Our Detection Code:

clear all

close all

% read a grayscale liver image

ORG =imread('m3.jpg');

figure;imshow(ORG);

I = rgb2gray(ORG);

% find the appropriate threshold value to find the edges of the

background of an image to discard it from the diagnosis

EdgeImg=edge(I,'zerocross',.0009);

% operations to close and fill the area of the required region to

be one region

EdgeImg = bwareaopen(EdgeImg,8);

figure;imshow(EdgeImg)

se1 = strel('disk',7) ;

EdgeImg = imclose(EdgeImg,se1);

EdgeImg =imfill(EdgeImg,'holes');

figure;imshow(EdgeImg)

% specify the required intensity values to define defected regions

Defected_R = ( (I<0.180*255 & I >0.04*255) );

figure;imshow(Defected_R)

Page 45: Final Senior Project Documentation

%% test on the original image if the pixel value is in the range of

the defected region and placed in the background region make it

equal to zero

[r c]=size(I);

for r=1:r

for c=1:c

if EdgeImg (r,c)==0 ;

Defected_R(r,c)=0;

end

end

end

figure;imshow(Defected_R)

% fill the tumor shapes

Defected_R =imfill(Defected_R,'holes');

se1 = strel('disk',5) ; % 11-by-11 square

Defected_R = imclose(Defected_R,se1);

Defected_R =imfill(Defected_R,'holes');

% remove all object containing fewer than 30 pixels

Defected_R = bwareaopen(Defected_R,100);

figure;imshow(Defected_R)

figure;imshow(ORG)

% Searching all bounding boxes

image_labled = bwlabel( bw );

region_props = regionprops( image_labled, 'BoundingBox' );

region_num = length( region_props );

% Only if something was detected

if region_num>0

for j = 1:region_num

region_params = region_props(j).BoundingBox;

box_width = region_params(3);

box_height = region_params(4);

box_x = region_params(1);

Page 46: Final Senior Project Documentation

box_y = region_params(2);

line( [box_x box_x+box_width], [box_y box_y] );

line( [box_x box_x+box_width], [box_y+box_height

box_y+box_height] );

line( [box_x box_x], [box_y box_y+box_height] );

line( [box_x+box_width box_x+box_width], [box_y

box_y+box_height] );

end

end

Page 47: Final Senior Project Documentation

APPENDIX B

Zero Crossing Detector ( LoG Edge Detector)

Brief Description

The zero crossing detector looks for places in the Laplacian of an image where the

value of the Laplacian passes through zero --- i.e. points where the Laplacian changes sign.

Such points often occur at `edges' in images --- i.e. points where the intensity of the image

changes rapidly, but they also occur at places that are not as easy to associate with edges. It

is best to think of the zero crossing detector as some sort of feature detector rather than as a

specific edge detector. Zero crossings always lie on closed contours and so the output from

the zero crossing detector is usually a binary image with single pixel thickness lines showing

the positions of the zero crossing points.

The starting point for the zero crossing detector is an image which has been filtered

using the Laplacian of Gaussian filter. The zero crossings that result are strongly influenced

by the size of the Gaussian used for the smoothing stage of this operator. As the smoothing is

increased then fewer and fewer zero crossing contours will be found, and those that do

remain will correspond to features of larger and larger scale in the image.

How It Works

The core of the zero crossing detector is the Laplacian of Gaussian filter and so a

knowledge of that operator is assumed here. As described there, `edges' in images give rise

to zero crossings in the LoG output. For instance, Figure 1 shows the response of a 1-D LoG

filter to a step edge in the image.

Figure 1 Response of 1-D LoG filter to a step edge. The left hand graph shows a 1-D image, 200 pixels long, containing

a step edge. The right hand graph shows the response of a 1-D LoG filter with Gaussian standard deviation 3 pixels.

Page 48: Final Senior Project Documentation

However, zero crossings also occur at any place where the image intensity gradient

starts increasing or starts decreasing, and this may happen at places that are not obviously

edges. Often zero crossings are found in regions of very low gradient where the intensity

gradient wobbles up and down around zero.

Once the image has been LoG filtered, it only remains to detect the zero crossings.

This can be done in several ways. The simplest is to simply threshold the LoG output at zero,

to produce a binary image where the boundaries between foreground and background regions

represent the locations of zero crossing points. These boundaries can then be easily detected

and marked in single pass, e.g. using some morphological operator. For instance, to locate all

boundary points, we simply have to mark each foreground point that has at least one

background neighbour.

The problem with this technique is that will tend to bias the location of the zero

crossing edge to either the light side of the edge, or the dark side of the edge, depending

upon whether it is decided to look for the edges of foreground regions or for the edges of

background regions.

A better technique is to consider points on both sides of the threshold boundary, and

choose the one with the lowest absolute magnitude of the Laplacian, which will hopefully be

closest to the zero crossing. Since the zero crossings generally fall in between two pixels in

the LoG filtered image, an alternative output representation is an image grid which is

spatially shifted half a pixel across and half a pixel down relative to the original image. Such

a representation is known as a dual lattice. This does not actually localize the zero crossing

any more accurately of course.

A more accurate approach is to perform some kind of interpolation to estimate the

position of the zero crossing to sub-pixel precision.[]

Page 49: Final Senior Project Documentation

REFERENCES

[1]. A. Bovik, “ The Essential Guide to Image processing “, Elsevier Inc., 2009.

[2]. G. Dougherty, “ Digital Image Processing for Medical Applications ”, Cambridge

University Press, 2009.

[3]. R.C. Gonzales, R.E. Woods, “Digital Image Processing”, Prentice-Hall, 2002.

[4] Essentials of Ultrasound Physics. J.A. Zagzebski. Mosby. 1996.

[5] Digital Image Processing. R.C. Gonzales and R.E. Woods. Prentice-Hall. 2002.

[6] Scale Space and Edge Detection using Anisotropic Diffusion. P. Perona and J. Malik.

IEEE Trans. Pattern and Anal.

Machine Intell. Vol 12. pp. 629-639. July 1990.

[7] De-noising by soft-thresholding. D.L. Donoho. IEEE Trans. Inform Theory. Vol. 41. pp.

613-627. May 1995

[8] Scale Space and Edge Detection using Anisotropic Diffusion. P. Perona and J. Malik.

IEEE Trans. Pattern and Anal.

Machine Intell. Vol 12. pp. 629-639. July 1990.

[9] Cho, Z-H., Jones, J. P. and Singh, M. Foundations of Medical Imaging. Wiley, 1993.

237, 1993.

[10] Y.M. Kadah, A.A Farag, J.M. Zurada, A.M. Badawi, and A.M. Youssef, “Classification

algorithms for quantitative tissue characterization of diffuse liver disease from ultrasound

images,” IEEE Transactions on Medical Imaging, vol. 15, no. 4, pp. 466–478, 1996.

[11] Y-N. Sun, H-M. Horng, X-Z. Lin, and J-Y.Wang, “Ultrasonic image analysis for liver

diagnosis,” IEEE in Medicine and Biology, pp. 93–101, Nov./Dec. 1996.

[12] AHN, C.B., Y.C. SONG, D.J. PARK, Adaptive template filtering for signal-to-noise

ratio enhancement in magnetic resonance imaging, IEEE Trans. Med. Imaging, 1999, 18(6),

549–556.

[13] MALLAT, S., S. ZHONG, Characterization of signals from multiscale edges, IEEE

Trans. Pattern Anal. Machine Intell, 1992, 14(7), 710–732.

Page 50: Final Senior Project Documentation

[14] MEYER, Y., Wavelets and operators, Cambridge UK, Cambridge University Press,

1993, 81–98.

[15] NICOLAE, M.C., MORARU L., GOGU A., Speckle noise reduction of ultrasound

images, Medical Ultrasonography an International Journal of Clinical Imaging,

Supplement, 11, 2009, 50–51.

[16] A.C.Bovik, T.S.Huang and D.C.Munson, "A Generalisation of Median Filtering Using

Linear Combinations of Order-Statistics," IEEE Trans. Acoust., Speech and Signal

Processing, vol.ASSP- 31, no.6, pp.1342-1349, Dec.1983.

[17] P. Soille, Mathematical image analysis: principles and applications, Springer- Verlag,

1999.

[18] G.A ASTIN, Adaptive filters for digital image noise smoothing, an evaluation, Comput.

Vis. Graphics Image Process. 1985, 31, pp. 103-121.