Title: Painterly Rendering with Curved Brush Strokes of Multiple Sizes
1Painterly Rendering with Curved Brush Strokes of
Multiple Sizes
- Aaron Hertzman, NYU
- http//mrl.nyu.edu/publications/painterly98/
- (SIGGRAPH 98)
- Presented by Marc Flury
2What is Painterly Rendering?
- An oxymoron?
- Its a method of reproducing the artistic style
and/or expression of a painting using a source
image. - An image space technique
- Sort of a glorified Photoshop filter
3An Example
4An Example
5In This Presentation
- The rationale of painterly rendering using
curved brush strokes of multiple styles - Overview of implementation
- Examples of applying different parameters to
achieve different styles
6Rationale
- Real painting requires
- Time
- Skill
- Artistic talent
- Typical filtering methods
- Use only one size brush stroke
- Cant refine style with multiple passes
- Only support one style
- Image is flattened
7Typical Filtering - Photoshop
8More detail needs smaller strokes
9Improved Quality and Detail
10Advantages
- Much faster than painting
- Can be used for video (or even interactive
rendering) - Multiple brush sizes allow for varying detail and
continuous color regions - Multi-pass method is somewhat analogous to true
artistic techniques (better results?) - The system can be parameterized to create
different styles
11General Painting Algorithm
function paint (sourceImage, R1 Rn) canvas
a new constant color image // paint the
canvas for each brush radius Ri, from
largest to smallest do // apply Gaussian
blur referenceImage sourceImage G(fsRi)
// paint a layer paintLayer(canvas,
referenceImage, Ri) return canvas
12source image
13General Painting Algorithm
function paint (sourceImage, R1 Rn) canvas
a new constant color image // paint the
canvas for each brush radius Ri, from
largest to smallest do // apply Gaussian
blur referenceImage sourceImage G(fsRi)
// paint a layer paintLayer(canvas,
referenceImage, Ri) return canvas
14Layer Painting Algorithm
function paintLayer(canvas, referenceImage, R)
S a new set of strokes, initially empty D
difference(canvas, referenceImage) grid
fg R for x0 to imageWidth stepsize grid do
for y0 to imageHeight stepsize grid do M
the region(x-grid/2xgrid/2,
y-grid/2ygrid/2) areaError sumOfError(M,
D) / grid2 if (areaError gt T) then
(x1, y1) maxPoint(areaError) stroke
makeStroke(R, x1, y1, referenceImage) add
stroke to S paint all strokes S on
canvas random order
15Curved Brush Strokes
- Anti-aliased cubic B-splines
- Each stroke models the color gradient of the
reference image - Stroke Representation
- List of control points
- Color
- Brush Size
16Curved Stroke Algorithm
function makeSplineStroke(x0, y0, R, refImage)
strokeColor refImage.color(x0, y0) K new
stroke, radius R, color strokeColor add point
(x0, y0) to K (x, y) (x0, y0) (lastDx,
lastDy) (0, 0) for i1 to maxStrokeLength do
if (i gt minStrokeLength and
(refImage.color(x,y) canvas.color(x,y) lt
refImage.color(x,y)- strokeColor)) then return
K if (refImage.gradientMag(x,y) 0) then
return K (gx, gy) refImage.gradientDirectio
n(x, y) (dx, dy) (-gy, gx) if (lastDx
dx lastDy dy lt 0) then (dx, dy)
(-dx, -dy) (dx, dy) fc (dx,dy) (1-fc)
(lastDx,lastDy) (dx, dy) (dx,dy)/(dx2
dy2)1/2 (x, y) (x Rdx, y Rdy)
(lastDx, lastDy) (dx, dy) add the point
(x, y) to K return K
17Finding Control Points
D2
D1
D0
18Style Parameters
- Approximation Threshold (T)
- Brush Sizes Smallest (Ri), Number (n),
Size Ratio (Ri-1/Ri) - Curvature Filter (fc)
- Blur Factor (fs)
- Min and max stroke lengths (minLength, maxLength)
- Opacity (a)
- Grid size (fg)
- Color Jitter (jh, js, jv, jr, jg, jb)
19Examples Source Image
20Examples Impressionism
T 100 R (8, 4, 2) fc 1 fs .5 a 1 fg
1 minLength 4 maxLength 16
21Examples Expressionism
T 50 R (8, 4, 2) fc .25 fs .5 a .7 fg
1 minLength 10 maxLength 16 js .5
22Examples Water Color
T 200 R (8, 4, 2) fc 1 fs .5 a .5 fg
1 minLength 4 maxLength 16 jr jg jh .3
23Examples Pointillism
T 100 R (4, 2) fc 1 fs .5 a 1 fg
.5 minLength 0 maxLength 0 jv jh .3
24More Examples.
25More Examples
26More Examples