SlideShare a Scribd company logo
Computer Vision
Chap.2 Image Processing
SUB CODE: 3171614
SEMESTER: 7TH IT
PREPARED BY:
PROF. KHUSHALI B. KATHIRIYA
Outline
• Pixel transforms
• Color transforms
• Histogram processing & equalization
• Filtering
• Convolution
• Fourier transformation and its applications in sharpening
• Blurring and noise removal
Prepared by: Prof. Khushali B Kathiriya
2
What is Image Processing?
PREPARED BY:
PROF. KHUSHALI B. KATHIRIYA
“One picture is worth more than ten thousand words”
Anonymous
Prepared by: Prof. Khushali B Kathiriya
4
What is Digital Image Processing?
• Digital image processing focuses on two major tasks
• Improvement of pictorial information for human interpretation
• Processing of image data for storage, transmission and representation for
autonomous machine perception
Prepared by: Prof. Khushali B Kathiriya
5
What is DIP? (cont…)
The continuum from image processing to computer vision can be broken up into
low-, mid- and high-level processes
Low Level Process
Input: Image
Output: Image
Examples: Noise
removal, image
sharpening
Mid Level Process
Input: Image
Output: Attributes
Examples: Object
recognition,
segmentation
High Level Process
Input: Attributes
Output: Understanding
Examples: Scene
understanding,
autonomous navigation
Prepared by: Prof. Khushali B Kathiriya
6
History of Digital Image Processing
Early 1920s: One of the first applications of digital imaging was in the news-
paper industry
• The Bartlane cable picture transmission service
• Images were transferred by submarine cable between London and New York
• Pictures were coded for cable transfer and reconstructed at the receiving end on a
telegraph printer
Early digital image
Prepared by: Prof. Khushali B Kathiriya
7
History of DIP (cont…)
Mid to late 1920s: Improvements to the Bartlane system resulted in higher quality
images
• New reproduction
processes based
on photographic
techniques
• Increased number
of tones in
reproduced images
Improved
digital image Early 15 tone digital
image
Prepared by: Prof. Khushali B Kathiriya
8
History of DIP (cont…)
1960s: Improvements in computing technology and the onset of the space race led
to a surge of work in digital image processing
• 1964: Computers used to
improve the quality of
images of the moon taken
by the Ranger 7 probe
• Such techniques were used
in other space missions
including the Apollo landings
A picture of the moon taken
by the Ranger 7 probe
minutes before landing
Prepared by: Prof. Khushali B Kathiriya
9
History of DIP (cont…)
1970s: Digital image processing begins to be used in medical applications
• 1979: Sir Godfrey N.
Hounsfield & Prof. Allan M.
Cormack share the Nobel
Prize in medicine for the
invention of tomography,
the technology behind
Computerised Axial
Tomography (CAT) scans
Typical head slice CAT
image
Prepared by: Prof. Khushali B Kathiriya
10
History of DIP (cont…)
1980s - Today: The use of digital image processing techniques has exploded and
they are now used for all kinds of tasks in all kinds of areas
• Image enhancement/restoration
• Artistic effects
• Medical visualisation
• Industrial inspection
• Law enforcement
• Human computer interfaces
Prepared by: Prof. Khushali B Kathiriya
11
Examples: Image Enhancement
One of the most common uses of DIP techniques: improve quality, remove noise
etc
Prepared by: Prof. Khushali B Kathiriya
12
Examples: The Hubble Telescope
•Launched in 1990 the Hubble
telescope can take images of
very distant objects
•However, an incorrect mirror
made many of Hubble’s
images useless
•Image processing
techniques were
used to fix this
Prepared by: Prof. Khushali B Kathiriya
13
Examples: Artistic Effects
Artistic effects are used to make
images more visually
appealing, to add special effects
and to make composite images
Prepared by: Prof. Khushali B Kathiriya
14
Examples: Medicine
Take slice from MRI scan of canine heart, and find boundaries between types of
tissue
• Image with gray levels representing tissue density
• Use a suitable filter to highlight edges
Original MRI Image of a Dog Heart Edge Detection Image
Prepared by: Prof. Khushali B Kathiriya
15
Examples: GIS
Geographic Information Systems
• Digital image processing techniques are used extensively to manipulate satellite
imagery
• Terrain classification
• Meteorology
Prepared by: Prof. Khushali B Kathiriya
16
Examples: GIS (cont…)
Night-Time Lights of the World data set
• Global inventory of human
settlement
• Not hard to imagine the kind of
analysis that might be done using
this data
Prepared by: Prof. Khushali B Kathiriya
17
Examples: Industrial Inspection
•Human operators are expensive, slow
and unreliable
•Make machines do the job instead
•Industrial vision systems are used in
all kinds of industries
Prepared by: Prof. Khushali B Kathiriya
18
Examples: PCB Inspection
Printed Circuit Board (PCB) inspection
• Machine inspection is used to determine that all components are present and that all
solder joints are acceptable
• Both conventional imaging and x-ray imaging are used
Prepared by: Prof. Khushali B Kathiriya
19
Examples: Law Enforcement
Image processing techniques are used
extensively by law enforcers
• Number plate recognition for speed
cameras/automated toll systems
• Fingerprint recognition
• Enhancement of CCTV images
Prepared by: Prof. Khushali B Kathiriya
20
Examples: HCI
Try to make human computer interfaces more
natural
• Face recognition
• Gesture recognition
Prepared by: Prof. Khushali B Kathiriya
21
Key Stages in Digital Image
Processing
PREPARED BY:
PROF. KHUSHALI B. KATHIRIYA
Key Stages in Digital Image Processing
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
Prepared by: Prof. Khushali B Kathiriya
23
Key Stages in Digital Image Processing:
Image Aquisition
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
Prepared by: Prof. Khushali B Kathiriya
24
Key Stages in Digital Image Processing:
Image Enhancement
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
Prepared by: Prof. Khushali B Kathiriya
25
Key Stages in Digital Image Processing:
Image Restoration
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
Prepared by: Prof. Khushali B Kathiriya
26
Key Stages in Digital Image Processing:
Morphological Processing
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
Prepared by: Prof. Khushali B Kathiriya
27
Key Stages in Digital Image Processing:
Segmentation
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
Prepared by: Prof. Khushali B Kathiriya
28
Key Stages in Digital Image Processing:
Object Recognition
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
Prepared by: Prof. Khushali B Kathiriya
29
Key Stages in Digital Image Processing:
Representation & Description
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
Prepared by: Prof. Khushali B Kathiriya
30
Key Stages in Digital Image Processing:
Image Compression
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
Prepared by: Prof. Khushali B Kathiriya
31
Key Stages in Digital Image Processing:
Colour Image Processing
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
Prepared by: Prof. Khushali B Kathiriya
32
Image Enhancement
PREPARED BY:
PROF. KHUSHALI B. KATHIRIYA
Key Stages in Digital Image Processing:
Image Aquisition
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
Prepared by: Prof. Khushali B Kathiriya
34
Key Stages in Digital Image Processing:
Image Enhancement
Image
Acquisition
Image
Restoration
Morphological
Processing
Segmentation
Representation
& Description
Image
Enhancement
Object
Recognition
Problem Domain
Colour Image
Processing
Image
Compression
Prepared by: Prof. Khushali B Kathiriya
35
A Note About Grey Levels
• So far when we have spoken about image grey level values we have said
they are in the range [0, 255]
• Where 0 is black and 255 is white
• There is no reason why we have to use this range
• The range [0,255] stems from display technologies
• For many of the image processing operations , grey levels are assumed
to be given in the range [0.0, 1.0]
Prepared by: Prof. Khushali B Kathiriya
36
What is a Digital Image? (Cont.)
Common image formats include:
• 1 sample per point (B&W or Grayscale)
• 3 samples per point (Red, Green, and Blue)
• 4 samples per point (Red, Green, Blue, and “Alpha”, a.k.a.
Opacity)
Prepared by: Prof. Khushali B Kathiriya
37
What Is Image Enhancement?
Image enhancement is the process of making images more useful
The reasons for doing this include:
• Highlighting interesting detail in images
• Removing noise from images
• Making images more visually appealing
Prepared by: Prof. Khushali B Kathiriya
38
Image Enhancement Examples
Prepared by: Prof. Khushali B Kathiriya
39
Image Enhancement Examples (cont…)
Prepared by: Prof. Khushali B Kathiriya
40
Image Enhancement Examples (cont…)
Prepared by: Prof. Khushali B Kathiriya
41
Image Enhancement Examples (cont…)
Prepared by: Prof. Khushali B Kathiriya
42
Spatial & Frequency Domains
There are two broad categories of image enhancement techniques
• Spatial domain techniques
• Direct manipulation of image pixels
• Frequency domain techniques
• Manipulation of Fourier transform or wavelet transform of an image
Prepared by: Prof. Khushali B Kathiriya
43
Image Enhancement
Image Histogram
PREPARED BY:
PROF. KHUSHALI B. KATHIRIYA
Image Histograms
• The histogram of an image shows us the distribution of grey levels in the
image
• Massively useful in image processing, especially in segmentation
Grey Levels
Frequencies
Prepared by: Prof. Khushali B Kathiriya
45
Histogram Examples
Prepared by: Prof. Khushali B Kathiriya
46
Histogram Examples (cont…)
Prepared by: Prof. Khushali B Kathiriya
47
Histogram Examples (cont…)
Prepared by: Prof. Khushali B Kathiriya
48
Histogram Examples (cont…)
Prepared by: Prof. Khushali B Kathiriya
49
Histogram Examples (cont…)
Prepared by: Prof. Khushali B Kathiriya
50
Histogram Examples (cont…)
Prepared by: Prof. Khushali B Kathiriya
51
Histogram Examples (cont…)
Prepared by: Prof. Khushali B Kathiriya
52
Histogram Examples (cont…)
Prepared by: Prof. Khushali B Kathiriya
53
Histogram Examples (cont…)
Prepared by: Prof. Khushali B Kathiriya
54
Histogram Examples (cont…)
Prepared by: Prof. Khushali B Kathiriya
55
Histogram Examples (cont…)
• A selection of images and
their histograms
• Notice the relationships
between the images and
their histograms
• Note that the high contrast
image has the most
evenly spaced histogram
Prepared by: Prof. Khushali B Kathiriya
56
Histogram Example
• Plot the histogram for following data.
Prepared by: Prof. Khushali B Kathiriya
57
Grey Level Number of Pixels
0 40
1 20
2 10
3 15
4 10
5 3
6 2
Histogram Example
• Calculate the probability of occurrence of the grey level (Probability Density
Functions)
Prepared by: Prof. Khushali B Kathiriya
58
Grey Level Number of
Pixels(nk)
P(rk) = nk/n
0 40
1 20
2 10
3 15
4 10
5 3
6 2
n=100
Histogram Example
• Calculate the probability of occurrence of the grey level (normalized histogram)
Prepared by: Prof. Khushali B Kathiriya
59
Grey Level Number of
Pixels(nk)
P(rk) = nk/n
0 40 0.4
1 20 0.2
2 10 0.1
3 15 0.15
4 10 0.1
5 3 0.03
6 2 0.02
n=100
Image Enhancement
Histogram Stretching
PREPARED BY:
PROF. KHUSHALI B. KATHIRIYA
Linear Stretching
• One way to increase the dynamic range is by using a technique
known as histogram stretching
• In this method , we do not alter the basic shape of the histogram ,
but we spread it so as to cover the entire dynamic range
Prepared by: Prof. Khushali B Kathiriya
61
• Smax -> Maximum grey level of output image
• Smin -> Minimum grey level of output image
• rmax -> Maximum grey level of input image
• rmin -> Minimum grey level of input image
Rmax - Rmin
Smax – Smin
s = T(r) = (R - Rmin) + Smin
Histogram Stretching : Example
• Perform histogram stretching so that new image has a dynamic range of [0,7]
Prepared by: Prof. Khushali B Kathiriya
62
Grey Level Number of Pixels
0 0
1 0
2 50
3 60
4 50
5 20
6 10
7 0
Histogram Stretching : Example
Prepared by: Prof. Khushali B Kathiriya
63
Histogram
Stretching
:
Example Prepared by: Prof. Khushali B Kathiriya
64
Histogram Stretching : Example
Prepared by: Prof. Khushali B Kathiriya
65
Histogram Stretching
• Modified histogram in the dynamic range of [0,7]
Prepared by: Prof. Khushali B Kathiriya
66
Grey Level Number of Pixels
0 50
1 0
2 60
3 0
4 50
5 20
6 0
7 10
Try out your self…
Histogram Stretching
• Modified histogram in the dynamic range of [0,7]
Prepared by: Prof. Khushali B Kathiriya
68
Grey Level Number of Pixels
0 100
1 90
2 85
3 70
4 0
5 0
6 0
7 0
Histogram Stretching
• Modified histogram in the dynamic range of [0,7]
Prepared by: Prof. Khushali B Kathiriya
69
Grey Level Number of Pixels
0 100
1 0
2 90
3 0
4 0
5 85
6 0
7 70
Image Enhancement
Histogram Equalisation
PREPARED BY:
PROF. KHUSHALI B. KATHIRIYA
Histogram Equalisation
• Spreading out the frequencies in an image (or equalising the image) is a simple
way to improve dark or washed out images
• The formula for histogram
equalisation is given where
• rk: input intensity
• sk: processed intensity
• k: the intensity range
(e.g 0.0 – 1.0)
• nj: the frequency of intensity j
• n: the sum of all frequencies
Prepared by: Prof. Khushali B Kathiriya
71
)
( k
k r
T
s =

=
=
k
j
j
r r
p
1
)
(

=
=
k
j
j
n
n
1
Equalisation Transformation Function
Prepared by: Prof. Khushali B Kathiriya
72
Equalisation Examples 1
Prepared by: Prof. Khushali B Kathiriya
73
Equalisation Examples
2
Prepared by: Prof. Khushali B Kathiriya
74
Equalisation Examples (cont…)
3
4
Prepared by: Prof. Khushali B Kathiriya
75
Histogram Equalization
• Histogram--->PDF --- > CDF --- > Equalized
histogram
• CDF – cumulative density function

=
=
r
r
k
k r
p
r
T
S
0
)
(
)
(
Prepared by: Prof. Khushali B Kathiriya
76
Equalize the given histogram
Grey
Level
Number
of
Pixels(nk)
PDF
P(rk) =
nk/n
CDF (L-1)*Sk Round
off
0 790
1 1023
2 850
3 656
4 329
5 245
6 122
7 81
4096
Prepared by: Prof. Khushali B Kathiriya
77
Equalize the given histogram
Grey
Level
Number
of
Pixels(nk)
PDF
P(rk) =
nk/n
CDF
Sk =
(L-1)*Sk Round
off
0 790 0.19
1 1023 0.25
2 850 0.21
3 656 0.16
4 329 0.08
5 245 0.06
6 122 0.03
7 81 0.02
4096

r
r r
p
0
)
(
Prepared by: Prof. Khushali B Kathiriya
78
Equalize the given histogram
Grey
Level
Number
of
Pixels(nk)
PDF
P(rk) =
nk/n
CDF
Sk =
(L-1)*Sk Round
off
0 790 0.19 0.19
1 1023 0.25 0.44
2 850 0.21 0.65
3 656 0.16 0.81
4 329 0.08 0.89
5 245 0.06 0.95
6 122 0.03 0.98
7 81 0.02 1
4096

r
r r
p
0
)
(
Prepared by: Prof. Khushali B Kathiriya
79
Equalize the given histogram
Grey
Level
Number
of
Pixels(nk)
PDF
P(rk) =
nk/n
CDF
Sk =
(L-1)*Sk Round
off
0 790 0.19 0.19 1.33 1
1 1023 0.25 0.44 3.08 3
2 850 0.21 0.65 4.55 5
3 656 0.16 0.81 5.67 6
4 329 0.08 0.89 6.23 6
5 245 0.06 0.95 6.65 7
6 122 0.03 0.98 6.86 7
7 81 0.02 1 7 7
4096

r
r r
p
0
)
(
Prepared by: Prof. Khushali B Kathiriya
80
Equalized Grey Level
Grey Level Old Number of
Pixels
New Number of
Pixels
0 790 0
1 1023 790
2 850 0
3 656 1023
4 329 0
5 245 850
6 122 656+329 = 985
7 81 245+122+81 = 448
Prepared by: Prof. Khushali B Kathiriya
81
Grey
Level
Round
off
0 1
1 3
2 5
3 6
4 6
5 7
6 7
7 7
Histogram Equalization
Prepared by: Prof. Khushali B Kathiriya
82
Satelite Origional Image
Prepared by: Prof. Khushali B Kathiriya
83
Histogram Equalized Image
Prepared by: Prof. Khushali B Kathiriya
84
Try out your self
(Equalize the given histogram)
Grey Level Number of Pixels
0 100
1 90
2 50
3 20
4 0
5 0
6 0
7 0
Prepared by: Prof. Khushali B Kathiriya
85
Try out your self
(Equalize the given histogram)
Prepared by: Prof. Khushali B Kathiriya
86
Noise Removal and Blurring
PREPARED BY:
PROF. KHUSHALI B. KATHIRIYA
What is Image Restoration?
• Image restoration attempts to restore images that have been degraded
• Identify the degradation process and attempt to reverse it
• Similar to image enhancement, but more objective
Prepared by: Prof. Khushali B Kathiriya
88
Image restoration vs. image enhancement
• Enhancement:
• largely a subjective process
• Priori knowledge about the degradation is not a must (sometimes no
degradation is involved)
• Procedures are heuristic and take advantage of the psychophysical aspects of
human visual system
• Restoration:
• more an objective process
• Images are degraded
• Tries to recover the images by using the knowledge about the degradation
Prepared by: Prof. Khushali B Kathiriya
89
Noise and Images
• The sources of noise in digital images arise
during image acquisition (digitization) and
transmission
• Imaging sensors can be affected by ambient
conditions
• Interference can be added
to an image during transmission
Prepared by: Prof. Khushali B Kathiriya
90
Noise Model
• We can consider a noisy image to be modelled as follows:
• where f(x, y) is the original image pixel, η(x, y) is the noise term and g(x, y) is
the resulting noisy pixel
• If we can estimate the model the noise in an image is based on this will help us
to figure out how to restore the image
)
,
(
)
,
(
)
,
( y
x
y
x
f
y
x
g 
+
=
Prepared by: Prof. Khushali B Kathiriya
91
Noise Models
Gaussian Rayleigh
Erlang Exponential
Uniform
Impulse
There are many different models for the
image
noise term η(x, y):
• Gaussian
• Most common model
• Rayleigh
• Erlang
• Exponential
• Uniform
• Impulse
• Salt and pepper noise
Prepared by: Prof. Khushali B Kathiriya
93
Noise Example
• The test pattern to the right is ideal for
demonstrating the addition of noise
• The following slides will show the result of
adding noise based on various models to this
image
Histogram to go here
Image
Histogram
Prepared by: Prof. Khushali B Kathiriya
94
Noise Example (cont…)
Gaussian Rayleigh Erlang
Prepared by: Prof. Khushali B Kathiriya
95
Noise Example (cont…)
Exponential Uniform Impulse
Histogram to go here
Prepared by: Prof. Khushali B Kathiriya
96
Noise Removal
Arithmetic Mean Filter
PREPARED BY:
PROF. KHUSHALI B. KATHIRIYA
Filtering to Remove Noise: Arithmetic Mean Filter
• We can use spatial filters of different kinds to remove different kinds of noise
• The arithmetic mean filter is a very simple one and is calculated as follows:
This is implemented as the
simple smoothing filter
Blurs the image to remove
noise


=
xy
S
t
s
t
s
g
mn
y
x
f
)
,
(
)
,
(
1
)
,
(
ˆ
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
Prepared by: Prof. Khushali B Kathiriya
98
Other Means
There are different kinds of mean filters all of which exhibit slightly different
behaviour:
• Geometric Mean
• Harmonic Mean
• Contraharmonic Mean
Prepared by: Prof. Khushali B Kathiriya
99
Other Means (cont…)
• There are other variants on the mean which can give different performance
• Geometric Mean:
• Achieves similar smoothing to the arithmetic mean, but tends to lose less image
detail
mn
S
t
s xy
t
s
g
y
x
f
1
)
,
(
)
,
(
)
,
(
ˆ








= 

Prepared by: Prof. Khushali B Kathiriya
100
Other Means (cont…)
Harmonic Mean:
• Works well for salt noise, but fails for pepper noise
• Also does well for other kinds of noise such as Gaussian noise


=
xy
S
t
s t
s
g
mn
y
x
f
)
,
( )
,
(
1
)
,
(
ˆ
Prepared by: Prof. Khushali B Kathiriya
101
Other Means (cont…)
• Contraharmonic Mean:
• Q is the order of the filter and adjusting its value changes the filter’s behaviour
• Positive values of Q eliminate pepper noise
• Negative values of Q eliminate salt noise




+
=
xy
xy
S
t
s
Q
S
t
s
Q
t
s
g
t
s
g
y
x
f
)
,
(
)
,
(
1
)
,
(
)
,
(
)
,
(
ˆ
Prepared by: Prof. Khushali B Kathiriya
102
Noise Removal Examples
Original
Image
Image
Corrupted
By Gaussian
Noise
After A 3*3
Geometric
Mean Filter
After A 3*3
Arithmetic
Mean Filter
Prepared by: Prof. Khushali B Kathiriya
103
Noise Removal Examples (cont…)
Image
Corrupted
By Pepper
Noise
Result of
Filtering Above
With 3*3
Contraharmonic
Q=1.5
Prepared by: Prof. Khushali B Kathiriya
104
Noise Removal Examples (cont…)
Image
Corrupted
By Salt
Noise
Result of
Filtering Above
With 3*3
Contraharmonic
Q=-1.5
Prepared by: Prof. Khushali B Kathiriya
105
Contraharmonic Filter: Here Be Dragons
Choosing the wrong value for Q when using the contraharmonic filter can have
drastic results
Prepared by: Prof. Khushali B Kathiriya
106
Noise Removal
Order Statistics Filters
PREPARED BY:
PROF. KHUSHALI B. KATHIRIYA
Order Statistics Filters
• Spatial filters that are based on ordering the pixel values that make up the
neighbourhood operated on by the filter
• Useful spatial filters include
• Median filter
• Max and min filter
• Midpoint filter
• Alpha trimmed mean filter
Prepared by: Prof. Khushali B Kathiriya
108
Median Filter
• Median Filter:
• Excellent at noise removal, without the smoothing effects that can occur with
other smoothing filters
• Particularly good when salt and pepper noise is present
)}
,
(
{
)
,
(
ˆ
)
,
(
t
s
g
median
y
x
f
xy
S
t
s 
=
Prepared by: Prof. Khushali B Kathiriya
109
Max and Min Filter
Max Filter:
Min Filter:
Max filter is good for pepper noise and min is good for salt noise
)}
,
(
{
max
)
,
(
ˆ
)
,
(
t
s
g
y
x
f
xy
S
t
s 
=
)}
,
(
{
min
)
,
(
ˆ
)
,
(
t
s
g
y
x
f
xy
S
t
s 
=
Prepared by: Prof. Khushali B Kathiriya
110
Midpoint Filter
Midpoint Filter:
Good for random Gaussian and uniform noise





 +
=


)}
,
(
{
min
)}
,
(
{
max
2
1
)
,
(
ˆ
)
,
(
)
,
(
t
s
g
t
s
g
y
x
f
xy
xy S
t
s
S
t
s
Prepared by: Prof. Khushali B Kathiriya
111
Alpha-Trimmed Mean Filter
• Alpha-Trimmed Mean Filter:
• We can delete the d/2 lowest and d/2 highest grey levels
• So gr(s, t) represents the remaining mn – d pixels


−
=
xy
S
t
s
r t
s
g
d
mn
y
x
f
)
,
(
)
,
(
1
)
,
(
ˆ
Prepared by: Prof. Khushali B Kathiriya
112
Noise Removal Examples
Image
Corrupted
By Salt And
Pepper Noise
Result of 1
Pass With A
3*3 Median
Filter
Result of 2
Passes With
A 3*3 Median
Filter
Result of 3
Passes With
A 3*3 Median
Filter
Prepared by: Prof. Khushali B Kathiriya
113
Noise Removal Examples (cont…)
Image
Corrupted
By Pepper
Noise
Image
Corrupted
By Salt
Noise
Result Of
Filtering
Above
With A 3*3
Min Filter
Result Of
Filtering
Above
With A 3*3
Max Filter
Prepared by: Prof. Khushali B Kathiriya
114
Noise Removal Examples (cont…)
Image
Corrupted
By Uniform
Noise
Image Further
Corrupted
By Salt and
Pepper Noise
Filtered By
5*5 Arithmetic
Mean Filter
Filtered By
5*5 Median
Filter
Filtered By
5*5 Geometric
Mean Filter
Filtered By
5*5 Alpha-Trimmed
Mean Filter
Prepared by: Prof. Khushali B Kathiriya
115
Periodic Noise
• Typically arises due to
electrical or electromagnetic
interference
• Gives rise to regular noise
patterns in an image
• Frequency domain techniques
in the Fourier domain are
most effective at removing
periodic noise
Prepared by: Prof. Khushali B Kathiriya
116
Band Reject Filters
•Removing periodic noise from an image involves
removing a particular range of frequencies from
that image
•Band reject filters can be used for this purpose
•An ideal band reject filter is given as follows:









+

+


−
−

=
2
)
,
(
1
2
)
,
(
2
0
2
)
,
(
1
)
,
(
0
0
0
0
W
D
v
u
D
if
W
D
v
u
D
W
D
if
W
D
v
u
D
if
v
u
H
Prepared by: Prof. Khushali B Kathiriya
117
Band Reject Filters (cont…)
• The ideal band reject filter is shown below, along with Butterworth and Gaussian
versions of the filter
Ideal Band
Reject Filter
Butterworth
Band Reject
Filter (of order 1)
Gaussian
Band Reject
Filter
Prepared by: Prof. Khushali B Kathiriya
118
Band Reject Filter Example
Image corrupted
by sinusoidal
noise
Fourier spectrum
of corrupted
image
Butterworth band
reject filter
Filtered image
Prepared by: Prof. Khushali B Kathiriya
119
Adaptive Filters
• The filters discussed so far are applied to an entire image without any regard
for how image characteristics vary from one point to another
• The behaviour of adaptive filters changes depending on the characteristics of
the image inside the filter region
• We will take a look at the adaptive median filter
Prepared by: Prof. Khushali B Kathiriya
120
Adaptive Median Filtering
• The median filter performs relatively well on impulse noise as long as the
spatial density of the impulse noise is not large
• The adaptive median filter can handle much more spatially dense impulse
noise, and also performs some smoothing for non-impulse noise
• The key insight in the adaptive median filter is that the filter size changes
depending on the characteristics of the image
Prepared by: Prof. Khushali B Kathiriya
121
Adaptive Median Filtering (cont…)
Remember that filtering looks at each original pixel image in turn and generates a new filtered
pixel
First examine the following notation:
• zmin = minimum grey level in Sxy
• zmax = maximum grey level in Sxy
• zmed = median of grey levels in Sxy
• zxy = grey level at coordinates (x, y)
• Smax =maximum allowed size of Sxy
Prepared by: Prof. Khushali B Kathiriya
122
Adaptive Median Filtering (cont…)
Level A: A1 = zmed – zmin
A2 = zmed – zmax
If A1 > 0 and A2 < 0, Go to level B
Else increase the window size
If window size ≤ Smax repeat level A
Else output zmed
Level B: B1 = zxy – zmin
B2 = zxy – zmax
If B1 > 0 and B2 < 0, output zxy
Else output zmed
Prepared by: Prof. Khushali B Kathiriya
123
Adaptive Median Filtering (cont…)
The key to understanding the algorithm is to remember that the adaptive median
filter has three purposes:
• Remove impulse noise
• Provide smoothing of other noise
• Reduce distortion
Prepared by: Prof. Khushali B Kathiriya
124
Adaptive Filtering Example
Image corrupted by salt
and pepper noise with
probabilities Pa = Pb=0.25
Result of filtering with a
7 * 7 median filter
Result of adaptive
median filtering with i = 7
Prepared by: Prof. Khushali B Kathiriya
125
Summary
• Restoration is slightly more objective than enhancement
• Spatial domain techniques are particularly useful for removing random
noise
• Frequency domain techniques are particularly useful for removing
periodic noise
Prepared by: Prof. Khushali B Kathiriya
126
Filtering
PREPARED BY:
PROF. KHUSHALI B. KATHIRIYA
Contents
In this lecture we will look at spatial filtering techniques:
• Neighbourhood operations
• What is spatial filtering?
• Smoothing operations
• What happens at the edges?
• Correlation and convolution
Prepared by: Prof. Khushali B Kathiriya
128
Neighbourhood Operations
• Neighbourhood operations simply operate on a larger neighbourhood of pixels
than point operations
• Neighbourhoods are
mostly a rectangle
around a central pixel
• Any size rectangle
and any shape filter
are possible
Origin x
y Image f (x, y)
(x, y)
Neighbourhood
Prepared by: Prof. Khushali B Kathiriya
129
Simple Neighbourhood Operations
Some simple neighbourhood operations include:
• Min: Set the pixel value to the minimum in the neighbourhood
• Max: Set the pixel value to the maximum in the neighbourhood
• Median: The median value of a set of numbers is the midpoint value in that set (e.g.
from the set [1, 7, 15, 18, 24] 15 is the median). Sometimes the median works better
than the average
Prepared by: Prof. Khushali B Kathiriya
130
Simple Neighbourhood Operations Example
123 127 128 119 115 130
140 145 148 153 167 172
133 154 183 192 194 191
194 199 207 210 198 195
164 170 175 162 173 151
Original Image x
y
Enhanced Image x
y
Prepared by: Prof. Khushali B Kathiriya
131
The Spatial Filtering Process
r s t
u v w
x y z
Origin x
y Image f (x, y)
eprocessed = v*e +
r*a + s*b + t*c +
u*d + w*f +
x*g + y*h + z*i
Filter
Simple 3*3
Neighbourhood
e 3*3 Filter
a b c
d e f
g h i
Original Image
Pixels
*
The above is repeated for every pixel in the original image to generate the
filtered image
Prepared by: Prof. Khushali B Kathiriya
132
Spatial Filtering: Equation Form

−
= −
=
+
+
=
a
a
s
b
b
t
t
y
s
x
f
t
s
w
y
x
g )
,
(
)
,
(
)
,
(
Filtering can be given in
equation form as shown
above
Notations are based on the
image shown to the left
Prepared by: Prof. Khushali B Kathiriya
133
Smoothing Spatial Filters
One of the simplest spatial filtering operations we can perform is a smoothing
operation
• Simply average all of the pixels in a neighbourhood around a central value
• Especially useful
in removing noise
from images
• Also useful for
highlighting gross
detail
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
Simple
averaging
filter
(Box filter)
Prepared by: Prof. Khushali B Kathiriya
134
Smoothing Spatial Filtering
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
Origin x
y Image f (x, y)
e = 1/9*106 +
1/9*104 + 1/9*100 + 1/9*108 +
1/9*99 + 1/9*98 +
1/9*95 + 1/9*90 + 1/9*85
= 98.3333
Filter
Simple 3*3
Neighbourhood
106
104
99
95
100 108
98
90 85
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
1/9
3*3 Smoothing
Filter
104 100 108
99 106 98
95 90 85
Original Image
Pixels
*
The above is repeated for every pixel in the original image to generate the
smoothed image
Prepared by: Prof. Khushali B Kathiriya
135
Image Smoothing Example
• The image at the top left
is an original image of
size 500*500 pixels
• The subsequent images
show the image after
filtering with an averaging
filter of increasing sizes
• 3, 5, 9, 15 and 35
• Notice how detail begins
to disappear
Prepared by: Prof. Khushali B Kathiriya
136
Correlation
• The equation of correlation is defined as follows :
• It performs dot product between weights and function
Prepared by: Prof. Khushali B Kathiriya
137
a b
s a t b
g( x,y ) ω( s,t ) f ( x s,y t )
g ω f
=− =−
= + +
=
 
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2 5
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
1
2
1
-2
4
1
-1
-1
1
1
1
1
-1
2
1
-1
-1
1
Input Image, f
output
Image, g
Correlation
Prepared by: Prof. Khushali B Kathiriya
138
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2 10
5
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
3
1
2
-2
4
2
-1
-1
1
1
1
1
-1
2
1
-1
-1
1
Input Image, f
output
Image, g
Correlation
Prepared by: Prof. Khushali B Kathiriya
139
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2 10 10
5
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
3
3
1
-3
4
2
-1
-1
1
1
1
1
-1
2
1
-1
-1
1
Input Image, f
output
Image, g
Correlation
Prepared by: Prof. Khushali B Kathiriya
140
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2 10 10 15
5
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
1
3
3
-1
6
2
-1
-1
1
1
1
1
-1
2
1
-1
-1
1
Input Image, f
output
Image, g
Correlation
Prepared by: Prof. Khushali B Kathiriya
141
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2 10 10
3
15
5
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
2
2
1
-1
4
1
-2
-2
1
1
1
1
-1
2
1
-1
-1
1
Input Image, f
output
Image, g
Correlation
Prepared by: Prof. Khushali B Kathiriya
142
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
4
10 10
3
15
5
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
1
2
2
-3
2
2
-2
-2
2
1
1
1
-1
2
1
-1
-1
1
Input Image, f
output
Image, g
Correlation
Prepared by: Prof. Khushali B Kathiriya
143
4
11
4
10
4
4
6
10
11
3
5
-5
9
7
15
5
Final output Image, g
Correlation
Prepared by: Prof. Khushali B Kathiriya
144
Weighted Smoothing Filters
• More effective smoothing filters can be generated by allowing different pixels in
the neighbourhood different weights in the averaging function
• Pixels closer to the
central pixel are more
important
• Often referred to as a
weighted averaging
1/16
2/16
1/16
2/16
4/16
2/16
1/16
2/16
1/16
Weighted
averaging filter
Prepared by: Prof. Khushali B Kathiriya
145
Another Smoothing Example
By smoothing the original image we get rid of lots of the finer detail
which leaves only the gross features for thresholding
Original Image Smoothed Image Thresholded Image
Prepared by: Prof. Khushali B Kathiriya
146
Averaging Filter Vs. Median Filter Example
• Filtering is often used to remove noise from images
• Sometimes a median filter works better than an averaging filter
Original Image
With Noise
Image After
Averaging Filter
Image After
Median Filter
Prepared by: Prof. Khushali B Kathiriya
147
Averaging Filter Vs. Median Filter Example
Prepared by: Prof. Khushali B Kathiriya
148
Averaging Filter Vs. Median Filter Example
Prepared by: Prof. Khushali B Kathiriya
149
Averaging Filter Vs. Median Filter Example
Prepared by: Prof. Khushali B Kathiriya
150
Simple Neighbourhood Operations Example
123 127 128 119 115 130
140 145 148 153 167 172
133 154 183 192 194 191
194 199 207 210 198 195
164 170 175 162 173 151
x
y
Prepared by: Prof. Khushali B Kathiriya
151
Strange Things Happen At The Edges!
Origin x
y Image f (x, y)
e
e
e
e
• At the edges of an image we are missing pixels to form a neighbourhood
e e
e
Prepared by: Prof. Khushali B Kathiriya
152
Strange Things Happen At The Edges! (cont…)
There are a few approaches to dealing with missing edge pixels:
• Omit missing pixels
• Only works with some filters
• Can add extra code and slow down processing
• Pad the image
• Typically with either all white or all black pixels
• Replicate border pixels
• Truncate the image
• Allow pixels wrap around the image
• Can cause some strange image artefacts
Prepared by: Prof. Khushali B Kathiriya
153
Simple Neighbourhood Operations Example
123 127 128 119 115 130
140 145 148 153 167 172
133 154 183 192 194 191
194 199 207 210 198 195
164 170 175 162 173 151
x
y
Prepared by: Prof. Khushali B Kathiriya
154
Strange Things Happen At The Edges! (cont…)
Original
Image
Filtered Image:
Zero Padding
Filtered Image:
Replicate Edge Pixels
Filtered Image:
Wrap Around Edge Pixels
Correlation & Convolution
• The filtering we have been talking about so far is referred to as
correlation with the filter itself referred to as the correlation kernel
• Convolution is a similar operation, with just one subtle difference
• For symmetric filters it makes no difference
eprocessed = v*e +
z*a + y*b + x*c +
w*d + u*e +
t*f + s*g + r*h
r s t
u v w
x y z
Filter
a b c
d e e
f g h
Original Image
Pixels
*
Prepared by: Prof. Khushali B Kathiriya
156
Convolution
• The equation of correlation is defined as follows :
• It performs cross product between weights and function
Prepared by: Prof. Khushali B Kathiriya
157
a b
s a t b
g( x,y ) ω( s,t ) f ( x s,y t )
g ω f
=− =−
= − −
= 
 
Convolution
Prepared by: Prof. Khushali B Kathiriya
158
1 -1 -1
1 2 -1
1 1 1
2 2 2 3
2 1 3 3
2 2 1 2
1 3 2 2
Rotate 180o
1
-1
-1
1
2
-1
1
1
1
Convolution kernel, ω
Convolution
Input Image, f
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2 5
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
1
-2
-1
2
4
-1
1
1
1
1
-1
-1
1
2
-1
1
1
1
Output
Image, g
Prepared by: Prof. Khushali B Kathiriya
159
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2 4
5
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
3
-1
-2
2
4
-2
1
1
1
1
-1
-1
1
2
-1
1
1
1
Input Image, f
Output
Image, g
Convolution
Prepared by: Prof. Khushali B Kathiriya
160
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2 4 4
5
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
3
-3
-1
3
4
-2
1
1
1
1
-1
-1
1
2
-1
1
1
1
Input Image, f
Output
Image, g
Convolution
Prepared by: Prof. Khushali B Kathiriya
161
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2 4 4 -2
5
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
1
-3
-3
1
6
-2
1
1
1
1
-1
-1
1
2
-1
1
1
1
Input Image, f
Output
Image, g
Convolution
Prepared by: Prof. Khushali B Kathiriya
162
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2 4 4
9
-2
5
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
2
-2
-1
1
4
-1
2
2
1
1
-1
-1
1
2
-1
1
1
1
Input Image, f
Output
Image, g
Convolution
Prepared by: Prof. Khushali B Kathiriya
163
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
6
4 4
9
-2
5
3
2
1
2
2
1
3
2
3
2
2
1
2
2
3
2
1
-2
-2
3
2
-2
2
2
2
1
-1
-1
1
2
-1
1
1
1
Input Image, f
Output
Image, g
Convolution
Prepared by: Prof. Khushali B Kathiriya
164
12
7
6
4
8
6
14
4
5
9
5
9
5
11
-2
5
Final output Image, g
Convolution
Prepared by: Prof. Khushali B Kathiriya
165
Image Enhancement
Fourier transformation
PREPARED BY:
PROF. KHUSHALI B. KATHIRIYA
Filter and Frequency
• Frequency – The number of times that a periodic function repeats the same
sequence of values during a unit variation of the independent variable.
• Filter – A device or material for suppressing or minimizing waves or oscillations
of certain frequencies.
Prepared by: Prof. Khushali B Kathiriya
167
The Big Idea
=
• Any function that periodically repeats itself can be
expressed as a sum of sines and cosines of
different frequencies each multiplied by a different
coefficient – a Fourier series
Prepared by: Prof. Khushali B Kathiriya
168
The Big Idea (cont…)
Notice how we get closer and closer to the original function as we add more
and more frequencies
Prepared by: Prof. Khushali B Kathiriya
169
The Big Idea (cont…) Frequency
domain signal
processing
example in Excel
Prepared by: Prof. Khushali B Kathiriya
170
Complex Numbers
• A complex number, C, is defined as
C = R + jI,
where R is real number & I is Imaginary number equal to the square root of
-1.
ie. j = 1
−
Prepared by: Prof. Khushali B Kathiriya
171
The Discrete Fourier Transform (DFT)
• The Discrete Fourier Transform of f(x, y), for x = 0, 1, 2…M-1 and y = 0,1,2…N-1,
denoted by F(u, v), is given by the equation:
for u = 0, 1, 2…M-1 and v = 0, 1, 2…N-1.

−
=
−
=
+
−
=
1
0
1
0
)
/
/
(
2
)
,
(
)
,
(
M
x
N
y
N
vy
M
ux
j
e
y
x
f
v
u
F 
Prepared by: Prof. Khushali B Kathiriya
172
DFT & Images
• The DFT of a two dimensional image can be visualised by showing the
spectrum of the image component frequencies
DFT
Prepared by: Prof. Khushali B Kathiriya
173
DFT & Images
Prepared by: Prof. Khushali B Kathiriya
174
DFT & Images
Prepared by: Prof. Khushali B Kathiriya
175
DFT & Images (cont…)
DFT
Scanning electron microscope
image of an integrated circuit
magnified ~2500 times
Fourier spectrum of the image
Prepared by: Prof. Khushali B Kathiriya
176
DFT & Images (cont…)
Prepared by: Prof. Khushali B Kathiriya
177
DFT & Images (cont…)
Prepared by: Prof. Khushali B Kathiriya
178
The Inverse DFT
• It is really important to note that the Fourier transform is completely reversible
• The inverse DFT is given by:
for x = 0, 1, 2…M-1 and y = 0, 1, 2…N-1

−
=
−
=
+
=
1
0
1
0
)
/
/
(
2
)
,
(
1
)
,
(
M
u
N
v
N
vy
M
ux
j
e
v
u
F
MN
y
x
f 
Prepared by: Prof. Khushali B Kathiriya
179
The DFT and Image Processing
To filter an image in the frequency domain:
1. Compute F(u,v) the DFT of the image
2. Multiply F(u,v) by a filter function H(u,v)
3. Compute the inverse DFT of the result
Prepared by: Prof. Khushali B Kathiriya
180
Some Basic Frequency Domain Filters
Low Pass Filter
High Pass Filter
Prepared by: Prof. Khushali B Kathiriya
181
Frequency Domain Methods
Spatial Domain Frequency Domain
Prepared by: Prof. Khushali B Kathiriya
182
Major filter categories
• Typically, filters are classified by examining their
properties in the frequency domain:
(1) Low-pass
(2) High-pass
(3) Band-pass
(4) Band-stop
Prepared by: Prof. Khushali B Kathiriya
183
Example
Original signal
Low-pass filtered
High-pass filtered
Band-pass filtered
Band-stop filtered
Prepared by: Prof. Khushali B Kathiriya
184
Low-pass filters
(i.e., smoothing filters)
• Preserve low frequencies - useful for noise suppression
frequency domain time domain
Example:
Prepared by: Prof. Khushali B Kathiriya
185
High-pass filters
(i.e., sharpening filters)
• Preserves high frequencies - useful for edge detection
frequency
domain
time
domain
Example:
Prepared by: Prof. Khushali B Kathiriya
186
Band-pass filters
• Preserves frequencies within a certain band
frequency
domain
time
domain
Example:
Prepared by: Prof. Khushali B Kathiriya
187
Band-stop filters
• How do they look like?
Band-pass Band-stop
Prepared by: Prof. Khushali B Kathiriya
188
Frequency Domain Methods
Case 1: H(u,v) is specified in
the frequency domain.
Case 2: h(x,y) is specified in
the spatial domain.
(real)
Prepared by: Prof. Khushali B Kathiriya
189
Frequency domain filtering: steps
F(u,v) = R(u,v) + jI(u,v)
Prepared by: Prof. Khushali B Kathiriya
190
Frequency domain filtering: steps (cont’d)
G(u,v)= F(u,v)H(u,v) = H(u,v) R(u,v) + jH(u,v)I(u,v)
(Case 1)
Prepared by: Prof. Khushali B Kathiriya
191
Example
f(x,y) fp(x,y) fp(x,y)(-1)x+y
F(u,v)
H(u,v) - centered G(u,v)=F(u,v)H(u,v)
g(x,y)
gp(x,y)
Prepared by: Prof. Khushali B Kathiriya
192

More Related Content

What's hot

Texture By Priyanka Chauhan
Texture By Priyanka ChauhanTexture By Priyanka Chauhan
Texture By Priyanka Chauhan
Priyanka Chauhan
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image Segmentation
Mostafa G. M. Mostafa
 
Computer Vision with Deep Learning
Computer Vision with Deep LearningComputer Vision with Deep Learning
Computer Vision with Deep Learning
Capgemini
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
asodariyabhavesh
 
Segmentation
SegmentationSegmentation
Segmentation
guest49d49
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
Poonam Seth
 
Image segmentation 2
Image segmentation 2 Image segmentation 2
Image segmentation 2
Rumah Belajar
 
Lec10: Medical Image Segmentation as an Energy Minimization Problem
Lec10: Medical Image Segmentation as an Energy Minimization ProblemLec10: Medical Image Segmentation as an Energy Minimization Problem
Lec10: Medical Image Segmentation as an Energy Minimization Problem
Ulaş Bağcı
 
Image segmentation with deep learning
Image segmentation with deep learningImage segmentation with deep learning
Image segmentation with deep learning
Antonio Rueda-Toicen
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
Gayan Sampath
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
A B Shinde
 
Introduction of image processing
Introduction of image processingIntroduction of image processing
Introduction of image processing
Avani Shah
 
Filtering an image is to apply a convolution
Filtering an image is to apply a convolutionFiltering an image is to apply a convolution
Filtering an image is to apply a convolution
Abhishek Mukherjee
 
Digital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainDigital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency Domain
Mostafa G. M. Mostafa
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
Md Shabir Alam
 
Super resolution
Super resolutionSuper resolution
Super resolution
Federico D'Amato
 
Morphological operations
Morphological operationsMorphological operations
Image segmentation
Image segmentationImage segmentation
Image segmentation
Bulbul Agrawal
 
Lec8: Medical Image Segmentation (II) (Region Growing/Merging)
Lec8: Medical Image Segmentation (II) (Region Growing/Merging)Lec8: Medical Image Segmentation (II) (Region Growing/Merging)
Lec8: Medical Image Segmentation (II) (Region Growing/Merging)
Ulaş Bağcı
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
University of Potsdam
 

What's hot (20)

Texture By Priyanka Chauhan
Texture By Priyanka ChauhanTexture By Priyanka Chauhan
Texture By Priyanka Chauhan
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image Segmentation
 
Computer Vision with Deep Learning
Computer Vision with Deep LearningComputer Vision with Deep Learning
Computer Vision with Deep Learning
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Segmentation
SegmentationSegmentation
Segmentation
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Image segmentation 2
Image segmentation 2 Image segmentation 2
Image segmentation 2
 
Lec10: Medical Image Segmentation as an Energy Minimization Problem
Lec10: Medical Image Segmentation as an Energy Minimization ProblemLec10: Medical Image Segmentation as an Energy Minimization Problem
Lec10: Medical Image Segmentation as an Energy Minimization Problem
 
Image segmentation with deep learning
Image segmentation with deep learningImage segmentation with deep learning
Image segmentation with deep learning
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Introduction of image processing
Introduction of image processingIntroduction of image processing
Introduction of image processing
 
Filtering an image is to apply a convolution
Filtering an image is to apply a convolutionFiltering an image is to apply a convolution
Filtering an image is to apply a convolution
 
Digital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainDigital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency Domain
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Super resolution
Super resolutionSuper resolution
Super resolution
 
Morphological operations
Morphological operationsMorphological operations
Morphological operations
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Lec8: Medical Image Segmentation (II) (Region Growing/Merging)
Lec8: Medical Image Segmentation (II) (Region Growing/Merging)Lec8: Medical Image Segmentation (II) (Region Growing/Merging)
Lec8: Medical Image Segmentation (II) (Region Growing/Merging)
 
Spatial domain and filtering
Spatial domain and filteringSpatial domain and filtering
Spatial domain and filtering
 

Similar to CV_2 Image Processing

Lec_1_Introduction.pdf
Lec_1_Introduction.pdfLec_1_Introduction.pdf
Lec_1_Introduction.pdf
nagwaAboElenein
 
Lec_1_Introduction.pdf
Lec_1_Introduction.pdfLec_1_Introduction.pdf
Lec_1_Introduction.pdf
nagwaAboElenein
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
Sahil Biswas
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
Muhammad Taha Sikander
 
Digital Image Processing_ ch1 introduction-2003
Digital Image Processing_ ch1 introduction-2003Digital Image Processing_ ch1 introduction-2003
Digital Image Processing_ ch1 introduction-2003
Malik obeisat
 
ImageProcessing1-Introduction.ppt
ImageProcessing1-Introduction.pptImageProcessing1-Introduction.ppt
ImageProcessing1-Introduction.ppt
NiharikaDubey17
 
Basics of digital image processing
Basics of digital image  processingBasics of digital image  processing
Basics of digital image processing
zahid6
 
1_unit-1.1_Introduction to DIP.pptx
1_unit-1.1_Introduction to DIP.pptx1_unit-1.1_Introduction to DIP.pptx
1_unit-1.1_Introduction to DIP.pptx
BUCHUPALLIVIMALAREDD2
 
Image processing
Image processingImage processing
Image processing
NIYITEGEKA innocent
 
ImageProcessing1-Introduction.ppt
ImageProcessing1-Introduction.pptImageProcessing1-Introduction.ppt
ImageProcessing1-Introduction.ppt
RishiJain193179
 
Digital image processing using matlab
Digital image processing using matlab Digital image processing using matlab
Digital image processing using matlab
Amr Rashed
 
Image processing1 introduction
Image processing1 introductionImage processing1 introduction
Image processing1 introduction
Shingrakhia Hansa
 
1. digital image processing
1. digital image processing1. digital image processing
1. digital image processing
vilasini rvr
 
Digital Image Processing: An Introduction
Digital Image Processing: An IntroductionDigital Image Processing: An Introduction
Digital Image Processing: An Introduction
Mostafa G. M. Mostafa
 
Image processing1 introduction (1)
Image processing1 introduction (1)Image processing1 introduction (1)
Image processing1 introduction (1)
SantoshNemade2
 
Imagine camp, Developing Image Processing app for windows phone platform
Imagine camp, Developing Image Processing app for windows phone platformImagine camp, Developing Image Processing app for windows phone platform
Imagine camp, Developing Image Processing app for windows phone platform
Rahat Yasir
 
ARKA RAJ SAHA-27332020003..pptx
ARKA RAJ SAHA-27332020003..pptxARKA RAJ SAHA-27332020003..pptx
ARKA RAJ SAHA-27332020003..pptx
Adharchandsaha
 
Presentation on Digital Image Processing
Presentation on Digital Image ProcessingPresentation on Digital Image Processing
Presentation on Digital Image Processing
Salim Hosen
 
mca.pptx
mca.pptxmca.pptx
mca.pptx
ssuser4bbfb1
 
Dip unit-i-ppt academic year(2016-17)
Dip unit-i-ppt academic year(2016-17)Dip unit-i-ppt academic year(2016-17)
Dip unit-i-ppt academic year(2016-17)
RagavanK6
 

Similar to CV_2 Image Processing (20)

Lec_1_Introduction.pdf
Lec_1_Introduction.pdfLec_1_Introduction.pdf
Lec_1_Introduction.pdf
 
Lec_1_Introduction.pdf
Lec_1_Introduction.pdfLec_1_Introduction.pdf
Lec_1_Introduction.pdf
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
 
Digital Image Processing_ ch1 introduction-2003
Digital Image Processing_ ch1 introduction-2003Digital Image Processing_ ch1 introduction-2003
Digital Image Processing_ ch1 introduction-2003
 
ImageProcessing1-Introduction.ppt
ImageProcessing1-Introduction.pptImageProcessing1-Introduction.ppt
ImageProcessing1-Introduction.ppt
 
Basics of digital image processing
Basics of digital image  processingBasics of digital image  processing
Basics of digital image processing
 
1_unit-1.1_Introduction to DIP.pptx
1_unit-1.1_Introduction to DIP.pptx1_unit-1.1_Introduction to DIP.pptx
1_unit-1.1_Introduction to DIP.pptx
 
Image processing
Image processingImage processing
Image processing
 
ImageProcessing1-Introduction.ppt
ImageProcessing1-Introduction.pptImageProcessing1-Introduction.ppt
ImageProcessing1-Introduction.ppt
 
Digital image processing using matlab
Digital image processing using matlab Digital image processing using matlab
Digital image processing using matlab
 
Image processing1 introduction
Image processing1 introductionImage processing1 introduction
Image processing1 introduction
 
1. digital image processing
1. digital image processing1. digital image processing
1. digital image processing
 
Digital Image Processing: An Introduction
Digital Image Processing: An IntroductionDigital Image Processing: An Introduction
Digital Image Processing: An Introduction
 
Image processing1 introduction (1)
Image processing1 introduction (1)Image processing1 introduction (1)
Image processing1 introduction (1)
 
Imagine camp, Developing Image Processing app for windows phone platform
Imagine camp, Developing Image Processing app for windows phone platformImagine camp, Developing Image Processing app for windows phone platform
Imagine camp, Developing Image Processing app for windows phone platform
 
ARKA RAJ SAHA-27332020003..pptx
ARKA RAJ SAHA-27332020003..pptxARKA RAJ SAHA-27332020003..pptx
ARKA RAJ SAHA-27332020003..pptx
 
Presentation on Digital Image Processing
Presentation on Digital Image ProcessingPresentation on Digital Image Processing
Presentation on Digital Image Processing
 
mca.pptx
mca.pptxmca.pptx
mca.pptx
 
Dip unit-i-ppt academic year(2016-17)
Dip unit-i-ppt academic year(2016-17)Dip unit-i-ppt academic year(2016-17)
Dip unit-i-ppt academic year(2016-17)
 

More from Khushali Kathiriya

Chap.3 Knowledge Representation Issues Chap.4 Inference in First Order Logic
Chap.3 Knowledge Representation  Issues  Chap.4 Inference in First Order  LogicChap.3 Knowledge Representation  Issues  Chap.4 Inference in First Order  Logic
Chap.3 Knowledge Representation Issues Chap.4 Inference in First Order Logic
Khushali Kathiriya
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Khushali Kathiriya
 
learning with complete data.pdf
learning with complete data.pdflearning with complete data.pdf
learning with complete data.pdf
Khushali Kathiriya
 
ADA_2_Analysis of Algorithms
ADA_2_Analysis of AlgorithmsADA_2_Analysis of Algorithms
ADA_2_Analysis of Algorithms
Khushali Kathiriya
 
ADA_1 Introduction of Algorithm
ADA_1 Introduction of AlgorithmADA_1 Introduction of Algorithm
ADA_1 Introduction of Algorithm
Khushali Kathiriya
 
AI_ Backtracking in prolog
AI_ Backtracking in prologAI_ Backtracking in prolog
AI_ Backtracking in prolog
Khushali Kathiriya
 
AI_Cuts in prolog
AI_Cuts in prologAI_Cuts in prolog
AI_Cuts in prolog
Khushali Kathiriya
 
AI_Recursive search in prolog
AI_Recursive search in prologAI_Recursive search in prolog
AI_Recursive search in prolog
Khushali Kathiriya
 
AI_List in prolog
AI_List in prologAI_List in prolog
AI_List in prolog
Khushali Kathiriya
 
AI_11 Game playing
AI_11 Game playingAI_11 Game playing
AI_11 Game playing
Khushali Kathiriya
 
AI_ Bays theorem
AI_ Bays theoremAI_ Bays theorem
AI_ Bays theorem
Khushali Kathiriya
 
AI_Bayesian belief network
AI_Bayesian belief networkAI_Bayesian belief network
AI_Bayesian belief network
Khushali Kathiriya
 
AI_11 Understanding
AI_11  UnderstandingAI_11  Understanding
AI_11 Understanding
Khushali Kathiriya
 
AI_ 8 Weak Slot and Filler Structure
AI_ 8 Weak Slot and Filler  StructureAI_ 8 Weak Slot and Filler  Structure
AI_ 8 Weak Slot and Filler Structure
Khushali Kathiriya
 
AI_7 Statistical Reasoning
AI_7 Statistical Reasoning AI_7 Statistical Reasoning
AI_7 Statistical Reasoning
Khushali Kathiriya
 
AI_6 Uncertainty
AI_6 Uncertainty AI_6 Uncertainty
AI_6 Uncertainty
Khushali Kathiriya
 
AI_5 Resolution/ Channing
AI_5 Resolution/ ChanningAI_5 Resolution/ Channing
AI_5 Resolution/ Channing
Khushali Kathiriya
 
AI_ 3 & 4 Knowledge Representation issues
AI_ 3 & 4 Knowledge Representation issuesAI_ 3 & 4 Knowledge Representation issues
AI_ 3 & 4 Knowledge Representation issues
Khushali Kathiriya
 
AI_2 State Space Search
AI_2 State Space SearchAI_2 State Space Search
AI_2 State Space Search
Khushali Kathiriya
 
AI_1 Introduction of AI
AI_1 Introduction of AIAI_1 Introduction of AI
AI_1 Introduction of AI
Khushali Kathiriya
 

More from Khushali Kathiriya (20)

Chap.3 Knowledge Representation Issues Chap.4 Inference in First Order Logic
Chap.3 Knowledge Representation  Issues  Chap.4 Inference in First Order  LogicChap.3 Knowledge Representation  Issues  Chap.4 Inference in First Order  Logic
Chap.3 Knowledge Representation Issues Chap.4 Inference in First Order Logic
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
learning with complete data.pdf
learning with complete data.pdflearning with complete data.pdf
learning with complete data.pdf
 
ADA_2_Analysis of Algorithms
ADA_2_Analysis of AlgorithmsADA_2_Analysis of Algorithms
ADA_2_Analysis of Algorithms
 
ADA_1 Introduction of Algorithm
ADA_1 Introduction of AlgorithmADA_1 Introduction of Algorithm
ADA_1 Introduction of Algorithm
 
AI_ Backtracking in prolog
AI_ Backtracking in prologAI_ Backtracking in prolog
AI_ Backtracking in prolog
 
AI_Cuts in prolog
AI_Cuts in prologAI_Cuts in prolog
AI_Cuts in prolog
 
AI_Recursive search in prolog
AI_Recursive search in prologAI_Recursive search in prolog
AI_Recursive search in prolog
 
AI_List in prolog
AI_List in prologAI_List in prolog
AI_List in prolog
 
AI_11 Game playing
AI_11 Game playingAI_11 Game playing
AI_11 Game playing
 
AI_ Bays theorem
AI_ Bays theoremAI_ Bays theorem
AI_ Bays theorem
 
AI_Bayesian belief network
AI_Bayesian belief networkAI_Bayesian belief network
AI_Bayesian belief network
 
AI_11 Understanding
AI_11  UnderstandingAI_11  Understanding
AI_11 Understanding
 
AI_ 8 Weak Slot and Filler Structure
AI_ 8 Weak Slot and Filler  StructureAI_ 8 Weak Slot and Filler  Structure
AI_ 8 Weak Slot and Filler Structure
 
AI_7 Statistical Reasoning
AI_7 Statistical Reasoning AI_7 Statistical Reasoning
AI_7 Statistical Reasoning
 
AI_6 Uncertainty
AI_6 Uncertainty AI_6 Uncertainty
AI_6 Uncertainty
 
AI_5 Resolution/ Channing
AI_5 Resolution/ ChanningAI_5 Resolution/ Channing
AI_5 Resolution/ Channing
 
AI_ 3 & 4 Knowledge Representation issues
AI_ 3 & 4 Knowledge Representation issuesAI_ 3 & 4 Knowledge Representation issues
AI_ 3 & 4 Knowledge Representation issues
 
AI_2 State Space Search
AI_2 State Space SearchAI_2 State Space Search
AI_2 State Space Search
 
AI_1 Introduction of AI
AI_1 Introduction of AIAI_1 Introduction of AI
AI_1 Introduction of AI
 

Recently uploaded

Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
SakkaravarthiShanmug
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
GauravCar
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
ydzowc
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
AjmalKhan50578
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
riddhimaagrawal986
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
bijceesjournal
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
Madan Karki
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...
IJECEIAES
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
IJECEIAES
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 

Recently uploaded (20)

Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
 
artificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptxartificial intelligence and data science contents.pptx
artificial intelligence and data science contents.pptx
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
 
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
原版制作(Humboldt毕业证书)柏林大学毕业证学位证一模一样
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Welding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdfWelding Metallurgy Ferrous Materials.pdf
Welding Metallurgy Ferrous Materials.pdf
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
People as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimalaPeople as resource Grade IX.pdf minimala
People as resource Grade IX.pdf minimala
 
Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...Rainfall intensity duration frequency curve statistical analysis and modeling...
Rainfall intensity duration frequency curve statistical analysis and modeling...
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
Seminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptxSeminar on Distillation study-mafia.pptx
Seminar on Distillation study-mafia.pptx
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...An improved modulation technique suitable for a three level flying capacitor ...
An improved modulation technique suitable for a three level flying capacitor ...
 
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 

CV_2 Image Processing

  • 1. Computer Vision Chap.2 Image Processing SUB CODE: 3171614 SEMESTER: 7TH IT PREPARED BY: PROF. KHUSHALI B. KATHIRIYA
  • 2. Outline • Pixel transforms • Color transforms • Histogram processing & equalization • Filtering • Convolution • Fourier transformation and its applications in sharpening • Blurring and noise removal Prepared by: Prof. Khushali B Kathiriya 2
  • 3. What is Image Processing? PREPARED BY: PROF. KHUSHALI B. KATHIRIYA
  • 4. “One picture is worth more than ten thousand words” Anonymous Prepared by: Prof. Khushali B Kathiriya 4
  • 5. What is Digital Image Processing? • Digital image processing focuses on two major tasks • Improvement of pictorial information for human interpretation • Processing of image data for storage, transmission and representation for autonomous machine perception Prepared by: Prof. Khushali B Kathiriya 5
  • 6. What is DIP? (cont…) The continuum from image processing to computer vision can be broken up into low-, mid- and high-level processes Low Level Process Input: Image Output: Image Examples: Noise removal, image sharpening Mid Level Process Input: Image Output: Attributes Examples: Object recognition, segmentation High Level Process Input: Attributes Output: Understanding Examples: Scene understanding, autonomous navigation Prepared by: Prof. Khushali B Kathiriya 6
  • 7. History of Digital Image Processing Early 1920s: One of the first applications of digital imaging was in the news- paper industry • The Bartlane cable picture transmission service • Images were transferred by submarine cable between London and New York • Pictures were coded for cable transfer and reconstructed at the receiving end on a telegraph printer Early digital image Prepared by: Prof. Khushali B Kathiriya 7
  • 8. History of DIP (cont…) Mid to late 1920s: Improvements to the Bartlane system resulted in higher quality images • New reproduction processes based on photographic techniques • Increased number of tones in reproduced images Improved digital image Early 15 tone digital image Prepared by: Prof. Khushali B Kathiriya 8
  • 9. History of DIP (cont…) 1960s: Improvements in computing technology and the onset of the space race led to a surge of work in digital image processing • 1964: Computers used to improve the quality of images of the moon taken by the Ranger 7 probe • Such techniques were used in other space missions including the Apollo landings A picture of the moon taken by the Ranger 7 probe minutes before landing Prepared by: Prof. Khushali B Kathiriya 9
  • 10. History of DIP (cont…) 1970s: Digital image processing begins to be used in medical applications • 1979: Sir Godfrey N. Hounsfield & Prof. Allan M. Cormack share the Nobel Prize in medicine for the invention of tomography, the technology behind Computerised Axial Tomography (CAT) scans Typical head slice CAT image Prepared by: Prof. Khushali B Kathiriya 10
  • 11. History of DIP (cont…) 1980s - Today: The use of digital image processing techniques has exploded and they are now used for all kinds of tasks in all kinds of areas • Image enhancement/restoration • Artistic effects • Medical visualisation • Industrial inspection • Law enforcement • Human computer interfaces Prepared by: Prof. Khushali B Kathiriya 11
  • 12. Examples: Image Enhancement One of the most common uses of DIP techniques: improve quality, remove noise etc Prepared by: Prof. Khushali B Kathiriya 12
  • 13. Examples: The Hubble Telescope •Launched in 1990 the Hubble telescope can take images of very distant objects •However, an incorrect mirror made many of Hubble’s images useless •Image processing techniques were used to fix this Prepared by: Prof. Khushali B Kathiriya 13
  • 14. Examples: Artistic Effects Artistic effects are used to make images more visually appealing, to add special effects and to make composite images Prepared by: Prof. Khushali B Kathiriya 14
  • 15. Examples: Medicine Take slice from MRI scan of canine heart, and find boundaries between types of tissue • Image with gray levels representing tissue density • Use a suitable filter to highlight edges Original MRI Image of a Dog Heart Edge Detection Image Prepared by: Prof. Khushali B Kathiriya 15
  • 16. Examples: GIS Geographic Information Systems • Digital image processing techniques are used extensively to manipulate satellite imagery • Terrain classification • Meteorology Prepared by: Prof. Khushali B Kathiriya 16
  • 17. Examples: GIS (cont…) Night-Time Lights of the World data set • Global inventory of human settlement • Not hard to imagine the kind of analysis that might be done using this data Prepared by: Prof. Khushali B Kathiriya 17
  • 18. Examples: Industrial Inspection •Human operators are expensive, slow and unreliable •Make machines do the job instead •Industrial vision systems are used in all kinds of industries Prepared by: Prof. Khushali B Kathiriya 18
  • 19. Examples: PCB Inspection Printed Circuit Board (PCB) inspection • Machine inspection is used to determine that all components are present and that all solder joints are acceptable • Both conventional imaging and x-ray imaging are used Prepared by: Prof. Khushali B Kathiriya 19
  • 20. Examples: Law Enforcement Image processing techniques are used extensively by law enforcers • Number plate recognition for speed cameras/automated toll systems • Fingerprint recognition • Enhancement of CCTV images Prepared by: Prof. Khushali B Kathiriya 20
  • 21. Examples: HCI Try to make human computer interfaces more natural • Face recognition • Gesture recognition Prepared by: Prof. Khushali B Kathiriya 21
  • 22. Key Stages in Digital Image Processing PREPARED BY: PROF. KHUSHALI B. KATHIRIYA
  • 23. Key Stages in Digital Image Processing Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Prepared by: Prof. Khushali B Kathiriya 23
  • 24. Key Stages in Digital Image Processing: Image Aquisition Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Prepared by: Prof. Khushali B Kathiriya 24
  • 25. Key Stages in Digital Image Processing: Image Enhancement Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Prepared by: Prof. Khushali B Kathiriya 25
  • 26. Key Stages in Digital Image Processing: Image Restoration Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Prepared by: Prof. Khushali B Kathiriya 26
  • 27. Key Stages in Digital Image Processing: Morphological Processing Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Prepared by: Prof. Khushali B Kathiriya 27
  • 28. Key Stages in Digital Image Processing: Segmentation Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Prepared by: Prof. Khushali B Kathiriya 28
  • 29. Key Stages in Digital Image Processing: Object Recognition Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Prepared by: Prof. Khushali B Kathiriya 29
  • 30. Key Stages in Digital Image Processing: Representation & Description Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Prepared by: Prof. Khushali B Kathiriya 30
  • 31. Key Stages in Digital Image Processing: Image Compression Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Prepared by: Prof. Khushali B Kathiriya 31
  • 32. Key Stages in Digital Image Processing: Colour Image Processing Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Prepared by: Prof. Khushali B Kathiriya 32
  • 33. Image Enhancement PREPARED BY: PROF. KHUSHALI B. KATHIRIYA
  • 34. Key Stages in Digital Image Processing: Image Aquisition Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Prepared by: Prof. Khushali B Kathiriya 34
  • 35. Key Stages in Digital Image Processing: Image Enhancement Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Prepared by: Prof. Khushali B Kathiriya 35
  • 36. A Note About Grey Levels • So far when we have spoken about image grey level values we have said they are in the range [0, 255] • Where 0 is black and 255 is white • There is no reason why we have to use this range • The range [0,255] stems from display technologies • For many of the image processing operations , grey levels are assumed to be given in the range [0.0, 1.0] Prepared by: Prof. Khushali B Kathiriya 36
  • 37. What is a Digital Image? (Cont.) Common image formats include: • 1 sample per point (B&W or Grayscale) • 3 samples per point (Red, Green, and Blue) • 4 samples per point (Red, Green, Blue, and “Alpha”, a.k.a. Opacity) Prepared by: Prof. Khushali B Kathiriya 37
  • 38. What Is Image Enhancement? Image enhancement is the process of making images more useful The reasons for doing this include: • Highlighting interesting detail in images • Removing noise from images • Making images more visually appealing Prepared by: Prof. Khushali B Kathiriya 38
  • 39. Image Enhancement Examples Prepared by: Prof. Khushali B Kathiriya 39
  • 40. Image Enhancement Examples (cont…) Prepared by: Prof. Khushali B Kathiriya 40
  • 41. Image Enhancement Examples (cont…) Prepared by: Prof. Khushali B Kathiriya 41
  • 42. Image Enhancement Examples (cont…) Prepared by: Prof. Khushali B Kathiriya 42
  • 43. Spatial & Frequency Domains There are two broad categories of image enhancement techniques • Spatial domain techniques • Direct manipulation of image pixels • Frequency domain techniques • Manipulation of Fourier transform or wavelet transform of an image Prepared by: Prof. Khushali B Kathiriya 43
  • 44. Image Enhancement Image Histogram PREPARED BY: PROF. KHUSHALI B. KATHIRIYA
  • 45. Image Histograms • The histogram of an image shows us the distribution of grey levels in the image • Massively useful in image processing, especially in segmentation Grey Levels Frequencies Prepared by: Prof. Khushali B Kathiriya 45
  • 46. Histogram Examples Prepared by: Prof. Khushali B Kathiriya 46
  • 47. Histogram Examples (cont…) Prepared by: Prof. Khushali B Kathiriya 47
  • 48. Histogram Examples (cont…) Prepared by: Prof. Khushali B Kathiriya 48
  • 49. Histogram Examples (cont…) Prepared by: Prof. Khushali B Kathiriya 49
  • 50. Histogram Examples (cont…) Prepared by: Prof. Khushali B Kathiriya 50
  • 51. Histogram Examples (cont…) Prepared by: Prof. Khushali B Kathiriya 51
  • 52. Histogram Examples (cont…) Prepared by: Prof. Khushali B Kathiriya 52
  • 53. Histogram Examples (cont…) Prepared by: Prof. Khushali B Kathiriya 53
  • 54. Histogram Examples (cont…) Prepared by: Prof. Khushali B Kathiriya 54
  • 55. Histogram Examples (cont…) Prepared by: Prof. Khushali B Kathiriya 55
  • 56. Histogram Examples (cont…) • A selection of images and their histograms • Notice the relationships between the images and their histograms • Note that the high contrast image has the most evenly spaced histogram Prepared by: Prof. Khushali B Kathiriya 56
  • 57. Histogram Example • Plot the histogram for following data. Prepared by: Prof. Khushali B Kathiriya 57 Grey Level Number of Pixels 0 40 1 20 2 10 3 15 4 10 5 3 6 2
  • 58. Histogram Example • Calculate the probability of occurrence of the grey level (Probability Density Functions) Prepared by: Prof. Khushali B Kathiriya 58 Grey Level Number of Pixels(nk) P(rk) = nk/n 0 40 1 20 2 10 3 15 4 10 5 3 6 2 n=100
  • 59. Histogram Example • Calculate the probability of occurrence of the grey level (normalized histogram) Prepared by: Prof. Khushali B Kathiriya 59 Grey Level Number of Pixels(nk) P(rk) = nk/n 0 40 0.4 1 20 0.2 2 10 0.1 3 15 0.15 4 10 0.1 5 3 0.03 6 2 0.02 n=100
  • 60. Image Enhancement Histogram Stretching PREPARED BY: PROF. KHUSHALI B. KATHIRIYA
  • 61. Linear Stretching • One way to increase the dynamic range is by using a technique known as histogram stretching • In this method , we do not alter the basic shape of the histogram , but we spread it so as to cover the entire dynamic range Prepared by: Prof. Khushali B Kathiriya 61 • Smax -> Maximum grey level of output image • Smin -> Minimum grey level of output image • rmax -> Maximum grey level of input image • rmin -> Minimum grey level of input image Rmax - Rmin Smax – Smin s = T(r) = (R - Rmin) + Smin
  • 62. Histogram Stretching : Example • Perform histogram stretching so that new image has a dynamic range of [0,7] Prepared by: Prof. Khushali B Kathiriya 62 Grey Level Number of Pixels 0 0 1 0 2 50 3 60 4 50 5 20 6 10 7 0
  • 63. Histogram Stretching : Example Prepared by: Prof. Khushali B Kathiriya 63
  • 64. Histogram Stretching : Example Prepared by: Prof. Khushali B Kathiriya 64
  • 65. Histogram Stretching : Example Prepared by: Prof. Khushali B Kathiriya 65
  • 66. Histogram Stretching • Modified histogram in the dynamic range of [0,7] Prepared by: Prof. Khushali B Kathiriya 66 Grey Level Number of Pixels 0 50 1 0 2 60 3 0 4 50 5 20 6 0 7 10
  • 67. Try out your self… Histogram Stretching • Modified histogram in the dynamic range of [0,7] Prepared by: Prof. Khushali B Kathiriya 68 Grey Level Number of Pixels 0 100 1 90 2 85 3 70 4 0 5 0 6 0 7 0
  • 68. Histogram Stretching • Modified histogram in the dynamic range of [0,7] Prepared by: Prof. Khushali B Kathiriya 69 Grey Level Number of Pixels 0 100 1 0 2 90 3 0 4 0 5 85 6 0 7 70
  • 69. Image Enhancement Histogram Equalisation PREPARED BY: PROF. KHUSHALI B. KATHIRIYA
  • 70. Histogram Equalisation • Spreading out the frequencies in an image (or equalising the image) is a simple way to improve dark or washed out images • The formula for histogram equalisation is given where • rk: input intensity • sk: processed intensity • k: the intensity range (e.g 0.0 – 1.0) • nj: the frequency of intensity j • n: the sum of all frequencies Prepared by: Prof. Khushali B Kathiriya 71 ) ( k k r T s =  = = k j j r r p 1 ) (  = = k j j n n 1
  • 71. Equalisation Transformation Function Prepared by: Prof. Khushali B Kathiriya 72
  • 72. Equalisation Examples 1 Prepared by: Prof. Khushali B Kathiriya 73
  • 73. Equalisation Examples 2 Prepared by: Prof. Khushali B Kathiriya 74
  • 74. Equalisation Examples (cont…) 3 4 Prepared by: Prof. Khushali B Kathiriya 75
  • 75. Histogram Equalization • Histogram--->PDF --- > CDF --- > Equalized histogram • CDF – cumulative density function  = = r r k k r p r T S 0 ) ( ) ( Prepared by: Prof. Khushali B Kathiriya 76
  • 76. Equalize the given histogram Grey Level Number of Pixels(nk) PDF P(rk) = nk/n CDF (L-1)*Sk Round off 0 790 1 1023 2 850 3 656 4 329 5 245 6 122 7 81 4096 Prepared by: Prof. Khushali B Kathiriya 77
  • 77. Equalize the given histogram Grey Level Number of Pixels(nk) PDF P(rk) = nk/n CDF Sk = (L-1)*Sk Round off 0 790 0.19 1 1023 0.25 2 850 0.21 3 656 0.16 4 329 0.08 5 245 0.06 6 122 0.03 7 81 0.02 4096  r r r p 0 ) ( Prepared by: Prof. Khushali B Kathiriya 78
  • 78. Equalize the given histogram Grey Level Number of Pixels(nk) PDF P(rk) = nk/n CDF Sk = (L-1)*Sk Round off 0 790 0.19 0.19 1 1023 0.25 0.44 2 850 0.21 0.65 3 656 0.16 0.81 4 329 0.08 0.89 5 245 0.06 0.95 6 122 0.03 0.98 7 81 0.02 1 4096  r r r p 0 ) ( Prepared by: Prof. Khushali B Kathiriya 79
  • 79. Equalize the given histogram Grey Level Number of Pixels(nk) PDF P(rk) = nk/n CDF Sk = (L-1)*Sk Round off 0 790 0.19 0.19 1.33 1 1 1023 0.25 0.44 3.08 3 2 850 0.21 0.65 4.55 5 3 656 0.16 0.81 5.67 6 4 329 0.08 0.89 6.23 6 5 245 0.06 0.95 6.65 7 6 122 0.03 0.98 6.86 7 7 81 0.02 1 7 7 4096  r r r p 0 ) ( Prepared by: Prof. Khushali B Kathiriya 80
  • 80. Equalized Grey Level Grey Level Old Number of Pixels New Number of Pixels 0 790 0 1 1023 790 2 850 0 3 656 1023 4 329 0 5 245 850 6 122 656+329 = 985 7 81 245+122+81 = 448 Prepared by: Prof. Khushali B Kathiriya 81 Grey Level Round off 0 1 1 3 2 5 3 6 4 6 5 7 6 7 7 7
  • 81. Histogram Equalization Prepared by: Prof. Khushali B Kathiriya 82
  • 82. Satelite Origional Image Prepared by: Prof. Khushali B Kathiriya 83
  • 83. Histogram Equalized Image Prepared by: Prof. Khushali B Kathiriya 84
  • 84. Try out your self (Equalize the given histogram) Grey Level Number of Pixels 0 100 1 90 2 50 3 20 4 0 5 0 6 0 7 0 Prepared by: Prof. Khushali B Kathiriya 85
  • 85. Try out your self (Equalize the given histogram) Prepared by: Prof. Khushali B Kathiriya 86
  • 86. Noise Removal and Blurring PREPARED BY: PROF. KHUSHALI B. KATHIRIYA
  • 87. What is Image Restoration? • Image restoration attempts to restore images that have been degraded • Identify the degradation process and attempt to reverse it • Similar to image enhancement, but more objective Prepared by: Prof. Khushali B Kathiriya 88
  • 88. Image restoration vs. image enhancement • Enhancement: • largely a subjective process • Priori knowledge about the degradation is not a must (sometimes no degradation is involved) • Procedures are heuristic and take advantage of the psychophysical aspects of human visual system • Restoration: • more an objective process • Images are degraded • Tries to recover the images by using the knowledge about the degradation Prepared by: Prof. Khushali B Kathiriya 89
  • 89. Noise and Images • The sources of noise in digital images arise during image acquisition (digitization) and transmission • Imaging sensors can be affected by ambient conditions • Interference can be added to an image during transmission Prepared by: Prof. Khushali B Kathiriya 90
  • 90. Noise Model • We can consider a noisy image to be modelled as follows: • where f(x, y) is the original image pixel, η(x, y) is the noise term and g(x, y) is the resulting noisy pixel • If we can estimate the model the noise in an image is based on this will help us to figure out how to restore the image ) , ( ) , ( ) , ( y x y x f y x g  + = Prepared by: Prof. Khushali B Kathiriya 91
  • 91. Noise Models Gaussian Rayleigh Erlang Exponential Uniform Impulse There are many different models for the image noise term η(x, y): • Gaussian • Most common model • Rayleigh • Erlang • Exponential • Uniform • Impulse • Salt and pepper noise Prepared by: Prof. Khushali B Kathiriya 93
  • 92. Noise Example • The test pattern to the right is ideal for demonstrating the addition of noise • The following slides will show the result of adding noise based on various models to this image Histogram to go here Image Histogram Prepared by: Prof. Khushali B Kathiriya 94
  • 93. Noise Example (cont…) Gaussian Rayleigh Erlang Prepared by: Prof. Khushali B Kathiriya 95
  • 94. Noise Example (cont…) Exponential Uniform Impulse Histogram to go here Prepared by: Prof. Khushali B Kathiriya 96
  • 95. Noise Removal Arithmetic Mean Filter PREPARED BY: PROF. KHUSHALI B. KATHIRIYA
  • 96. Filtering to Remove Noise: Arithmetic Mean Filter • We can use spatial filters of different kinds to remove different kinds of noise • The arithmetic mean filter is a very simple one and is calculated as follows: This is implemented as the simple smoothing filter Blurs the image to remove noise   = xy S t s t s g mn y x f ) , ( ) , ( 1 ) , ( ˆ 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 Prepared by: Prof. Khushali B Kathiriya 98
  • 97. Other Means There are different kinds of mean filters all of which exhibit slightly different behaviour: • Geometric Mean • Harmonic Mean • Contraharmonic Mean Prepared by: Prof. Khushali B Kathiriya 99
  • 98. Other Means (cont…) • There are other variants on the mean which can give different performance • Geometric Mean: • Achieves similar smoothing to the arithmetic mean, but tends to lose less image detail mn S t s xy t s g y x f 1 ) , ( ) , ( ) , ( ˆ         =   Prepared by: Prof. Khushali B Kathiriya 100
  • 99. Other Means (cont…) Harmonic Mean: • Works well for salt noise, but fails for pepper noise • Also does well for other kinds of noise such as Gaussian noise   = xy S t s t s g mn y x f ) , ( ) , ( 1 ) , ( ˆ Prepared by: Prof. Khushali B Kathiriya 101
  • 100. Other Means (cont…) • Contraharmonic Mean: • Q is the order of the filter and adjusting its value changes the filter’s behaviour • Positive values of Q eliminate pepper noise • Negative values of Q eliminate salt noise     + = xy xy S t s Q S t s Q t s g t s g y x f ) , ( ) , ( 1 ) , ( ) , ( ) , ( ˆ Prepared by: Prof. Khushali B Kathiriya 102
  • 101. Noise Removal Examples Original Image Image Corrupted By Gaussian Noise After A 3*3 Geometric Mean Filter After A 3*3 Arithmetic Mean Filter Prepared by: Prof. Khushali B Kathiriya 103
  • 102. Noise Removal Examples (cont…) Image Corrupted By Pepper Noise Result of Filtering Above With 3*3 Contraharmonic Q=1.5 Prepared by: Prof. Khushali B Kathiriya 104
  • 103. Noise Removal Examples (cont…) Image Corrupted By Salt Noise Result of Filtering Above With 3*3 Contraharmonic Q=-1.5 Prepared by: Prof. Khushali B Kathiriya 105
  • 104. Contraharmonic Filter: Here Be Dragons Choosing the wrong value for Q when using the contraharmonic filter can have drastic results Prepared by: Prof. Khushali B Kathiriya 106
  • 105. Noise Removal Order Statistics Filters PREPARED BY: PROF. KHUSHALI B. KATHIRIYA
  • 106. Order Statistics Filters • Spatial filters that are based on ordering the pixel values that make up the neighbourhood operated on by the filter • Useful spatial filters include • Median filter • Max and min filter • Midpoint filter • Alpha trimmed mean filter Prepared by: Prof. Khushali B Kathiriya 108
  • 107. Median Filter • Median Filter: • Excellent at noise removal, without the smoothing effects that can occur with other smoothing filters • Particularly good when salt and pepper noise is present )} , ( { ) , ( ˆ ) , ( t s g median y x f xy S t s  = Prepared by: Prof. Khushali B Kathiriya 109
  • 108. Max and Min Filter Max Filter: Min Filter: Max filter is good for pepper noise and min is good for salt noise )} , ( { max ) , ( ˆ ) , ( t s g y x f xy S t s  = )} , ( { min ) , ( ˆ ) , ( t s g y x f xy S t s  = Prepared by: Prof. Khushali B Kathiriya 110
  • 109. Midpoint Filter Midpoint Filter: Good for random Gaussian and uniform noise       + =   )} , ( { min )} , ( { max 2 1 ) , ( ˆ ) , ( ) , ( t s g t s g y x f xy xy S t s S t s Prepared by: Prof. Khushali B Kathiriya 111
  • 110. Alpha-Trimmed Mean Filter • Alpha-Trimmed Mean Filter: • We can delete the d/2 lowest and d/2 highest grey levels • So gr(s, t) represents the remaining mn – d pixels   − = xy S t s r t s g d mn y x f ) , ( ) , ( 1 ) , ( ˆ Prepared by: Prof. Khushali B Kathiriya 112
  • 111. Noise Removal Examples Image Corrupted By Salt And Pepper Noise Result of 1 Pass With A 3*3 Median Filter Result of 2 Passes With A 3*3 Median Filter Result of 3 Passes With A 3*3 Median Filter Prepared by: Prof. Khushali B Kathiriya 113
  • 112. Noise Removal Examples (cont…) Image Corrupted By Pepper Noise Image Corrupted By Salt Noise Result Of Filtering Above With A 3*3 Min Filter Result Of Filtering Above With A 3*3 Max Filter Prepared by: Prof. Khushali B Kathiriya 114
  • 113. Noise Removal Examples (cont…) Image Corrupted By Uniform Noise Image Further Corrupted By Salt and Pepper Noise Filtered By 5*5 Arithmetic Mean Filter Filtered By 5*5 Median Filter Filtered By 5*5 Geometric Mean Filter Filtered By 5*5 Alpha-Trimmed Mean Filter Prepared by: Prof. Khushali B Kathiriya 115
  • 114. Periodic Noise • Typically arises due to electrical or electromagnetic interference • Gives rise to regular noise patterns in an image • Frequency domain techniques in the Fourier domain are most effective at removing periodic noise Prepared by: Prof. Khushali B Kathiriya 116
  • 115. Band Reject Filters •Removing periodic noise from an image involves removing a particular range of frequencies from that image •Band reject filters can be used for this purpose •An ideal band reject filter is given as follows:          +  +   − −  = 2 ) , ( 1 2 ) , ( 2 0 2 ) , ( 1 ) , ( 0 0 0 0 W D v u D if W D v u D W D if W D v u D if v u H Prepared by: Prof. Khushali B Kathiriya 117
  • 116. Band Reject Filters (cont…) • The ideal band reject filter is shown below, along with Butterworth and Gaussian versions of the filter Ideal Band Reject Filter Butterworth Band Reject Filter (of order 1) Gaussian Band Reject Filter Prepared by: Prof. Khushali B Kathiriya 118
  • 117. Band Reject Filter Example Image corrupted by sinusoidal noise Fourier spectrum of corrupted image Butterworth band reject filter Filtered image Prepared by: Prof. Khushali B Kathiriya 119
  • 118. Adaptive Filters • The filters discussed so far are applied to an entire image without any regard for how image characteristics vary from one point to another • The behaviour of adaptive filters changes depending on the characteristics of the image inside the filter region • We will take a look at the adaptive median filter Prepared by: Prof. Khushali B Kathiriya 120
  • 119. Adaptive Median Filtering • The median filter performs relatively well on impulse noise as long as the spatial density of the impulse noise is not large • The adaptive median filter can handle much more spatially dense impulse noise, and also performs some smoothing for non-impulse noise • The key insight in the adaptive median filter is that the filter size changes depending on the characteristics of the image Prepared by: Prof. Khushali B Kathiriya 121
  • 120. Adaptive Median Filtering (cont…) Remember that filtering looks at each original pixel image in turn and generates a new filtered pixel First examine the following notation: • zmin = minimum grey level in Sxy • zmax = maximum grey level in Sxy • zmed = median of grey levels in Sxy • zxy = grey level at coordinates (x, y) • Smax =maximum allowed size of Sxy Prepared by: Prof. Khushali B Kathiriya 122
  • 121. Adaptive Median Filtering (cont…) Level A: A1 = zmed – zmin A2 = zmed – zmax If A1 > 0 and A2 < 0, Go to level B Else increase the window size If window size ≤ Smax repeat level A Else output zmed Level B: B1 = zxy – zmin B2 = zxy – zmax If B1 > 0 and B2 < 0, output zxy Else output zmed Prepared by: Prof. Khushali B Kathiriya 123
  • 122. Adaptive Median Filtering (cont…) The key to understanding the algorithm is to remember that the adaptive median filter has three purposes: • Remove impulse noise • Provide smoothing of other noise • Reduce distortion Prepared by: Prof. Khushali B Kathiriya 124
  • 123. Adaptive Filtering Example Image corrupted by salt and pepper noise with probabilities Pa = Pb=0.25 Result of filtering with a 7 * 7 median filter Result of adaptive median filtering with i = 7 Prepared by: Prof. Khushali B Kathiriya 125
  • 124. Summary • Restoration is slightly more objective than enhancement • Spatial domain techniques are particularly useful for removing random noise • Frequency domain techniques are particularly useful for removing periodic noise Prepared by: Prof. Khushali B Kathiriya 126
  • 126. Contents In this lecture we will look at spatial filtering techniques: • Neighbourhood operations • What is spatial filtering? • Smoothing operations • What happens at the edges? • Correlation and convolution Prepared by: Prof. Khushali B Kathiriya 128
  • 127. Neighbourhood Operations • Neighbourhood operations simply operate on a larger neighbourhood of pixels than point operations • Neighbourhoods are mostly a rectangle around a central pixel • Any size rectangle and any shape filter are possible Origin x y Image f (x, y) (x, y) Neighbourhood Prepared by: Prof. Khushali B Kathiriya 129
  • 128. Simple Neighbourhood Operations Some simple neighbourhood operations include: • Min: Set the pixel value to the minimum in the neighbourhood • Max: Set the pixel value to the maximum in the neighbourhood • Median: The median value of a set of numbers is the midpoint value in that set (e.g. from the set [1, 7, 15, 18, 24] 15 is the median). Sometimes the median works better than the average Prepared by: Prof. Khushali B Kathiriya 130
  • 129. Simple Neighbourhood Operations Example 123 127 128 119 115 130 140 145 148 153 167 172 133 154 183 192 194 191 194 199 207 210 198 195 164 170 175 162 173 151 Original Image x y Enhanced Image x y Prepared by: Prof. Khushali B Kathiriya 131
  • 130. The Spatial Filtering Process r s t u v w x y z Origin x y Image f (x, y) eprocessed = v*e + r*a + s*b + t*c + u*d + w*f + x*g + y*h + z*i Filter Simple 3*3 Neighbourhood e 3*3 Filter a b c d e f g h i Original Image Pixels * The above is repeated for every pixel in the original image to generate the filtered image Prepared by: Prof. Khushali B Kathiriya 132
  • 131. Spatial Filtering: Equation Form  − = − = + + = a a s b b t t y s x f t s w y x g ) , ( ) , ( ) , ( Filtering can be given in equation form as shown above Notations are based on the image shown to the left Prepared by: Prof. Khushali B Kathiriya 133
  • 132. Smoothing Spatial Filters One of the simplest spatial filtering operations we can perform is a smoothing operation • Simply average all of the pixels in a neighbourhood around a central value • Especially useful in removing noise from images • Also useful for highlighting gross detail 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 Simple averaging filter (Box filter) Prepared by: Prof. Khushali B Kathiriya 134
  • 133. Smoothing Spatial Filtering 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 Origin x y Image f (x, y) e = 1/9*106 + 1/9*104 + 1/9*100 + 1/9*108 + 1/9*99 + 1/9*98 + 1/9*95 + 1/9*90 + 1/9*85 = 98.3333 Filter Simple 3*3 Neighbourhood 106 104 99 95 100 108 98 90 85 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 3*3 Smoothing Filter 104 100 108 99 106 98 95 90 85 Original Image Pixels * The above is repeated for every pixel in the original image to generate the smoothed image Prepared by: Prof. Khushali B Kathiriya 135
  • 134. Image Smoothing Example • The image at the top left is an original image of size 500*500 pixels • The subsequent images show the image after filtering with an averaging filter of increasing sizes • 3, 5, 9, 15 and 35 • Notice how detail begins to disappear Prepared by: Prof. Khushali B Kathiriya 136
  • 135. Correlation • The equation of correlation is defined as follows : • It performs dot product between weights and function Prepared by: Prof. Khushali B Kathiriya 137 a b s a t b g( x,y ) ω( s,t ) f ( x s,y t ) g ω f =− =− = + + =  
  • 138. 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 10 10 5 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 3 3 1 -3 4 2 -1 -1 1 1 1 1 -1 2 1 -1 -1 1 Input Image, f output Image, g Correlation Prepared by: Prof. Khushali B Kathiriya 140
  • 139. 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 10 10 15 5 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 1 3 3 -1 6 2 -1 -1 1 1 1 1 -1 2 1 -1 -1 1 Input Image, f output Image, g Correlation Prepared by: Prof. Khushali B Kathiriya 141
  • 140. 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 10 10 3 15 5 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 2 2 1 -1 4 1 -2 -2 1 1 1 1 -1 2 1 -1 -1 1 Input Image, f output Image, g Correlation Prepared by: Prof. Khushali B Kathiriya 142
  • 142. 4 11 4 10 4 4 6 10 11 3 5 -5 9 7 15 5 Final output Image, g Correlation Prepared by: Prof. Khushali B Kathiriya 144
  • 143. Weighted Smoothing Filters • More effective smoothing filters can be generated by allowing different pixels in the neighbourhood different weights in the averaging function • Pixels closer to the central pixel are more important • Often referred to as a weighted averaging 1/16 2/16 1/16 2/16 4/16 2/16 1/16 2/16 1/16 Weighted averaging filter Prepared by: Prof. Khushali B Kathiriya 145
  • 144. Another Smoothing Example By smoothing the original image we get rid of lots of the finer detail which leaves only the gross features for thresholding Original Image Smoothed Image Thresholded Image Prepared by: Prof. Khushali B Kathiriya 146
  • 145. Averaging Filter Vs. Median Filter Example • Filtering is often used to remove noise from images • Sometimes a median filter works better than an averaging filter Original Image With Noise Image After Averaging Filter Image After Median Filter Prepared by: Prof. Khushali B Kathiriya 147
  • 146. Averaging Filter Vs. Median Filter Example Prepared by: Prof. Khushali B Kathiriya 148
  • 147. Averaging Filter Vs. Median Filter Example Prepared by: Prof. Khushali B Kathiriya 149
  • 148. Averaging Filter Vs. Median Filter Example Prepared by: Prof. Khushali B Kathiriya 150
  • 149. Simple Neighbourhood Operations Example 123 127 128 119 115 130 140 145 148 153 167 172 133 154 183 192 194 191 194 199 207 210 198 195 164 170 175 162 173 151 x y Prepared by: Prof. Khushali B Kathiriya 151
  • 150. Strange Things Happen At The Edges! Origin x y Image f (x, y) e e e e • At the edges of an image we are missing pixels to form a neighbourhood e e e Prepared by: Prof. Khushali B Kathiriya 152
  • 151. Strange Things Happen At The Edges! (cont…) There are a few approaches to dealing with missing edge pixels: • Omit missing pixels • Only works with some filters • Can add extra code and slow down processing • Pad the image • Typically with either all white or all black pixels • Replicate border pixels • Truncate the image • Allow pixels wrap around the image • Can cause some strange image artefacts Prepared by: Prof. Khushali B Kathiriya 153
  • 152. Simple Neighbourhood Operations Example 123 127 128 119 115 130 140 145 148 153 167 172 133 154 183 192 194 191 194 199 207 210 198 195 164 170 175 162 173 151 x y Prepared by: Prof. Khushali B Kathiriya 154
  • 153. Strange Things Happen At The Edges! (cont…) Original Image Filtered Image: Zero Padding Filtered Image: Replicate Edge Pixels Filtered Image: Wrap Around Edge Pixels
  • 154. Correlation & Convolution • The filtering we have been talking about so far is referred to as correlation with the filter itself referred to as the correlation kernel • Convolution is a similar operation, with just one subtle difference • For symmetric filters it makes no difference eprocessed = v*e + z*a + y*b + x*c + w*d + u*e + t*f + s*g + r*h r s t u v w x y z Filter a b c d e e f g h Original Image Pixels * Prepared by: Prof. Khushali B Kathiriya 156
  • 155. Convolution • The equation of correlation is defined as follows : • It performs cross product between weights and function Prepared by: Prof. Khushali B Kathiriya 157 a b s a t b g( x,y ) ω( s,t ) f ( x s,y t ) g ω f =− =− = − − =   
  • 156. Convolution Prepared by: Prof. Khushali B Kathiriya 158 1 -1 -1 1 2 -1 1 1 1 2 2 2 3 2 1 3 3 2 2 1 2 1 3 2 2 Rotate 180o 1 -1 -1 1 2 -1 1 1 1 Convolution kernel, ω
  • 157. Convolution Input Image, f 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 5 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 1 -2 -1 2 4 -1 1 1 1 1 -1 -1 1 2 -1 1 1 1 Output Image, g Prepared by: Prof. Khushali B Kathiriya 159
  • 159. 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 4 4 5 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 3 -3 -1 3 4 -2 1 1 1 1 -1 -1 1 2 -1 1 1 1 Input Image, f Output Image, g Convolution Prepared by: Prof. Khushali B Kathiriya 161
  • 160. 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 4 4 -2 5 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 1 -3 -3 1 6 -2 1 1 1 1 -1 -1 1 2 -1 1 1 1 Input Image, f Output Image, g Convolution Prepared by: Prof. Khushali B Kathiriya 162
  • 161. 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 4 4 9 -2 5 3 2 1 2 2 1 3 2 3 2 2 1 2 2 3 2 2 -2 -1 1 4 -1 2 2 1 1 -1 -1 1 2 -1 1 1 1 Input Image, f Output Image, g Convolution Prepared by: Prof. Khushali B Kathiriya 163
  • 163. 12 7 6 4 8 6 14 4 5 9 5 9 5 11 -2 5 Final output Image, g Convolution Prepared by: Prof. Khushali B Kathiriya 165
  • 164. Image Enhancement Fourier transformation PREPARED BY: PROF. KHUSHALI B. KATHIRIYA
  • 165. Filter and Frequency • Frequency – The number of times that a periodic function repeats the same sequence of values during a unit variation of the independent variable. • Filter – A device or material for suppressing or minimizing waves or oscillations of certain frequencies. Prepared by: Prof. Khushali B Kathiriya 167
  • 166. The Big Idea = • Any function that periodically repeats itself can be expressed as a sum of sines and cosines of different frequencies each multiplied by a different coefficient – a Fourier series Prepared by: Prof. Khushali B Kathiriya 168
  • 167. The Big Idea (cont…) Notice how we get closer and closer to the original function as we add more and more frequencies Prepared by: Prof. Khushali B Kathiriya 169
  • 168. The Big Idea (cont…) Frequency domain signal processing example in Excel Prepared by: Prof. Khushali B Kathiriya 170
  • 169. Complex Numbers • A complex number, C, is defined as C = R + jI, where R is real number & I is Imaginary number equal to the square root of -1. ie. j = 1 − Prepared by: Prof. Khushali B Kathiriya 171
  • 170. The Discrete Fourier Transform (DFT) • The Discrete Fourier Transform of f(x, y), for x = 0, 1, 2…M-1 and y = 0,1,2…N-1, denoted by F(u, v), is given by the equation: for u = 0, 1, 2…M-1 and v = 0, 1, 2…N-1.  − = − = + − = 1 0 1 0 ) / / ( 2 ) , ( ) , ( M x N y N vy M ux j e y x f v u F  Prepared by: Prof. Khushali B Kathiriya 172
  • 171. DFT & Images • The DFT of a two dimensional image can be visualised by showing the spectrum of the image component frequencies DFT Prepared by: Prof. Khushali B Kathiriya 173
  • 172. DFT & Images Prepared by: Prof. Khushali B Kathiriya 174
  • 173. DFT & Images Prepared by: Prof. Khushali B Kathiriya 175
  • 174. DFT & Images (cont…) DFT Scanning electron microscope image of an integrated circuit magnified ~2500 times Fourier spectrum of the image Prepared by: Prof. Khushali B Kathiriya 176
  • 175. DFT & Images (cont…) Prepared by: Prof. Khushali B Kathiriya 177
  • 176. DFT & Images (cont…) Prepared by: Prof. Khushali B Kathiriya 178
  • 177. The Inverse DFT • It is really important to note that the Fourier transform is completely reversible • The inverse DFT is given by: for x = 0, 1, 2…M-1 and y = 0, 1, 2…N-1  − = − = + = 1 0 1 0 ) / / ( 2 ) , ( 1 ) , ( M u N v N vy M ux j e v u F MN y x f  Prepared by: Prof. Khushali B Kathiriya 179
  • 178. The DFT and Image Processing To filter an image in the frequency domain: 1. Compute F(u,v) the DFT of the image 2. Multiply F(u,v) by a filter function H(u,v) 3. Compute the inverse DFT of the result Prepared by: Prof. Khushali B Kathiriya 180
  • 179. Some Basic Frequency Domain Filters Low Pass Filter High Pass Filter Prepared by: Prof. Khushali B Kathiriya 181
  • 180. Frequency Domain Methods Spatial Domain Frequency Domain Prepared by: Prof. Khushali B Kathiriya 182
  • 181. Major filter categories • Typically, filters are classified by examining their properties in the frequency domain: (1) Low-pass (2) High-pass (3) Band-pass (4) Band-stop Prepared by: Prof. Khushali B Kathiriya 183
  • 182. Example Original signal Low-pass filtered High-pass filtered Band-pass filtered Band-stop filtered Prepared by: Prof. Khushali B Kathiriya 184
  • 183. Low-pass filters (i.e., smoothing filters) • Preserve low frequencies - useful for noise suppression frequency domain time domain Example: Prepared by: Prof. Khushali B Kathiriya 185
  • 184. High-pass filters (i.e., sharpening filters) • Preserves high frequencies - useful for edge detection frequency domain time domain Example: Prepared by: Prof. Khushali B Kathiriya 186
  • 185. Band-pass filters • Preserves frequencies within a certain band frequency domain time domain Example: Prepared by: Prof. Khushali B Kathiriya 187
  • 186. Band-stop filters • How do they look like? Band-pass Band-stop Prepared by: Prof. Khushali B Kathiriya 188
  • 187. Frequency Domain Methods Case 1: H(u,v) is specified in the frequency domain. Case 2: h(x,y) is specified in the spatial domain. (real) Prepared by: Prof. Khushali B Kathiriya 189
  • 188. Frequency domain filtering: steps F(u,v) = R(u,v) + jI(u,v) Prepared by: Prof. Khushali B Kathiriya 190
  • 189. Frequency domain filtering: steps (cont’d) G(u,v)= F(u,v)H(u,v) = H(u,v) R(u,v) + jH(u,v)I(u,v) (Case 1) Prepared by: Prof. Khushali B Kathiriya 191
  • 190. Example f(x,y) fp(x,y) fp(x,y)(-1)x+y F(u,v) H(u,v) - centered G(u,v)=F(u,v)H(u,v) g(x,y) gp(x,y) Prepared by: Prof. Khushali B Kathiriya 192