SlideShare une entreprise Scribd logo
1  sur  31
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, [])

Contenu connexe

Tendances

Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processingAhmed Daoud
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image RestorationMostafa G. M. Mostafa
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsKalyan Acharjya
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency DomainAmnaakhaan
 
Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processingAnuj Arora
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)asodariyabhavesh
 
Image segmentation
Image segmentationImage segmentation
Image segmentationKuppusamy P
 
5. gray level transformation
5. gray level transformation5. gray level transformation
5. gray level transformationMdFazleRabbi18
 
filters for noise in image processing
filters for noise in image processingfilters for noise in image processing
filters for noise in image processingSardar Alam
 
Image degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafImage degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafMD Naseem Ashraf
 
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 convolutionAbhishek Mukherjee
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersSuhaila Afzana
 
Image feature extraction
Image feature extractionImage feature extraction
Image feature extractionRishabh shah
 

Tendances (20)

Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Histogram Equalization
Histogram EqualizationHistogram Equalization
Histogram Equalization
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image Restoration
 
Image Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):BasicsImage Restoration (Frequency Domain Filters):Basics
Image Restoration (Frequency Domain Filters):Basics
 
Image Filtering in the Frequency Domain
Image Filtering in the Frequency DomainImage Filtering in the Frequency Domain
Image Filtering in the Frequency Domain
 
Spatial filtering using image processing
Spatial filtering using image processingSpatial filtering using image processing
Spatial filtering using image processing
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
5. gray level transformation
5. gray level transformation5. gray level transformation
5. gray level transformation
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Noise
NoiseNoise
Noise
 
filters for noise in image processing
filters for noise in image processingfilters for noise in image processing
filters for noise in image processing
 
Image degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem AshrafImage degradation and noise by Md.Naseem Ashraf
Image degradation and noise by Md.Naseem Ashraf
 
Canny Edge Detection
Canny Edge DetectionCanny Edge Detection
Canny Edge Detection
 
Noise Models
Noise ModelsNoise Models
Noise Models
 
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
 
Image Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain FiltersImage Smoothing using Frequency Domain Filters
Image Smoothing using Frequency Domain Filters
 
Image feature extraction
Image feature extractionImage feature extraction
Image feature extraction
 

Similaire à 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
 
Image restoration1
Image restoration1Image restoration1
Image restoration1moorthim7
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfnagwaAboElenein
 
Digital Image Processing - Image Restoration
Digital Image Processing - Image RestorationDigital Image Processing - Image Restoration
Digital Image Processing - Image RestorationMathankumar 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 ModelIJERA 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.pdfssuserff72e4
 
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 normTuan Q. Pham
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringShajun 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 slidesBHAGYAPRASADBUGGE
 
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
 

Similaire à 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
 

Plus de Shajun Nisha

Google meet and its extensions sac
Google meet and its extensions sacGoogle meet and its extensions sac
Google meet and its extensions sacShajun Nisha
 
Dip fundamentals 2
Dip fundamentals 2Dip fundamentals 2
Dip fundamentals 2Shajun Nisha
 
Dip digital image 3
Dip digital image 3Dip digital image 3
Dip digital image 3Shajun Nisha
 
25 environmental ethics intellectual property rights
25 environmental ethics intellectual property rights25 environmental ethics intellectual property rights
25 environmental ethics intellectual property rightsShajun Nisha
 
Linear regression in machine learning
Linear regression in machine learningLinear regression in machine learning
Linear regression in machine learningShajun Nisha
 
Basics of research in research methodology
Basics of research in research methodologyBasics of research in research methodology
Basics of research in research methodologyShajun Nisha
 
Auto encoders in Deep Learning
Auto encoders in Deep LearningAuto encoders in Deep Learning
Auto encoders in Deep LearningShajun Nisha
 
Teaching Aptitude in Research Methodology
Teaching Aptitude in Research MethodologyTeaching Aptitude in Research Methodology
Teaching Aptitude in Research MethodologyShajun Nisha
 
Perceptron and Sigmoid Neurons
Perceptron and Sigmoid NeuronsPerceptron and Sigmoid Neurons
Perceptron and Sigmoid NeuronsShajun Nisha
 
Mc Culloch Pitts Neuron
Mc Culloch Pitts NeuronMc Culloch Pitts Neuron
Mc Culloch Pitts NeuronShajun Nisha
 
Image processing lab work
Image processing lab workImage processing lab work
Image processing lab workShajun Nisha
 
introduction to cloud computing
 introduction to cloud computing introduction to cloud computing
introduction to cloud computingShajun Nisha
 
online learning NPTEL
online learning NPTELonline learning NPTEL
online learning NPTELShajun Nisha
 

Plus de 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
 

Dernier

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Dernier (20)

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

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, []);