Você está na página 1de 8

Creating Pen-and-Ink Illustration using Stroke Morphing Method

Hye-Sun Kim Hee-Jeong Jin, Young-Jung Yu, Hwan-Gue Cho


Ertual Reality Department Department of Computer Science,
ETRI, TaeJeon, Korea Pusan National University, Korea
E-mail: hsukim @pearl .cs.pusan.ac.kr E-mail: { hjjin, yjyu, hgcho} @pearl.cs.pusan.ac.kr

Abstract descriptions as input; and image-based systems, which pro-


duce illustrations from greyscale images[7]. Geometry-
Most illustration systems need a lot of user strokes based systems have been studied to render silhouettes of
to generate natural-looking pen-and-ink illustrations. In 3D objects[4]. In one such study, strokes were drawn
order. to reduce the number of user strokes necessary, on silhouette images by texture mapping[@, while another
we propose a new method for pen-and-ink illustrations study used intersection lines[2]. However, it is hard to ex-
using a stroke morphing concept. For this, we introduce tract the boundaries and features of surfaces completely
a general stroke morphing procedure, which consists of using image-based methods. As a result, most recent re-
both jlow-oriented morphing and shape-oriented morph- searchers have chosen methods whereby strokes are speci-
ing. Using this morphing technique, we can make more fied through numerous of user interactions, in image-based
natural-looking pen-and-ink illustration with fewer user systems.[d 7, 91
strokes. This work can be applied to generate simplijed A number of previous researchers have built their sys-
pictures for dictionary typesetting. The main purpose of tems to generate illustrations which have been beautiful,
this paper is to describe this method, which requires fewer artistic and similar to natural objects, therefore they have
user strokes than other previous methods. Experimental had to use many strokes per illustration. However, if you
results are given in the$nal section. inspect dictionaries and textbooks, you can see that many
practical illustrations are somewhat different from illustra-
Keywords :Illustration, Stroke Morphing tions generated using other previous systems. For clarity,
dictionary illustrations express only important characteris-
tics of objects. As a result, many features of an object
are simplified or omitted and fewer strokes are used. Fig.1
1. Introduction shows two types of illustrations. Fig.l(a) shows an illustra-
tion by an automatic drawing system [6] and Fig.l(b) shows
Scientific, technical, or medical documents have many a hand-drawn illustration printed in a dictionary. In this pa-
illustrations, sketches or other line-oriented drawings. per, we propose a new method for generating illustration
Though traditional printing techniques have been developed strokes by applying a stroke morphing technique, which is
increasingly in our century, illustrated pictures are also used a kind of field morphing.
since that abstract drawings can convey complex informa-
tion better than realistic images[2]. Abstract drawings like 1.2 System overview
pen-and-ink illustrations offer numerous advantages over
photorealism and they include their ability to omit extrane-
ous details, to focus attention on relevant features, to clarify The procedure of our system consists of 3 steps: bound-
and simplify shapes, or to expose parts that are hidden[9]. ary extraction, input of user strokes, and generation of arti-
ficial strokes. In the first step, the boundaries of objects are
extracted and smoothed by using the Bkzier curve, User
1.1 Previous works strokes are then drawn by the user to generate artificial
strokes. In the final step, we use stroke morphing techniques
In recent years, a number of systems which automat- to generate artificial strokes. Each step is described in the
ically generate pen-and-ink illustrations have been devel- following section in detail. Fig.:! shows the illustration gen-
oped. These systems can be clasified into two broad, input- erating procedure using our system. At first, an original 2D
based categories: geometry-baged systems, which take 3D image is given, as in Fig.2(a). Then, our system extracts

113
0-7695-1007-8/01 $10.000 2001 IEEE
2. Boundary processing for illustration

In general, it is difficult to generate a good illustration


if only a small number of strokes are used. To overcome
this drawback we exploit the boundary of an object. This
phase consists of two parts; boundary smoothing and image
contour construction.

2.1. Boundary smoothing


Figure 1. Two types of illustration (a)
computer-based illustration by a previous The first step of the boundary extraction is to construct
work (having numerous strokes) [6] (b) hand- boundary points with a Laplacian filter and define the
drawn illustration printed on dictionary (hav- boundary using polylines[ 1, 3,5]. At this stage, the bound-
ing few strokes) ary will be rough and complex. We then use the smoothing
phase to refine the rough boundary. The smoothing phase
removes redundant and noisy points in the polylines. Af-
ter the smoothing pha$e, the boundary becomes more sim-
the contour of it, as in Fig.2(b). In this step, the boundary ple and the curves smoother. This process is illustrated by
edge segment must be connected smoothly and simplified. Fig.3. Fig.3(a) and (b) show a raw boundary and its noisy
In order to make a user-illustration. a human drawer creates points, which are determined by the area of three adjacent
user strokes within the boundary of a given image, like in points(1ocid triangle). Then, the points where the area of
Fig.2(c). From these sets of given user strokes, our system the local ulangle are less than a are regarded as noise and
generates artificial strokes based on the topology of the user eliminated. Fig.3(c) shows the example of redundant points,
strokes. Fig.2(d) shows the result of the stroke morphing which haw angles greater than .'6 These points are also
phase. eliminated.. Fig.3(d) shows the result of this process.

Pl

P10 -P PI0

Figure 3. Boundary smoothing: (a) finding


out noisy points and removing p 3 , p s , and P8,
(b) reimoving p 2 and p 7 , (c) removing redun-
dant point p4, (d) result boundary

2.2. Image contour construction


(C) (d)
Following boundary smoothing process, the simplified,
shortened boundary-lines must be connected as a single
Figure 2. Illustration generating procedure:
closed curve. There are three steps, in this contour con-
(a) an original image (b) boundary extraction
struction process: separation, merging, and the deletion of
(c) user strokes (d) illustration result polylines.
If the difference between the inclinations of two adjacent
line segments in a polyline is larger than a given threshold,

114
l-----l l-----l L s i , k - l s i , k s i , k + l of si. The l e n g t h ( s i , k )denotes the edge

vector of sf. The base vector is defined as bi =


-
length of ( s i , k ,s i , k + l ) , and the C;,jmeans a j-th direction
- si,l,
where si,?,?is the last control point of s i .

Figure 5. The structure of the user stroke for


morphing
Figure 4. Two types of stroke morphing meth-
ods: (a)t(b) the flow-oriented stroke mor-
phing procedure, (c)-+(d) the shape-oriented
stroke morphing procedure
3.1. User stroke

we divide the polyline at the point that connects the adjacent In the image-based illustration system, little information
line segments. On the other hand, if two distinct polylines is supplicd, so user strokcs arc used to compensate for in-
arc closer than a given threshold, we merge them in order to sufficiencies.
makc the polylincs into one. After the separation and merg- A user provides uscr strokes by drawing polylines di-
ing, the image contour construction process removes noisy rectly on an image with a mouse or a stylus pen. The di-
polylines that are shorter than the user-defined threshold. rection and number of user strokes must be carefully detcr-
mined, since three parameters( 3 of strokes, their direction,
and their length) are crucial to the quality of the final illus-
3. Stroke morphing tration. Then, user strokes are simplified and smoothed, to
eliminate noisy and redundant control points.
Stroke morphing is a technique uscd to automatically
Our system accepts two types of user stroke: the shape
generate artificial strokes based on given user strokes. We
user stroke and the direction user stroke. Fig.7 shows how
use two kinds of methods: flow-oriented stroke morphing
this system generates artificial strokes when the shape user
and shape-oriented stroke morphing. Flow-oriented stroke
strokes (a) and the direction user strokes (b) are given. For
morphing is suitable when strokes are intended to show flow
some objects, the direction user strokes do not need to be
or direction, like smoke or water. Shape-oriented stroke
given. Fig.7 shows two different cases: in Fig.7(a), only
morphing, on the other hand, is suitable when strokes are
shape user strokes are used, and in Fig.7(b), both shape and
influenced more by shape than flow, so this can be applied
direction uscr strokes are used.
to drawing leaves or feathers.
Fig.4 shows the two different drawing stroke morphing
methods, both with the same number of user strokes. Fig.4
(a)+(b) show the flow-orientedstroke morphing procedure,
and Fig.4 (c)+(d) show the shape-oriented stroke morphing
procedure. The morphing method employed by the user can (a) s, (b) sd (c) ss @ sd.
be chosen based upon the characteristics of each illustration
image. Figure 6. User strokes and artificial strokes:
Fig.5 shows a notation for the structure of a user stroke; (a) s , ~ user
: stroke for the shape (b) S d : user
control points, angles, length of composing vector, direction stroke for the processing direction (c) artifi-
vectors, and a base vector shown a? a dotted line. Let si be cial strokes = s,?@I sd
the i-th user stroke. The si,j denotes the j-th control point
of the user stroke s;. The a n g l r ( s i , k ) in this figure denotes

115
user stroke s, and n denotes the number of user strokes.
After detlmnining 11 (s,,,,), we must generate each di-
rection vector of the stroke s , , ~ ~ , The
,. k-th direction vector
of s,,, Gnezt,,k, is generated by following equation.

original image ,where disf ( s , , ~y, ) denotes the distance between points s, ,
5 -l and p , n (s,) denotes the number of direction vectors of the
user stroke .it and n denotes the number of user strokes.
Through this equation, we can generate the direction
vector of anew artificial strobe which started from a point p .
After generating the direction vector, the point p is modified
+
to p ij'!,, k and the generating process of a direction vec-
\..
L
L,j tor is repeated until r) (s,,,,,) vectors are generated. Then the
same process is repeated for the next starting point ( S I , y~).
user stroke Fig.8 shows an artificial stroke s,,,, and many notations
-1 5 used in equations. The snev,is generated by the flow mor-
phing technique with two user strokes, s , , s l t l .

final illustration
(a) (b)

Figure 7. Artificial stroke generation proce-


dure: the direction strokes are not used in
(a); the direction user strokes are followed by
side line of a cup in (b) Figure 8. Notations in the flow morphing
equation: the artificial stroke s , , , , is gener-
ated with two user strokes s ~ s,, + ~

3.2. Flow morphing


Fig.9 shows the illustration obtained by the flow morph-
In many ca$es, the direction of user strokes is impor- ing technique.
tant to generate realistic illustrations. The flow morphing
method preserves the direction of user strokes during the 3.3. Shape morphing
stroke morphing phase. For this, each user stroke is divided
into several direction vectors. All direction vectors have the The aim of shape morphing is to best preserve the shape
same length. Let ,s, denote an artificial stroke to be gen- of user strokes. For this morphing technique, each user
erated by flow morphing technique. A p(x,y) denotes the stroke is divided into the same number ofcjirection vectors.
position where stroke s,,, is started at. Then we can deter- Next, the user generates the base vector, b,,,,, of an artifi-
mine, n(s,,,,), the number of direction vectors of the line cial stroke s, which starts at a point p . as in the following
segment of polyline,,,s, as follows: equation. Note that p is the starting point of a new artificial
stroke.

,where d i s t ( ~ i p, ~) denotes
, the distance between pointssi,l ,where R is the number of user strokes, & denotes the base
and p , n ( s i ) denotes the number of direction vectors of a vector of a user stroke si.

116
1)) CJ

n, = 17 n , =246

user strokes

After generating the baqe vector of s,,,, the user must


determine direction vectors of s,,,. Next the angle and
length of direction vectors in each user stroke need to be
computed. The k-th direction vector, G'new,k, of snerois
defined a$in the following equation.
-. I d,+l,l
Gnew.0 = baew (4)

Figure 10. Notations of the shape morphing


: The artificial stroke s,,,,, is generated with
two user strokes si and s ; + ~

In the previous equation, rotate (a.ngle( snew, k ) , v;lew,k- I )


denotes the function which retum a normalize$ vector ro-
tated by a n g l e ( s n , w , k ) from G'new,k-I toward b,,. By re-
peating the above equations, artificial strokes generated by must also be considered. In order to generate an illustra-
using shape-oriented morphing technique can be abtained. tion, only a pen with a fixed drawing width is used. To
Fig.10 shows notations used in the equations and an ar- illustrate the dark side of an image, one must will gener-
tificial stroke generated by the shape morphing method. ate many strokes, while reducing the number of artificial
Fig.11 shows an illustration image generated by using strokes in the bright side of an image.
the shape morphing method. Fig.11 shows that the shape of For determining the stroke density of a subregion of an
user strokes is preserved in the resulting illustration image. image, the number of artificial strokes can be controlled by
adjusting the pixel intensity of the starting point p of an
3.4. Drawing artificial strokes artificial stroke. Let I, be the pixel intensity of a point p.
In our experiments, this is an integer k , where 0 5 k 5
So far, it har been explained how to make artificial 255. Ip = 255(= 0) means a white space (=black) pixel.
strokes (direction, number of piecewise line segment, etc.) Let B O S d ( p ) be a "small enclosing box" with d width and
from given user strokes. Since artificial strokes also have height at the center point p, and let I s 0 x d(), be the average
to show the characteristics of input images, image intensity pixel intensity of pixels in BOX-d(y).It must be determine

117
3
C

C J
\ -c
-8 3

(a)
'X
nu = 9
(b)
n, = 152
(c)
Figure 11. An example of shape morphing : (a) a given 2D image (b) extracted boundary and user
strokes (c) the illustration result of (a)

probabilistically if the pointy can be a starting point of a two typical illustrations produced using the stroke morph-
new artificial stroke or not. Let P r ( p )be the probability of ing method. Fig.l4(a) is a given 2D image. In Fig.l4(b),
an artificial stroke starting at a point ( x ,y). Then we can a human illustrator creates user strokes within each image.
calculate P r ( p )as follows: The final results are shown in Fig.l4(c), where the wolf and
the prairie dog illustrations are completed in postscript for-
mat. In case of the wolf image, 13 shape user strokes are
given and 308 artificial strokes are generated in the result
P r ( p ) = 0, if I B O A - ~>=
( ~ )to, illustration image. For prairie dog, 17 shape user strokes
where f o and f l are control constants. In this experiment, are given and 421 artificial strokes are generated. Fig.15
t l = 4. So, if a pixel is surrounded with a perfect black shows the result when our illustration method is used for
box, then about 25% of such black pixels might be starting dictionary typesetting.
points of any artificial strokes. Selecting a good t o , t l and This paper presents a new illustration method that high-
d of B O S d ( p )is very important in generating a realistic il- lights the important features of original images. The im-
lustration. Also we can generate many different illustrations proved features of our method can be summarized ar fol-
by adjusting these control variables t o , t l , and d. lows:
0 Illustrations can be created by specifying a small num-
4. Experimental results and conclusion ber o f simple user strokes.

This illustration system has been implemented on a Pen- 0 The proposed technique enables users to easily control
tium 111, 600MHz. All input images are 512x512 black the illustration effects by adjusting the user strokes.
and white images. The execution time depends on the den- 0 This is the first illustration technique that utilizes
sity of the objects in the input image and the number of user stroke morphing.
strokes. In our experiments, the average execution time was
about one minute. The final results were translate to the
postscript format with a Be'zier curve to make more refined, References
high resolution images.
Fig.12 shows result illustrations based on the number of [I] J. M. Cychosz. Eficient Binary Image Thinning Using Neigh-
borhood Maps. Graphics Gems TV, 1994.
user strokes. If there are too few user strokes, the system can
[?I 0. Deussen, J. Hamel, A. Raab, S. Schlechtweg, and
not generate good results. However, it is of no use to give T. Strcithotte. An illustration technique using hardware-based
too many strokes, as Fig.l2(c). It can be seen that results of intersections and skeletons. Graphics Interface '99, pages
Fig.12(b)(nU=5)and Fig.12(c)(nU=15)are not so different. 175-182, June 1999.
Fig. 13 shows the result illustrations of two knot images [3] S. Gupb and R. F. Spmull. Filtering edges for gray-scale
and an example of dictionary typesetting. Fig.14 shows displays. Computer Graphics '81,pages 1-5, August 1981.

118
knot InoVn 1. a. A compact intersection of interlaced material,
such as cord, ribbon, or ropc. b. A fastening made by tying together
lengths of niaterial. such as rope. in a prescribed way. 2. A decorative
how of ribbon. fabric, or braid. 3. A unifying bond, apccially a n i w
iage bond. 4. A tight cluster of pcnons or things: a knot of onlookcn.
5 . A feeling of tightness:
a knot of fear i n my stoma-
ch. 6. A coniplex problem.
01.
hard place or lump. especi-
ally on a tree, at a point fr-
om which a stem or branc-
h grows. 7.A hard place
or lump. especially on ai-
rec, at a point from which
a stcm 01 branch grows.

(a) slip knot I (b) overhand knot (c) an example for dictionary typesetting by authors
Figure 13. illustrationsoutput: two kinds of knots

[4] I,. Markosian, M. A. Kowalski, S. J. Trychin, and L. D.


Rourdew. Real-time nonphotorealistic rendering. Proc-. SIC-
GMPII 97, pages 415-410, August 1997.
[ 5 ] E. N. Mortensen and W. A. Barrctt. Interactive segmentation
with intelligent scissors. GRAPHICAL M O D E L S A N D I M -
AGE PROCESSING, pages 349-384, September 1998.
[GI M. P. Salisbury, S.E. Anderson, R. Barzel, and D. H. Salesin.
Interactive pen-and-ink illustration. Proc. SlGGhIPH '94.
pages 101-108, July 1994.
171 M. P. Salisbury, M. T. Wong, J. E Hughes, and D. H. Salesin. (a) I 7 n = 3
Orientable textures for image-based pen-and-ink illustration.
Proc. SICGRAPfi '97, pages 4 0 1 4 0 6 , August 1997.
[SI G. Winkenbach and D. H. Salesin. Rendering parametric sur-
faces in pen-and-ink. Proc. SlGGRtPH 96, pages 469476,
August 1996.
[9] G. Winkcnbsch and D. [I. Salesin. Computer-generated pen-
and-ink illustration. Proc. SICGh'APff 9 4 , pages 91--100, (b) nu = 5
July 1994. 7-

-L
(c) n , = 15

Figure 12. Results based on the number of


user strokes: solid lines in left figures denote
user strokes. (a) too few user strokes, (b)
proper number of user strokes, (c) too many
user strokes

119
I-

ilt, = 13
IT 11, = 308

(a) input images


n,, = 17
____
(b) given user strokes
i 11, = 421

(c) final results

Figure 14. The three steps of illustrations building: (a) 2D images (b) boundary extraction and user
strokes (c) final results of the processing, 1 2 , is the number of artificial strokes, r j t l denotes the
number of user strokes

hand /hend/n 1[C] either o f the movable pans at the end of a person’s arm,
including the lingers: S h e had a gun in her hand. [=She was holding a
p n ] I I’ve got Inasty cut inlon my left hnd. I I held the child by
the hands (with each other). ltIe left the child by the hand. hands
with each other. IHe left the child by the hand.lShe’s very good with
her hands. =good at making thing, mending things,etc. I Wait until
get my hands c>nhim! I can’t d o i t today - I’ve got my hands full.ltIe
go1 my as ked For her hand in marriage. I That child needs a firmhand!
2. [C]apointer or needle on a clock, machine or measuring insnument:

little finger

(a)Original image(second author’s left hand) (b)An example for dictionary illustration

Figure 15. a hand example for dictionary illustration

120

Você também pode gostar