Presentation is loading. Please wait.

Presentation is loading. Please wait.

Painterly Rendering with Curved Brush Strokes of Multiple Sizes Aaron Hertzman, NYU Presented by: Shreeganesh Ramanan.

Similar presentations


Presentation on theme: "Painterly Rendering with Curved Brush Strokes of Multiple Sizes Aaron Hertzman, NYU Presented by: Shreeganesh Ramanan."— Presentation transcript:

1 Painterly Rendering with Curved Brush Strokes of Multiple Sizes Aaron Hertzman, NYU Presented by: Shreeganesh Ramanan

2 Introduction Painterly Rendering is a method of reproducing artistic style and expression of a painting using a source image and/or 3D models An Image Space Technique A few steps beyond what Photoshop TM offers.

3 A Sampler

4

5 Things to discuss “curved brush strokes of multiple sizes” Implementation details(as little as possible ) Various parameters and what they can do

6 So you want to be an artist ? Do you have lot of time ? A huge smattering of skill ? That elusive thing called talent And some canvas, paints, a subject, and a dirty rag you call work clothes

7 Or we can turn to NPR

8 Previous Work… One brush size only No multiple passes to refine style Support for one style only Image looks “flattened”

9 Previous Work.. But details need different sized strokes

10 CBS of MS improves quality

11 Advantages Faster than painting –Can be used for interactive rendering Multiple brush sizes allow for varying detail and continuous color regions Multipass method similar to how artist paint Different parameters create different styles

12 Main Loop function paint (sourceImage, R 1 … R n ) { canvas := a new constant color image // paint the canvas for each brush radius R i, from largest to smallest do { // apply Gaussian blur referenceImage = sourceImage * G(f σ R i ) // paint a layer paintLayer(canvas, referenceImage, Ri) } return canvas }

13 Painting a Layer function paintLayer(canvas, referenceImage, R) { S := a new set of strokes, initially empty D := difference(canvas, referenceImage) grid := f g R for x=0 to imageWidth stepsize grid do { for y=0 to imageHeight stepsize grid do { M := the region(x-grid/2…x+grid/2, y-grid/2…y+grid/2) areaError := sumOfError(M, D) / grid 2 if (areaError > T) then { (x 1, y 1 ) := maxPoint(areaError) stroke := makeStroke(R, x 1, y 1, referenceImage) add stroke to S } } } paint all strokes S on canvas – random order }

14 Curved Brush Strokes Anti-aliased cubic B-Splines Each stroke models the color gradient of reference image Representation –Control Points –Color –Size of brush

15 Spline Stroke Algorithm function makeSplineStroke(x 0, y 0, R, refImage) { strokeColor = refImage.color(x 0, y 0 ) K := new stroke, radius R, color strokeColor add point (x 0, y 0 ) to K (x, y) := (x 0, y 0 ) (lastDx, lastDy) := (0, 0) for i=1 to maxStrokeLength do { if (i > minStrokeLength and (|refImage.color(x,y) – canvas.color(x,y)| < |refImage.color(x,y)- strokeColor)) then return K if (refImage.gradientMag(x,y) ==0) then return K (gx, gy) := refImage.gradientDirection(x, y) (dx, dy) := (-gy, gx) if (lastDx * dx + lastDy * dy < 0) then (dx, dy) = (-dx, -dy) (dx, dy) := f c * (dx,dy) + (1-f c ) * (lastDx,lastDy) (dx, dy) := (dx,dy)/(dx2 + dy2)1/2 (x, y) := (x + R*dx, y + R*dy) (lastDx, lastDy) := (dx, dy) add the point (x, y) to K } return K }

16 Calculating Control Points θ0θ0 G0G0 (x 0, y 0 ) D1D1 (x 1, y 1 ) (x 2, y 2 ) D0D0 G1G1 θ1θ1 G2G2

17 Parameters of Style Approximation Threshold (T) Brush Sizes – Smallest (R i ), Number (n), Size Ratio (R i -1/R i ) Curvature Filter (f c ) Blur Factor (f σ ) Min and max stroke lengths (minLength, maxLength) Opacity ( α ) Grid size (f g ) Color Jitter (j h, j s, j v, j r, j g, j b )

18 Experiments in Style Source Image

19 Experiments in Style Impressionist

20 Experiments in Style Expressionist

21 Experiments in Style Colorist Wash

22 Experiments in Style Pointillist


Download ppt "Painterly Rendering with Curved Brush Strokes of Multiple Sizes Aaron Hertzman, NYU Presented by: Shreeganesh Ramanan."

Similar presentations


Ads by Google