image restoration outline a model of the image degradation / restoration process noise models...
TRANSCRIPT
![Page 1: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/1.jpg)
IMAGE RESTORATION
![Page 2: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/2.jpg)
Outline• A model of the image degradation / restoration process• Noise models• Restoration in the presence of noise only – spatial filteri
ng• Periodic noise reduction by frequency domain filtering• Linear, position-invariant degradations• Estimating the degradation function• Inverse filtering & Wiener filtering• Constrained Least square filtering• Geometric mean filter• Geometric and spatial transformation
![Page 3: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/3.jpg)
What is Image Restoration?•Image restoration is to restore a degraded image back to the original image •Image enhancement is to manipulate the image so that it is suitable for a specific application.
![Page 4: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/4.jpg)
4
Image Restoration
Image restoration attempts to restore images that have been degraded
–Identify the degradation process and attempt to reverse it
–Similar to image enhancement, but more objective
![Page 5: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/5.jpg)
A model of the image degradation/restoration process
g(x,y)=f(x,y)*h(x,y)+(x,y) – Spatial domain
G(u,v)=F(u,v)H(u,v)+N(u,v) – Frequency domain
![Page 6: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/6.jpg)
A model of the image degradation/restoration process
•Where,f(x,y) - input imagef^(x,y) - estimated original imageg(x,y) - degraded imageh(x,y) - degradation function
(x,y) - additive noise term
![Page 7: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/7.jpg)
Noise models • Sources of noise
–Image acquisition (digitization) - Imaging sensors can be affected by ambient conditions
–Image transmission - Interference can be added to an image during transmission
• Spatial properties of noise–Statistical behavior of the gray-level values of pixels–Noise parameters, correlation with the image
• Frequency properties of noise–Fourier spectrum–Ex. white noise (a constant Fourier spectrum)
![Page 8: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/8.jpg)
Noise models •Noise model is decided based on understanding of the physics of the sources of noise.
–Gaussian: poor illumination–Rayleigh: range image–Gamma(Erlang), Exponential: laser imaging–Impulse: faulty switch during imaging–Uniform: least used
![Page 9: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/9.jpg)
Noise probability density functions
•Noise cannot be predicted but can be approximately described in statistical way using the probability density function (PDF)
![Page 10: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/10.jpg)
Gaussian noise• Mathematical tractability in spatial and
frequency domains• Used frequently in practice• Electronic circuit noise and sensor noise
22 2/)(
2
1)(
zezp
mean variance
1)( dzzpNote:
Intensity
![Page 11: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/11.jpg)
Gaussian noise PDF
70% in [(), ()]95% in [(), ()]
![Page 12: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/12.jpg)
–The mean and variance of this density are given by
–a and b can be obtained through mean and variance
az
azeazbzp
baz
for 0
for )(2
)(/)( 2
4
)4( and 4/ 2
b
ba
Rayleigh noise
![Page 13: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/13.jpg)
Rayleigh noise PDF
![Page 14: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/14.jpg)
–The mean and variance of this density are given by
–a and b can be obtained through mean and variance
0for 0
0for )!1()(
1
z
zeb
zazp
azbb
22 and /a
bab
Erlang (Gamma) noise
![Page 15: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/15.jpg)
Gamma noise (PDF)
![Page 16: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/16.jpg)
The mean and variance of this density are given by
0for 0
0for )(
z
zaezp
az
22 1
and /1a
a
Exponential noise
![Page 17: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/17.jpg)
Exponential Noise PDFSpecial case of Erlang PDF with b=1
![Page 18: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/18.jpg)
Uniform noise
otherwise 0
if 1
)( bzaabzp
12
)(
22
2 ab
ba
Mean:
Variance:
• Less practical, used for random number generator
![Page 19: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/19.jpg)
Uniform PDF
z
![Page 20: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/20.jpg)
Impulse (salt-and-pepper) nosie
otherwise 0
for
for
)( bzP
azP
zp b
a
If either Pa or Pb is zero, it is called unipolar.Otherwise, it is called bipolar.
• Quick transients, such as faulty switching during imaging
![Page 21: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/21.jpg)
Impulse (salt-and-pepper) nosie PDF
![Page 22: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/22.jpg)
Image Degradation with Additive Noise
Original image
Histogram
Degraded images
),(),(),( yxyxfyxg
![Page 23: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/23.jpg)
Histogram
Degraded images
Image Degradation with Additive Noise (cont.)
![Page 24: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/24.jpg)
Periodic noise• Is an image that arises from electrical and
electromechanical interference during image acquisition
• It can be observed by visual inspection both in the spatial domain and frequency domain
• can be reduced significantly via frequency domain filtering
![Page 25: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/25.jpg)
Periodic Noise
Periodic noise looks like dotsIn the frequencydomain
![Page 26: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/26.jpg)
Estimation of noise parameters
• Periodic noise–Observe the frequency spectrum
• Random noise with unknown PDFs–Case 1: imaging system is available•Capture images of “flat” environment
–Case 2: noisy images available•Take a strip from constant area•Draw the histogram and observe it•Measure the mean and variance
![Page 27: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/27.jpg)
Estimation of Noise
Image histogram cannot be used to estimate noise PDF.
It is better to use the histogram of one area of an image that has constant intensity to estimate noise PDF.
![Page 28: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/28.jpg)
Noise Removal Restoration Methods
• Mean filters–Arithmetic mean filter–Geometric mean filter–Harmonic mean filter–Contra-harmonic mean
filter• Order statistics filters
–Median filter–Max and min filters–Mid-point filter–alpha-trimmed filters
• Adaptive filters–Adaptive local noise
reduction filter–Adaptive median filter
![Page 29: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/29.jpg)
Mean Filters
Arithmetic mean filter or moving average filter
xySts
tsgmn
yxf),(
),(1
),(ˆ mn = size of moving window
Degradation model:
),(),(),(),( yxyxhyxfyxg
To remove this part
- is the simplest of the mean filters- smooths local variations in an image - noise is reduced as a result of blurring
![Page 30: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/30.jpg)
Mean Filters Contd...
Geometric mean filter
mn
Sts xy
tsgyxf
1
),(
),(),(ˆ
- achieves smoothing as compared to arithmetic mean filter- it tends to lose less image detail in the process
![Page 31: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/31.jpg)
Mean Filter: Example
Original image
Image corrupted by AWGN
Image obtained
using a 3x3geometric mean filter
Image obtained
using a 3x3arithmetic mean filter
![Page 32: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/32.jpg)
Harmonic and Contraharmonic FiltersHarmonic mean filter
xySts tsg
mnyxf
),( ),(1
),(ˆ
Contraharmonic mean filter
xy
xy
Sts
Q
Sts
Q
tsg
tsg
yxf
),(
),(
1
),(
),(
),(ˆ
mn = size of moving window
Works well for salt noisebut fails for pepper noise
Q = the filter order
Positive Q is suitable for eliminating pepper noise.Negative Q is suitable for eliminating salt noise.
For Q = 0, the filter reduces to an arithmetic mean filter.For Q = -1, the filter reduces to a harmonic mean filter.
![Page 33: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/33.jpg)
Contraharmonic Filters: Example
Image corrupted by pepper noise with prob. = 0.1
Image corrupted
by salt noise with prob. = 0.1
Image obtained
using a 3x3contra-
harmonic mean filter
With Q = 1.5
Image obtained
using a 3x3contra-
harmonic mean filter
With Q=-1.5
![Page 34: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/34.jpg)
Order-Statistic Filters
subimage
Original image
Moving window
Statistic parametersMean, Median, Mode, Min, Max, Etc.
Output image
![Page 35: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/35.jpg)
Order-Statistics FiltersMedian filter
),(median),(ˆ),(
tsgyxfxySts
Max filter
),(max),(ˆ),(
tsgyxfxySts
Min filter
),(min),(ˆ),(
tsgyxfxySts
Midpoint filter
),(min),(max2
1),(ˆ
),(),(tsgtsgyxf
xyxy StsSts
Reduce “dark” noise (pepper noise)
Reduce “bright” noise (salt noise)
![Page 36: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/36.jpg)
Median Filter : How it works Median Filter : How it works A median filter is good for removing impulse, isolated noise
Degraded image
Salt noise
Pepper noise
Movingwindow
Sorted array
Salt noisePepper noise
Median
Filter output
Normally, impulse noise has high magnitude and is isolated. When we sort pixels in the moving window, noise pixels are usually at the ends of the array.
Therefore, it’s rare that the noise pixel will be a median value.
![Page 37: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/37.jpg)
Median Filter : Example
Image corrupted
by salt-and-pepper
noise with pa=pb= 0.1
Images obtained using a 3x3 median filter
1
4
2
3
![Page 38: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/38.jpg)
Max and Min Filters: Example
Image corrupted by pepper noise with prob. = 0.1
Image corrupted
by salt noise with prob. = 0.1
Image obtained
using a 3x3max filter
Image obtained
using a 3x3min filter
![Page 39: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/39.jpg)
Alpha-trimmed Mean Filter
xyStsr tsg
dmnyxf
),(
),(1
),(ˆ
where, gr(s,t) represent the remaining mn-d pixels after removing the d/2 highest and d/2 lowest values of g(s,t).
This filter is useful in situations involving multiple types of noise such as a combination of salt-and-pepper and Gaussian noise.
![Page 40: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/40.jpg)
Alpha-trimmed Mean Filter: ExampleAlpha-trimmed Mean Filter: Example
Image corrupted by additive
uniform noise
Image obtained
using a 5x5arithmetic mean filter
Image additionallycorrupted by additivesalt-and-pepper noise
1 2
2 Image obtained
using a 5x5geometric mean filter
2
![Page 41: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/41.jpg)
Alpha-trimmed Mean Filter: Example (cont.)Alpha-trimmed Mean Filter: Example (cont.)
Image corrupted by additive
uniform noise
Image obtained
using a 5x5 median filter
Image additionallycorrupted by additivesalt-and-pepper noise
1 2
2
Image obtained
using a 5x5alpha-
trimmed mean filterwith d = 5
2
![Page 42: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/42.jpg)
Alpha-trimmed Mean Filter: Example (cont.)Alpha-trimmed Mean Filter: Example (cont.)
Image obtained
using a 5x5arithmetic mean filter
Image obtained
using a 5x5geometric mean filter
Image obtained
using a 5x5 median filter
Image obtained
using a 5x5alpha-
trimmed mean filterwith d = 5
![Page 43: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/43.jpg)
A model of the image degradation /restoration process
g(x,y)=f(x,y)*h(x,y)+(x,y)
G(u,v)=F(u,v)H(u,v)+N(u,v)
![Page 44: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/44.jpg)
Linear, position-invariant degradation
• Linear system–H[af1(x,y)+bf2(x,y)]=aH[f1(x,y)]+bH[f2(x,y)]
• Position(space)-invariant system–H[f(x,y)]=g(x,y) is position invariant if
H[f(x-, y-)]=g(x-, y-)
Properties of the degradation function H
![Page 45: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/45.jpg)
Estimation of Degradation FunctionDegradation model:
),(),(),(),( yxyxhyxfyxg
),(),(),(),( vuNvuHvuFvuG
Methods:1. Estimation by Image Observation
2. Estimation by Experiment
3. Estimation by Modeling
or
If we know exactly h(x,y), regardless of noise, we can do deconvolution to get f(x,y) back from g(x,y).
![Page 46: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/46.jpg)
Estimation by Image ObservationEstimation by Image Observation
f(x,y) f(x,y)*h(x,y) g(x,y)
Subimage
ReconstructedSubimage
),( vuGs ),( yxgs
),(ˆ yxfs
DFT
DFT
),(ˆ vuFs
Restoration process byestimation
Original image (unknown) Degraded image
),(ˆ),(
),(),(vuF
vuGvuHvuH
s
ss
Estimated Transfer function
Observation
This case is used when weknow only g(x,y) and cannot repeat the experiment!
![Page 47: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/47.jpg)
Estimation by ExperimentEstimation by Experiment Used when we have the same equipment set up
Input impulse image
SystemH( )
Response image fromthe system
),( vuG
),( yxg),( yxA
AyxADFT ),(
A
vuGvuH
),(),(
DFTDFT
![Page 48: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/48.jpg)
Estimation by ModelingEstimation by Modeling Used when we know physical mechanism underlying the image formation process that can be expressed mathematically.
AtmosphericTurbulence model
6/522 )(),( vukevuH
Example:Original image Severe turbulence
k = 0.00025k = 0.001
k = 0.0025
Low turbulenceMild turbulence
![Page 49: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/49.jpg)
Estimation by Modeling: Motion BlurringEstimation by Modeling: Motion BlurringAssume that camera velocity is ))(),(( 00 tytxThe blurred image is obtained by
dttyytxxfyxgT
))(),((),( 00
0
where T = exposure time.
dtdxdyetyytxxf
dxdyedttyytxxf
dxdyeyxgvuG
Tvyuxj
vyuxjT
vyuxj
0
)(200
)(2
0
00
)(2
))(),((
))(),((
),(),(
![Page 50: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/50.jpg)
Estimation by Modeling: Motion Blurring (cont.)Estimation by Modeling: Motion Blurring (cont.)
dtevuF
dtevuF
dtdxdyetyytxxfvuG
Ttvytuxj
Ttvytuxj
Tvyuxj
0
))()((2
0
))()((2
0
)(200
00
00
),(
),(
))(),(( ),(
Then we get, the motion blurring transfer function:
dtevuHT
tvytuxj 0
))()((2 00),(
For constant motion ),())(),(( 00 btattytx
)(
0
)(2 ))(sin()(
),( vbuajT
vbuaj evbuavbua
TdtevuH
![Page 51: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/51.jpg)
Motion Blurring ExampleMotion Blurring ExampleFor constant motion
)())(sin()(
),( vbuajevbuavbua
TvuH
Original image Motion blurred imagea = b = 0.1, T = 1
![Page 52: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/52.jpg)
Inverse Filtering
after we obtain H(u,v), we can estimate F(u,v) by the inverse filter:
),(
),(),(
),(
),(),(ˆ
vuH
vuNvuF
vuH
vuGvuF
From degradation model:
),(),(),(),( vuNvuHvuFvuG
Noise is enhancedwhen H(u,v) is small.
To avoid the side effect of enhancing noise, we can apply this formulation to freq. component (u,v) with in a radius D0 from the center of H(u,v).
In practical, the inverse filter is not popularly used.
![Page 53: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/53.jpg)
Inverse Filtering• The simplest approach to restoration is direct inverse filtering, where
we compute an estimate, (u,v), of the transform of the original image simply by dividing the transform of the degraded image, G(u,v), by the degraded function.
•g(m,n) = f(m,n)*h(m,n)+η(m,n)•g = Hf + η
• If the noise is zero the error function is denoted as •T() = ||g- ||2
•T() = g2+H2-2H
• = 0
•
![Page 54: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/54.jpg)
Inverse Filtering Contd...• To find Mean Square Error
•0+2H2-2H =0 •2H22H•H >>>>> H = (Inverse Filtering)
• G(u,v) = H(u,v)(u,v)• (u,v) = • With addition of noise the observed degraded image in frequency
domain• G(u,v) = F(u,v)H(u,v)+N(u,v) ……(1)
•
![Page 55: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/55.jpg)
Inverse Filtering Contd...• Divide equation one by H(u,v)• = …….(2)
• We know that (u,v) = • Substitute (u,v) in eqn (2)• (u,v) = F(u,v)+ • If noise is zero the estimated image (u,v) is equal to original image,
but noise will not be properly removed in inverse filtering.
•
![Page 56: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/56.jpg)
Inverse Filtering: Example
6/522 )(0025.0),( vuevuH
Original image
Blurred imageDue to Turbulence
Result of applyingthe full filter
Result of applyingthe filter with D0=70
Result of applyingthe filter with D0=40
Result of applyingthe filter with D0=85
![Page 57: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/57.jpg)
Inverse Filtering• Limitations:1. Even if the degradation function is known the undegraded image
cannot be recovered exactly because N(u,v) is the random function which is not known.
2. If the degradation function has ‘0’ or small value the ratio easily dominates the estimate F(u,v,) one approach to get ride of 0 (or) small value problem to limits the filter frequency to the value near the origin.
•
![Page 58: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/58.jpg)
WIENER FILTERING• Inverse filtering has no explicit provision for handling noise but the
wiener filtering it incorporates both degradation function, statistical characteristics of noise taken into the restoration process.
•e2 = E[(f-]• Objective of the wiener filter is to find the estimate of uncorrupted
image f, such that the mean square error is minimize the wiener filter is optimum filter
• Diagram
•
![Page 59: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/59.jpg)
Wiener Filtering Contd...• The error between the input signal and the estimated signal is given
by the mean square error.– e(x,y) = f(x,y) –(x,y)– E[f(x,y) –(x,y)2] =0
• According to the principle of orthogonality the expected value of f(x,y) –(x,y) totally orthogonal with g(x,y) is zero.
E[f(x,y) –(x,y)g(x,y)] = 0(x,y) = g(x,y)*r(x,y)E[f(x,y)- (g(x,y)*r(x,y))g(x,y)] =0 E[f(x,y)g(x,y)] = E[(r(x,y)*g(x,y))g(x,y)]
=E{g(x,y)}
•
![Page 60: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/60.jpg)
Wiener Filtering Contd...• γfgγfg(x,y) =
• γfg (x,y) = γgg(k,l)
• γfg (x,y) = r(x,y)* γgg(x,y)
• On taking Fourier transform• Sfg(u,v) = R(u,v)Sgg(u,v)
• Sfg and Sgg are the Power Spectral Density• R(u,v) = • W.k.t g(x,y) = f(x,y)*h(x,y)• Cross correlation between f(x,y) and g(x,y) is given as
•
![Page 61: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/61.jpg)
Wiener Filtering Contd...• γfg (x,y) = E [f(x+l1,y+l2)g*(x,y)]
= E [f(x+l1,y+l2)(f(x,y)*h(x,y))]
= E [f(x+l1,y+l2) ]
= γfg (x,y) = ff(l1+k1,l2+k2)
= h*(x,y)*ff(-x,-y)
On taking Fourier transformSfg(u,v) = H*(u,v)Sff(u,v)
Without the presence of noise g=h*f γgg (l1,l2) = γhh (l1,l2)*ff(l1,l2)
γgg (l1,l2) = [h(l1,l2)*h*(-l1,-l2)]*ff(l1,l2)
•
![Page 62: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/62.jpg)
Wiener Filtering Contd...•Sgg(u,v) = H(u,v)H*(u,v). Sff(u,v)
= |H(u,v)|2 Sff(u,v)
R(u,v)= = With presence of noise Sgg(u,v) = |H(u,v)|2 Sff(u,v)+ N(u,v)
= |N(u,v)|2
R(u,v)= = = R(u,v)G(u,v)
Multiply and divide by H(u,v) in R(u,v) and sub in = G(u,v)
•
![Page 63: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/63.jpg)
Wiener Filtering Contd...• = = G(u,v)• Wiener filter also know as minimum mean square filter or least mean
square filter.• Wiener filter does not have the same problem as the inverse filter
unless both H(u,v) and Sη(u,v) are zero for the same value of u&v• H(u,v) = degradation function• H*(u,v) = complex conjugate of H(u,v)• |H(u,v)|2 = H*(u,v) H(u,v)• Sη(u,v) = |N(u,v)|2 = Power spectrum of the noise• Sf(u,v) = |F(u,v)|2 = Power spectrum of an undegraded image.
•
![Page 64: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/64.jpg)
Wiener Filtering• Consideration:1. When a noise is zero
η(x,y)=0, Sη(u,v) =0 =
It reduces to inverse filtering2. IF H(u,v)=1
=
•
![Page 65: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/65.jpg)
Wiener Filtering•Signal to Noise ratio 3. Signal to noise ratio is greater than 1
>>1Then = G(u,v) --- Here the wiener filter act as a all pass filters.ADVANTAGES:1.The wiener filter does not have zero value problem untill both H(u,v) and is equal to zero.2.The result obtained by wiener filter is more closer to the original image than inverse filter.
•
![Page 66: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/66.jpg)
Approximation of Wiener Filter
),(),(/),(),(
),(
),(
1),(ˆ
2
2
vuGvuSvuSvuH
vuH
vuHvuF
f
Wiener Filter Formula:
Approximated Formula:
),(),(
),(
),(
1),(ˆ
2
2
vuGKvuH
vuH
vuHvuF
Difficult to estimate
In Practice, K is chosen manually to obtain the best visual result!
![Page 67: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/67.jpg)
Wiener Filter: Example
Original image
Blurred imageDue to Turbulence
Result of the full inverse filter
Result of the inverse filter with D0=70
Result of the full Wiener filter
![Page 68: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/68.jpg)
Wiener Filter: Example (cont.)
Original image
Result of the inverse filter with D0=70
Result of the Wiener filter
Blurred imageDue to Turbulence
![Page 69: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/69.jpg)
Example: Wiener Filter and Motion Blurring Image degradedby motion blur +AWGN
Result of theinverse filter
Result of theWiener filter
2=650
2=325
2=130
![Page 70: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/70.jpg)
Degradation model:),(),(),(),( yxyxhyxfyxg
In matrix form,
Constrained Least Squares Filter Constrained Least Squares Filter
ηHfg Aims to find the minimum of a criterion function
1
0
1
0
22 ),(M
x
N
y
yxfC
Subject to the constraint
22ˆ ηfHg
),(),(),(
),(),(ˆ
22
*
vuGvuPvuH
vuHvuF
Constrained least square filter is given by,
where
P(u,v) = Fourier transform of p(x,y) =
010
141
010
where www T2
![Page 71: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/71.jpg)
Constrained Least Squares Filter: Example Constrained Least Squares Filter: Example
),(),(),(
),(),(ˆ
22
*
vuGvuPvuH
vuHvuF
Constrained least square filter
is adaptively adjusted to achieve the best result.
Results from the previous slide obtained from the constrained least square filter
![Page 72: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/72.jpg)
Constrained Least Squares Filter: Example (cont.) Constrained Least Squares Filter: Example (cont.) Image degradedby motion blur +AWGN
Result of theConstrainedLeast square filter
Result of theWiener filter
2=650
2=325
2=130
![Page 73: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/73.jpg)
Constrained Least Squares Filter:Adjusting Constrained Least Squares Filter:Adjusting
Define fHgr ˆ It can be shown that2
)( rrr T
We want to adjust gamma so that a 22ηr
where a = accuracy factor1. Specify an initial value of
2. Compute
3. Stop if is satisfiedOtherwise return step 2 after increasing if
or decreasing ifUse the new value of to recompute
1
1
2r
a 22ηr
a 22ηr
),(),(),(
),(),(ˆ
22
*
vuGvuPvuH
vuHvuF
![Page 74: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/74.jpg)
Constrained Least Squares Filter:Adjusting Constrained Least Squares Filter:Adjusting (cont.)(cont.)
),(),(),(
),(),(ˆ
22
*
vuGvuPvuH
vuHvuF
),(ˆ),(),(),( vuFvuHvuGvuR
1
0
1
0
22),(
1 M
x
N
y
yxrMN
r
1
0
1
0
22 ),(1 M
x
N
y
myxMN
1
0
1
0
),(1 M
x
N
y
yxMN
m
mMN 22η
2η
2rFor computing
For computing
![Page 75: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/75.jpg)
Constrained Least Squares Filter: Example Constrained Least Squares Filter: Example
Original image
Blurred imageDue to Turbulence
Results obtained from constrained least square filters
Use wrong noise parameters
Correct parameters:Initial = 10-5
Correction factor = 10-6
a = 0.25
2 = 10-5
Wrong noise parameter
2 = 10-2
Use correct noise parameters
![Page 76: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/76.jpg)
Geometric Mean filter Geometric Mean filter
),(
),(
),(),(
),(
),(
),(),(ˆ
1
2
*
2
*
vuG
vuS
vuSvuH
vuH
vuH
vuHvuF
f
This filter represents a family of filters combined into a single expression
= 1 the inverse filter = 0 the Parametric Wiener filter = 0, = 1 the standard Wiener filter = 1, < 0.5 More like the inverse filter = 1, > 0.5 More like the Wiener filter
Another name: the spectrum equalization filter
![Page 77: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/77.jpg)
Geometric TransformationGeometric Transformation
These transformations are often called rubber-sheet transformations: Printing an image on a rubber sheet and then stretch this sheet accordingto some predefine set of rules.
A geometric transformation consists of 2 basic operations:1. A spatial transformation :
Define how pixels are to be rearranged in the spatiallytransformed image.
2. Gray level interpolation :Assign gray level values to pixels in the spatiallytransformed image.
![Page 78: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/78.jpg)
Geometric Transformation : AlgorithmGeometric Transformation : Algorithm
Distorted image g
1. Select coordinate (x,y) in f to be restored2. Compute
),( yxrx ),( yxsy
3. Go to pixel in a distorted image g
),( yx
Image f to be restored
4. get pixel value atBy gray level interpolation
),( yxg
5. store that value in pixel f(x,y)
13
5
),( yx ),( yx
![Page 79: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/79.jpg)
Spatial TransformationSpatial Transformation To map between pixel coordinate (x,y) of f and pixel coordinate (x’,y’) of g
),( yxrx ),( yxsy
For a bilinear transformation mapping between a pair of Quadrilateral regions
4321),( cxycycxcyxrx
8765),( cxycycxcyxsy ),( yx ),( yx
To obtain r(x,y) and s(x,y), we need to know 4 pairs of coordinates and its correspondingwhich are called tiepoints. ),( yx ),( yx
![Page 80: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/80.jpg)
Gray Level Interpolation: Nearest NeighborGray Level Interpolation: Nearest Neighbor
Since may not be at an integer coordinate, we need to Interpolate the value of
),( yx ),( yxg
Example interpolation methods that can be used:1. Nearest neighbor selection2. Bilinear interpolation3. Bicubic interpolation
![Page 81: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/81.jpg)
Geometric Distortion and Restoration ExampleGeometric Distortion and Restoration ExampleOriginal image and
tiepointsTiepoints of distorted
image
Distorted image Restored image
Use nearestneighbor intepolation
![Page 82: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/82.jpg)
Geometric Distortion and Restoration Example Geometric Distortion and Restoration Example (cont.)(cont.)
Original image and tiepoints
Tiepoints of distortedimage
Distorted image Restored image
Use bilinear intepolation
![Page 83: IMAGE RESTORATION Outline A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering](https://reader035.vdocuments.net/reader035/viewer/2022062221/56649f175503460f94c2e2de/html5/thumbnails/83.jpg)
Example: Geometric RestorationExample: Geometric RestorationOriginal image Geometrically distorted
image
Difference between 2 above images
Restored image
Use the sameSpatial Trans.as in the previousexample