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

Preview:

DESCRIPTION

study

Citation preview

Diffusion Curves: A Vector Representation for Smooth-Shaded

Image

Alexandrina OrzanAdrien Bousseau

Holger Winnem¨ollerPascal Barla

Jo¨elle ThollotDavid Salesin3

SIGGRAPH08

Abstract• Diffusion curve

represent smooth shaded image

• Manual, assisted or automatic extraction for the diffusion curve

• GPU-based multi-grid gradient solution

Outline

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

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 …

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

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]

RELATIVE WORK

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

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

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]

Standard Multigrid V-cycle

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

u= F

DIFFUSION CURVES

Diffusion curve Final image

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

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

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

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

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

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 !

CREATING DIFFUSION CURVES

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

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

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

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

Automatic Extraction

2. Conversion

to diffusion curves

1. Data extractionOriginal bitmap Automatic reconstruction

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

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

Result

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

curves

• website

DISCUSSION & FUTURE WORK

photograph Manually created gradient mesh. 340 vertices

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

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

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

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

END

Recommended