36
An Introduction to Texture Synthesis 2008/05/29

An Introduction to Texture Synthesis

  • Upload
    enrico

  • View
    42

  • Download
    0

Embed Size (px)

DESCRIPTION

An Introduction to Texture Synthesis. 2008/05/29. Desirable Properties. Result looks like the input Efficient General Easy to use Extensible. The Challenge. Need to model the whole spectrum: from repeated to stochastic texture. repeated. stochastic. Both?. - PowerPoint PPT Presentation

Citation preview

Page 1: An Introduction to Texture Synthesis

An Introduction to Texture SynthesisAn Introduction to Texture Synthesis

2008/05/29

Page 2: An Introduction to Texture Synthesis

Desirable PropertiesDesirable Properties

Result looks like the Result looks like the inputinput

EfficientEfficient

GeneralGeneral

Easy to useEasy to use

ExtensibleExtensible

Page 3: An Introduction to Texture Synthesis

The ChallengeThe Challenge

Need to model the whole Need to model the whole spectrum: from spectrum: from repeated to stochastic repeated to stochastic texturetexture

repeated

stochastic

Both?

Page 4: An Introduction to Texture Synthesis

[Shannon,’48] proposed a way to [Shannon,’48] proposed a way to generate English-looking text using generate English-looking text using N-grams: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

Page 5: An Introduction to Texture Synthesis

Assuming Markov property, compute P(Assuming Markov property, compute P(pp|N(|N(pp))))• Building explicit probability tables infeasible

• Instead, let’s search the input image for all similar neighborhoods — that’s our histogram for p

To synthesize To synthesize pp, just pick one match at random, just pick one match at random

pp

non-parametricsampling

Input image Synthesizing a pixel

Page 6: An Introduction to Texture Synthesis

Basic AlgorithmBasic Algorithm

Exhaustively search neighborhoodsExhaustively search neighborhoods

Page 7: An Introduction to Texture Synthesis

NeighborhoodNeighborhood

Neighborhood size determines the quality & costNeighborhood size determines the quality & cost

33 55 77

99 1111 4141

423 s 528 s 739 s

1020 s 1445 s 24350 s

Page 8: An Introduction to Texture Synthesis

Efros & Leung ’99Efros & Leung ’99

The algorithmThe algorithm•Very simple

•Surprisingly good results

•Synthesis is easier than analysis!

•…but very slow

Optimizations and ImprovementsOptimizations and Improvements•Multi-resolution Pyramid

• Jump Map

•Chaos Mosaic

Page 9: An Introduction to Texture Synthesis

Multi-resolution PyramidMulti-resolution Pyramid

High resolution Low resolution

Page 10: An Introduction to Texture Synthesis

Multi-resolution AlgorithmMulti-resolution Algorithm

Page 11: An Introduction to Texture Synthesis

Multi-resolution PyramidMulti-resolution Pyramid

Better image quality & faster computation Better image quality & faster computation

1 level55

3 levels55

1 level1111

Page 12: An Introduction to Texture Synthesis

What is a Jump Map?What is a Jump Map?

Same size as inputSame size as input

Page 13: An Introduction to Texture Synthesis

What is a Jump Map?What is a Jump Map?

Same size as inputSame size as input

Set of jumps per Set of jumps per pixelpixel

Page 14: An Introduction to Texture Synthesis

What is a Jump Map?What is a Jump Map?

Same size as inputSame size as input

Set of jumps per Set of jumps per pixelpixel

Jumps are weighted Jumps are weighted according to according to similaritysimilarity• Need not sum to 1

0.4

0.3

0.2

Page 15: An Introduction to Texture Synthesis

Output

Synthesis with Jump MapsSynthesis with Jump Maps

Input

Page 16: An Introduction to Texture Synthesis

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

Process: 1) tile input image; 2) pick random blocks and place them in random locations 3) Smooth edges

input

idea result

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

Page 17: An Introduction to Texture Synthesis

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

Of course, doesn’t work for structured textures

input

result

Page 18: An Introduction to Texture Synthesis

Image QuiltingImage Quilting

Idea:Idea:• let’s combine random block placement of

Chaos Mosaic with spatial constraints of Efros & Leung

Page 19: An Introduction to Texture Synthesis

pp

Efros & Leung ’99 extendedEfros & Leung ’99 extended

Observation:Observation: neighbor pixels are highly correlated neighbor pixels are highly correlated

Input image

non-parametricsampling

BB

Idea:Idea: unit of synthesis = block 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

Page 20: An Introduction to Texture Synthesis

Input texture

B1 B2

Random placement of blocks

block

B1 B2

Neighboring blocksconstrained by overlap

B1 B2

Minimal errorboundary cut

Page 21: An Introduction to Texture Synthesis

min. error boundary

Minimal error boundaryMinimal error boundary

overlapping blocks vertical boundary

__ ==22

overlap error

),,min( 1,1,11,1 jijijiijij EEEeE

Page 22: An Introduction to Texture Synthesis

AlgorithmAlgorithm

•Pick size of block and size of overlap

•Synthesize blocks in raster order

•Search input texture for block that satisfies overlap constraints (above and left)

•Easy to optimize using NN search

•Paste new block into resulting texture

•use dynamic programming to compute minimal error boundary cut

Page 23: An Introduction to Texture Synthesis
Page 24: An Introduction to Texture Synthesis
Page 25: An Introduction to Texture Synthesis
Page 26: An Introduction to Texture Synthesis
Page 27: An Introduction to Texture Synthesis

Failures

(Chernobyl

Harvest)

Page 28: An Introduction to Texture Synthesis

Image Quilting for Texture Transfer

Image Quilting for Texture Transfer

++ ==

Page 29: An Introduction to Texture Synthesis

Texture TransferTexture Transfer

Take the texture from Take the texture from one object and “paint” it one object and “paint” it onto another objectonto another object

• This requires separating texture and shape

• That’s HARD, but we can cheat

• Assume we can capture shape by boundary and rough shading

Then, just add another constraint when Then, just add another constraint when sampling: similarity to underlying image sampling: similarity to underlying image at that spotat that spot

Page 30: An Introduction to Texture Synthesis

++ ==

++ ==

parmesan

rice

Page 31: An Introduction to Texture Synthesis

++ ==

Page 32: An Introduction to Texture Synthesis

Sourcetexture

Target image

Sourcecorrespondenc

eimage

Targetcorrespondence image

Page 33: An Introduction to Texture Synthesis

++ ==

Page 34: An Introduction to Texture Synthesis

input image

Portilla & Simoncelli

Wei & Levoy Image Quilting

Xu, Guo & Shum

Page 35: An Introduction to Texture Synthesis

Portilla & Simoncelli

Wei & Levoy Image Quilting

Xu, Guo & Shum

input image

Page 36: An Introduction to Texture Synthesis

Portilla & Simoncelli

Wei & Levoy Image Quilting

input image

Homage to Shannon!

Xu, Guo & Shum