1 dr. scott schaefer diffusion curves. 2/38 diffusion curves vector graphics-based representation...

Post on 06-Jan-2018

221 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Representation Bezier curves represent discontinuities Give each curve a color function on left/right side of curve  Original paper uses linear color change  Modification: Control points can have any color 3/49 Image taken from “Diffusion Curves: A Vector Representation for Smooth-Shaded Images”

TRANSCRIPT

1

Dr. Scott Schaefer

Diffusion Curves

2/38

Diffusion Curves

Vector graphics-based representation for 2D images

Images are piecewise smooth with discontinuities represented as curves

Image taken from “Diffusion Curves: A Vector Representation for Smooth-Shaded Images”

Representation

Bezier curves represent discontinuities Give each curve a color function on left/right

side of curveOriginal paper uses linear

color changeModification: Control

points can have any color

3/49Image taken from “Diffusion Curves: A Vector Representation for Smooth-Shaded Images”

Image Construction

Use curves as boundary constraints Find a harmonic function that interpolates

those boundary constraints

4/49Image taken from “Diffusion Curves: A Vector Representation for Smooth-Shaded Images”

Implementation (Simplified)

Define a left/right color for points

Use a background color to represent no data (black)

Draw curve as a polygon made of quads (thick) with smooth shading

5/49

Implementation (Simplified)

Colored pixels are constraints Find a harmonic function satisfying

constraintsHarmonic function has Laplacian zero

everywhere

6/49

Implementation (Simplified)

Colored pixels are constraints Find a harmonic function satisfying

constraintsHarmonic function has Laplacian zero

everywhere

7/49

-4

1

1

1

1

0 0

0 0

Implementation (Simplified)

Colored pixels are constraints Find a harmonic function satisfying

constraintsHarmonic function has Laplacian zero

everywhereEach value is average of

its neighbors

8/49

-4

1

1

1

1

0 0

0 0

Implementation (Simplified)

Draw curves as quads Read pixel buffer back from OpenGL Repeat a lot

For all pixels whose initial value was black, replace with average color of its neighbors from previous iteration

9/49

Problem

10/49

Problem

11/49Final Result

Problem

12/49100 Iterations

Problem

13/49200 Iterations

Problem

14/49400 Iterations

Problem

15/49800 Iterations

Problem

16/491600 Iterations

Problem

17/496400 Iterations

Problem

18/49Infinity Iterations

Problem

19/49

256

Simple Multi-Grid

Create power of 2 down-sampled imagesAverage value of all non-black pixels

For each level, starting at second to lastUp-sample previous level

Copy pixel value to black high-res pixels (non-black pixels are constraints)

For some number of iterationsFor each non-constrained pixel, replace with

average of its neighbors from last iteration

20/49

Example

21/49Original 512x512

Example

22/49Down-sampled 256x256

Example

23/49Down-sampled 128x128

Example

24/49Down-sampled 64x64

Example

25/49Down-sampled 32x32

Example

26/49Down-sampled 16x16

Example

27/49Down-sampled 8x8

Example

28/49Down-sampled 4x4

Example

29/49Down-sampled 2x2

Example

30/49Down-sampled 1x1

Example

31/49Up-sampled

Example

32/49Smoothed

Example

33/49Up-sampled

Example

34/49Smoothed

Example

35/49Up-sampled

Example

36/49Smoothed

Example

37/49Up-sampled

Example

38/49Smoothed

Example

39/49Up-sampled

Example

40/49Smoothed

Example

41/49Up-sampled

Example

42/49Smoothed

Example

43/49Up-sampled

Example

44/49Smoothed

Example

45/49Up-sampled

Example

46/49Smoothed

Example

47/49Up-sampled

Example

48/49Smoothed

Example

49/49

top related