Document 7651133

Download Report

Transcript Document 7651133

1. Introduction
Degradations
• Noises (Dot/Pattern)
• Illumination Imperfections
(Brightness /Contrast)
• Color Imperfections
• Blurring
Image Blur
• Out-of-Focus Blur
• Aberrations in the optical systems
• Motion Blur
• Atmospheric Turbulence Blur
In Addition to these blurring effects,
noise always corrupts any recorded
image.
Image Restoration
= Image Deblurring
= Image Deconvolution
= is concerned with the
reconstruction or estimation of the
uncorrupted image from a blurred
and noisy one
g(x,y)
fˆ ( x, y )
Blind Image Deconvolution
• Step #1 : Blur identification
• Step #2 : Image restoration
Image Restoration :needs
• Characteristics of the degrading
systems
• Characteristics of noise
(prior knowledge)
ทำไมภำพจึงเสี ยไป (ต้ นเหตุ) :-
Spatial Domain
Blur Model
d(x, y )
f(x, y )
ภำพในธรรมชำติ
g(x, y )
สำเหตุ
η(x, y )
noise
ภำพทีเ่ สี ยไปแล้ ว
Spatial Domain
g(x, y ) = d (x, y ) * f (x, y ) + η (x, y )
1)
ทำไมภำพจึงเสี ยไป (ต้ นเหตุ) :-
Frequency
Domain
Blur Model
D(u, v)
F(u,v)
ภำพในธรรมชำติ
G(u, v)
สำเหตุ
ภำพทีเ่ สี ยไปแล้ ว
χ(u, v)
Spectral Domain
G(u, v) = D(u, v)F(u, v) + χ(u, v)
2)
กระทำ Image Restoration เพื่อ
Fˆ ( x, y )
H(u, v)
ifft
G(u,v)
ออกแบบFilter
ภำพทีเ่ สี ยไปแล้ ว
χ(u, v)
fˆ ( x, y )
ภำพทีไ่ ด้ คืนมำ
2. Blur Models
เพื่อศึกษำธรรมชำติของ
d (x, y) or D(u,v)
ซึ่งเรียกว่ ำ Point-spread Function
(PSF) หรื อ Degradation
function หรื อ Blurring function
The blurring of images is modeled in (1)
as the convolution of an ideal image (f
or F) with a 2-D point-spread function
(PSF), d or D.
คุณสมบัตทิ สี่ ำคัญของ PSF ของสำเหตุ
• Spatially invariant – image is blurred
in exactly the same way at every
location
• D or d takes on non-negative values
• D or d is real values
• D or d is modeled as passive operation
– no energy is absorbed or generated
2.1 No Blur
In case the recorded image is imaged
perfectly, no blur will be apparent in
the discrete image.
d(x,y) =
 (x,y)
(delta)
1 if x  y  0
 ( x, y )  
0 elsewhere
กลำง
6)
2.2 Linear Motion Blur
Motion blur
• Translation ***** ระยะทำง (L)
• Rotation **** มุม (วัดเทียบกับแกนนอน)
• Sudden change of scale (ย่ อ/ขยำย)
• Combinations of these

L
x
1
2
2
if x  y  and   tan 

2
y
d ( x , y : L,  )   L
0 elsewhere

7a)
L = 50, phi = 45 degree
2.3 Uniform Out-of-Focus
Blur
D/d เป็ นแผ่ นวงกลม-disk
 1
2
2
2
 2 if x  y  R
d ( x, y : R)  R
0 elsewhere

8a)
R = 10
2.4 Atmospheric
Turbulence Blur
D/d = Gaussian Function
d ( x, y :  G
 x y
)  C exp 
2
2 G

2
2




9a)
3.Image Restoration
Algorithms
วิธีแก้ ไขควำม blur
Let h(n1,n2) be PSF of the linear filter.
ˆf (n , n )  h(n , n ) * g (n , n )
1 2
1 2
1 2
ภำพที่ได้ คืนมำ
PSF ของ filter
ภำพ blur ทีม่ อี ยู่
กำรกระทำ
convolution
ˆ
F (u, v)  H (u, v)G(u, v)
Objective
...is to design appropriate restoration
filters (h, H) for use in Eq. 10
Measurement of restoration quality
Signal-to-noise-ratio (SNR)
SNRg of blurred image
 variance of the original image, f 
SNRg  10log10 

 variance of the difference image, g-f 
dB
SNR fˆ of restored image
 variance of the original image, f
SNR fˆ  10 log 10 
 variance of the difference image, f̂ - f
dB




SNR  SNR fˆ  SNRg
 variance of the difference image, g -f
SNR  10log10 
ˆ
variance
of
the
difference
image,
f-f

dB



3.1 Inverse Filters
An inverse filter is a linear filter whose
point-spread function, hinv(n1,n2) is the
inverse of the blurring function,
d(n1,n2).
1
H inv (u, v) 
D(u, v)
13)
นำค่ ำ H ที่ออกแบบแล้ วนีแ้ ทนค่ ำลงในสมกำร 10 (กรณี
ไม่ คำนึงถึง noise)
จากสมการ 10
ˆ
F (u, v)  H (u, v)G(u, v)
1
Fˆ (u, v) 
G(u, v)
D(u, v)
จากสมการ 2
D
(
u
,
v
)
F
(
u
,
v
)
Fˆ (u, v) 
 F (u, v)
D(u, v)
ˆ
F (u, v)
นำค่ ำใน
มำกระทำ inverse Fourier
transform จะได้
ˆf ( x, y )  ifft2( Fˆ (u, v))
กรณีคำนึงถึง noise ด้ วย
ˆ
F (u, v)  H (u, v)G(u, v)
Fˆ (u, v) 
1
 D(u, v) F (u, v)  Wχ (u, v)
D(u, v)

χ (u, v)
W
ˆ
*14**
F (u, v)  F (u, v) 
D(u, v)
ˆ
F (u, v)
เมื่อนำค่ ำใน
มำกระทำ inverse Fourier
transform จะได้ ภำพกลับมำ แต่ noise ทีม่ ีอยู่ในภำพก็
จะถูกขยำยจนเห็นได้ อย่ ำงชัดเจน เพรำะเทอมที่ 2 ของสมกำร
14) กล่ ำวคือ
1) ผลหำรไม่ สำมำรถนิยำม ถ้ ำ D(u,v) มีค่ำเท่ ำกับศูนย์
2) ผลหำรจะมีค่ำมำกมำย ถ้ ำ D(u,v) มีค่ำน้ อยเข้ ำใกล้ ศูนย์
3.2 Least-Squares Filters
3.2.1 The Wiener Filter
3.2.2 The Constrained
Least-squared Filter
3.2.1 The Wiener Filter
The Wiener filter is a linear spatially
invariant filter of the form
ˆf (n , n )  h(n , n ) * g (n , n )
1 2
1 2
1 2
in which the point-spread function
h(n1,n2) is chosen such that it
minimizes the mean-squared error
(MSE) between the ideal and restored
image.
Expectation = Mean

2
ˆ
MSE  E ( f (n1 , n2 )  f (n1 , n2 ))
MSE 

ˆ (n , n )

f
(
n
,
n
)

f

N 1 M 1
2
1
n1  0 n2  0
2
1
2
The minimization problem,
 ( MSE)

0
2
h
2
has solution (in spectral domain)
H w (u , v) 
*
D (u , v)
16)
S w (u , v)
D (u , v) D(u, v) 
S f (u, v)
*
D* (u,v) = complex conjugate of D(u,v)
Sw (u,v) = the power spectrum of the
noise
Sf (u,v) = the power spectrum of the ideal
image
Estimation of Sw (u,v)
1) In the case Sw (u,v) = 0,
noiseless, we have
*
D (u, v)
H w (u, v)  *
D (u, v) D(u , v)
 1

H w (u, v)   D(u, v)
0

for D(u, v)  0
for D(u, v)  0
17)
2) In the case Sw (u,v) << Sf (u,v) ,
the Wiener filter approaches the
inverse filter.
 1

H w (u, v)   D(u, v)
0

for D(u, v)  0
for D(u, v)  0
3) In the case Sw (u,v) >> Sf (u,v) , the
Wiener filter acts as a frequency
rejection filter, Hw(u,v) -> 0.
4) In the case the noise is white noise,
Sw (u, v)  
2
w
18)
The estimation of noise variance can be
left to the user as if it were a tunable
parameter.
Small values of  will yield a result
close to the inverse filter, while large
values will over-smooth the restored
image.
2
Estimation of Sf (u,v)
1) Replace Sf (u,v) by an
estimate of the power
spectrum of the blurred
image and variance of noise,
1 *
2
S f (u, v)  S g (u, v)   
G (u, v)G(u, v)   w
MN
2
w
19)
2) Replace Sf (u,v) by an
estimate of the power
spectrum of the
representative images.
3) Estimate Sf (u,v) by using
statistical model (Eq. 20a)b)).
3.2.2 The Constrained
Least-Squares Filter
แท้จริ ง
h(x,y)
g(x,y)
d(x,y)
fˆ ( x, y )
d ( x, y) * fˆ ( x, y)  g ( x, y)
สร้างขึ้น
21)
g ( x, y )  d ( x, y ) * fˆ ( x, y )  0
g ( x, y )  d ( x, y ) * fˆ ( x, y )
N 1 M 1
=
 
2
g ( k1 , k2 )  d ( k1 , k2 ) * fˆ ( k1 , k2 )
k1  0 k2  0

2
w
Introduce c() PSF of high-pass filter, then
we have the solution as the following Eq.

2
*
D (u, v)
H cls (u, v)  *
*
D (u, v) D(u, v)   C (u, v)C (u, v)
Tunable parameter
3.3 Iterative Filters
4. Blur Identification
Algorithms
1. ITU
International Telecommunications Union