Upload
naseem-ansari
View
224
Download
0
Embed Size (px)
Citation preview
7/27/2019 Chapter 5 Ip
1/76
Image Restoration
Chapter 5
Prof. Vidya Manian
De t. of Electrical and Com uter En ineerin
INEL 5327 ECE, UPRM1
7/27/2019 Chapter 5 Ip
2/76
Overview A model of the Image Degradation/Restoration Process
Noise Models Restoration in the Presence of Noise Only-Spatial
Periodic Noise Reduction by Frequency Domain Filtering
Estimatin the De radation Functions
Inverse Filtering
Minimum Mean Square error(Wiener) Filtering
Constrained Least Squares Filtering Geometric Mean Filter
INEL 5327 ECE, UPRM2
7/27/2019 Chapter 5 Ip
3/76
A model of the Image
egra on es ora on rocess
f(x,y) : image function
g(x,y): degraded image
(x,y): additive noise term
INEL 5327 ECE, UPRM3
7/27/2019 Chapter 5 Ip
4/76
A model of the Image
egra on es ora on rocess
Is H is a linear, position-invariant process, then thedegraded image is given in the spatial domain
g(x,y) = h(x,y) * f(x,y) + (x,y) (5.1-1)
Frequency domain representation
u,v = u,v u,v u,v . -
INEL 5327 ECE, UPRM4
7/27/2019 Chapter 5 Ip
5/76
Noise Models - Gaussian Noise
(5.2-1)
z: gray level
: mean
: standard deviation
2: variance
INEL 5327 ECE, UPRM5
7/27/2019 Chapter 5 Ip
6/76
Noise Models - Gaussian Noise
INEL 5327 ECE, UPRM6
7/27/2019 Chapter 5 Ip
7/76
Noise Models - Ra lei h Noise
(5.2-2)for z>= a
for z < a
INEL 5327 ECE, UPRM7
7/27/2019 Chapter 5 Ip
8/76
Noise Models - Ra lei h Noise
INEL 5327 ECE, UPRM8
7/27/2019 Chapter 5 Ip
9/76
Noise Models Erlan Gamma Noise
(5.2-5)for z>= 0
for z < 0
INEL 5327 ECE, UPRM9
7/27/2019 Chapter 5 Ip
10/76
Noise Models - Erlan Gamma Noise
INEL 5327 ECE, UPRM10
7/27/2019 Chapter 5 Ip
11/76
Noise Models Ex onential Noise
(5.2-8)for z>= 0
for z < 0
INEL 5327 ECE, UPRM11
7/27/2019 Chapter 5 Ip
12/76
Noise Models - Ex onential Noise
INEL 5327 ECE, UPRM12
7/27/2019 Chapter 5 Ip
13/76
Noise Models Uniform Noise
(5.2-11)for a
7/27/2019 Chapter 5 Ip
14/76
Noise Models - Uniform Noise
INEL 5327 ECE, UPRM14
7/27/2019 Chapter 5 Ip
15/76
Noise Models Impulse (salt-and-
pepper o se
(5.2-14)for z = a
for z = b
otherwise
INEL 5327 ECE, UPRM15
7/27/2019 Chapter 5 Ip
16/76
Noise Models - Impulse (salt-and-
pepper o se
INEL 5327 ECE, UPRM16
7/27/2019 Chapter 5 Ip
17/76
Noise Models Periodic Noise
INEL 5327 ECE, UPRM17
7/27/2019 Chapter 5 Ip
18/76
Restoration in the Presence of Noise
n y- pa a er ng
x = f x + x 5.3-1
Frequency domain representation
G(u,v) = F(u,v) + N(u,v) (5.1-2)
INEL 5327 ECE, UPRM18
7/27/2019 Chapter 5 Ip
19/76
Mean Filters Arithmetic mean filterThe simplest of mean filters.
(5.3-3)
window of size m x n, centered at point (x,y).
The value of the restored image at any point (x,y) issimply arithmetic mean computed using the pixels in theregion defined by Sxy.
INEL 5327 ECE, UPRM19
7/27/2019 Chapter 5 Ip
20/76
Mean Filters Geometric mean filter
(5.3-4)
Each restored pixel is given by the product of thepixels in the subimage window, raised to the power
mn.
INEL 5327 ECE, UPRM20
7/27/2019 Chapter 5 Ip
21/76
Mean Filters Harmonic mean filter
(5.3-5)
Works well for salt noise, but fails for pepper noise.
INEL 5327 ECE, UPRM21
7/27/2019 Chapter 5 Ip
22/76
Mean Filters Contraharmonic mean
er
(5.3-6)
Q: order of the filter.
Works well for reducing or virtually eliminating the
effects of salt-and-pepper noise.Q positive eliminates the pepper
Q negative eliminates the saltINEL 5327 ECE, UPRM22
7/27/2019 Chapter 5 Ip
23/76
Mean Filters Exam les I
INEL 5327 ECE, UPRM23
7/27/2019 Chapter 5 Ip
24/76
Mean Filters Exam les II
INEL 5327 ECE, UPRM24
7/27/2019 Chapter 5 Ip
25/76
Order Statistics Filters
r er tat st cs ters xpress on
Median Filter
Max Filter
Min Filter
Mid Point Filter
Alpha-trimmed mean filter
INEL 5327 ECE, UPRM25
7/27/2019 Chapter 5 Ip
26/76
Order Statistics Filters Exam le I
INEL 5327 ECE, UPRM26
7/27/2019 Chapter 5 Ip
27/76
Order Statistics Filters Exam le II
INEL 5327 ECE, UPRM27
7/27/2019 Chapter 5 Ip
28/76
Ada tive Filters Adaptive, local noise reduction filter
g(x,y) the value of the noisy image at
(x,y)
variance of the noise corrupting
f(x,y) to form g(x,y)
the local mean of the pixels in Sxy
the local variance of the pixels inSxy
INEL 5327 ECE, UPRM28
7/27/2019 Chapter 5 Ip
29/76
Ada tive Filters Adaptive median filter
Level A: A1 = Zmed Zmin
if A1 > 0 AND A2 < 0, Go to level B
If window size 0 AND B2 < 0, output Zxy
Else output Zmed
INEL 5327 ECE, UPRM29
7/27/2019 Chapter 5 Ip
30/76
Periodic Noise Reduction
energy in the Fourier transform, at locationscorresponding to the frequencies of the periodicinterference
Bandreject filters General location of the noise component(s) in the
frequency domain is approximately known
Bandpass filter performs
INEL 5327 ECE, UPRM30
7/27/2019 Chapter 5 Ip
31/76
Periodic Noise Reduction by Frequency
oma n er ngBandre ect Filters
Ideal
Butterworth bandreject
Gaussian Filters
Bandpass Filters
INEL 5327 ECE, UPRM31
7/27/2019 Chapter 5 Ip
32/76
Periodic Noise Reduction by Frequency
oma n er ng xamp e
INEL 5327 ECE, UPRM32
7/27/2019 Chapter 5 Ip
33/76
the Fourier spectrum
Butterworth bandreject filter of order 4 with
the noise impulses
from the transform
INEL 5327 ECE, UPRM33
7/27/2019 Chapter 5 Ip
34/76
common because it removes too much image detail
Notch filters
neighborhoods about a center frequency
Shape of the notch can be arbitrary (eg.,
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
35/76
Notch FiltersNotch Filters RejectRadius D0 with centers at (u0, v0), by simemetry at (-u0, -v0)
Ideal
Butterworth bandreject
Gaussian Filters
These three filters become highpass filters if u0 = v0 = 0
Notch Filters Pass
INEL 5327 ECE, UPRM35
7/27/2019 Chapter 5 Ip
36/76
36
spatial domain after passing through the notch filter
Fig 5.20 shows starlike components caused by
Optimum method to minimize local variance of the
Extract principal frequency component of
=
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
37/76
37
Formation of HNP(u,v) requires judgment about
Corresponding pattern in spatial domain after
n(x,y)=F-1{HNP(u,v)G(u,v)}
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
38/76
Notch Filters Exam le
INEL 5327 ECE, UPRM38
7/27/2019 Chapter 5 Ip
39/76
Periodic interference39
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
40/76
Estimatin the de radation function By observation, experimentation and mathematical modeling Blind deconvolution: rocess of restorin an ima e b usin a
40
degradation function that bas been estimated in some way
By observation deduce complete degradation function H(u,v)ase on assumption o position invariance
Perform experiment with the equipment used to acquire the
Obtain impulse response of the degradation. A linear, space-invariant system is characterized completely by its impulse
response H(u,v)=G(u,v)/A
u,v s t e o t e o serve mage an s a constant
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
41/76
Estimation b modelin
41
turbulence
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
42/76
Estimatin the De radation Function
Because the true degradation function is seldom known completely, the process of restoringimage is ca e in econvo ution .
Let assume that noise is negligible, so our principal equation (5-1.1) will be:
g(x,y) = h(x,y) * f(x,y)
By Image Observation
By Experimentation
By Modeling
For example a model for atmospheric turbulence:
INEL 5327 ECE, UPRM42
E ti ti th D d ti F ti
7/27/2019 Chapter 5 Ip
43/76
Estimating the Degradation Function
xamp e
INEL 5327 ECE, UPRM43
7/27/2019 Chapter 5 Ip
44/76
Inverse Filterin
A simple approach is direct inverse filtering to restore the image. Just dividingt e trans orm egra e unction G(u,v), y t e egra ation unction:
If we replace G(u,v) by F(u,v)H(u,v)+ N(u,v), we obtain:
As ou see we cannot recover the unde raded ima e exactl because N u v
is a random function whose Fourier transform is not known. If H(u,v) is zero orvery small values, then the ratio N(u,v)/H(u,v) would dominate the estimate
INEL 5327 ECE, UPRM44
7/27/2019 Chapter 5 Ip
45/76
45
By limiting the analysis to frequencies near origin,
Fig. 5.27: Inverse fitlering
G(u,v)/H(u,v) outside a radius of 40, 70 and 85
Cutoff is implemented by applying to the ratio a
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
46/76
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
47/76
Inverse Filterin Exam le
INEL 5327 ECE, UPRM47
Minimum Mean Square Error (Wiener)
7/27/2019 Chapter 5 Ip
48/76
Minimum Mean Square Error (Wiener)
er ng
noise into the restoration process.
degradation function =
com lex
conjugate of =
=
power spectrum of the
noise =
If noise is zero, the power spectrum vanishes and Wiener filter reduces to the inverse
power spectrum o t e
undegraded image =
filter. If we consider a as a constant, we have the expression reduces to:
K is a specified constant.
INEL 5327 ECE, UPRM48
7/27/2019 Chapter 5 Ip
49/76
Wiener Filterin Exam le I
INEL 5327 ECE, UPRM49
7/27/2019 Chapter 5 Ip
50/76
Wiener Filterin Exam le II
INEL 5327 ECE, UPRM50
7/27/2019 Chapter 5 Ip
51/76
51
by the inverse Fourier transform of the frequencydomain estimate
A number of useful measures are based on the
power spectra of noise and of the undegradedimage: Signal to-noise ratio, mean square error
Root mean square error
Root mean square signal to noise ratio
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
52/76
Constrained Least S uares Filterin
.
With Constrained Least Squares Filtering is required to know the mean and
variance of the noise and we can calculate these variables from a given degraded
ima e.
We can express our main expression in vector-matrix form, as follows:
Subject to the constraint:
The frequency domain solution is given by the next expression:
INEL 5327 ECE, UPRM52
Constrained Least Squares Filtering -
7/27/2019 Chapter 5 Ip
53/76
Constrained Least Squares Filtering
xamp e
INEL 5327 ECE, UPRM53
7/27/2019 Chapter 5 Ip
54/76
INEL 5327 ECE, UPRM54
7/27/2019 Chapter 5 Ip
55/76
55
n ro uc on o ompu er
Tomo ra h De t. of Homeland
Security
INEL 5327 ECE, UPRM
Image Reconstruction from
7/27/2019 Chapter 5 Ip
56/76
g
ro ec ons Reconstructing an image from a series of
56
projections, X-ray computed tomography (CT)
Imaging a single object on a uniform background
3-D region of a human body round object is a
tumor with higher absorption characteristics
Pass a thin flat beam of X-rays from left to right,energy absorbed more by object than background
Any point in the signal is the sum of the absorptionvalues across the single ray in the beam
correspon ing spatia y to t at point in ormation is
the 1-D absorption signal)INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
57/76
INEL 5327 ECE, UPRM57
B k ti
7/27/2019 Chapter 5 Ip
58/76
Back ro ection
-
58
which the beam came-
called smearing
direction of the beam
Reconstruction by adding the of backprojection
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
59/76
INEL 5327 ECE, UPRM59
7/27/2019 Chapter 5 Ip
60/76
s num er o pro ec ons ncreases , e s reng othe non-intersecting backprojections decreases60
projections intersects,
becomes circular
Projections 180 apart are mirror images of each
,
circle to generate all projections required forreconstruction
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
61/76
61
INEL 5327 ECE, UPRM
Principles of computed
7/27/2019 Chapter 5 Ip
62/76
omograp y
62
of an object by X-raying the object from manydifferent directions
X-ray beam in the form of a cone
-point is proportional to the X-ray energy impingingon that point after it has passed through the subject
2-D equivalent of backprojection
volumeINEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
63/76
the backprojectiosn would result in 3D rendition of
the structure of the chest cavity
63
CT gets the same information by generating slicesthrough the body
3D representation can be obtained by stacking the
slices A CT is much more economical, number of detectors
required to get a high resolution slice is much
smaller than generating a complex 2D projection ofthe same resolution
X-ray levels and computation cost are less in the 1D
projection CT approachINEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
64/76
-
64
object along parallel rays-
Cormack and Hounsfield shared the 1979 Nobel
tomography
X-ray beam and a single detector
pair is translated incrementally along the linear
directionINEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
65/76
65
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
66/76
66
of the detector at each increment of translation
source/detector assembly is rotated and the
procedure is repeated to generate anotherprojection at a different angle. Procedure isrepeated for all angles [0,180]degrees
Image is generated by backprojection. A set of cross-sectional imaages(slices) is generated
by incrementally moving the subject pst the
source/detector planeINEL 5327 ECE, UPRM
Stackin these ima es com utationall roduces a
7/27/2019 Chapter 5 Ip
67/76
Stackin these ima es com utationall roduces a
3D volume of a section of the body
Second generation (G2) CT scanners beam used is
67
in the shape of a fan
Requires fewer translations of the source detector
pair
Third-generation (G3) scanners employ a bank ofdetectors long enough to cover the entire field ofview of a wider beam
Fourth generation (G4) scanners-employ a circularring of detection (5000) only the source has torotate
Advantage of G3 and G4 is speed.INEL 5327 ECE, UPRM
Disadvantage-X-ray scatter, higher doses than G1
7/27/2019 Chapter 5 Ip
68/76
an o ac eve compara e Fifth generation (G5)CT scanners-electron beam CT
68
e m na es a mec an ca mo on y emp oy ng
electron beams controlled electromagneticallyx genera on e ca - or scanner
is configured using slip rings that eliminate the need
source/detectors and the processing unit
360 deg while the patient is moved at a constants eed alon the axis er endicular to the scan
Results in a continuous helical volume of data that is
rocessed to obtain individual slice ima esINEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
69/76
69
scanners thick fan beams are used in conjunctionwith parallel banks of detectors to collect volumetricCT data simultaneously
3D cross sectional slabs rather than single ones aregenerated per X ray burst
Uses Xray tubes more economically, reducing cost
and dosage
INEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
70/76
70
INEL 5327 ECE, UPRM
The
7/27/2019 Chapter 5 Ip
71/76
The71
INEL 5327 ECE, UPRM
Geometric Mean Filter
7/27/2019 Chapter 5 Ip
72/76
Geo e c Mea e
following expression:
,
INEL 5327 ECE, UPRM72
Geometric Transformations
7/27/2019 Chapter 5 Ip
73/76
Modif the s atial relationshi s between ixels in animage.
In this type of transformation we have to approach:
- Spatia trans ormation, which de ines therearrangement of pixels
assignment of gray levels to pixels in the spatiallytransformed image.
INEL 5327 ECE, UPRM73
Exercises
7/27/2019 Chapter 5 Ip
74/76
-
74
Explain why the filter is effective in eliminating
pepper noise when Q is positive.
Explain why the filter is effective in eliminating salt
noise when Q is negative. Discuss the behavior of the filter when Q=-1
intensity levels
geometric mean filtering is less blurredINEL 5327 ECE, UPRM
7/27/2019 Chapter 5 Ip
75/76
75
currency exchange, finds that the photos of the coins
are blurred to the point where the date and othermarkings are not readable. The blurring is due tothe camera being out of focus when the pictures
were taken. Propose a step-by-steps solution torestore the images to the point that the Professor
can rea t e mar ngs, g ven t e camera use ortaking the photos and also the coins.
INEL 5327 ECE, UPRM
Restoring images degraded due to linear motion (in x-
-
7/27/2019 Chapter 5 Ip
76/76
-
5.17) Linear motion. Estimate blurring function H(u,v)76
5.19) Images from a craft are blurred due to circular
motion (rapid rotation of the craft about its verticalaxis). The images are blurred by uniform rotational
motion. The craft rotation was limited to /8 radians
uring image acquisition. e image acquisitionprocess can be modeled as an ideal shutter that is
radians. Assuming vertical motion was negligible
restoring the images.INEL 5327 ECE, UPRM