Académique Documents
Professionnel Documents
Culture Documents
1. Introduction
1.2 Aim of the project
1.2.1 Objectivities of the thesis
Chapter 2 8-19
2. Introduction
2.1.2 History of Image Processing
2.2 Significance of Image Processing
2.3 Digital Image Processing
2.4 What is an Image?
1
3.1 Image Segmentaton
3.2. Segmentation Techniques
3.2.1 Spatial Clustering
3.2.2 Split and Merge Segmentation
3.3 Methods
3.3.1 Thresholding
2
4.7 GLE Parameter Settings
4.8 Quantitative Evaluation and Comparisons on Noisy Synthetic Images With
Inhomogeneities
Chapter 5
5.1 Introduction to MATLAB
5.1.2 Typical uses of MATLAB
5.1.3 Features of MATLAB
5.2MATLAB System
5.3 Some Basic Plot Commands:
Chapter 8
3
8. REFERENCES
List of figures
Figure 2.4: The additive model of RGB. Red, green, and blue are the primary stimuli
for human color perception and are the primary additive colors.
4
Figure4.2: Deformation of a snake. The left picture corresponds with the
initialization; the right picture shows the final shape of the snake after having
minimized the energy
List of Tables
5
Chapter 1
1.1 INTRODUCTION
Contours are used in the field of digital image processing to find the contour
of an object. They are used in computer vision and image analysis to detect and
locate objects, and to describe their shape. Contour is a powerful tool for
segmentation in image processing. There are several advantages of contour models
over image segmentation methods, such as edge detection, thresholding, and region
grow.
Image segmentation is one of the substantial techniques in the field of image
processing. Image segmentation is defined as the partitioning of an image into non
overlapping regions made up of pixels.
The evolution of the interface is driven by minimizing an energy defined by
a variational formulation which mathematically expresses the properties of the object
to be segmented. Classically, the terms associated to image features are either edge-
based, such as the image gradient on the contour, or region-based terms, as
introduced by Chan and Vese. Region-based terms are known to be more robust to
noise than edge based contours and they do not need the initialization to be near the
solution. The work of Chan and Vese is based on evolving the interface according to
the variance of the gray-level values of both interior and exterior regions. This
approach has been extended, since then, to other features such as the Bayesian model
and histogram model. The latter approaches do define the inner and outer regions as
the whole inner and outer space, respectively, of the evolving contour. Thus, they
may fail if these features are not spatially invariant. This problem is tackled in that
proposes to compute the features in a band around the evolving contour. In the inner
and outer regions are defined at each point of the evolving region as the intersection
between a ball and the inside and outside space. Li et al. used a kernel function at
each point to define a region-scalable fitting term.
6
According to the representation of the evolving interface, contours may be
classified into parametric and geometric approaches. Geometric contours are used for
curve topologies and parametric contours are used for set of discrete points.
My work stems from the ideas of free-form deformation technique. Free-form
deformation has been actively used for medical image registration. However, to the
best of our knowledge, free-form deformation has not been used for parametric
contours. In our work, we use the mean value coordinates as the parameterization to
deform the evolving contour. Mean value coordinates have several advantages over
free-form deformation, namely that control points only need to form a closed
polygon that may have any shape. Any point of the space is inside or outside of this
polygon may be parameterized with respect to the control points. For free-form
deformation the control points need to form a regular shape and only interior points
may be parameterized with them. In our approach, we can easily deal with region-
based approaches. This is an advantage with respect to most previous parameterized
approaches, which are only able to deal with edge-based energies. According to our
knowledge, there is almost no work in the field of parametric-based approaches,
except in 3D, able to deal in a unified manner with the mean, Bayesian and
histogram model, which is the case in this paper. As with other similar parametric-
based approaches, in our approach the evolving contour is locally deformed as the
polygon vertices are moved. The deformation applied to the evolving contour is
implicitly regularized, as will be seen, according to the distance of the polygon to the
evolving interface. The versatility of our approach opens the door to new
applications such as medical image segmentation, where most of the times the
structure to be segmented has only one regular connected component.
7
In this approach the evolving contour is locally deformed. The deformation
applied to the evolving contour is implicitly regularized.
8
Chapter 2
9
2.2 Significance of Image Processing
Image processing is an active area of research in such diverse fields as
medicine, astronomy, microscopy, defense, industrial quality control, and the
publication and entertainment industries. The concept of an image has expanded to
include three-dimensional data sets (volume images), and even four-dimensional
volume-time data sets.
The analysis of a picture using techniques that can identify shades, colors
and relationships that cannot be perceived by the human eye. Image processing is
used to solve identification problems, such as in forensic medicine or in creating
weather maps from satellite pictures. It deals with images in bitmapped graphics
format that have been scanned in or captured with digital cameras. The principle
advantage of Digital Image Processing methods is its versatility, repeatability and the
preservation of original data precision.
Vision is the most advanced of our sensor, so it is not surprising that image
play the single most important role in human perception. However, unlike humans,
who are limited to the visual band of the EM spectrum imaging machines cover
almost the entire EM spectrum, ranging from gamma to radio waves. They can
10
operate also on images generated by sources that humans are not accustomed to
associating with image.
11
Figure2.1: Sample Image.
Pixel :
A pixel (short for picture element) is a single point in a graphic image. Each
such information element is not really a dot, nor a square but an abstract sample.
Each element of the above matrix is known as a pixel where dark = 0 and light = 1. A pixel with
only 1 bit will represent a black and white image. If the numbers of bits are increased
then the number of gray levels will increase and a better picture quality is achieved.
All naturally occurring images are analog in nature. If the number of pixels is more
then the clarity is more. An image is represented as a matrix in Digital Image
Processing. In Digital Signal Processing we use only row matrices. Naturally
occurring images should be sampled and quantized to get a digital image. A good image
should have 1024*1024 pixels which is known as 1k * 1k = 1Mpixel.
12
Figure2.2: Pixel arrangement
Each pixel has a value from 0 (black) to 255 (white). The possible range of the pixel
values depend on the color depth of the image, here 8 bit = 256 tones or grayscales.
A normal grey scale image has 8 bit color depth = 256 grey scales. A “true color”
image has 24 bit color depth = 8 x 8 x 8 bits = 256 x 256 x 256 colors = ~16 million
colors.
A true-color image assembled from three grayscale images colored red, green and
blue. Such an image may contain up to 16 million different colors. Some grayscale
images have more grayscales, for instance 16 bit = 65536 grayscales. In principle three
grayscale images can be combined to form an image with 281,474,976,710,656
grayscales.
13
2.4.1 Gray scale image:
A grayscale image is a function I (xylem) of the two spatial coordinates of the
image plane. I(x, y) is the intensity of the image at the point (x, y) on the image plane.
I (xylem) takes non-negative values assume the image is bounded by a rectangle [0,
a] [0, b]I: [0, a] [0, b] [0, info)
In a (8-bit) grayscale image each picture element has an assigned intensity that
ranges from 0 to 255. A grey scale image is what people normally call a black and
white image, but the name emphasizes that such an image will also include many
shades of grey.
14
white. The RGB color model is an additive color model in which red, green,
and blue light are added together in various ways to reproduce a broad array
of colors. The name of the model comes from the initials of the three additive
primary colors, red, green, and blue.
The main purpose of the RGB color model is for the sensing, representation,
and display of images in electronic systems, such as televisions and computers,
though it has also been used in conventional photography.
Figure 2.4: The additive model of RGB. Red, green, and blue are the primary stimuli
for human color perception and are the primary additive colors.
15
the coordinate convention. Note that x ranges from 0 to M-1 and y from 0 to N-1 in
integer increments.
The coordinate convention used in the toolbox to denote arrays is different
from the preceding paragraph in two minor ways. First, instead of using (xylem) the
toolbox uses the notation (race) to indicate rows and columns. Note, however, that
the order of coordinates is the same as the order discussed in the previous
paragraph, in the sense that the first element of a coordinate topples, (alb), refers to a
row and the second to a column. The other difference is that the origin of the
coordinate system is at (r, c) = (1, 1); thus, r ranges from 1 to M and c from 1 to N in
integer increments. IPT documentation refers to the coordinates. Less frequently the
toolbox also employs another coordinate convention called spatial coordinates which
uses x to refer to columns and y to refers to rows. This is the opposite of our use of
variables x and y.
16
Figure 2.5 Fundamental Steps in Digital Image Processing
The figure shows the fundamental steps that are involved in digital image
processing. This shows two broad categories of methods- one whose input and
output are images, and methods whose inputs may images, but whose outputs are
attributes extracted from those images.
17
2.6.5 Wavelet and Multi-Resolution Processing
Wavelets are the foundation for representing images in various degrees of
resolution. In particular for image data compression and for pyramidal
representation, in which images are subdivided successively into smaller
regions.Wavelet transform is capable of providing the time and frequency
information simultaneously, hence giving a time-frequency representation of the
signal. Although the time and frequency resolution problems are results of a physical
phenomenon (the Heisenberg uncertainty principle) and exist regardless of the
transform used, it is possible to any signal by using an alternative approach called
the multi-resolution analysis (MRA).
MRA analyzes the signal at different frequencies with different resolutions. MRA is
designed to give good time resolution and poor frequency resolution at high
frequencies and good frequency resolution and poor time resolution at low
frequencies.
2.6.6 Compression
Compression deals with techniques for reducing the storage required to save
an image, or the bandwidth required to transmit it. Although storage technology has
improved significantly over the past decade, the same cannot be said for
transmission capacity. This is true particularly in uses of the internet, which are
characterized by significant pictorial content. Image compression is familiar to most
users of computers in the form of image file extensions, such as the jpg file extension
used in the JPEG(Joint Photographic Experts Group) .
2.6.8 Segmentation
18
Segmentation procedures partition an image into its constituent parts or
objects. A rugged segmentation procedure brings the process a long way toward
successful solution of imaging problems that require objects to be identified
individually.
2.6.10 Recognition
It is the process that assigns a label (e.g., “vehicle”) to an object based on its
descriptors. The scope of digital image processing includes recognition of individual
image regions, which are also, can be called as object or patterns. The approaches to
pattern recognition developed into two principal areas Decision and structural. The
first category deals with patterns described using quantitative descriptors, such as
length, area, and texture. The second category deals with patterns best described by
qualitative descriptors, such as relational descriptors.
19
Chapter 3
Literature survey
The homogeneity predicate P(Si) = true for all regions (Si) and P(Si U
Sj)=false, when Si is adjacent to Sj. Homogeneity predicates are usually based on
image intensity, color, texture, etc. Image segmentation can be classified into these
categories: spatial clustering split and merge schemes, and region growing schemes.
20
clustering, which combine histogram techniques with spatial linkage techniques for
better results.
3.3 Methods
In this section, we briefly describe several common approaches that have
appeared in the recent literature on image segmentation. We define each method,
provide an overview of how the method is implemented, and discuss its advantages
and disadvantages. Although each technique is described separately, multiple
techniques are often used in conjunction with one another for solving different
segmentation problems. We divide segmentation methods into eight categories: (1)
thresholding approaches, (2) region growing approaches, (3) classifiers, (4) clustering
approaches, (5) Markov random field models. Of the methods discussed in this
section, thresholding, classifier, clustering, and Markov random field approaches can
be considered pixel classification methods.
Most of the image segmentation methods that we will describe can be
posed as optimization problems where the desired segmentation minimizes some
energy or cost function defined by the particular application. In probabilistic
methods, this is equivalent to maximizing a likelihood or a posteriori probability.
21
Defining an appropriate E is a major difficulty in designing segmentation algorithms
because of the wide variety of image properties that can be used, such as intensity,
edges, and texture. In addition to information derived from the image, prior
knowledge can also be incorporated to further improve performance. The advantage
of posing segmentation as an optimization problem is that it precisely defines what is
desirable in the segmentation. It is clear that for different applications, different
energy functions are necessary. Several general surveys on image segmentation exist
in the literature. Additional surveys on image segmentation specifically for medical
images have also appeared.
3.3.1 Thresholding
Thresholding approaches segment scalar images by creating a binary
partitioning of the image intensities. A thresholding procedure attempts to determine
an intensity value, called the threshold, which separates the desired classes. The
segmentation is then achieved by grouping all pixels with intensity greater than the
threshold into one class, and all other pixels into another class. Determination of
more than one threshold value is a process called multi-thresholding. Thresholding is
a simple yet often effective means for obtaining segmentation in images where
different structures have contrasting intensities or other quantifiable features. The
partition is usually generated interactively, although automated methods do exist.
For scalar images, interactive methods can be based on an operator’s visual
assessment of the resulting segmentation since the thresholding operation is
implementable in real-time.
Thresholding is often used as an initial step in a sequence of image
processing operations. Its main limitations are that in its simplest form only two
classes are generated and it cannot be applied to multi-channel images. In addition,
thresholding typically does not take into account the spatial characteristics of an
image. This causes it to be sensitive to noise and intensity inhomogeneities, which
can occur in magnetic resonance images. Both these artifacts essentially corrupt the
22
histogram of the image, making separation more difficult. For these reasons,
variations on classical thresholding have been proposed for medical image
segmentation that incorporate information based on local intensities and
connectivity.
3.3.3 Classifiers
Classifier methods are pattern recognition techniques that seek to partition a
feature space derived from the image using data with known labels. A feature space
is the range space of any function of the image, with the most common feature space
being the image intensities themselves. A histogram is an example of a 1-D feature
space. All pixels with their associated features on the left side of the partition would
be grouped into one class. Although the features used can be related to texture or
23
other properties, we assume for simplicity that the features are simply intensity
values.
Classifiers are known as supervised methods since they require training data
that are manually segmented and then used as references for automatically
segmenting new data. There are a number of ways in which training data can be
applied in classifier methods. A simple classifier is the nearest-neighbor classifier,
where each pixel or voxel is classified in the same class as the training datum with
the closest intensity. The k-nearest-neighbor (kNN) classifier is a generalization of
this approach, where the pixel is classified according to the majority vote of the k
closest training data. The kNN classifier is considered a nonparametric classifier
since it makes no underlying assumption about the statistical structure of the data.
Another nonparametric classifier is the Parzen window, where the classification is
made according to the majority vote within a predefined window of the feature space
centered at the unlabeled pixel intensity.
A commonly-used parametric classifier is the maximum likelihood (ML) or Bayes
classifier. It assumes that the pixel intensities are independent samples from a
mixture of probability distributions, usually Gaussian. This mixture, called a finite
mixture model, is given by the probability density function.
3.3.4 Clustering
Clustering algorithms essentially perform the same function as classifier
methods without the use of training data. Thus, they are termed unsupervised
methods. In order to compensate for the lack of training data, clustering methods
iterate between segmenting the image and characterizing the properties of the each
class. In a sense, clustering methods train themselves using the available data. Three
commonly used clustering algorithms are the K-means or ISODATA algorithm, the
fuzzy c-means algorithm, and the expectation-maximization (EM) algorithm. The K-
means clustering algorithm clusters data by iteratively computing a mean intensity
for each class and segmenting the image by classifying each pixel in the class with
24
the closest mean. The number of classes was assumed to be three, representing (from
dark gray to white) cerebrospinal fluid, gray matter, and white matter. The fuzzy c-
means algorithm generalizes the K-means algorithm, allowing for soft segmentations
based on fuzzy set theory. The EM algorithm applies the same clustering principles
with the underlying assumption that the data follows a Gaussian mixture model. It
iterates between computing the posterior probabilities and computing maximum
likelihood estimates of the means, co-variances, and mixing coefficients of the
mixture model. Although clustering algorithms do not require training data, they do
require an initial segmentation (or equivalently, initial parameters). The EM
algorithm has demonstrated greater sensitivity to initialization than the K-means or
fuzzy c-means algorithms. Like classifier methods, clustering algorithms do not
directly incorporate spatial modeling and can therefore be sensitive to noise and
intensity in homogeneities. This lack of spatial modeling, however, can provide
significant advantages for fast computation. Work on improving the robustness of
clustering algorithms to intensity in homogeneities in MR images has demonstrated
excellent success.
25
image data using iterative methods such as iterated conditional modes or simulated
annealing. The segmentation is much smoother than the non-MRF result a difficulty
associated with MRF models is proper selection of the parameters controlling the
strength of spatial interactions. Too high a setting can result in an excessively smooth
segmentation and a loss of important structural details. In addition, MRF methods
usually require computationally intensive algorithms. Despite these disadvantages,
MRFs are widely used not only to model segmentation classes, but also to model
intensity in homogeneities that can occur in MRimages and texture properties.
3.3.6 Other approaches
Model-fitting is a segmentation method that typically fits a simple
geometric shape such as an ellipse or parabola to the locations of extracted image
features in an image. It is a technique which is specialized to the structure being
segmented but is easily implemented and can provide good results when the model
is appropriate. A more general approach is to fit spline curves or surfaces to the
features. The main difficulty with model-fitting is that image features must first be
extracted before the fitting can take place.
The watershed algorithm uses concepts from mathematical morphology to partition
images into homogeneous regions. This method can suffer from over segmentation,
which occurs when the image is segmented into an unnecessarily large number of
regions. Thus, watershed algorithms in medical imaging are usually followed by a
post-processing step to merge separate regions that belong to the same structure.
26
The initial approach to solving the segmentation problem in this application was to
use a technique that would produce closed contours of the anatomical objects in the
image. The idea of a closed contour simplifies the segmentation process. Once the
user identifies the region of interest by supplying a seed point, whichever contour
contained that point is identified as the object of interest. Next, a contour filling
algorithm would be used to extract only this area from the rest of the image, using
the closed contour as the boundary.
3.4.2 Standard Edge Detection
To use this approach, we examined a number of standard edge detectors. The goal
was to find the “best” edge detector for our application. The best edge detector is the
one that produce a closed contour of one pixel thick edges. In gradient edge detection
methods, the assumption is that edges are formed by pixels with a high gradient. A
fast rate of change of intensity at some direction given by the angle of the gradient
vector is observed at edge pixels. The magnitude of the gradient indicates the
strength of the edge. All of the edge detectors in the gradient class approximate the
first derivative. A common disadvantage of these operators is their failure to provide
reliable segmentation due to their gradient-based nature. In the following
descriptions, (x,y) represents the pixel location in the input image.
3.4.3 Dimensionality
Dimensionality refers to whether a segmentation method operates in a 2-D image
domain or a 3-D image domain. Methods that rely solely on image intensities are
independent of the image domain. However, certain methods, such as deformable
models, Markov random fields (MRFs), and region growing (described below),
incorporate spatial information and may therefore operate differently depending on
the dimensionality of the image. Generally, 2-D methods are applied to 2-D images,
and 3-D methods are applied to 3-D images. In some cases, however, 2-D methods
are applied sequentially to the slices of a 3-D image. This may arise because of
practical reasons such as ease of implementation, lower computational complexity,
27
and reduced memory requirements. In addition, certain structures are more easily
defined along 2-D slices.
Chapter 4
Proposed method
28
distribution. Under this assumption, all the pixels belonging to the
same distribution would be assigned to the same class and our energy
function is defined as below:
where G is a full set of Gaussian parameters; μi and σi2 are the Gaussian
mean and the variance for the object i respectively.
Compared with the descriptor based on the mean constant, the
Gaussian distribution can better describe the region by using the mean
from the first derivative and variation from the second derivative.
When the noise is additive Gaussian noise with zero mean, only the
variation would be affected by additive Gaussian noise. Hence, the
Gaussian model can naturally suppress the impact of Gaussian noise
since the variation can be dynamically estimated during the
optimization procedure. As the salt and pepper noise has maximum or
minimum intensity value, the gray levels of this type of noise normally
fall outside of μi ± 3σi (called the 3-sigma rule); and therefore, the
impact of the noise on the energy function approaches zero.
29
entities such as image pixels and correlated features to characterize
mutual influences among image pixels. Thereby, we incorporate
contextual spatial property with the Gaussian model to improve the
insensitivity to noise of as below:
Since the bias field b(x) is slowly varying in the given image, the value
change of bias field in a small local window of x can be approximated
as constant. Thereby, b(x) can be presented as below:
30
where b(y) is the bias field value of pixel y that belongs in the clique of
the central pixel x .
Accordingly, our energy functional is formulated as below:
4.3 Contours
Contours are used in the field of digital image processing to find the contour
of an object. They are used in computer vision and image analysis to detect and
locate objects, and to describe their shape. Contour is a powerful tool for
segmentation in image processing. There are several advantages of contour models
over image segmentation methods, such as edge detection, thresholding, and region
grow.
Contours have been used for image segmentation and boundary tracking
since the first introduction of snakes by Kass et al. The idea is to start with first
boundary shapes represented in a type of closed curves, i.e. contours, and iteratively
change them by applying shrink/expansion operations according to the constraints
of images. Those shrink/expansion operations, called contour evolution, are done by
the minimization of an energy function
The method of contours has become popular for a range of applications,
mainly image segmentation and motion tracking. This is based on the use of
deformable contours which match to various object shapes and motions. Contours
are used for identifying the shape of the object.
31
Figure 4.1 Contour Initialization
Contours model, also known as “snakes” because of the way the contour moves
during the evolution, are one of the most popular de- formable models. A snake
is an energy-minimizing contour guided by external constraint forces and
influenced by image forces that pull it toward features such as lines and edges
localizing them accurately. In the snake’s framework, the contour curve can be
described as:
Point-based snakes. Te curve is an ordered collection of discrete points,
called snaxels.
Parametric snakes. The curve is defined in a continuous parametric
from of the form r (s) (r x (s), r y (s)) , using basis functions like b-spines or
Fourier exponentials defined at certain knots in the curve.
Point-based snakes can be regarded as an extreme case of parametric snakes,
where the curves are defined in terms of b-spines of degree zero with 2
parameters (position x and y) for each curve point. Point-based snakes thus
generally require more parameters than parametric snakes, resulting on
slower optimization algorithms. Moreover, parametric snakes can incorporate
the smoothness and other a priori constraints in the basis functions used,
eliminating the necessity of extra energy terms.
32
Figure4.2: Deformation of a snake. The left picture corresponds with the
initialization; the right picture shows the final shape of the snake after having
minimized the energy
33
4.4.2 Constraint energies
In interactive setups,constraint energies allow the user to enter a
priori knowledge specifying the points the curve should pass through. An
easy way to model this constraint into energy is using the distance from that
specified point to the closest point of the curve:
Nc
c min || r (s) rc,i ||2
1 s
Where rc ,i are the N c fixed points. This energy can be visualized as springs with
one end at fixed points and the other end sliding on the curve.
34
We propose three different region-based energy models based on the energies. The
proposed energy models are based on a discretization of the energy functional rather
than the corresponding evolution equations.
1
h
| h | h
I ( P)
Since the objective is to minimize this energy, we need to compute its derivatives
with respect to the cage vertices V .The gradient of Emean with respect to v j is
2
v j mean ( I ( P) h )( j ( P)I ( P) v j h )
h 1 h
Where
1
v j mean
| h | h
I ( p) j ( P)
In classical level set approaches, do not take into account this dependency and use a
coordinate descent approach to minimize the functional: the mean h and the
evolution equation are updated iteratively to evolve the equation. In the case of CAC,
we assume v j h = 0.
35
4.5.2 Gaussian Energy Model
The Gaussian energy decreases when the values of each region h have
stable statistics h and h . In other words, the curve will stop evolving when each
In order to minimize the energy, calculate the gradient the derivative of the energy
with respect to each control point v i to apply gradient descent:
2
I ( p) h
v j Egauss I ( p)i ( p)
h 1 p h h2
36
and minimization purpose, the above proposed energy Elg is used as the data term
to be defined as:
We introduce two other regularization terms to regulate the level set function in our
proposed energy function:
37
Fig. The segmentation results (delineated in red color) from the synthetic images
corrupted by mixture of three types of image noise demonstrated in the 1st, 2nd
rows for the CV and GLE models respectively.
By minimizing the energy formulation, we can obtain the optimized result of image
segmentation given by the level set function φ. The energy minimization is achieved
by an iterative process. We give the solution to the energy minimization with respect
to its variables φ, b, μi and σi for inside and outside the contour as follows.
where ∗ is the convolution operation and ( .̂ ) are denoted as the intermediate values
for the variables during each iteration of optimization. And then, we keep φ and the
region descriptors μ1,μ2 and σ1, σ2 fixed to minimize the energy form E with respect
to the bias field b.
38
2) Energy Minimization With Respect to the Level Set Function φ: To maximize the
energy functional E with respect to φ, the associated Euler-Lagrange equation for φ is
applied.
A standard method [30] to minimize a fitting form E is to find the steady state
solution of the gradient flow equation by iteration t. The level set speed for φ(t, x) is
presented as below:
where ∇ is the gradient operator; div (・) is the divergence operator; the function dp is
w_ here 1w is the convolution function and defined by 1w(x) = W(|y − x|)dy, which
is a constant and equals to 1 in the image domain _ except at the boundary of the
image. Numerically, W( |y − x| ) is defined by using the Gaussian kernel in our
model:
39
4.7 GLE Parameter Settings
1) Gaussian Noise: In this section, all the synthetic images were firstly corrupted by
GN with zero mean and sigma = 5, 20, 30 and 40 respectively and then these images
40
were further cor-rupted by shading artifacts. We set the Gaussian kernel with sigma
= 6 in LBF and LSII models.
As shown in Fig. 4, all models successfully segmented the expected three objects
from the synthetic images with intensity inhomogeneities only and with GN with
sigma = 5. Both LBF and LSII models failed the segmentation when the GN levels
increased to more than sigma = 20. In contrast, our algorithm achieved satisfactory
segmentation results for the synthetic images corrupted by all these different levels
of Gaussian noise. According to the JD error rates in Fig. 5, the results from our
model were comparable to the other two models when the sigma of Gaussian noise is
smaller than 20. Our model significantly outperformed the two models when the
sigma of Gaussian noise increased. Moreover, the accuracy of our model
corresponding to different levels of GN demonstrates that the performance of our
model was insensitive to the levels of Gaussian noise.
2) Speckle Noise: Speckle noise (SN) is an inherent feature of ultrasound images, which
may have negative effect on diagnostic interpretation [32]. In this section, all the
synthetic images were firstly corrupted by GN with zero mean and sigma
3) Salt and Pepper Noise: Salt and pepper noise (SPN) or spike noise can be introduced
into images in situations where quick transients, such as faulty switching analog-to-
digital converter errors, or bit errors in the data transmission occur [26]. Random salt
and pepper noise densities of 0.02, 0.04 and 0.06 were added to all the synthetic
images after the images were corrupted by the shading artifacts. The segmentation
results from three models are shown in the Fig. 7. We set the Gaussian kernel with
sigma = 20 in the LBF and LSII models
41
Initial Contours GLE LBF LSII
42
Chapter 5
MATLAB
5.1 INTRODUCTION
MATLAB is a high-performance language for technical computing. It integrates
computation, visualization, and programming in an easy-to-use environment where
problems and solutions are expressed in familiar mathematical notation. MATLAB
stands for matrix laboratory, and was written originally to provide easy access to
matrix software developed by LINPACK (linear system package) and EISPACK
(Eigen system package) projects. MATLAB is therefore built on a foundation of
sophisticated matrix software in which the basic element is array that does not
require pre dimensioning which to solve many technical computing problems,
especially those with matrix and vector formulations, in a fraction of time.
5.1.2 Typical uses of MATLAB
The typical usage areas of MATLAB are
i. Math and computation
ii. Algorithm development
iii. Data acquisition
iv. Data analysis ,exploration and visualization
v. Scientific and engineering graphics
MATLAB is an interactive system whose basic data element is an array that
does not require dimensioning. This allows you to solve many technical computing
problems, especially those with matrix and vector formulations, in a fraction of the
time it would take to write a program in a scalar non-interactive language such as C
or FORTRAN.
MATLAB features a family of add-on application-specific solutions called
toolboxes. Very important to most users of MATLAB, toolboxes allow you to learn
and apply specialized technology. Toolboxes are comprehensive collections of
43
MATLAB functions (M-files) that extend the MATLAB environment to solve
particular classes of problems. Areas in which toolboxes are available include signal
processing, image processing, control systems, and many others.
44
MATLAB
MATLAB
Programming language
5.2MATLAB System
The MATLAB system consists of five main parts:
a. Development Environment
b. The MATLAB Mathematical Function
c. The MATLAB Language
d. The Graphical User Interface(GUI) construction
45
e. The MATLAB Application Program Interface (API)
a. Development Environment
This is the set of tools and facilities that help you use MATLAB functions and
files. Many of these tools are graphical user interfaces. It includes the MATLAB
desktop and Command Window, a command history, an editor and debugger, and
browsers for viewing help, the workspace, files, and the search path.
b. MATLAB Mathematical Function
This is a vast collection of computational algorithms ranging from
elementary functions like sum, sine, cosine, and complex arithmetic, to more
sophisticated functions like matrix inverse, matrix Eigen values, Bessel functions, and
fast Fourier transforms.
c. MATLAB Language
This is a high-level matrix/array language with control flow statements,
functions, data structures, input/output, and object-oriented programming features.
It allows both "programming in the small" to rapidly create quick and dirty throw-
away programs, and "programming in the large" to create complete large and
complex application programs.
d. Graphics
MATLAB has extensive facilities for displaying vectors and matrices as
graphs, as well as annotating and printing these graphs. It includes high-level
functions for two-dimensional and three-dimensional data visualization, image
processing, animation, and presentation graphics. It also includes low-level functions
that allow you to fully customize the appearance of graphics as well as to build
complete graphical user interfaces on your MATLAB applications.
46
(dynamic linking), calling MATLAB as a computational engine, and for reading and
writing MAT-files.
Kinds of plots:
plot(x,y) creates a Cartesian plot of the vectors x & y
plot(y) creates a plot of y vs.the numerical values of the elements
in the y-vector
polar(theta,r) creates a polar plot of the vectors r & theta where theta is
in radians
Plot description:
47
text(x,y,'text','sc') writes 'text' at point x,y assuming lower left corner is (0,0)
and upper right corner is (1,1)
axis([xmin xmax ymin ymax]sets scaling for the x- and y-axes on the current
plot
+ Addition
- Subtraction
* Multiplication
^ Exponentiation
Array products: Recall that addition and subtraction of matrices involved addition
or subtraction of the individual elements of the matrices. Sometimes it is desired to
simply multiply or divide each element of an matrix by the corresponding element of
another matrix 'array operations”. Array or element-by-element operations are
executed when the operator is preceded by a '.' (Period):
48
a .\ b divides each element of b by the respective element of a
49
Figure.5.5.1: MATLAB desktop
MATLAB uses a search path to find M-files and other MATLAB related files,
which are organize in directories in the computer file system. Any file run in
MATLAB must reside in the current directory or in a directory that is on search
path. By default, the files supplied with MATLAB and math works toolboxes are
included in the search path. The easiest way to see which directories are on the
search path. The easiest way to see which directories are soon the search paths, or to
add or modify a search path, is to select set path from the File menu the desktop,
and then use the set path dialog box. It is good practice to add any commonly used
directories to the search path to avoid repeatedly having the change the current
directory.
The Command History Window contains a record of the commands a user
has entered in the command window, including both current and previous
50
MATLAB sessions. Previously entered MATLAB commands can be selected and re-
executed from the command history window by right clicking on a command or
sequence of commands. This action launches a menu from which to select various
options in addition to executing the commands. This is useful to select various
options in addition to executing the commands. This is a useful feature when
experimenting with various commands in a work session.
5.5.2 Using the MATLAB Editor to create M-Files
The MATLAB editor is both a text editor specialized for creating M-files and a
graphical MATLAB debugger. The editor can appear in a window by itself, or it can
be a sub window in the desktop. M-files are denoted by the extension .m, as in
pixelup.m.
The MATLAB editor window has numerous pull-down menus for tasks such
as saving, viewing, and debugging files. Because it performs some simple checks and
also uses color to differentiate between various elements of code, this text editor is
recommended as the tool of choice for writing and editing M-functions.
To open the editor, type edit at the prompt opens the M-file filename.m in an
editor window, ready for editing. As noted earlier, the file must be in the current
directory, or in a directory in the search path.
51
MATLAB most images are represented as two-dimensional arrays (matrices), in
which each element of the matrix corresponds to a single pixel in the displayed
image. Some images, such as RGB, require a three-dimensional array, where the first
plane in the third dimension represents the red pixel intensities, the second plane
represents the green pixel intensities, and the third plane represents the blue pixel
intensities.
The following sections describe the different data and image types, and give details
about how to read, write, work with, and display graphics images; how to alter the
display properties and aspect ratio of an image during display; how to print an
image; and how to convert the data type or graphics format of an image.
52
MATLAB input functions read the most commonly used bit depths (bits per
pixel) of any of the supported graphics file formats. When the data is in memory, it
can be stored as uint8, uint16, or double. For details on which bit depths are
appropriate for each supported format, see imread and imwrite.
Supported Image Formats
MATLAB commands read, write, and display several types of graphics file
formats for images. As with MATLAB generated images, once a graphics file format
image is displayed, it becomes a Handle Graphics image object. MATLAB supports
the following graphics file formats, along with others:
Table 5.6.1: Image Formats
FORMAT DESCRIPTION RECOGNIZED
NAME EXTENSION
TIFF Tagged Image File .tif, .tiff
Format
JPEG Joint Photograph .jpg, .jpeg
Experts Group
For more information about the bit depths and image types supported for these
formats, see imread and imwrite.
53
Functions for Reading, Writing, and Displaying Images:
Table5.6.2:MATLAB functions
54
This assigns a floating number ("a number with decimals") between 0 and 1 to each
pixel. The value 0 corresponds to black and the value 1 corresponds to white. The
other class is called uint8 which assigns an integer between 0 and 255 to represent the
brightness of a pixel. The value 0 corresponds to black and 255 to white.
55
Chapter 6
56
Chapter 7
CONCLUSION
We have proposed a more general model for segmenting images with/without
intensity inhomogeneities and with different types of noise. Our proposed level set
energy function, which is dominated by the global Gaussian distribution and
constrained by local neighbor properties, can overcome the artifacts from both the
intensity inhomogeneity and image noise.
57
REFERENCES
[1] S. Osher and J. Sethian, “Fronts propagating with curvature-dependent speed:
Algorithms based on Hamilton-Jacobi formulations,” J. Comput. Phys., vol. 79,
pp. 12–49, Nov. 1988.
[2] L. He, Z. Peng, B. Everding, X. Wang, C. Y. Han, K. L. Weiss, and W G. Wee,
“A comparative study of deformable contour methods on medical image
segmentation,” Image Vis. Comput., vol. 26, pp. 141–163, 2008.
[3] R. Tsai and S. Osher, “Level set methods and their applications in image
science,” Commun. Math. Sci., vol. 1, no. 4, pp. 1–20, 2003.
[4] Y. Boykov and O. Veksler, Handbook of Mathematical Models in Computer Vision.
New York, NY, USA: Springer-Verlag, 2006.
[5] G. Song and T. D. Bui, “Image segmentation and selective smoothing by using
Mumford-Shah model,” IEEE Trans. Image Process., vol. 14, no. 10, pp. 1537–
1549, Oct. 2005.
[6] D. Cremers, M. Rousson, and R. Deriche, “A review of statistical approaches
to level set segmentation: Integrating color, texture, motion and shape,” Int. J.
Comput. Vis., vol. 72, no. 2, pp. 195–215, 2007.
[7] V. Caselles, R. Kimmel, and G. Sapiro, “Geodesic active contours,” Int. j
Comput. Vis., vol. 22, no. 1, pp. 61–79, 1997.
[8] S. Kichenassamy, A. Kumar, P. Olver, A. Tannenbaum, and A. Yezzi,
“Gradient flows and geometric active contour models,” in Proc. Int. Conf.
Comput. Vis., Cambridge, MA, USA, 1995, pp. 810–815.
[9] R. Kimmel, A. Amir, and A. M. Bruckstein, “Finding shortest paths on
surfaces using level sets propagation,” IEEE Trans. Pattern Anal. Mach. Intell.,
vol. 17, no. 6, pp. 635–640, Jun. 1995.
[10] R. Malladi, J. A. Sethian, and B. C. Vemuri, “Shape modeling with front
propagation: A level set approach,” IEEE Trans. Pattern Anal. Mach. Intell., vol.
17, no. 2, pp. 158–175, Feb. 1995.
58
[11] A. Vasilevskiy and K. Siddiqi, “Flux maximizing geometric flows,”
IEEE Trans. Pattern Anal. Mach. Intell., vol. 24, no. 12, pp. 1565–1578, Dec. 2002.
[12] T. F. Chan and L. A. Vese, “Active contours without edges,” IEEE
Trans. Image Process., vol. 10, no. 2, pp. 266–277, Feb. 2001.
[13] C. Samson, L. Blanc-Feraud, G. Aubert, and J. Zerubia, “A variational
model for image classification and restoration,” IEEE Trans. Pattern Anal.
Mach. Intell., vol. 22, no. 5, pp. 460–472, May 2000.
[14] A. Tsai, A. Yezzi, and A. S. Willsky, “Curve evolution implementation
of the Mumford-Shah functional for image segmentation, denoising,
interpolation, and magnification,” IEEE Trans. Image Process., vol. 10, no. 8, pp.
1169–1186, Aug. 2001.
[15] L. Vese and T. Chan, “A multiphase level set framework for image
segmentation using the Mumford and Shah model,” Int. J. Comput. Vis., vol.
50, pp. 271–293, Dec. 2002.
[16] A. Yezzi, Jr., S. Kichenassamy, A. Kumar, P. Olver, and A.
Tannenbaum, “A geometric snake model for segmentation of medical
imagery,” IEEE Trans. Med. Imag., vol. 16, no. 2, pp. 199–209, Apr. 1997.
[17] G. Papandreou and P. Maragos, “Multigrid geometric active contour
models,” IEEE Trans. Image Process., vol. 16, no. 1, pp. 229–240, Jan. 2007.
[18] D. Mumford and J. Shah, “Optimal approximations by piecewise
smooth functions and associated variational problems,” Commun. Pure Appl.
Math., vol. 42, no. 5, pp. 577–685, 1989.
[19] N. Paragios and R. Deriche, “Geodesic active regions and level set
methods for supervised texture segmentation,” Int. J. Comput. Vis., vol. 46, no.
3, pp. 223–247, 2002.
[20] C. Li, C.-Y. Kao, J. C. Gore, and Z. Ding, “Minimization of region-
scalable fitting energy for image segmentation,” IEEE Trans. Image Process.,
vol. 17, no. 10, pp. 1940–1949, Oct. 2008.
59
[21] S. Lankton and A. Tannenbaum, “Localizing region-based active con-
tours,” IEEE Trans. Image Process., vol. 17, no. 11, pp. 2029–2039, Nov. 2008.
[22] C. Li, R. Huang, Z. Ding, J. C. Gatenby, D. N. Metaxas, and J. C. Gore,
“A level set method for image segmentation in the presence of intensity
inhomogeneities with application to MRI,” IEEE Trans. Image Process., vol. 20,
no. 7, pp. 2007–2016, Jul. 2011.
60