defocus • deconvolution / inverse filtersweb.mit.edu/2.710/fall06/2.710-wk15-a-sl.pdf ·...
Post on 13-Jul-2020
8 Views
Preview:
TRANSCRIPT
MIT 2.71/2.710 Optics12/12/05 wk15-a-1
Today
• Defocus
• Deconvolution / inverse filters
MIT 2.71/2.710 Optics12/12/05 wk15-a-2
Defocus
MIT 2.71/2.710 Optics12/12/05 wk15-a-3
©© 2020thth Century FoxCentury Fox
MIT 2.71/2.710 Optics12/12/05 wk15-a-4
Focus in classical imaging
inin--focusfocus
defocusdefocus
MIT 2.71/2.710 Optics12/12/05 wk15-a-5
Focus in classical imaging
inin--focusfocus
defocusdefocus
MIT 2.71/2.710 Optics12/12/05 wk15-a-6
Intensity distribution near the focus of an ideal lens
( )NA61.0 λ×=∆x
( )2NA2λ
=∆z
(rotationally symmetric wrt z axis)
z
MIT 2.71/2.710 Optics12/12/05 wk15-a-7
Back to the basics: 4F system
2f 2fx ′′ x′x
1f 1f
imageimageplaneplane
objectobjectplaneplane
FourierFourierplaneplane
z
MIT 2.71/2.710 Optics12/12/05 wk15-a-8
Back to the basics: 4F system
2f 2fx ′′ x′x
1f 1f
imageimageplaneplane
objectobjectplaneplane
FourierFourierplaneplane
z
maxxa ≡
(NA)1
( )1
max1 NA
fx
=
(NA)2
( )2
max2 NA
fx
=
MIT 2.71/2.710 Optics12/12/05 wk15-a-9
Back to the basics: 4F system
2f 2fx ′′ x′x
1f 1f
imageimageplaneplane
objectobjectplaneplane
FourierFourierplaneplane
z
( )xg ⎟⎟⎠
⎞⎜⎜⎝
⎛ ′′
1fxGλ ⎟⎟
⎠
⎞⎜⎜⎝
⎛′− x
ffg2
1
MIT 2.71/2.710 Optics12/12/05 wk15-a-10
4F system with defocused input
2f 2fx ′′ x′x
1f 1f
imageimageplaneplane
objectobjectplaneplane
FourierFourierplaneplane
z
( )xg
MIT 2.71/2.710 Optics12/12/05 wk15-a-11
4F system with defocused input
2f 2fx ′′ x′x
1f 1f
imageimageplaneplane
objectobjectplaneplane
FourierFourierplaneplane
z
( ) ⎟⎟⎠
⎞⎜⎜⎝
⎛∆+
∗zyxixg
λπ
22
exp
MIT 2.71/2.710 Optics12/12/05 wk15-a-12
4F system with defocused input
2f 2fx ′′ x′x
1f 1f
imageimageplaneplane
objectobjectplaneplane
FourierFourierplaneplane
z
( ) ⎟⎟⎠
⎞⎜⎜⎝
⎛∆
∗z
xixgλ
π2
exp ( )⎥⎥⎦
⎤
⎢⎢⎣
⎡⎟⎟⎠
⎞⎜⎜⎝
⎛ ′′∆⋅⎟⎟
⎠
⎞⎜⎜⎝
⎛ ′′2
11
expf
xzif
xGλ
λπλ
ℑ
MIT 2.71/2.710 Optics12/12/05 wk15-a-13
4F system with defocused input
2f 2fx ′′ x′x
1f 1f
imageimageplaneplane
objectobjectplaneplane
FourierFourierplaneplane
z
( ) ⎟⎟⎠
⎞⎜⎜⎝
⎛∆
∗z
xixgλ
π2
exp ( ) ( )⎥⎦
⎤⎢⎣
⎡ ′′∆⋅⎟⎟
⎠
⎞⎜⎜⎝
⎛ ′′2
1
2
1
expf
xzif
xGλ
πλ
ℑ
MIT 2.71/2.710 Optics12/12/05 wk15-a-14
Effect of defocus on the Fourier plane
mild defocus
1fxλ′′
( ) ( )⎥⎦
⎤⎢⎣
⎡ ′′∆ 2
1
2
cosf
xzλ
π
( )z∆λ21
1
0
MIT 2.71/2.710 Optics12/12/05 wk15-a-15
Effect of defocus on the Fourier plane
strong defocus ( ) ( )⎥⎦
⎤⎢⎣
⎡ ′′∆ 2
1
2
cosf
xzλ
π
( )z∆λ21
1
0
1fxλ′′
MIT 2.71/2.710 Optics12/12/05 wk15-a-16
Effect of defocus on the Fourier plane
mild defocus ( ) ( )⎥⎦
⎤⎢⎣
⎡ ′′∆ 2
1
2
cosf
xzλ
π
( )z∆λ21
⎟⎟⎠
⎞⎜⎜⎝
⎛ ′′
1fxGλ
( ) ( )⎥⎦
⎤⎢⎣
⎡ ′′∆ 2
1
2
cosf
xzλ
π⎟⎟⎠
⎞⎜⎜⎝
⎛ ′′
1fxGλ
× not too different from ⎟⎟⎠
⎞⎜⎜⎝
⎛ ′′
1fxGλ
1
0
1fxλ′′
MIT 2.71/2.710 Optics12/12/05 wk15-a-17
Effect of defocus on the Fourier plane
1
0
⎟⎟⎠
⎞⎜⎜⎝
⎛ ′′
1fxGλ
× very different from
strong defocus ( ) ( )⎥⎦
⎤⎢⎣
⎡ ′′∆ 2
1
2
cosf
xzλ
π
( ) ( )⎥⎦
⎤⎢⎣
⎡ ′′∆ 2
1
2
cosf
xzλ
π⎟⎟⎠
⎞⎜⎜⎝
⎛ ′′
1fxGλ ⎟⎟
⎠
⎞⎜⎜⎝
⎛ ′′
1fxGλ
1fxλ′′
MIT 2.71/2.710 Optics12/12/05 wk15-a-18
Depth of field
( ) ( )⎥⎦
⎤⎢⎣
⎡ ′′∆ 2
1
2
cosf
xzλ
π
( )z∆λ21
1
0
1fxλ′′
system is defocus-insensitiveas long as frequencies
that pass through the systemare confined within this region
MIT 2.71/2.710 Optics12/12/05 wk15-a-19
Depth of field
( )z∆λ21
1
0
system is defocus-insensitiveas long as frequencies
that pass through the systemare confined within this region
( )
( )( )21max
1
max
2
21
fxz
zfx
′′≤∆⇒
⇒∆
≤′′
λλλ
1fxλ′′
( ) ( )⎥⎦
⎤⎢⎣
⎡ ′′∆ 2
1
2
cosf
xzλ
π
MIT 2.71/2.710 Optics12/12/05 wk15-a-20
Depth of field
( )z∆λ21
1
0
system is defocus-insensitiveas long as (∆z) is small enough that
frequencies that pass through the systemcan be confined within this region
( )
( )( ) 1
2
1
max
NA2
21
λλλ
≤∆⇒
⇒∆
≤′′
z
zfx
1fxλ′′
( ) ( )⎥⎦
⎤⎢⎣
⎡ ′′∆ 2
1
2
cosf
xzλ
π
Depth of field
MIT 2.71/2.710 Optics12/12/05 wk15-a-21
Depth of field & Depth of focus
2f 2fx ′′ x′x
1f 1f
objectobjectplaneplane
FourierFourierplaneplane
z
( )( )
( )1
max1
12
NA
NA2
fx
z
′′=
≤∆λ ( )
( )
( )2
max2
22
NA
NA2
fx
z
′′=
≤∆λ
imageimageplaneplane
Depth of fieldDepth of field Depth of focusDepth of focus
(NA)1
(NA)2
MIT 2.71/2.710 Optics12/12/05 wk15-a-22
NA trade – offs• high NA
– narrow PSF in the lateral direction (PSF width ~1/NA)• sharp lateral features
– narrow PSF in longitudinal direction (PSF depth ~1/NA2)• poor depth of field
• low NA– broad PSF in the lateral direction (PSF width ~1/NA)
• blurred lateral features– broad PSF in longitudinal direction (PSF depth ~1/NA2)
• good depth of field
MIT 2.71/2.710 Optics12/12/05 wk15-a-23
Depth of focus: Geometrical Optics viewpoint
2f 2fx ′′ x′x
1f 1f
z(NA)1
(NA)2
defocuseddefocusedimageimageplaneplane
∆x
∆z
maxxa ≡
( )2NAxz ∆
=∆From similar triangles:
Now require defocused spot ≈ diffraction spot: ( )2NA61.0 λ
≈∆x
Therefore: ( )22NA61.0 λ
≈∆z
MIT 2.71/2.710 Optics12/12/05 wk15-a-24
Defocus and Deconvolution(Inverse filters)
MIT 2.71/2.710 Optics12/12/05 wk15-a-25
2f 2fx ′′ x′x
1f 1f
DepthDepthOf Of
FocusFocus
DefocusDefocus
worsensworsensawayawayfromfromfocalfocalplaneplane
22½½DDobjectobject
z
Imaging a 2½D object
MIT 2.71/2.710 Optics12/12/05 wk15-a-26
2f 2fx ′′ x′x
1f 1f
portion of objectportion of objectdefocused by defocused by ΔΔzz
z∆z
Imaging a 2½D object
MIT 2.71/2.710 Optics12/12/05 wk15-a-27
2f 2fx ′′ x′x
1f 1f
…… is equivalent to same portion is equivalent to same portion inin--focusfocus PLUS PLUS ……
…… fictitious quadratic fictitious quadratic phase mask phase mask
on the Fourier planeon the Fourier plane
( )⎭⎬⎫
⎩⎨⎧ ∆′′+′′− 2
1
22
2expf
zyxiλ
π (applied(appliedlocally locally ))
z
Imaging a 2½D object
MIT 2.71/2.710 Optics12/12/05 wk15-a-28
Example
focal plane
2 (DoF)s 4 (DoF)s
MIT 2.71/2.710 Optics12/12/05 wk15-a-29
Distance between planes ≈ 2 Depths of Fieldleft-most “M” : image blurred by diffraction onlycenter and right-most “M”s : image blurred by diffraction and defocus
Raw image (collected by camera – noise-free)
MIT 2.71/2.710 Optics12/12/05 wk15-a-30
Raw image explanation: convolution
“M” convolvedwith standard
diffraction PSF
“M” convolvedwith diffraction PSF
and defocus
“M” convolvedwith diffraction PSFand more defocus
MIT 2.71/2.710 Optics12/12/05 wk15-a-31
Raw image explanation: Fourier domain
{ } ndiffractioM"" H×ℑ { }( )2DoF
M""
defocus
ndiffractio
HH
××ℑ { }
( )4DoFM""
defocus
ndiffractio
HH
××ℑ
MIT 2.71/2.710 Optics12/12/05 wk15-a-32
Can diffraction and defocus be “undone” ?• Effect of optical system (expressed in the Fourier plane):
• To undo the optical effect, multiply by the “inverse transfer function”
{ } defocusndiffractiosystemsystem e wherM"" HHHH ×=×ℑ
{ }( ) { } !!! M"" 1M"" system
system ℑ=××ℑH
H
MIT 2.71/2.710 Optics12/12/05 wk15-a-33
Can diffraction and defocus be “undone” ?• Effect of optical system (expressed in the Fourier domain):
• To undo the optical effect, multiply by the “inverse transfer function”
• Problems– Transfer function goes to zero outsize the system pass-band– Inverse transfer function will multiply the FT of the noise as well
as the FT of the original signal
2umax–2umax
1
0
transfer function
{ } systemM"" H×ℑ
{ }( ) { } !!! M"" 1M"" system
system ℑ=××ℑH
H
defocusndiffractiosystem HHH ×=where
MIT 2.71/2.710 Optics12/12/05 wk15-a-34
Solution: Tikhonov regularization
2
system
*system
systemobjectoriginal
imagefinal
H
HH
+×⎟⎟⎠
⎞⎜⎜⎝
⎛×
⎭⎬⎫
⎩⎨⎧
ℑ=⎭⎬⎫
⎩⎨⎧
ℑµ
“raw image”(formed by the optics)
post-processing(“inverse filter”)
2f 2fx ′′ x ′x
1f 1f
image planeimage plane““raw imageraw image””
originaloriginalobjectobject
z
⎭⎬⎫
⎩⎨⎧
×⎭⎬⎫
⎩⎨⎧
ℑℑ−system
1
objectoriginal H
CCDcamera
finalfinalimageimage
COMPUTATIONALCOMPUTATIONALIMAGINGIMAGING
MIT 2.71/2.710 Optics12/12/05 wk15-a-35
On Tikhonov regularization
2
system
*system
systemobjectoriginal
imagefinal
H
HH
+×⎟⎟⎠
⎞⎜⎜⎝
⎛×
⎭⎬⎫
⎩⎨⎧
ℑ=⎭⎬⎫
⎩⎨⎧
ℑµ
• µ is the “regularizer” or “regularization parameter”• choice of µ : depends on the noise and signal energy• for Gaussian noise andand image statistics, optimum µ is
“Wiener filter”
• More generally, the optimal inverse filters are nonlinear and/orprobabilistic (e.g. maximum likelihood inversion)
• For more details: 2.717
poweroptimum SNR
1=µ
MIT 2.71/2.710 Optics12/12/05 wk15-a-36
Deconvolution using Tikhonov regularized inverse filterUtilized a priori knowledge of depth of each digit (alternatively,needs depth-from defocus algorithm)
Artifacts due primarily to numerical errors getting amplifiedby the inverse filter (despite regularization)
Deconvolution: diffraction and defocusnoise free
MIT 2.71/2.710 Optics12/12/05 wk15-a-37
Noisy raw imageSNR=10
MIT 2.71/2.710 Optics12/12/05 wk15-a-38
Deconvolution using Wiener filter (i.e. Tikhonov with µ=1/SNR)Noise is destructive away from focus (4DOFs)Utilized a priori knowledge of depth of each digit
Artifacts due primarily to noise getting amplified by the inverse filter
Deconvolution in the presence of noiseSNR=10
top related