SlideShare a Scribd company logo
C A N O N C O N F I D E N T I A L
Asymmetric recursive Gaussian filtering for
space-variant artificial bokeh
Tuan Pham
Canon Information Systems Research Australia
Oral Session 5 15:45-16:00 on Thursday 13 December 2018
Overview
2
1. Recursive Gaussian filter
2. Space-variant recursive filter
3. Artificial bokeh application
FIR filter versus IIR (recursive) filter
3
Finite Impulse Response (FIR) filter
Output is a weighted average of input samples: O(N), where N is filter size
Xn-2 Xn-1 Xn Xn+1 Xn+2
ynyn-1yn-2 yn+1 yn+2
Impulse
input
Finite
impulse
response
0
0
w1
w2
w3
w4
w5
w1
w2
w3 w4 w5
Infinite Impulse Response (IIR) filter
Output is a weighted average of input and previous output samples
O(1) computation regardless of filter size
Xn-2 Xn-1 Xn
yn-2 yn-1 yn yn+1 yn+2
xn+1 xn+2
Infinite
impulse
response 0
Causal
direction
Xn-2 Xn-1Xn
yn-2 yn-1ynyn+1 yn+2
xn+1 xn+2
Anti-causal
direction
0
∑wi = 1
for a
normalised
filter
Recursive Gaussian filter
4
Second-order IIR filter [1] uses up to 2 previous taps
Anti-causal
filter
x + y
Causal
filter y+
y̶
𝑦 𝑛
+
= 𝑛0 𝑥 𝑛 + 𝑛1 𝑥 𝑛−1 − 𝑑1 𝑦 𝑛−1
+
− 𝑑2 𝑦 𝑛−2
+
𝑦 𝑛
−
= 𝑚1 𝑥 𝑛+1 + 𝑚2 𝑥 𝑛+2 − 𝑑1 𝑦 𝑛+1
−
− 𝑑2 𝑦 𝑛+2
−
𝑦 𝑛 = 𝑦 𝑛
+ + 𝑦 𝑛
−
Parallel IIR implementation of
Gaussian filter
4th-order filter is more accurate
𝑦 𝑛
+
= 𝑛0 𝑥 𝑛 + 𝑛1 𝑥 𝑛−1 + 𝑛2 𝑥 𝑛−2 + 𝑛3 𝑥 𝑛−3
− 𝑑1 𝑦 𝑛−1
+
− 𝑑2 𝑦 𝑛−2
+
− 𝑑3 𝑦 𝑛−3
+
− 𝑑4 𝑦 𝑛−4
+
𝑦 𝑛
−
= 𝑚1 𝑥 𝑛+1 + 𝑚2 𝑥 𝑛+2 + 𝑚3 𝑥 𝑛+3 + 𝑚4 𝑥 𝑛+4
− 𝑑1 𝑦 𝑛+1
−
− 𝑑2 𝑦 𝑛+2
−
− 𝑑3 𝑦 𝑛+3
−
− 𝑑4 𝑦 𝑛+4
−
𝑦 𝑛 = 𝑦 𝑛
+ + 𝑦 𝑛
−
-40 -20 0 20 40
10
-6
10
-5
10
-4
10
-3
10
-2
10
-1
t
h(t)
Gaussian =10
2nd
order, RMSE=2×10-3
4nd
order, RMSE=4×10-5
-40 -20 0 20 40
-0.01
0
0.01
0.02
0.03
0.04
0.05
t
h(t)
Gaussian
2nd
order
4nd
order
Log
space
Forth-order IIR filter [2]: use up to 4 previous taps
→ more accurate
where the filter coefficients ni, mi, and di (i=1...4) are
functions of the Gaussian smoothing scale σ
[2] Farnebäck and Westin, Improving Deriche-style recursive Gaussian filters, JMIV, 2006.
[1] Deriche, Fast algorithms for low-level vision, PAMI, 1990.
Space-variant IIR filter: the straightforward extension [3]
5
Vary the filter coefficients ni, mi, and di according to the varying σ
This isotropic filter works OK for smoothly varying σ
not OK for discontinuous blur: colour bleeds across blur discontinuities
foveation blur: 0 ≤ σ ≤ 20 discontinuous blur σ ∈ {0, 10}
[3] Tan, et al., Performance of three recursive algorithms for fast space-variant Gaussian filtering, 2003.
y+
Σ
0
1
1
0
0
1 Σ
σ
x σ=0 σ=1 σ=1
leakage
causal filters
y̶
Σ
0
1
1
0
0
1
σ=0 σ=0 σ=1
σ
x
anti-causal filters
causal pass: bleeding anti-causal pass: no bleeding
input
output
Colour bleeds to adjacent pixels if the blur difference is large enough
Our solution: constraining the rate of change of directional σ’s
6
xy-separable filtering, each with 2 directions -> 4 directional sigmas:
𝜎𝑥
+
, 𝜎𝑥
−
, 𝜎𝑦
+
, 𝜎𝑦
−
, which can be different at a pixel
Σ
0
1
1
0
0
1
σ ̶
x
y
Σ
anti-causal filterscausal filters
0
1
1
0
1
σ+
0
0
1
σ 0
σ+
=0
σ̶
=0
σ ̶
=1 σ+
= 1 σ̶
=.5σ+
=.1 σ+
=0
σ̶
=0
x
+
x
-
y
+
y
-
0
10
5
To minimise leakage, the rate of increase of 𝜎+
and the rate of decrease of 𝜎− is tapered to at
most 1/3 per pixel.
input
output
7
Bokeh = Japanese for visually pleasing out-of-focus blur
Application: artificial bokeh
Depth map
Large Depth-of-Field input
Deriche's 2-tap symmetric IIR Our 2-tap asymmetric IIR
Farneback's 4-tap symmetric IIR Our 4-tap asymmetric IIR
8
Application: artificial bokeh
Bokeh = Japanese for visually pleasing out-of-focus blur
Depth map
Summary
9
IIR filter is more efficient than FIR filter for large filter size
Naïve extension of existing IIR filters to space-varying Gaussian
filters produces artefacts at sudden blur discontinuities
We proposed asymmetric IIR filters that minimise intensity
leakage across blur discontinuities
Our asymmetric IIR filters produce good defocus blur for
scenes with depth discontinuities (e.g. portrait shot)
10
Thank you
tuan.pham@cisra.canon.com.au
Details: filter normalisation
11
0
0
0
0
0
0
0
Anti-causal
filter σ̶
x + y
Causal
filter σ+
y+
y̶
+
+
w+
δ
w̶
δ
×
×
2σ+
σ+
+ σ̶
2σ̶
σ+
+ σ̶
The asymmetric left & right blur weights may not add up to 1
Need to add a small delta response to normalise the total filter
Application: speeded-up anisotropic filtering
12
20 iterations of Perona-Malik
anisotropic diffusion with λ=0.25,
𝑔 𝛻𝐼 = exp (− 𝛻𝐼 /5)
Our edge-stopping blur with
𝜎 = 16 × exp − 𝛻𝐼 in the inset

More Related Content

PDF
Visual Impression Localization of Autonomous Robots_#CASE2015
PDF
Lecture 4
PPTX
Num Integration
PPT
MATLAB : Numerical Differention and Integration
PPTX
Line Detection
Visual Impression Localization of Autonomous Robots_#CASE2015
Lecture 4
Num Integration
MATLAB : Numerical Differention and Integration
Line Detection

What's hot (20)

PPT
Introduction To Advanced Image Processing
PPTX
Numerical integration;Gaussian integration one point, two point and three poi...
PPT
8.7 numerical integration
PPT
Numerical integration
PDF
Image formation
PPT
香港六合彩
PPTX
Calculas IMPROPER INTEGRALS AND APPLICATION OF INTEGRATION ppt
PPT
1519 differentiation-integration-02
PDF
Math 2 Application of integration
PDF
5th Semester Electronic and Communication Engineering (2013-June) Question Pa...
PPT
Numerical integration
PPT
Application of Integrals
PDF
ICPR2014-Poster
PPTX
Digital signal processing on arm new
PPT
Comparing 3-D Interpolation Techniques
PPTX
Introduction to Image Processing
PDF
Numerical Integration: Trapezoidal Rule
PPT
Multi variable integral
 
PPT
Hidden lines & surfaces
Introduction To Advanced Image Processing
Numerical integration;Gaussian integration one point, two point and three poi...
8.7 numerical integration
Numerical integration
Image formation
香港六合彩
Calculas IMPROPER INTEGRALS AND APPLICATION OF INTEGRATION ppt
1519 differentiation-integration-02
Math 2 Application of integration
5th Semester Electronic and Communication Engineering (2013-June) Question Pa...
Numerical integration
Application of Integrals
ICPR2014-Poster
Digital signal processing on arm new
Comparing 3-D Interpolation Techniques
Introduction to Image Processing
Numerical Integration: Trapezoidal Rule
Multi variable integral
 
Hidden lines & surfaces
Ad

Similar to Oral presentation on Asymmetric recursive Gaussian filtering for space-variant artificial bokeh (20)

PDF
Asymmetric recursive Gaussian filtering for space-variant artificial bokeh
PPTX
Image Restoration (Frequency Domain Filters):Basics
PDF
234456743edc.pdf
PDF
PDF
Modified adaptive bilateral filter for image contrast enhancement
PPTX
Module 3-DCT.pptxssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...
PPTX
Image Restoration (Order Statistics Filters)
PDF
Parameterized Image Filtering Using fuzzy Logic
PDF
An Adaptive Two-level Filtering Technique for Noise Lines in Video Images
PPTX
Image filtering in Digital image processing
PDF
IVR - Chapter 2 - Basics of filtering I: Spatial filters (25Mb)
PPT
Image restoration and enhancement techniques
PPT
chapter5-2 restoration and depredations.ppt
PPT
03_definition_bf.ppt
PPT
03_definition_bf [Автосохраненный].ppt
PPTX
lec06-resampling2.pptx
PDF
Translation Invariance (TI) based Novel Approach for better De-noising of Dig...
PDF
Image noise &image_filteringin digital image processing
PPTX
DIP -Unit 3 ppt.pptx
PPT
november29.ppt
Asymmetric recursive Gaussian filtering for space-variant artificial bokeh
Image Restoration (Frequency Domain Filters):Basics
234456743edc.pdf
Modified adaptive bilateral filter for image contrast enhancement
Module 3-DCT.pptxssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss...
Image Restoration (Order Statistics Filters)
Parameterized Image Filtering Using fuzzy Logic
An Adaptive Two-level Filtering Technique for Noise Lines in Video Images
Image filtering in Digital image processing
IVR - Chapter 2 - Basics of filtering I: Spatial filters (25Mb)
Image restoration and enhancement techniques
chapter5-2 restoration and depredations.ppt
03_definition_bf.ppt
03_definition_bf [Автосохраненный].ppt
lec06-resampling2.pptx
Translation Invariance (TI) based Novel Approach for better De-noising of Dig...
Image noise &image_filteringin digital image processing
DIP -Unit 3 ppt.pptx
november29.ppt
Ad

More from Tuan Q. Pham (14)

PPTX
Parallel implementation of geodesic distance transform with application in su...
PDF
Parallel implementation of geodesic distance transform with application in su...
PDF
Multi-hypothesis projection-based shift estimation for sweeping panorama reco...
PDF
Multi-hypothesis projection-based shift estimation for sweeping panorama reco...
PPT
Non-maximum suppression using fewer than two comparison per pixels
PDF
Paper fingerprinting using alpha-masked image matching
PDF
Paper fingerprinting using alpha-masked image matching
PDF
Bidirectional bias correction for gradient-based shift estimation
PDF
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
PPT
Resolution enhancement of low-quality videos using a high-resolution frame
PPT
Separable bilateral filtering for fast video preprocessing
PDF
Performance of Optimal Registration Estimator
PDF
Influence of Signal-to-Noise Ratio and Point Spread Function on Limits of Sup...
PPT
Normalized averaging using adaptive applicability functions with applications...
Parallel implementation of geodesic distance transform with application in su...
Parallel implementation of geodesic distance transform with application in su...
Multi-hypothesis projection-based shift estimation for sweeping panorama reco...
Multi-hypothesis projection-based shift estimation for sweeping panorama reco...
Non-maximum suppression using fewer than two comparison per pixels
Paper fingerprinting using alpha-masked image matching
Paper fingerprinting using alpha-masked image matching
Bidirectional bias correction for gradient-based shift estimation
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Resolution enhancement of low-quality videos using a high-resolution frame
Separable bilateral filtering for fast video preprocessing
Performance of Optimal Registration Estimator
Influence of Signal-to-Noise Ratio and Point Spread Function on Limits of Sup...
Normalized averaging using adaptive applicability functions with applications...

Recently uploaded (20)

PDF
Electronic commerce courselecture one. Pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
Teaching material agriculture food technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation theory and applications.pdf
PDF
KodekX | Application Modernization Development
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Electronic commerce courselecture one. Pdf
Chapter 3 Spatial Domain Image Processing.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Teaching material agriculture food technology
Digital-Transformation-Roadmap-for-Companies.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Network Security Unit 5.pdf for BCA BBA.
Encapsulation theory and applications.pdf
KodekX | Application Modernization Development
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Diabetes mellitus diagnosis method based random forest with bat algorithm
20250228 LYD VKU AI Blended-Learning.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Encapsulation_ Review paper, used for researhc scholars
MIND Revenue Release Quarter 2 2025 Press Release
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

Oral presentation on Asymmetric recursive Gaussian filtering for space-variant artificial bokeh

  • 1. C A N O N C O N F I D E N T I A L Asymmetric recursive Gaussian filtering for space-variant artificial bokeh Tuan Pham Canon Information Systems Research Australia Oral Session 5 15:45-16:00 on Thursday 13 December 2018
  • 2. Overview 2 1. Recursive Gaussian filter 2. Space-variant recursive filter 3. Artificial bokeh application
  • 3. FIR filter versus IIR (recursive) filter 3 Finite Impulse Response (FIR) filter Output is a weighted average of input samples: O(N), where N is filter size Xn-2 Xn-1 Xn Xn+1 Xn+2 ynyn-1yn-2 yn+1 yn+2 Impulse input Finite impulse response 0 0 w1 w2 w3 w4 w5 w1 w2 w3 w4 w5 Infinite Impulse Response (IIR) filter Output is a weighted average of input and previous output samples O(1) computation regardless of filter size Xn-2 Xn-1 Xn yn-2 yn-1 yn yn+1 yn+2 xn+1 xn+2 Infinite impulse response 0 Causal direction Xn-2 Xn-1Xn yn-2 yn-1ynyn+1 yn+2 xn+1 xn+2 Anti-causal direction 0 ∑wi = 1 for a normalised filter
  • 4. Recursive Gaussian filter 4 Second-order IIR filter [1] uses up to 2 previous taps Anti-causal filter x + y Causal filter y+ y̶ 𝑦 𝑛 + = 𝑛0 𝑥 𝑛 + 𝑛1 𝑥 𝑛−1 − 𝑑1 𝑦 𝑛−1 + − 𝑑2 𝑦 𝑛−2 + 𝑦 𝑛 − = 𝑚1 𝑥 𝑛+1 + 𝑚2 𝑥 𝑛+2 − 𝑑1 𝑦 𝑛+1 − − 𝑑2 𝑦 𝑛+2 − 𝑦 𝑛 = 𝑦 𝑛 + + 𝑦 𝑛 − Parallel IIR implementation of Gaussian filter 4th-order filter is more accurate 𝑦 𝑛 + = 𝑛0 𝑥 𝑛 + 𝑛1 𝑥 𝑛−1 + 𝑛2 𝑥 𝑛−2 + 𝑛3 𝑥 𝑛−3 − 𝑑1 𝑦 𝑛−1 + − 𝑑2 𝑦 𝑛−2 + − 𝑑3 𝑦 𝑛−3 + − 𝑑4 𝑦 𝑛−4 + 𝑦 𝑛 − = 𝑚1 𝑥 𝑛+1 + 𝑚2 𝑥 𝑛+2 + 𝑚3 𝑥 𝑛+3 + 𝑚4 𝑥 𝑛+4 − 𝑑1 𝑦 𝑛+1 − − 𝑑2 𝑦 𝑛+2 − − 𝑑3 𝑦 𝑛+3 − − 𝑑4 𝑦 𝑛+4 − 𝑦 𝑛 = 𝑦 𝑛 + + 𝑦 𝑛 − -40 -20 0 20 40 10 -6 10 -5 10 -4 10 -3 10 -2 10 -1 t h(t) Gaussian =10 2nd order, RMSE=2×10-3 4nd order, RMSE=4×10-5 -40 -20 0 20 40 -0.01 0 0.01 0.02 0.03 0.04 0.05 t h(t) Gaussian 2nd order 4nd order Log space Forth-order IIR filter [2]: use up to 4 previous taps → more accurate where the filter coefficients ni, mi, and di (i=1...4) are functions of the Gaussian smoothing scale σ [2] Farnebäck and Westin, Improving Deriche-style recursive Gaussian filters, JMIV, 2006. [1] Deriche, Fast algorithms for low-level vision, PAMI, 1990.
  • 5. Space-variant IIR filter: the straightforward extension [3] 5 Vary the filter coefficients ni, mi, and di according to the varying σ This isotropic filter works OK for smoothly varying σ not OK for discontinuous blur: colour bleeds across blur discontinuities foveation blur: 0 ≤ σ ≤ 20 discontinuous blur σ ∈ {0, 10} [3] Tan, et al., Performance of three recursive algorithms for fast space-variant Gaussian filtering, 2003. y+ Σ 0 1 1 0 0 1 Σ σ x σ=0 σ=1 σ=1 leakage causal filters y̶ Σ 0 1 1 0 0 1 σ=0 σ=0 σ=1 σ x anti-causal filters causal pass: bleeding anti-causal pass: no bleeding input output Colour bleeds to adjacent pixels if the blur difference is large enough
  • 6. Our solution: constraining the rate of change of directional σ’s 6 xy-separable filtering, each with 2 directions -> 4 directional sigmas: 𝜎𝑥 + , 𝜎𝑥 − , 𝜎𝑦 + , 𝜎𝑦 − , which can be different at a pixel Σ 0 1 1 0 0 1 σ ̶ x y Σ anti-causal filterscausal filters 0 1 1 0 1 σ+ 0 0 1 σ 0 σ+ =0 σ̶ =0 σ ̶ =1 σ+ = 1 σ̶ =.5σ+ =.1 σ+ =0 σ̶ =0 x + x - y + y - 0 10 5 To minimise leakage, the rate of increase of 𝜎+ and the rate of decrease of 𝜎− is tapered to at most 1/3 per pixel. input output
  • 7. 7 Bokeh = Japanese for visually pleasing out-of-focus blur Application: artificial bokeh Depth map Large Depth-of-Field input
  • 8. Deriche's 2-tap symmetric IIR Our 2-tap asymmetric IIR Farneback's 4-tap symmetric IIR Our 4-tap asymmetric IIR 8 Application: artificial bokeh Bokeh = Japanese for visually pleasing out-of-focus blur Depth map
  • 9. Summary 9 IIR filter is more efficient than FIR filter for large filter size Naïve extension of existing IIR filters to space-varying Gaussian filters produces artefacts at sudden blur discontinuities We proposed asymmetric IIR filters that minimise intensity leakage across blur discontinuities Our asymmetric IIR filters produce good defocus blur for scenes with depth discontinuities (e.g. portrait shot)
  • 11. Details: filter normalisation 11 0 0 0 0 0 0 0 Anti-causal filter σ̶ x + y Causal filter σ+ y+ y̶ + + w+ δ w̶ δ × × 2σ+ σ+ + σ̶ 2σ̶ σ+ + σ̶ The asymmetric left & right blur weights may not add up to 1 Need to add a small delta response to normalise the total filter
  • 12. Application: speeded-up anisotropic filtering 12 20 iterations of Perona-Malik anisotropic diffusion with λ=0.25, 𝑔 𝛻𝐼 = exp (− 𝛻𝐼 /5) Our edge-stopping blur with 𝜎 = 16 × exp − 𝛻𝐼 in the inset