Shading Approach for Artistic Stroke Thickness using 2D Light Position
Takashi Ejiri, Yuki Morimoto, Tokiichiro Takahashi,Tokyo Denki University/UEI Research {t-ejiri, yuki, toki}@vcl.im.dendai.ac.jp

(a)

(b)

(c)

(d)

Figure 1: (a) Input image of an elephant and light position; (b) our result using (a); (c) input image of cattle and light position; (d) Ourresult using (c).

1. Introduction
We present an approach for determining stroke thickness inillustrations based on two-dimensional (2D) light position. Stroke
rendering is particularly important for cartoons and illustrations in
nonphotorealistic rendering (NPR). In cartoons and illustrations,stroke thickness is varied for effective expressions.
[Goodwin et al. 2007] proposed a shading approach to artistic
stroke thickness using a three-dimensional (3D) model. However,shading 2D images using 2D light position remains a challenge.
We propose a method to render artistic stroke styles by varying
thickness considering the distance from a 2D light position.

2. Our Approach
Interface
The proposed method performs illustration styled
shading in real-time by specifying the position of the light in an
input image according to the mouse pointer position (Figures 1a,1c).
Summary Our shading approach is based on an assumption
presented by [Goodwin et al. 2007]: dark strokes are drawn toapproximate dark regions of the shaded parts. First, the user
inputs a bitmap image of constant thickness strokes. Then, theinput image is segmented into black closed areas to express awide range of stroke thicknesses at each area. Each area is shadedso that the thickness changes partially by considering the 2D lightposition. Finally, strokes are rendered in an illustration style bysynthesizing the thickened lines. We use [Potrace] to vectorize
our result.

Segmentation of input bitmap strokes The input image is firsttransformed to a binary image (black or white). Then, sets ofpixels of consecutive white areas are extracted by a labelingprocess with their four neighboring black pixels as the segmentedareas. These black pixels are defined as stroke pixels.
We describe our thickening process using the 2D light position
mentioned below.
Calculation of shading direction
First, light directions arecalculated for all stroke pixels. Then, the light directions areapproximated for eight directions. Finally, the opposite directionof the light direction is obtained as the shading direction.
Calculation of line width Here, the strokes are thickened to theshading direction. In each stroke pixel, the thickening width(pixels) is determined by considering the 2D Euclidean distancefrom the light position where; n is the number ofstroke pixels. The user specifies the maximum value of the linewidth. In each area, the maximum value of the distance
is. The widthis calculated by the following equation．

Then, we thicken strokes by changing sequential
pixels in theshading direction of each stroke pixels into stroke pixels.

3. Result
Figure 1 shows input images (cattle and elephant) and our results.
We administered a questionnaire to compare the results of[Goodwin] with the results of the proposed method (seesupplemental material). The results of the questionnaire indicatethat our method can render artistic strokes from 2D image andlight position as well as the 3D method.

References
Permission to make digital or hard copies of part or all of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor commercial advantage and that copies bear this notice and the full citation on thefirst page. Copyrights for third-party components of this work must be honored. For allother uses, contact the Owner/Author.
SIGGRAPH 2014, August 10 – 14, 2014, Vancouver, British Columbia, Canada.
2014 Copyright held by the Owner/Author.
ACM 978-1-4503-2958-3/14/08

GOODWIN, T., VOLLICK, I., AND HERTWMANJ, A. 2007. Isophote
Distance: A Shading Approach to Artistic Stroke Thickness. In
Proc. of NPAR, 53-62.
POTRACE http://potrace.sourceforge.net