Professional Documents
Culture Documents
discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/267097158
CITATIONS READS
0 9,789
1 author:
Sarah Ali
Dijlah University College
5 PUBLICATIONS 1 CITATION
SEE PROFILE
All content following this page was uploaded by Sarah Ali on 20 October 2014.
By
Supervised by
2013
SUPERVISOR CERTIFICATION
Signature:
Name:
Date: 3 / 5 / 2014
Abstract
I
List of Content
Abstract . I
List of Content .. II
1.1 Background..........1
3.1 Introduction... 17
II
3.3 Part Two (LPF and HBF in Spatial Domain)...................................19
4.4 Discussion/...................................................................................... 25
5.1 Conclusion........................................................................................26
Reference..............................................................................................27
III
Chapter One
Introduction
1.1 Background
Digital Image Processing (DIP) involves the modification of digital data for
improving the image qualities with the aid of computer. The processing
helps in maximizing clarity, sharpness and details of features of interest
towards information extraction and further analysis. This form of remote
sensing actually began in 1960s with a limited number of researchers
analyzing airborne multispectral scanner data and digitized aerial
photographs. However, it was not until the launch of Landsat-1, in 1972,
that digital image data became widely available for land remote ensuing
applications. At that time not only the theory and practice of digital image
processing was in its infancy but also the cost of digital computers was
very high and their computational efficiency was far below by present
standards. Today, access to low cost and efficient computer hardware and
software is commonplace and the source of digital image data are many
and varied. The digital image sources range from commercial earth
resources satellites, airborne scanner, airborne solid-state camera, scanning
micro-densitometer to high-resolution video camera [1].
Image Enhancement (IE) transforms images to provide better
representation of the subtle details. It is an indispensable tool for
researchers in a wide variety of fields including (but not limited to) medical
imaging, art studies, forensics and atmospheric sciences. It is application
specific: an IE technique suitable for one problem might be inadequate for
another. For example forensic images/videos employ techniques that
resolve the problem of low resolution and motion blur while medical
imaging benefits more from increased contrast and sharpness. To cater for
1
such an ever increasing demand of digital imaging, software companies
have released commercial softwares for users who want to edit and visually
enhance the images [2].
Array of class logical, unit 8, Unit 16, single, or double whose pixel values
are directed indices into a color map. The color map is an m-by-3 array of
class double. For single or double arrays, integer values range from [1, p].
For logical, unit8, or unit 16 arrays, values range from [0, p-1]. An indexed
image consists of an array and a color map matrix. The pixel values in the
array are directed indices into a color map. By convention, this
documentation uses the variable name X to refer to the array and map to
refer to the color map [3].
2
loogical arraay. Thus, an array oof 0s and
d 1s whosee values aare of dataa class,
saay, unit8, is
i not considered a bbinary im
mage in MA
ATLAB [33].
3
Figure 1.2: Graysccale Imagees [4].
4
Figuree1.3: Colo
or Image [4].
5
Chapter Two
Image Enhancement Techniques
6
However, in the recent years the meaning of the term has evolved to denote
image-preserving noise smoothing.
This primarily serves to distinguish it from similar-sounding terms, such as
image restoration and image reconstruction, which also taking specific
meaning. Image enhancement has played and will continue to play an
important role into different fields such as medical, industrial, military and
scientific applications. In addition to these applications, image
enhancement is increasingly being used in consumer electronics. Internet
Web users, for instance, not only rely on built-in image processing
protocols such as JPEG (Joint Photographic Expert Group) and
interpolation, but they also have become image processing users equipped
with powerful yet inexpensive software such as Photoshop. Users not only
retrieve digital images from the Web but they are now able to acquire their
own by use of digital cameras or through digitization services. Image
enhancement is an indispensable tool for researchers in a wide variety of
fields:
1. In forensics, image enhancement is used for identification, evidence
gathering and surveillance. Images obtained from fingerprint detection,
security videos analysis and crime scene investigations are enhanced to
help in identification of culprits and protection of victims.
2. In atmospheric sciences IE is used to reduce the effects of haze, fog, mist
and turbulent weather for meteorological observations. It helps in detecting
shape and structure of remote objects in environment sensing. Satellite
images undergo image restoration and enhancement to remove noise.
3. Astrophotography faces challenges due to light and noise pollution that
can be minimized by IE. For real time sharpening and contrast
enhancement several cameras have in-built IE functions. Moreover,
numerous softwares allow editing such images to provide better and bright
results.
7
4. In oceanography the study of images reveals interesting features of water
flow, remains concentration, geomorphology and bathymetric patterns to
name a few. These features are more clearly observable in images that are
digitally enhanced to overcome the problem of moving targets, deficiency
of light and obscure surroundings.
5. IE techniques when applied to pictures and videos help the visually
impaired in reading small print, using computers and television and face
recognition. Several studies have been conducted that highlight the need
and value of using IE for the visually impaired.
6. The technique of image enhancement is often employed by virtual
restoration of historic paintings and artifacts in order to reduce stains and
crevices. Color contrast enhancement, sharpening and brightening are just
some of the techniques used to make the images bright. IE is a powerful
tool for restorers who can inform decisions by viewing the results of
restoring a painting beforehand. It is evenly useful in discerning text from
worn-out historic documents.
7. In the field of e-learning, IE is used to clarify the contents of chalkboard
as viewed on streamed video; it improves the content readability and helps
students to focus on the text. Similarly, collaboration through the
whiteboard is facilitated by enhancing the shared data and diminishing
artifacts like shadows and blemishes.
8. Medical imaging uses IE techniques for reducing noise and sharpening
details to improve the visual representation of the image. Since minute
details play a critical role in diagnosis and treatment of disease, it is
essential to highlight important features while displaying medical images.
This makes IE a necessary aiding tool for viewing anatomic areas in MRI,
ultrasound and x-rays to name a few.
9. Numerous other fields including law enforcement, microbiology,
biomedicine, bacteriology, climatology, meteorology, etc., benefit from
8
vaarious IE technique
t s. These bbenefits arre not limiited to proofessional studies
annd busineesses but extend tto the co
ommon users
u whoo employ IE to
coosmeticallly enhancee and corrrect their im
mages [5] [6] [7].
The follow
wing image explainns the diffferent typees of imaage enhan
ncement
teechniques..
2.2 Frequ
uency do
omain tecchniques
9
orthogonal transforms are discrete cosine transform, discrete Fourier
transform, Hartley Transform etc. The transform domain enables operation
on the frequency content of the image, and therefore high frequency
content such as edges and other subtle information can easily be enhanced.
Frequency domain which operate on the Fourier transform of an image.
Edges and sharp transitions (e.g. noise) in an image contribute
significantly to high frequency content of Fourier transform.
Low frequency contents in the Fourier transform are responsible to the
general appearance of the image over smooth areas.
The concept of filtering is easier to visualize in the frequency domain.
Therefore, enhancement of image f(x, y) can be done in the frequency
domain based on DFT. This is particularly useful in convolution if the
spatial extent of the point spread sequence h(x, y) is large then convolution
theory [8].
G (x, y) = h(x, y)*f(x, y)
Where g(x, y) is enhanced image.
10
Figure 2.2: Frequency Domain Filtering Operation [9].
1. Low-pass filter
Low-pass filters exist in many different forms, including electronic circuits
(such as a hiss filter used in audio), anti-aliasing filters for conditioning
signals prior to analog-to-digital conversion, digital filters for smoothing
sets of data, acoustic barriers, blurring of images, and so on. The moving
average operation used in fields such as finance is a particular kind of low-
pass filter, and can be analyzed with the same signal processing techniques
as are used for other low-pass filters. Low-pass filters provide a smoother
form of a signal, removing the short-term fluctuations, and leaving the
longer-term trend.
H(u,v)= 0 if D (u,v)<= D0
1 if D (u,v)> D0
11
W
Where D0 is a specifiied nonneggative quaantity, and
d D (u,v) i s the distaance
frrom the pooint to the center off the frequeency rectaangle. [10]]
Figure 2.3:
2 (a) Perrspective pplot of an ideal low
w-pass filteer function
n. (b)
Filterr displayed as an im
mage. (c) Filter
F radiaal cross seection [10]].
12
Figure 2.4: (a) Perrspective pplot of an ideal high
h-pass filteer function
n. (b)
Filterr displayed as an im
mage. (c) Filter
F radiaal cross seection [10]].
13
Image Processing in the spatial domain can be Expressed by: g (m, n) =T (f
(m, n)). Where f (m, n) is the input image, g (m, n) is the processed Image
and T is the operator defining the modification process. The operator =T, is
typically a single-valued and monotone function that can operate on
individual pixels or on selective value of the input Image is used to
compute the corresponding pixel value for the output Image. Within the
input image are used to compute the modified image at any given point.
One can consider point processing as a special case of region processing
where the region is composed of a single pixel. The point-processing
operator can also be expressed by: S=T(r), Where r and s are variables
denoting the intensity level of f(m , n) and g(m ,n) at any point (m ,n). The
following sections describe several point-and region-based image
enhancement techniques. The second article will also discuss spatial
smoothing, which is another example of region-based image processing,
and compare its advantages and disadvantages with transform domain
methods. The smallest possible neighborhood is of size 1 X 1. In this case g
depends only on the value of f at a single point (x, y) and T [3].
The spatial filtering process consists of simply moving the filter mask from
point to point in an image. At each point the response of filter is calculated
using a predefined relationship. Here two smoothening spatial filters -
mean and median are discussed.
The goal of image filtering is to reduce impulse noise or Gaussian noise
using a Median and Mean Filters. A 2-D median filtering operation is
performed by sliding a P x P window over the entire image and replacing
the center pixel by the median of the pixels in that window.
14
V(m,n)=(k,l)w a (k,l) y (m-k,n-l)
Where: y(m,n), v(n,m) are the input image and output image W is the
windows:
V(m,n)=1/NW(k,l)w y (m-k,n-l)
15
Figure 2.6: The M
Mechanics of Spatial Filteringg [6].
16
Chapter Three
Designing Spatial and Frequency Domain Filters Using
MATLAB
3.1 Introduction
17
1. Low Pass Filter:
That is, multiplication with shifts the origin of the spectrum to u=M/2,
v=N/2.
18
3.3 Part Two (LPF and HBF in Spatial Domain)
Convolving mask with image is carried out by sliding the mask over the
image, multiplying mask values with the pixel values falling beneath them
and obtaining the sum. The sum is used as the value for the position of the
center of the mask over the image.
2. The spatial highpass filter has both negative and positive values.
19
Chapter Four
Simulation Result, Analysis and Discussions
4.1 Introduction
In this chapter the results of the simulation which presented in chapter three
are introduced to evaluate the performance of image enhancement in
frequency domain techniques and spatial domain techniques are based on
the manipulation of the orthogonal transform of the image rather than the
image itself are included within the following section, which are evaluated
and discussed for each type. Below are the results from the spatial domain
and the frequency domain along with their difference image.
1. LPF
Output of enhancement process using LPF first order cases blurs image by
reducing the shape edges located within it as shown in figure (4.1, 4.2, and
4.3).
20
Figure 4.2: LPF in Frequency Domain.
Figure 4.3: Image after Filtering.
2. HPF
Figure (4.4) that show HPF in frequency domain and figure (4.5) show the
output image after affect HPF by increasing high frequency and edge
enhancement sharpen (or shows the edges of) an image.
21
Figure 4.4: HPF in Frequency Domain
22
4.3 Part two spatial domain results:
1. LPF
Output of enhancement process using LPF in spatial domain first order
cases blurs image by reducing the shape edges located within it as shown in
figure (4.6 and 4.7).
23
2.High Pass Filter with Center 9
Figure 4.8 shows the affect the effect of HPF with center 9 by keeping the
shape of object with edge accentuate.
Figure 4.8: The output image after filtering effect HBF with center 9
Figure 4.9 shows in the output image the effect of HPF with center 8 the
background of image became zero with accentuate the shape edge.
Figure 4.9: The output image after filtering effect HBF with center 9
24
4.4 Discussion:
25
Chapter Five
Conclusions and Suggestions for Further Work
5.1 Conclusion
The above discussion and various results obtained lead to the conclusion
that it is easier to comprehend the concepts of Digital Image Processing
and specifically various image enhancement techniques with the help of
their simulation on MATLAB. As it is evident from the results, the both
ways for filtering (frequency and spatial) domain are more or less the same.
When needed to image enhancement with a small kernel, would like to
advise to use the spatial domain, instead of the frequency domain, since the
Fourier transformation takes some time. Know that spatial domain is fast
and less complex than Fourier filtering.
26
Reference:
[10] T.M. Lilles, and R.W. Kiefer, "Remote Sensing and Image
Interpretation", John Wiley & Sons, New York, 1980.
27
[11] Nicoleta Angelescu, Iulian Udroiu, Ioan Tache, "Simulation of Image
Enhancement Techniques Using Matlab", Scientific Bulletin of the
Electrical Engineering Faculty, Romania, 2009.
28
Appendix
Part One (LPF and HBF in Frequency Domain)
close all;
clc;
clear;
a= imread ('circles.png');
figure(1);
imshow(a);
figure(2);
mesh(abs(a));
e=double(a);
b=fft2(e);
figure(3);
mesh(abs(b));
c=fftshift(b);
figure(4);
mesh(abs(c));
[x y z]=size(e);
fc=128;
for i=1:x
m(i)=(1/((1+(fc/i))^2*1)^0.5);
end
for j=1:y
n(j)=(1/((1+(fc/j))^2*1)^0.5);
end
for i=1:256
for j=1:256
w(i,j)=m(i).*n(j)';
end
end
figure(5);
mesh(abs(w));
e=0;
for i=1:x
h=x-e;
m2(i)=(1/((1+(fc/h))^2*1)^0.5);
e=e+1;
29
end
q=0;
for j=1:y
h2=y-q;
n2(j)=(1/((1+(fc/h2))^2*1)^0.5);
q=q+1;
end
for i=1:256
for j=1:256
w2(i,j)=m2(i).*n2(j)';
end
end
figure(6);
mesh(abs(w2));
for i=1:x
for j=1:y
f(i,j)=w(i,j)*w2(i,j);
end
end
figure(7);
mesh(abs(f));
for i=1:x
for j=1:y
filt(i,j)=c(i,j)*f(i,j);
end
end
figure(8);
mesh(abs(filt));
bb=ifftshift(filt);
cc=ifft2(bb);
dd=uint(cc);
figure(9);
imshow(cc);
close all;
clc;
clear;
30
a=imread('circles.png');
figure(1);
imshow(a);
figure(2);
mesh(abs(a));
e=double(a);
b=fft2(e);
figure(3);
mesh(abs(b));
c=fftshift(b);
figure(4);
mesh(abs(c));
[x y z]=size(e);
fc=128;
for i=1:x
m(i)=(1/((1+(fc/i))^2*1)^0.5);
end
for j=1:y
n(j)=(1/((1+(fc/j))^2*1)^0.5);
end
for i=1:256
for j=1:256
w(i,j)=m(i).*n(j)';
end
end
figure(5);
mesh(abs(w));
e=0;
for i=1:x
h=x-e;
m2(i)=(1/((1+(fc/h))^2*1)^0.5);
e=e+1;
end
q=0;
for j=1:y
h2=y-q;
n2(j)=(1/((1+(fc/h2))^2*1)^0.5);
q=q+1;
end
for i=1:256
for j=1:256
31
w2(i,j)=m2(i).*n2(j)';
end
end
figure(6);
mesh(abs(w2));
for i=1:x
for j=1:y
f(i,j)=w(i,j)*w2(i,j);
end
end
f1=1-f; //////////////////this line will make it a LPF
figure(7);
mesh(abs(f1));
for i=1:x
for j=1:y
filt(i,j)=c(i,j)*f1(i,j);
end
end
figure(8);
mesh(abs(filt));
bb=ifftshift(filt);
cc=ifft2(bb);
dd=uint(cc);
figure(9);
imshow(cc);
close all;
clc;
clear;
im=imread('rice.png');
figure(1);
imshow(im)
im2=im;
im=double(im);
[x y z]=size(im2);
32
for i=2:x-1
s=0;
for j=2:y-1
cont=1;
for c=i-1:i+1
for k=j-1:j+1
s(cont)=im(c,k);
cont=cont+1;
end
end
sum1=sum(s)/9;
im2(i,j)=sum1;
end
end
figure(2)
imshow(uint8(im2));
High pass filter with center 9 are discussed in above in Digital Image
Processing is simulation Using function and script of MATLAB:
clc
clear all
im=imread('rice.png');
figure(1);
imshow(im);
[x y z]=size(im);
a=double(im);
mask=([-1 -1 -1 -1 9 -1 -1 -1 -1]);
for i=2:x-1
for j=2:y-1
q=1;
for c=i-1:i+1
for d=j-1:j+1
s(q)=a(c,d);
q=q+1;
end
end
s=sum(s.*mask);
x(i,j)=s;
end
end
figure(2)
33
imshow(uint8(x));
High pass filter with center 8 are discussed in above in Digital Image
Processing is simulation Using function and script of MATLAB:
clc
clear all
im=imread('rice.png');
figure(1);
imshow(im);
[x y z]=size(im);
a=double(im);
mask=([-1 -1 -1 -1 8 -1 -1 -1 -1]);
for i=2:x-1
for j=2:y-1
q=1;
for c=i-1:i+1
for d=j-1:j+1
s(q)=a(c,d);
q=q+1;
end
end
s=sum(s.*mask);
im(i,j)=s;
end
end
figure(2)
imshow(uint8(im));
34
.
. spatial and frequency domain filters
Fourier Fourier .
Fourier .
Spatial and Frequency Domain Filters
.1
.2
.3
.4
. .