Texture S ynthesis Daniel Cohen-Or + = + = = The Goal of - - PowerPoint PPT Presentation

texture s ynthesis daniel cohen or the goal of texture
SMART_READER_LITE
LIVE PREVIEW

Texture S ynthesis Daniel Cohen-Or + = + = = The Goal of - - PowerPoint PPT Presentation

Texture S ynthesis Daniel Cohen-Or + = + = = The Goal of Texture Synthesis input image SYNTHESIS True (infinite) texture generated image Given a finite sample (large enough) of some texture, the goal is to synthesize other samples


slide-1
SLIDE 1

Texture S ynthesis

Daniel Cohen-Or

slide-2
SLIDE 2

+ =

slide-3
SLIDE 3

+ =

slide-4
SLIDE 4
slide-5
SLIDE 5

=

slide-6
SLIDE 6

The Goal of Texture Synthesis

  • Given a finite sample (large enough) of some texture, the

goal is to synthesize other samples from that same texture. True (infinite) texture SYNTHESIS generated image input image

slide-7
SLIDE 7
slide-8
SLIDE 8

The Challenge

repeated stochastic Both Need to model the whole spectrum: from repeated to stochastic texture

slide-9
SLIDE 9

Texture Types

slide-10
SLIDE 10

Texture model

Stationary - under a proper window size, the

  • bservable portion always appears similar.

Local - each pixel is predictable from a small set of neighboring pixels and independent of the rest of the image.

slide-11
SLIDE 11

Non-Stationary

slide-12
SLIDE 12

Non-Stationary

slide-13
SLIDE 13

Texture Synthesis for Graphics

  • Inspired by Texture Analysis and Psychophysics

– [Heeger & Bergen,’95] – [DeBonet,’97] – [Portilla & Simoncelli,’98]

  • …but didn’t work well for structured textures

– [Efros & Leung,’99]

  • (originally proposed by [Garber,’81])
slide-14
SLIDE 14
  • Input patch boundary.
  • Input texture example.
  • Fill boundary with texture.

“By Example” Texture Synthesis

slide-15
SLIDE 15

Texture Synthesis by Non Parametric Sampling

  • Generate English-looking text using N-grams,

[Shannon,’48]

  • Assuming Markov Chain on letters:

– P( letter | Proceeding n-letters )

? A

E N C Y C L O P E D I

slide-16
SLIDE 16

Efros & Leung ’99

  • [Shannon,’48] proposed a way to generate

English-looking text using N-grams:

– Assume a generalized Markov model – Use a large text to compute prob. distributions of each letter given N-1 previous letters – Starting from a seed repeatedly sample this Markov chain to generate new letters – Also works for whole words

WE NEED TO EAT CAKE

slide-17
SLIDE 17

Unit of Synthesis

  • Letter-by-letter: Used to name planets in

early 80s game “Elite”.

  • Word-by-word: M.V. Shaney (Bell Labs)

using alt.singles corpus.

– “As I've commented before, really relating to someone involves standing next to impossible.” – "One morning I shot an elephant in my arms and kissed him.” – "I spent an interesting evening recently with a grain of salt“.

slide-18
SLIDE 18

Mark V. Shaney (Bell Labs)

  • Notice how well local structure is preserved!

– Now, instead of letters let’s try pixels…

slide-19
SLIDE 19

Efros & Leung 99*

* A.A.Efros, T .K.Leung; “ Texture synthesis by non-parametric sampling” ; ICCV99. (originally proposed by [Garber,’ 81])

  • Assuming Markov property, compute
  • P( p | N(p) ).

– Explicit probability tables infeasible. – Instead, search input image for similar

neighbourhoods - that’s our histogram for p. Non-parametric sampling

slide-20
SLIDE 20

Sample Output

?

Efros & Leung 99 - Algorithm

  • Causal neighborhood –

Neighboring pixels with known values.

slide-21
SLIDE 21

Efros & Leung ’99

  • Assuming Markov property, compute P(p| N(p))

– Building explicit probability tables infeasible – Instead, let’s search the input image for all similar

neighborhoods — that’s our histogram for p

  • To synthesize p, j ust pick one match at random

p

non-parametric sampling

Input image Synthesizing a pixel

slide-22
SLIDE 22

Efros & Leung ’99

  • The algorithm

– Very simple – S

urprisingly good results

– S

ynthesis is easier than analysis!

– …

but very slow

  • Optimizations and Improvements

– [Wei & Levoy,’ 00] (based on [Popat & Picard,’ 93]) – [Harrison,’ 01] – [Ashikhmin,’ 01] – PatchMatch [Barnes et al. 2009]

slide-23
SLIDE 23

Chaos Mosaic [Xu, Guo & Shum, ‘ 00]

  • Process: 1) tile input image; 2) pick random blocks

and place them in random locations 3) S mooth edges

input idea result

Used in Lapped Textures [Praun et.al,’00]

slide-24
SLIDE 24

Chaos Mosaic [Xu, Guo & Shum, ‘ 00]

Of course, doesn’ t work for structured textures

input result

slide-25
SLIDE 25

Multi-Resolution Pyramids*

Example texture

pyramid

* L.-Y.Wei, M.Levoy; “Fast Texture Synthesis using Tree-structured Vector Quantization”;

SIGGRAPH00.

Output texture

slide-26
SLIDE 26

Extension to 3D Textures

  • Motion both in space and time

– fire, smoke, ocean waves.

  • How to synthesize?

– extend 2D algorithm to 3D.

slide-27
SLIDE 27

The Problems of Causal Scanning

  • Scanning order:

– Efros&Leung(1): Pixels with most neighbors. – Wei&Levoi(2): Raster scan.

  • These are “causal” scans.

(1) A.A.Efros, T .K.Leung; “ Text ure synt hesis by non-paramet ric sampling” ; ICCV99. (originally proposed by [Garber,’ 81])

(2) L.-Y .Wei, M.Levoy; “ Fast Text ure S

ynt hesis using Tree-st ruct ured Vect or Quant izat ion” ; S IGGRAPH00.

slide-28
SLIDE 28

The Problems of Causal Scanning

  • Can grow garbage.
  • No natural means of refining

synthesis.

  • Cannot be parallelized.
  • Problems are made worst for

synthesis of 3D space-time volumes (a.k.a. video)...

A.A.Efros, T.K.Leung; “Texture synthesis by non-parametric sampling”; ICCV99.

slide-29
SLIDE 29

Image Quilting

  • Idea:

– let’s combine random block placement of Chaos

Mosaic with spatial constraints of Efros & Leung.

  • Observation: neighbor pixels are highly correlated
slide-30
SLIDE 30

p

Efros & Leung ’99 extended

Input image

non-parametric sampling

B

Idea: unit of synthesis = block

  • Exactly the same but now we want P(B| N(B))
  • Much faster: synthesize all pixels in a block at once
  • Not the same as multi-scale!

Synthesizing a block

slide-31
SLIDE 31

Input texture

B1 B2

Random placement

  • f blocks

block

B1 B2

Neighboring blocks constrained by overlap

B1 B2

Minimal error boundary cut

slide-32
SLIDE 32
  • min. error boundary

Minimal error boundary

  • verlapping blocks

vertical boundary

_

=

2

  • verlap error
slide-33
SLIDE 33

Our Philosophy

  • The “ Corrupt Professor’s Algorithm” :

– Plagiarize as much of the source image as you

can

– Then try to cover up the evidence

  • Rationale:

– Texture blocks are by definition correct

samples of texture so problem only connecting them together

slide-34
SLIDE 34

Image Quilting Algorithm

– Pick size of block and size of overlap – Synthesize blocks in raster order – Search input texture for block that satisfies

  • verlap constraints (above and left)
  • Easy to optimize using NN search [Liang et.al., ’ 01]

– Paste new block into resulting texture

  • use dynamic programming to compute minimal error

boundary cut

See https://www.youtube.com/watch?v=t6DzioKuVEs Video

slide-35
SLIDE 35
slide-36
SLIDE 36
slide-37
SLIDE 37
slide-38
SLIDE 38
slide-39
SLIDE 39
slide-40
SLIDE 40
slide-41
SLIDE 41
slide-42
SLIDE 42

Failures

(Chernobyl Harvest)

slide-43
SLIDE 43

input image

Portilla & Simoncelli Wei & Levoy Image Quilting Xu, Guo & Shum

slide-44
SLIDE 44

Portilla & Simoncelli Wei & Levoy Image Quilting Xu, Guo & Shum

input image

slide-45
SLIDE 45

Portilla & Simoncelli Wei & Levoy Image Quilting

input image

Homage to Shannon!

Xu, Guo & Shum

slide-46
SLIDE 46
slide-47
SLIDE 47
slide-48
SLIDE 48

+ =

Application: Texture Transfer

  • Try to explain one obj ect with bits and

pieces of another obj ect:

slide-49
SLIDE 49

Texture Transfer

Constraint Texture sample

slide-50
SLIDE 50
  • Take the texture from one

image and “paint” it onto another obj ect

Texture Transfer

Same as texture synthesis, except an additional constraint:

  • 1. Consistency of texture
  • 2. S

imilarity to the image being “explained”

slide-51
SLIDE 51

+ =

slide-52
SLIDE 52

Source texture Target image Source correspondence image Target correspondence image

slide-53
SLIDE 53

+ =

slide-54
SLIDE 54

= +

slide-55
SLIDE 55
slide-56
SLIDE 56

?

Image analogies (filter by example)

A A’ B A to A’ like B to ? B’ B’

slide-57
SLIDE 57

? A1,…,An : A1’,…,An’ :: B : ?

A1 A1’ A2 A2’ A3 A3’ B B’

B’

slide-58
SLIDE 58

input

  • utput

texture segmentation drawing with color coded textures

slide-59
SLIDE 59

Applications – Artistic Filters (Cont.)

S

  • urce

Pair: Target Pairs:

slide-60
SLIDE 60

“ Texture By Numbers”

  • By color-labeling source image parts a realistic

synthesized image can be created

A B A` B`

Video

slide-61
SLIDE 61

Fragment-based Image Completion (S IGGRAPH’ 03)

slide-62
SLIDE 62

Fragment-based Image Completion (S IGGRAPH’ 03)

slide-63
SLIDE 63

Completion process

confidence and color at different time steps and scales

time

scale

slide-64
SLIDE 64

Results

slide-65
SLIDE 65

input image completion

Results

slide-66
SLIDE 66

Results

slide-67
SLIDE 67

Video Completion

. Wexler E. Shechtman M. Irani; “Space-Time Video Completion"; CVPR’04.

slide-68
SLIDE 68

Thank Y

  • u