Introduction to Computer Graphics – Image Processing (1) –
June 10, 2020 Kenshi Takayama
Introduction to Computer Graphics Image Processing (1) June 10, - - PowerPoint PPT Presentation
Introduction to Computer Graphics Image Processing (1) June 10, 2020 Kenshi Takayama Todays topics Edge-aware image processing Gradient-domain image processing 2 Image smoothing using Gaussian Filter Smoothness parameter
June 10, 2020 Kenshi Takayama
2
3
𝜏 = 2 𝜏 = 5 𝜏 = 10 Original
)'! ç Gaussian Kernel of radius 𝜏
4
𝑦 −𝜏 −2𝜏 −3𝜏 3𝜏 2𝜏 𝜏 𝐻! 𝑦
𝐪
)'! ç Gaussian Kernel of radius 𝜏
5
𝑦 −𝜏 −2𝜏 −3𝜏 3𝜏 2𝜏 𝜏 𝐻! 𝑦
𝐪
𝐫∈'
6
𝑦 −𝜏 −2𝜏 −3𝜏 3𝜏 2𝜏 𝜏 𝐻! 𝑦
http://people.csail.mit.edu/sparis/bf_course/
2𝑠 + 1 2𝑠 + 1
Stencil
7
𝜏 = 20 𝜏 = 5 downsample upsample
8
3× smoothed detail enhanced detail halos!
9
3× smoothed detail enhanced detail
𝐪
𝐫∈'
10
𝜏" = 32 𝜏" = 128 𝜏" = 512 Original In all cases, 𝜏# = 10
11
Real-time video abstraction [Winnemöller SIGGRAPH06]
12
https://en.wikipedia.org/wiki/Tone_mapping Fast bilateral filtering for the display of high-dynamic-range images [Durand SIGGRAPH02]
Short exposure Long exposure
13
γ correct. (𝑌 → 𝑌𝛿) details lost γ correct. HDR image Bilateral Filter details preserved
https://en.wikipedia.org/wiki/Tone_mapping Fast bilateral filtering for the display of high-dynamic-range images [Durand SIGGRAPH02]
𝐪
𝐫∈'
14
𝐪 "% , #𝐪 "' for pixel location 𝐪 and intensity 𝐽𝐪
Gaussian kernel applied to Euclidean distance in the feature space
to sample points {𝐠𝐪} in the feature space è Simpler computation
15
𝐻!" 𝐪 − 𝐫 𝐻!# 𝐽𝐪 − 𝐽𝐫 = exp − 𝐪 − 𝐫 $ 2𝜏%
$
exp − 𝐽𝐪 − 𝐽𝐫
$
2𝜏&
$
= exp − 𝐠𝐪 − 𝐠𝐫
$
2 = 𝐻' 𝐠𝐪 − 𝐠𝐫
16
A Fast Approximation of the Bilateral Filter using a Signal Processing Approach [Paris ECCV06] Real-time edge-aware image processing with the bilateral grid [Chen SIGGRAPH07]
17
White scribble è constraint of weight=1 Black scribble è constraint of weight=0 Weight map Application: color adjustment
Real-time edge-aware image processing with the bilateral grid [Chen SIGGRAPH07]
18
Instant Propagation of Sparse Edits on Images and Videos [Li PG10] Bilateral Hermite Radial Basis Functions for Contour-based Volume Segmentation [Ijiri EG13]
https://www.youtube.com/watch?v=mL6ig_OaQAA
Interpolation using RBF [Li10] (Purpose: edit propagation for images/videos) Interpolation using Hermite RBF [Ijiri13] (Purpose: segmentation of CT volume)
19
Digital Photography with Flash and No-Flash Image Pairs [Petschnigg SIGGRAPH04] Flash Photography Enhancement via Intrinsic Relighting [Eisemann SIGGRAPH04]
Photo A: without flash J Correct color L Noisy, blurred Photo F: with flash L Incorrect color J Less noisy, sharp
JBF'", '# 𝐵, 𝐺 𝐪 ≔ 1 𝑋
𝐪
8
𝐫∈8
𝐻'" 𝐪 − 𝐫 𝐻'# 𝐺
𝐪 − 𝐺 𝐫
𝐵𝐫
After applying JBF
20
A non local algorithm for image denoising [Buades CVPR05]
NLMF' 𝐽 𝐪 ≔ 1 𝑋
𝐪
8
𝐫∈8
𝐻' 𝐨𝐪 − 𝐨𝐫 𝐽𝐫
Noisy input Bilateral NL Means
21
Joint Bilateral Filter Guidance Input Output Original Input Gaussian Original Bilateral Rolling Guidance
Rolling Guidance Filter [Zhang ECCV14]
22
23
Poisson image editing [Perez SIGGRAPH03] Gradient Domain Manipulation Techniques in Vision and Graphics [Agrawal ICCV07 Course]
Simple copying L Boundary blurred L Gradient-domain processing J Source Dest.
24
Efficient gradient-domain compositing using quadtrees [Agarwala SIGGRAPH07]
Simple tiling Gradient-domain processing
25
Offset Dest. Source
26
Mean value coordinates [Floater CAGD03] Coordinates for instant image cloning [Farbman SIGGRAPH09]
https://www.youtube.com/watch?v=AXvPeuc-wRw
27
28
×2
||
29
Find 𝑔
9
that minimize 8
9
𝑔
9 − 𝑔 9:; − 9 )
subject to: 𝑔|<8 = 𝑔∗|<8
Find function 𝑔 such that its gradient closely matches user-specified target (
Find image 𝑔 whose gradient best matches user-specified target gradient field 𝐡 by solving Poisson equation
30
Find 𝑔
9
that minimize 8
9
𝑔
9 − 𝑔 9:; − 9 )
subject to: 𝑔|<8 = 𝑔∗|<8 Find 𝑔 𝑦, 𝑧 that minimizes F
(,> ∈8
𝛂𝑔 𝑦, 𝑧 − 𝐡(𝑦, 𝑧) ) subject to: 𝑔|<8 = 𝑔∗|<8
Solve Poisson equation: Δ𝑔 = 𝛂 ⋅ 𝐡 subject to: 𝑔|<8 = 𝑔∗|<8
31
Poisson image editing [Perez SIGGRAPH03]
source dest. source dest. source dest.
32
Real-time gradient-domain painting [McCann SIGGRAPH08] Code: http://graphics.cs.cmu.edu/projects/gradient-paint/gradient_paint.r2403.tar.gz
https://www.youtube.com/watch?v=9MGjrsPzFc4
Before After Before After
33
Poisson image editing [Perez SIGGRAPH03]
Amplify/suppress within selected region è Local Tone Mapping Set to zero except where detected as edges è Stylization
34
35
Find 𝐰9 that minimize 8
9,? ∈@
𝑥9? 𝐰9 − 𝐰
? − 𝐟9? )
subject to: 𝐰A = 𝐰A
∗, 𝑑 ∈ 𝐽B
Mesh editing with poisson-based gradient field manipulation [Yu SIGGRAPH04] Laplacian surface editing [Sorkine SGP04] Interfaces and algorithms for the creation, modification, and optimization of surface meshes [Nealen PhD07]
Edge vector of original shape è target gradient A few constraints of vertex positions è boundary condition
Poisson equation
Fix vertex positions, compute local rotation using SVD
Fix local rotations, compute vertex positions via Poisson equation
36
On linear variational surface deformation methods [Botsch TVCG08] As-rigid-as-possible surface modeling [Sorkine SGP07]
https://www.youtube.com/watch?v=ltX-qUjbkdc
Without rotation With rotation
è Fast & approx. computation using cage-based method
è Adapt GPU-based Poisson solver (originally for image processing)
37
GeoBrush: Interactive Mesh Geometry Cloning [Takayama EG11]
https://www.youtube.com/watch?v=FPsccn_gG8E