Nima Kalantari
CSCE 448/748 - Computational Photography
Texture Synthesis
Many slides from Alexei A. Efros
Texture
radishes
rocks
yogurt
Texture Synthesis
The Challenge
Weather Forecasting
Let’s predict weather:
The “Weather Channel” algorithm:
Markov Chain
What if we know today and yesterday’s weather?
Tomorrow
C
S
R
Today
R
C
S
Second Order Markov Chain
Tomorrow
C
S
R
Today
R
C
S
Observation
R,R
R,C
R,S
C,R
C,C
C,S
S,R
S,C
S,S
Markov Chains
Markov Chain
Text synthesis
Create plausible looking poetry, love letters, term papers, etc.
Most basic algorithm
Markov Chain Example: Text
“A dog is a man’s best friend. It’s a dog eat dog world out there.”
| 2/3 | | 1/3 | | | | | | | | |
| | 1/3 | | | | | 1/3 | 1/3 | | | |
1 | | | | | | | | | | | |
| | | | 1 | | | | | | | |
| | | | | 1 | | | | | | |
| | | | | | | | | | | 1 |
1 | | | | | | | | | | | |
| 1 | | | | | | | | | | |
| | | | | | | | | 1 | | |
| | | | | | | | | | 1 | |
| | | | | | | | | | | 1 |
| | | | | | 1 | | | | | |
a
dog
is
man’s
best
friend
it’s
eat
world
out
there
dog
is
man’s
best
friend
it’s
eat
world
out
there
a
.
.
Mark V. Shaney (Bell Labs)
Results:
Markov Random Field
A Markov random field (MRF)
First-order MRF:
D
C
X
A
B
X
*
*
*
*
*
*
*
*
X
*
*
*
*
*
*
*
*
*
*
*
*
Efros & Leung Algorithm
p
Synthesizing a pixel
non-parametric
sampling
Input image
Neighborhood Window
input
Varying Window Size
Increasing window size
Synthesis Results
french canvas
rafia weave
More Results
white bread
brick wall
Homage to Shannon
Hole Filling
Extrapolation
Summary
Image Quilting [Efros & Freeman]
p
Input image
non-parametric
sampling
B
Idea: unit of synthesis = block
Synthesizing a block
Input texture
B1
B2
Random placement
of blocks
block
B1
B2
Neighboring blocks
constrained by overlap
B1
B2
Minimal error
boundary cut
Minimal error boundary
min. error boundary
overlapping blocks
vertical boundary
_
=
2
overlap error
Our Philosophy
Portilla & Simoncelli
Wei & Levoy
Our algorithm
input image
Xu, Guo & Shum
Application: Texture Transfer
+
=
Texture Transfer
Constraint
Texture sample
Texture Transfer
Same as texture synthesis, except an additional constraint:
=
+