SlideShare a Scribd company logo
IMAGE RESTORATION
Dr.S.SHAJUN NISHA,
MCA.,M.Phil.,M.Tech.,MBA.,Ph.D
Assistant Professor &Head
PG & Research Dept. of Computer Science
Sadakathullah Appa College
Shajunnisha_s@yahoo.com
+91 99420 96220
2
Chapter 5
Image Restoration
Objectives:
To improve a given image in some predefined sense.
How MATLAB and Image Processing Tool models
degradation phenomena and formulate restoration
solutions.
Image restoration is an objective process while image
enhancement is subjective.
3
A Model of the Image Degradation/Restoration Process
The degradation process is modeled as a degradation
function that together with an additive noise term, operates
on an input image f(x,y) to produce a degraded image
g(x,y):
Given g(x,y), some knowledge about the degradation
function H, and some knowledge about the additive noise
term , the objective of restoration is to obtain an
estimate, , of the original image as close as possible
to the original input image.
),()],([),( yxyxfHyxg 
),( yx
),(ˆ yxf
4
5
A Model of the Image Degradation/Restoration Process
If H is a linear, spatially invariant process, it can be shown
that the degraded image is given in the spatial domain by:
Where h(x,y) is the spatial representation of the degradation
function and “*” indicates convolution. We can also write
its frequency domain equivalent as:
Where all terms in capital letter refer to Fourier transform
of corresponding terms.
The degradation function H(u,v) is called the optical
transform function (OTF), and the h(x,y) is called the point
spread function. MATLAB provides conversion functions:
otf2psf and psf2otf.
),(),(),(),( yxyxfyxhyxg 
),(),(),(),( vuNvuFvuHvuG 
6
A Model of the Image Degradation/Restoration Process
Because the degradation due to a linear, spatially invariant
degradation function, H, can be modeled as convolution,
sometimes the degradation process is referred to as
“convolving the image with a PSF or OTF”.
Similarly the restoration process is sometimes referred to as
deconvolution.
We first deal with cases where H is assumed to be an
identity operator, so it does not have any effect on the
process. This way we deal only with degradation noise.
Later we get H involve too.
7
Noise Models
Ability to simulate the behavior and effects of noise is
crucial to image restoration.
We will look at two noise models:
• Noise in the spatial domain (described by the noise
probability density function), and
• Noise in the frequency domain, described by various
Fourier properties of the noise.
MATLAB uses the function imnoise to corrupt an image
with noise. This function has the basic syntax:
g = imnoise(f, type, parameters)
Where f is the input image, and type and parameters will
be described later.
8
Adding Noise with Function imnoise
Function imnoise converts the input image to class double
in the range [0, 1] before adding noise to it.
This is very important to remember. For example, to add
Gaussian noise of mean 64 and variance 400 to a uint8
image, we scale the mean to 64/255 and the variance to
400/2552 for input into imnoise. Below is a summary of the
syntax for this function (see Page 143 for more information)
g = imnoise(f, ‘gaussian’, m, var)
g = imnoise(f, ‘localvar’, V)
g = imnoise(f, ‘localvar’, image_intensity, var)
g = imnoise(f, ‘salt & pepper’, d)
g = imnoise(f, ‘speckle’, var)
g = imnoise(f, ‘poisson’)
9
Generating Spatial Random Noise with a Specified
Distribution
Often, we wish to generate noise of types and parameters
other than the ones listed on previous page. In such cases,
spatial noise are generated using random numbers,
characterized by probability density function (PDF) or by
the corresponding cumulative distribution function (CDF).
Two of the functions used in MATLAB to generate random
numbers are:
rand – to generate uniform random numbers, and
randn – to generate normal (Gaussian) random numbers.
10
Example:
Assume that we have a random number generator that
generates numbers, w, uniformly in the [0 1] range.
Suppose we wish to generate random numbers with a
Rayleigh CDF, which is defined as:








az
aze
zF
baz
z
for0
for1
)(
/)( 2
To find z we solve the equation:
Or
Since the square root term is nonnegative, we are assured
that no values of z less than a are generated.
In MATALB: R = a + sqrt(b*log(1 – rand(M, N) ));
we baz
  /)( 2
1
)1ln( wbaz 
11
Function imnoise2 generates random numbers having CDFs
shown in the table below. They all use rand as: rand(M,N)
12
imnoise vs. imnoise2
The imnoise function generates a 1D noise array, imnoise2
will generate an M-by-N noise array.
imnoise scales the noise array to [0 1], imnoise2 does not
scale at all and will produce the noise pattern itself. The
user specifies the parameters directly.
Note: The salt-and-pepper noise has three values:
0 corresponding to pepper noise
1 corresponding to salt noise, and
0.5 corresponding to no noise.
You can copy the imnoise2 function from the course web
page.
13
r = imnoise2('gaussian', 100000, 1, 0, 1);
p = hist(r, 50);
bar(p)
0 10 20 30 40 50 60
0
1000
2000
3000
4000
5000
6000
7000
8000
14
r = imnoise2('gaussian', 256, 256, 0, 255);
p = hist(r, 50);
bar(p)
15
0 10 20 30 40 50 60
0
500
1000
1500
2000
2500
r = imnoise2(‘uniform', 100000, 1, 0, 1);
p = hist(r, 50);
bar(p)
16
0 10 20 30 40 50 60
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
r = imnoise2(‘lognormal', 100000, 1, 1, 0.25);
p = hist(r, 50);
bar(p)
17
0 10 20 30 40 50 60
0
1000
2000
3000
4000
5000
6000
r = imnoise2(‘rayleigh', 100000, 1, 1, 0.25);
p = hist(r, 50);
bar(p)
18
0 10 20 30 40 50 60
0
0.5
1
1.5
2
2.5
x 10
4
r = imnoise2(‘exponential', 100000, 1, 1, 1);
p = hist(r, 50);
bar(p) Does not matter
19
0 10 20 30 40 50 60
0
1000
2000
3000
4000
5000
6000
7000
8000
9000
r = imnoise2(‘erlang', 100000, 1, 2, 5);
p = hist(r, 50);
bar(p)
20
0 10 20 30 40 50 60
0
1
2
3
4
5
6
7
8
9
10
x 10
4
r = imnoise2(‘salt & pepper', 100000, 1, 0.05, 0.05);
p = hist(r, 50);
bar(p) If r(x,y) = 0, black
If r(x,y) = 1, white
If r(x,y) = 0.5 none
21
Periodic Noise
This kind of noise usually arises from electrical and/or
electromagnetical interference during image acquisition.
These kinds of noise are spatially dependent noise.
The periodic noise is handled in an image by filtering in
the frequency domain.
Our model for a periodic noise is:
Where A is amplitude, u0 and v0 determine the sinusoidal
frequencies with respect to the x- and y-axis, respectively,
and Bx and By are phase displacements with respect to the
origin. The M-by-N DFT of the equation is:
]/)(2/)(2[(),( 00 NByvMBxuSinAyxr yx  
)],()(),()[(
2
),( 00
/2
00
/2 00
vvuuevvuue
A
jvuR
NBvjMBuj yx
 

22
This statement shows a pair of complex conjugate impulses
located at (u+u0 , v+v0) and (u-u0 , v-v0), respectively.
A MATLAB function (imnoise3) accepts an arbitrary number
of impulse locations (frequency coordinates), each with its
own amplitude, frequencies, and phase displacement
parameters, and computes r(x, y) as the sum of sinusoids of
the form shown in the previous page.
The function also outputs the Fourier transform of the sum of
sinusoides, R(u,v) and the spectrum of R(u,v).
The sine waves are generated from the given impulse
location information via the inverse DFT.
Only one pair of coordinates is required to define the
location of an impulse.
The program generates the conjugate symmetric impulses.
23
C = [0 64; 0 128; 32 32; 64 0; 128 0; -32 32];
[r, R, S] = imnoise3(512, 512, C);
imshow(S, []);
C is k-by-2 matrix
containing K pairs
of frequency
domain coordinates
(u,v)
r is the noise
pattern of size M-
by-N
R is the Fourier
transform of r
S is the spectrum
of R
24
u
v
[0,0] [32,0][-32,0]
25
figure, imshow(r, [])
26
C = [0 32; 0 64; 16 16; 32 0; 64 0; -16 16];
[r, R, S] = imnoise3(512, 512, C);
imshow(S, []);
C = [0 64; 0 128; 32 32; 64 0; 128 0; -32 32];
27
figure, imshow(r, [])
28
C = [6 32; -2 2];
[r, R, S] = imnoise3(512, 512, C);
imshow(S, []);
29
figure, imshow(r, [])
30
C = [6 32; -2 2];
A = [1 5];
[r, R, S] = imnoise3(512, 512, C, A);
imshow(S, []);
31
figure, imshow(r, [])

More Related Content

What's hot

IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
Tawose Olamide Timothy
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filters
A B Shinde
 
Module 31
Module 31Module 31
Module 31
UllasSS1
 
Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersImage processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filters
Kuppusamy P
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIP
babak danyal
 
Hough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul IslamHough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul Islam
Nazmul Islam
 
Color fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingColor fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image Processing
Amna
 
Lecture 16 KL Transform in Image Processing
Lecture 16 KL Transform in Image ProcessingLecture 16 KL Transform in Image Processing
Lecture 16 KL Transform in Image Processing
VARUN KUMAR
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
Srishti Kakade
 
Image enhancement techniques
Image enhancement techniques Image enhancement techniques
Image enhancement techniques
Arshad khan
 
Point processing
Point processingPoint processing
Point processing
panupriyaa7
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
Amnaakhaan
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
Madhu Bala
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
Suhaila Afzana
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
asodariyabhavesh
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
A B Shinde
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
lalithambiga kamaraj
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):Basics
Kalyan Acharjya
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
Poonam Seth
 

What's hot (20)

IMAGE SEGMENTATION.
IMAGE SEGMENTATION.IMAGE SEGMENTATION.
IMAGE SEGMENTATION.
 
Image Processing: Spatial filters
Image Processing: Spatial filtersImage Processing: Spatial filters
Image Processing: Spatial filters
 
Module 31
Module 31Module 31
Module 31
 
Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersImage processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filters
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIP
 
Hough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul IslamHough Transform By Md.Nazmul Islam
Hough Transform By Md.Nazmul Islam
 
Color fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image ProcessingColor fundamentals and color models - Digital Image Processing
Color fundamentals and color models - Digital Image Processing
 
Lecture 16 KL Transform in Image Processing
Lecture 16 KL Transform in Image ProcessingLecture 16 KL Transform in Image Processing
Lecture 16 KL Transform in Image Processing
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Image enhancement techniques
Image enhancement techniques Image enhancement techniques
Image enhancement techniques
 
Point processing
Point processingPoint processing
Point processing
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
 
Smoothing Filters in Spatial Domain
Smoothing Filters in Spatial DomainSmoothing Filters in Spatial Domain
Smoothing Filters in Spatial Domain
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):Basics
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
 
Segmentation
SegmentationSegmentation
Segmentation
 

Similar to Image Restoration (Digital Image Processing)

ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
Shajun Nisha
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)
Varun Ojha
 
Online Signal Processing Assignment Help
Online Signal Processing Assignment HelpOnline Signal Processing Assignment Help
Online Signal Processing Assignment Help
Matlab Assignment Experts
 
Image restoration1
Image restoration1Image restoration1
Image restoration1
moorthim7
 
Digtial Image Processing Q@A
Digtial Image Processing Q@ADigtial Image Processing Q@A
Digtial Image Processing Q@A
Chung Hua Universit
 
matlab.docx
matlab.docxmatlab.docx
Dip3
Dip3Dip3
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
nagwaAboElenein
 
Digital Image Processing - Image Restoration
Digital Image Processing - Image RestorationDigital Image Processing - Image Restoration
Digital Image Processing - Image Restoration
Mathankumar S
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods
thanhhoang2012
 
Image Restitution Using Non-Locally Centralized Sparse Representation Model
Image Restitution Using Non-Locally Centralized Sparse Representation ModelImage Restitution Using Non-Locally Centralized Sparse Representation Model
Image Restitution Using Non-Locally Centralized Sparse Representation Model
IJERA Editor
 
ECCV2010: feature learning for image classification, part 2
ECCV2010: feature learning for image classification, part 2ECCV2010: feature learning for image classification, part 2
ECCV2010: feature learning for image classification, part 2zukun
 
Lecture 6-2023.pdf
Lecture 6-2023.pdfLecture 6-2023.pdf
Lecture 6-2023.pdf
ssuserff72e4
 
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error normRobust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Tuan Q. Pham
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
Shajun Nisha
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
BHAGYAPRASADBUGGE
 
Signals and Systems Homework Help.pptx
Signals and Systems Homework Help.pptxSignals and Systems Homework Help.pptx
Signals and Systems Homework Help.pptx
Matlab Assignment Experts
 
Tao Fayan_Iso and Full_volume rendering
Tao Fayan_Iso and Full_volume renderingTao Fayan_Iso and Full_volume rendering
Tao Fayan_Iso and Full_volume renderingFayan TAO
 

Similar to Image Restoration (Digital Image Processing) (20)

ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)
 
Online Signal Processing Assignment Help
Online Signal Processing Assignment HelpOnline Signal Processing Assignment Help
Online Signal Processing Assignment Help
 
Image restoration1
Image restoration1Image restoration1
Image restoration1
 
Digtial Image Processing Q@A
Digtial Image Processing Q@ADigtial Image Processing Q@A
Digtial Image Processing Q@A
 
matlab.docx
matlab.docxmatlab.docx
matlab.docx
 
Dip3
Dip3Dip3
Dip3
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Digital Image Processing - Image Restoration
Digital Image Processing - Image RestorationDigital Image Processing - Image Restoration
Digital Image Processing - Image Restoration
 
Frequency domain methods
Frequency domain methods Frequency domain methods
Frequency domain methods
 
Image Restitution Using Non-Locally Centralized Sparse Representation Model
Image Restitution Using Non-Locally Centralized Sparse Representation ModelImage Restitution Using Non-Locally Centralized Sparse Representation Model
Image Restitution Using Non-Locally Centralized Sparse Representation Model
 
Histogram processing
Histogram processingHistogram processing
Histogram processing
 
ECCV2010: feature learning for image classification, part 2
ECCV2010: feature learning for image classification, part 2ECCV2010: feature learning for image classification, part 2
ECCV2010: feature learning for image classification, part 2
 
Lecture 6-2023.pdf
Lecture 6-2023.pdfLecture 6-2023.pdf
Lecture 6-2023.pdf
 
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error normRobust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
 
3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides3 intensity transformations and spatial filtering slides
3 intensity transformations and spatial filtering slides
 
Signals and Systems Homework Help.pptx
Signals and Systems Homework Help.pptxSignals and Systems Homework Help.pptx
Signals and Systems Homework Help.pptx
 
Tao Fayan_Iso and Full_volume rendering
Tao Fayan_Iso and Full_volume renderingTao Fayan_Iso and Full_volume rendering
Tao Fayan_Iso and Full_volume rendering
 

More from Shajun Nisha

Google meet and its extensions sac
Google meet and its extensions sacGoogle meet and its extensions sac
Google meet and its extensions sac
Shajun Nisha
 
Dip syntax 4
Dip syntax 4Dip syntax 4
Dip syntax 4
Shajun Nisha
 
Dip fundamentals 2
Dip fundamentals 2Dip fundamentals 2
Dip fundamentals 2
Shajun Nisha
 
Dip application 1
Dip application 1Dip application 1
Dip application 1
Shajun Nisha
 
Dip digital image 3
Dip digital image 3Dip digital image 3
Dip digital image 3
Shajun Nisha
 
ICT tools
ICT  toolsICT  tools
ICT tools
Shajun Nisha
 
25 environmental ethics intellectual property rights
25 environmental ethics intellectual property rights25 environmental ethics intellectual property rights
25 environmental ethics intellectual property rights
Shajun Nisha
 
Linear regression in machine learning
Linear regression in machine learningLinear regression in machine learning
Linear regression in machine learning
Shajun Nisha
 
Basics of research in research methodology
Basics of research in research methodologyBasics of research in research methodology
Basics of research in research methodology
Shajun Nisha
 
Auto encoders in Deep Learning
Auto encoders in Deep LearningAuto encoders in Deep Learning
Auto encoders in Deep Learning
Shajun Nisha
 
Teaching Aptitude in Research Methodology
Teaching Aptitude in Research MethodologyTeaching Aptitude in Research Methodology
Teaching Aptitude in Research Methodology
Shajun Nisha
 
Perceptron and Sigmoid Neurons
Perceptron and Sigmoid NeuronsPerceptron and Sigmoid Neurons
Perceptron and Sigmoid Neurons
Shajun Nisha
 
Mc Culloch Pitts Neuron
Mc Culloch Pitts NeuronMc Culloch Pitts Neuron
Mc Culloch Pitts Neuron
Shajun Nisha
 
Image processing lab work
Image processing lab workImage processing lab work
Image processing lab work
Shajun Nisha
 
introduction to cloud computing
 introduction to cloud computing introduction to cloud computing
introduction to cloud computing
Shajun Nisha
 
online learning NPTEL
online learning NPTELonline learning NPTEL
online learning NPTEL
Shajun Nisha
 

More from Shajun Nisha (16)

Google meet and its extensions sac
Google meet and its extensions sacGoogle meet and its extensions sac
Google meet and its extensions sac
 
Dip syntax 4
Dip syntax 4Dip syntax 4
Dip syntax 4
 
Dip fundamentals 2
Dip fundamentals 2Dip fundamentals 2
Dip fundamentals 2
 
Dip application 1
Dip application 1Dip application 1
Dip application 1
 
Dip digital image 3
Dip digital image 3Dip digital image 3
Dip digital image 3
 
ICT tools
ICT  toolsICT  tools
ICT tools
 
25 environmental ethics intellectual property rights
25 environmental ethics intellectual property rights25 environmental ethics intellectual property rights
25 environmental ethics intellectual property rights
 
Linear regression in machine learning
Linear regression in machine learningLinear regression in machine learning
Linear regression in machine learning
 
Basics of research in research methodology
Basics of research in research methodologyBasics of research in research methodology
Basics of research in research methodology
 
Auto encoders in Deep Learning
Auto encoders in Deep LearningAuto encoders in Deep Learning
Auto encoders in Deep Learning
 
Teaching Aptitude in Research Methodology
Teaching Aptitude in Research MethodologyTeaching Aptitude in Research Methodology
Teaching Aptitude in Research Methodology
 
Perceptron and Sigmoid Neurons
Perceptron and Sigmoid NeuronsPerceptron and Sigmoid Neurons
Perceptron and Sigmoid Neurons
 
Mc Culloch Pitts Neuron
Mc Culloch Pitts NeuronMc Culloch Pitts Neuron
Mc Culloch Pitts Neuron
 
Image processing lab work
Image processing lab workImage processing lab work
Image processing lab work
 
introduction to cloud computing
 introduction to cloud computing introduction to cloud computing
introduction to cloud computing
 
online learning NPTEL
online learning NPTELonline learning NPTEL
online learning NPTEL
 

Recently uploaded

How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 

Recently uploaded (20)

How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 

Image Restoration (Digital Image Processing)

  • 1. IMAGE RESTORATION Dr.S.SHAJUN NISHA, MCA.,M.Phil.,M.Tech.,MBA.,Ph.D Assistant Professor &Head PG & Research Dept. of Computer Science Sadakathullah Appa College Shajunnisha_s@yahoo.com +91 99420 96220
  • 2. 2 Chapter 5 Image Restoration Objectives: To improve a given image in some predefined sense. How MATLAB and Image Processing Tool models degradation phenomena and formulate restoration solutions. Image restoration is an objective process while image enhancement is subjective.
  • 3. 3 A Model of the Image Degradation/Restoration Process The degradation process is modeled as a degradation function that together with an additive noise term, operates on an input image f(x,y) to produce a degraded image g(x,y): Given g(x,y), some knowledge about the degradation function H, and some knowledge about the additive noise term , the objective of restoration is to obtain an estimate, , of the original image as close as possible to the original input image. ),()],([),( yxyxfHyxg  ),( yx ),(ˆ yxf
  • 4. 4
  • 5. 5 A Model of the Image Degradation/Restoration Process If H is a linear, spatially invariant process, it can be shown that the degraded image is given in the spatial domain by: Where h(x,y) is the spatial representation of the degradation function and “*” indicates convolution. We can also write its frequency domain equivalent as: Where all terms in capital letter refer to Fourier transform of corresponding terms. The degradation function H(u,v) is called the optical transform function (OTF), and the h(x,y) is called the point spread function. MATLAB provides conversion functions: otf2psf and psf2otf. ),(),(),(),( yxyxfyxhyxg  ),(),(),(),( vuNvuFvuHvuG 
  • 6. 6 A Model of the Image Degradation/Restoration Process Because the degradation due to a linear, spatially invariant degradation function, H, can be modeled as convolution, sometimes the degradation process is referred to as “convolving the image with a PSF or OTF”. Similarly the restoration process is sometimes referred to as deconvolution. We first deal with cases where H is assumed to be an identity operator, so it does not have any effect on the process. This way we deal only with degradation noise. Later we get H involve too.
  • 7. 7 Noise Models Ability to simulate the behavior and effects of noise is crucial to image restoration. We will look at two noise models: • Noise in the spatial domain (described by the noise probability density function), and • Noise in the frequency domain, described by various Fourier properties of the noise. MATLAB uses the function imnoise to corrupt an image with noise. This function has the basic syntax: g = imnoise(f, type, parameters) Where f is the input image, and type and parameters will be described later.
  • 8. 8 Adding Noise with Function imnoise Function imnoise converts the input image to class double in the range [0, 1] before adding noise to it. This is very important to remember. For example, to add Gaussian noise of mean 64 and variance 400 to a uint8 image, we scale the mean to 64/255 and the variance to 400/2552 for input into imnoise. Below is a summary of the syntax for this function (see Page 143 for more information) g = imnoise(f, ‘gaussian’, m, var) g = imnoise(f, ‘localvar’, V) g = imnoise(f, ‘localvar’, image_intensity, var) g = imnoise(f, ‘salt & pepper’, d) g = imnoise(f, ‘speckle’, var) g = imnoise(f, ‘poisson’)
  • 9. 9 Generating Spatial Random Noise with a Specified Distribution Often, we wish to generate noise of types and parameters other than the ones listed on previous page. In such cases, spatial noise are generated using random numbers, characterized by probability density function (PDF) or by the corresponding cumulative distribution function (CDF). Two of the functions used in MATLAB to generate random numbers are: rand – to generate uniform random numbers, and randn – to generate normal (Gaussian) random numbers.
  • 10. 10 Example: Assume that we have a random number generator that generates numbers, w, uniformly in the [0 1] range. Suppose we wish to generate random numbers with a Rayleigh CDF, which is defined as:         az aze zF baz z for0 for1 )( /)( 2 To find z we solve the equation: Or Since the square root term is nonnegative, we are assured that no values of z less than a are generated. In MATALB: R = a + sqrt(b*log(1 – rand(M, N) )); we baz   /)( 2 1 )1ln( wbaz 
  • 11. 11 Function imnoise2 generates random numbers having CDFs shown in the table below. They all use rand as: rand(M,N)
  • 12. 12 imnoise vs. imnoise2 The imnoise function generates a 1D noise array, imnoise2 will generate an M-by-N noise array. imnoise scales the noise array to [0 1], imnoise2 does not scale at all and will produce the noise pattern itself. The user specifies the parameters directly. Note: The salt-and-pepper noise has three values: 0 corresponding to pepper noise 1 corresponding to salt noise, and 0.5 corresponding to no noise. You can copy the imnoise2 function from the course web page.
  • 13. 13 r = imnoise2('gaussian', 100000, 1, 0, 1); p = hist(r, 50); bar(p) 0 10 20 30 40 50 60 0 1000 2000 3000 4000 5000 6000 7000 8000
  • 14. 14 r = imnoise2('gaussian', 256, 256, 0, 255); p = hist(r, 50); bar(p)
  • 15. 15 0 10 20 30 40 50 60 0 500 1000 1500 2000 2500 r = imnoise2(‘uniform', 100000, 1, 0, 1); p = hist(r, 50); bar(p)
  • 16. 16 0 10 20 30 40 50 60 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 r = imnoise2(‘lognormal', 100000, 1, 1, 0.25); p = hist(r, 50); bar(p)
  • 17. 17 0 10 20 30 40 50 60 0 1000 2000 3000 4000 5000 6000 r = imnoise2(‘rayleigh', 100000, 1, 1, 0.25); p = hist(r, 50); bar(p)
  • 18. 18 0 10 20 30 40 50 60 0 0.5 1 1.5 2 2.5 x 10 4 r = imnoise2(‘exponential', 100000, 1, 1, 1); p = hist(r, 50); bar(p) Does not matter
  • 19. 19 0 10 20 30 40 50 60 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 r = imnoise2(‘erlang', 100000, 1, 2, 5); p = hist(r, 50); bar(p)
  • 20. 20 0 10 20 30 40 50 60 0 1 2 3 4 5 6 7 8 9 10 x 10 4 r = imnoise2(‘salt & pepper', 100000, 1, 0.05, 0.05); p = hist(r, 50); bar(p) If r(x,y) = 0, black If r(x,y) = 1, white If r(x,y) = 0.5 none
  • 21. 21 Periodic Noise This kind of noise usually arises from electrical and/or electromagnetical interference during image acquisition. These kinds of noise are spatially dependent noise. The periodic noise is handled in an image by filtering in the frequency domain. Our model for a periodic noise is: Where A is amplitude, u0 and v0 determine the sinusoidal frequencies with respect to the x- and y-axis, respectively, and Bx and By are phase displacements with respect to the origin. The M-by-N DFT of the equation is: ]/)(2/)(2[(),( 00 NByvMBxuSinAyxr yx   )],()(),()[( 2 ),( 00 /2 00 /2 00 vvuuevvuue A jvuR NBvjMBuj yx   
  • 22. 22 This statement shows a pair of complex conjugate impulses located at (u+u0 , v+v0) and (u-u0 , v-v0), respectively. A MATLAB function (imnoise3) accepts an arbitrary number of impulse locations (frequency coordinates), each with its own amplitude, frequencies, and phase displacement parameters, and computes r(x, y) as the sum of sinusoids of the form shown in the previous page. The function also outputs the Fourier transform of the sum of sinusoides, R(u,v) and the spectrum of R(u,v). The sine waves are generated from the given impulse location information via the inverse DFT. Only one pair of coordinates is required to define the location of an impulse. The program generates the conjugate symmetric impulses.
  • 23. 23 C = [0 64; 0 128; 32 32; 64 0; 128 0; -32 32]; [r, R, S] = imnoise3(512, 512, C); imshow(S, []); C is k-by-2 matrix containing K pairs of frequency domain coordinates (u,v) r is the noise pattern of size M- by-N R is the Fourier transform of r S is the spectrum of R
  • 26. 26 C = [0 32; 0 64; 16 16; 32 0; 64 0; -16 16]; [r, R, S] = imnoise3(512, 512, C); imshow(S, []); C = [0 64; 0 128; 32 32; 64 0; 128 0; -32 32];
  • 28. 28 C = [6 32; -2 2]; [r, R, S] = imnoise3(512, 512, C); imshow(S, []);
  • 30. 30 C = [6 32; -2 2]; A = [1 5]; [r, R, S] = imnoise3(512, 512, C, A); imshow(S, []);