study diffusion curves: a vector representation for smooth-shaded images

32
Diffusion Curves: A Vector Representation for Smooth-Shaded Image Alexandrina Orzan Adrien Bousseau Holger Winnem¨oller Pascal Barla Jo¨elle Thollot David Salesin3 SIGGRAPH08

Upload: chiamin-hsu

Post on 18-May-2015

1.459 views

Category:

Technology


5 download

DESCRIPTION

study

TRANSCRIPT

Page 1: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Diffusion Curves: A Vector Representation for Smooth-Shaded

Image

Alexandrina OrzanAdrien Bousseau

Holger Winnem¨ollerPascal Barla

Jo¨elle ThollotDavid Salesin3

SIGGRAPH08

Page 2: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Abstract• Diffusion curve

represent smooth shaded image

• Manual, assisted or automatic extraction for the diffusion curve

• GPU-based multi-grid gradient solution

Page 3: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Outline

• Introduction• Relative Work• Diffusion Curves• Creating Diffusion Curves• Results• Discussion & Future Work

Page 4: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Introduction

• Benefits of vector-based primitives – More compact representation, resolution-

independence, geometric editability, easity animated, more readily stylized

• Limited to represent complex color gradients– Only support linear or radial gradients– Fail in soft shadows, defocus blur, diffuse shading,

glossy reflection …

Page 5: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Introduction – cont.

• Gradient mesh (Adobe Illustrator and Corel CorelDraw)

– A lattice with colors at each vertex that are linearly interpolated across the mesh

– Difficult to create meshes• Optimized gradient mesh– [Sun et al.,SIGGRAPH07]– A semi-automatic method for optimizing a

manually initialized mesh

Page 6: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Diffusion Curve

• A curve that diffuses colors on both sides1. Support traditional freehand drawing• Artists sketch lines first as color boundaries

2. Most color variations can be assumed to caused by edges• Edges constitute a near-complete and natural

primitive for encoding and editing images [Carlsson 88; Elder 99; Elder and Goldberg 01]

Page 7: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

RELATIVE WORK

Page 8: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Gradient Tools

Optimized Gradient Meshes[Sun el al. SIGGRAPH07]1. A manually initialized mesh2. Sample and estimate color of control

points on Ferguson patches3. Optimize the reconstruct image with

constrains – smooth, vector line guided and boundary constrained

photographic Initial mesh Optimized mesh reconstructed

Page 9: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Gradient ToolsGradient Brush[McCann & Pollard, SIGGRAPH08]

• Interactive edge-focused drawing tools on gradient domain G – Brush, edge copy, clone

• I = G– Solve as Poisson Eq. with GPU-based

multigrid method

I = G‧

Gradient brush

Edge brush

Clone brush

Page 10: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

GPU-Based Multigrid Method for Gradient-Domain

Multi-grid method• Use a coarse version of the

domain to efficiently solve for the low frequency components of the solution,

• Use a fine version of the domain to refine the high frequency components.

GPU-based multigrid method• [Kazhdan and Hoppe,

SIGGRAPH08]• [Goodnight et al.,03]• [Briggs et al.,00]

Page 11: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Standard Multigrid V-cycle

Figure 1 of “Streaming Multigrid for Gradient-Domain Operations on Large Images”, SIGGRAPH 08

u= F

Page 12: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

DIFFUSION CURVES

Diffusion curve Final image

Page 13: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Rendering

Diffusion curve

Color source (CL, CR)

WyWx

Blur sources

Sharp color image

Blur map (B)Smoothness of the transition between Left and Right

Final image

2.Diffuse3. Reblur

1. Rasterize sources

Page 14: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

1. Rasterize sources

P[npo

s]

•(x,y,Tangent)CL[nl

]

•(r,g,b,t)

CR[nr

]

•(r,g,b,t)

Σ[nσ] •(σ,t)

P

CRCL

Σ

Bezier spline

Blur source - interpolation

Diffusion curve(similar to edge-based

representation [Elder 99])

Color source - interpolation

Page 15: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Gradient Field

• Compute the gradient of RGB 3 channels on the edges

wx,y = (CL – CR) N

P

CR

CL

0 0 0 …0 ..….

….0 ..0 0 0 ..

N

Page 16: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

2. Diffusion

• Compute I from gradient w with color source C as constrain

• Apply GPU-based multigrid method– Use Jocobi relaxation to solve

each level of multigrid– Limit the number of relaxation

iteration, ex: 512x512 image• 5i Jacobi iteration per multigrid

level• i is the level no. (fine coarse)

Solve Poisson equation with color constrain C

I =‧wI(x,y) = C(x,y)

where pixel (x,y) store color value

C Sharp color image

w = (wx, wy)

I

Page 17: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

3. Reblurring

• Diffuse the Blur map [Elder 99] to define blur kernel size with multigrid method

• Blur each pixel with the blur kernel defined in blur map

B = 0 B(x,y) = σ(x,y)

if pixel (x,y) is on a curve

σ B Sharp color image

Final image

Page 18: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Panning and Zooming

• Require to solve a global eq. • How to pan & zoom without a full Poisson solution at a higher resolution ?1. Compute a low-resolution

diffusion on the un-zoomed image domain

2. Use the obtained solution to define Dirichlet boundary conditions around the zooming window

I =‧wI(x,y) = C(x,y)

Curves outside the current viewport still influence the

viewport’s content !

Page 19: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

CREATING DIFFUSION CURVES

Page 20: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Creating Diffusion Curves

• Manual– artists can create an image with our tool by

sketching the lines of the drawing and then filling in the color

• Assisted– artists can trace manually over parts of an image

and we recover the colors of the underlying content• Automatic– artists can automatically convert an image into our

representation and possibly post-edit it

Page 21: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Assisted

1. Identify color outliers1. Sample colors along the curve at

distance d in N2. Measure σ of the neighborhood each

sample. Identify outliers where if it deviates too much from mean

2. Fit a polyline to the color points using DouglasPeucker algorithm– Start from the first and the last pt.– Repeatedly subdivide the line into

smaller segments until the max diff < є

– The end points of the final polyline yield the color controls points

N

d

working on L*a*b channels

Extracting color control points along a drawn curve

Page 22: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Original image Stylistic tracing using color sampling (drawing time < 1 min.)

Original image Active contours and color sampling (drawing time 90 min.)

Page 23: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Automatic Extraction

2. Conversion

to diffusion curves

1. Data extractionOriginal bitmap Automatic reconstruction

Page 24: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

1. Data Extraction• Structure-preserving manipulation[Orzan et al.,07]– Extract edge locations and blur values for edge pixels after

scale space analysis– Extract colors at both side of edge

Page 25: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

2. Conversion to Diffusion Curve

• Open source Portrace s.w. [Selinger 03]– Approximate a pixel chain with a polyline that has

a min. number of segments• Least approximation error

– Transform the polyline into a smooth curve made from end-to-end connected Bezier curve• Least square Bezier fitting based on a max. user-

specified fitting error and degree of smoothness

Page 26: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Result

• Nvidia GeForce 8800• Realtime performance– 512 x 512 grid– Several thousands

curves

• website

Page 27: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

DISCUSSION & FUTURE WORK

Page 28: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

photograph Manually created gradient mesh. 340 vertices

Our drawing – manually tracing, 38 diffusion curves, 365 geometric, 176 CL, 156 CR control point

Page 29: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Comparison with Gradient Meshes

• Representation efficiency– D seems more compact. But G has more regular mesh

• Usability– D are more natural drawing tool– D requires good understanding of the final combination. The

meshes are often overlapping • Topology

– D is hard to move a part of an image or warp the entire mesh• Relevant edges have to be selected• Hard to make sure how the colors of outer edges should interact

with their new surrounds for D

Page 30: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Future Challenges

• Layered system– Interaction of multi layers (a

global Poisson solution)– Blending layers with gradual

transparency

• Intersections– Curve splitting– Color editing

• Still poor to create texture

The colors attached to intersecting curves compete with each other creating a smooth color gradient after diffusion

Diffusion curves at intersection can be corrected by curve splitting and

color editing

Page 31: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

Conclusion

• Introduce Diffusion Curve as s new image representation– Offer most benefit of vector primitives– Allow to create highly complex image

• Compared with gradient mesh– Comparable both in quality and coding efficiency– Simpler to create– Diffusion curves can be capture automatically

Page 32: study Diffusion Curves: A Vector Representation for Smooth-Shaded Images

END