Simulation of the Half-Dry Stroke of Chine
Calligraphy
Yi Kong
Library Shenyang Ligong University Shenyang, China
Ying Yang, Hongman Wang College of Computer & Information Technology Liaoning Normal University
Dalian, China
Abstract—We propo an algorithm to simulate the half-dry stroke of Chine calligraphy. It employs Markov random field and texture mapping technology. Bad on the sample images collected from the hand-written artworks, we can obtain the sample strokes firstly, then, according to the object image obtained from the Windows system fonts and its features, we can render the characters with the half-dr
y effect without interactive means. We have applied the approach to some Chine characters and found the results to be very encouraging.
Keywords- half-dry stroke; Markov random field; textrue mapping; Chine calligraphy
I.I NTRODUCTION
Chine calligraphy has a long history in the Chine traditional arts, such as Cao Shu (cursive style) and Xing Shu (mi-cursive style), as shown in Figure 1 (a), (b) and (c), (d). Different styles of Chine calligraphy convey different themes and rve for different fields by different means. Studying on simulating the Chine calligraphy has an important meaning for propelling the development of computer graphics. In recent years, many scholars have been devoting themlves to study it. Reference [1] prents a framework for synthesizing Cao Shu realistically. Different brush texture patches (BTPs) are collected from the hand-written artworks to build up a brush texture library. BTPs can be extended to fit the required length by a Markov random field-bad interpolation technique. Zhang et al [2] propo a method to generate brush texture for cursive style calligraphy with autoregressive and stratified sampling. Different from [1], the brush texture patches collected from the masterpiece of great calligraphers needed to be re-treated in their system. To retain the half-
dry stroke texture, they also propo a control mechanism for the width of brush texture patches through stratified sampling method. Realization of the half-dry stroke effect in Chine ink-wash drawing bad on texture mapping can be prented in [3]. Tu et al [4] focus on an example-bad method for translating and customizing a line drawing into various styles. Sun et al [5][6] u the mou, keyboard and electronic pen input instrument to simulate different brush works. When calligraphy of hairy brush is being written by a ur, every stroke input is matched for the best suitable stroke from warehou. References [7] and [8] describe a rendering algorithm bad on analogy thoughts. Some methods mentioned above can get daedal effects, but interactive means are also adopted during the simulation
process. So it is difficult for the people who know little about
the calligraphy techniques to render computer calligraphy with
artistic style.
We prent an algorithm to simulate the half-dry stroke of
宝贝成长记录Chine calligraphy. The Half-dry stroke is a special technique
in Chine calligraphy, as shown in Figure 1 (e). It has white
silk in the strokes like drawing with damp-dry brush. Such
hollowing effect can show elegant, free, easy and strong temperament. Becau of the complex texture and special
shape, realization of the Half-dry stroke effect has become
difficult in the computer calligraphy art. In order to solve the
现实主义画派problem, an algorithm of texture mapping bad on the Markov
random field is prented here. The word with half-dry stroke
effect collected from hand-written artworks is regarded as the
sample image. A texture block is lected from the sample
image according to the equivalent probability and random
attribute of MRF. The internal texture of an object stroke in an
image is rendered with the lected texture blocks bad on the
texture mapping technology. Compared with previous methods,
we employ a non-interactive means to produce Chine
calligraphy half-dry stroke effect.
The rest of the paper is organized as follows. Algorithm
贻笑大方description is introduced in ction II. Experimental results are
shown in ction III. The conclusion is prented in ction IV.
II.A LGORITHM D ESCRIPTION
A.Markov Random field
Markov random field theory is the foundation of the
algorithm. First, we introduce some basic concepts.
The sites in S are related to one another via a neighborhood
system. A neighborhood system for S is defined as:
{}
|
i
i S
给朋友写的一封信=∀∈
N N (1)
where
i
N is the t of sites neighboring i. The neighboring
宫颈糜烂的症状有哪些
relationship has the following properties:
(1) a site is not neighboring to itlf;
(2) the neighboring relationship is mutual.
___________________________________ 978-1-61284-365-0/11/$26.00 ©2011 IEEE
For a regular lattice S , the neighboring t of i is defined as the t of nearby sites within a radius of r
[]{}
2
|(),i i i i S dist pixel pixel r i i ′′′=∈−≤≠N (2) where (,)dist A B
denotes the Euclidean distance between A and B and r takes an integer value.
Let 1{,,}m F F F ="be a family of random variables defined on the t S , in which each random variable i F takes a value i f in L . The family F is called a random field. We u the notation i i F f =
to denote the event that i F takes the value i f and the notation 11(,,)m m F f F f ==" to denote the joint event. For a discrete label t L , the probability that random variable i F takes the value i f is denoted ()i i P F f = and abbreviated ()i P f , and the joint probability is denoted 11()(,,)m m P F f P F f F f ====", and abbreviated ()P f .
F is said to be a Markov random field on S with respect to a neighborhood system N if and only if the following two conditions are satisfied:
()0,P f f F >∀∈ (3) {}(|)(|)i i i S i P f f P f f −=N (4)
where {}S i − is the t difference, {}S i f − denotes the t of
labels at the sites in {}S i −and
{}|i i i f f i ′′=∈N N
stands for the t of labels at the sites neighboring i . Formula (3) means its positivity that can be satisfied in practice usually.
Formula (4) means its Markovianity that depicts the local characteristics of F . A label interacts with o
nly the neighboring labels. It is always possible to lect sufficiently large i N so that the Markovianity holds. The largest
neighborhood consists of all other sites. Any F is an MRF with respect to such a neighborhood system. An MRF can have other properties including homogeneity and isotropy. It is said to be homogeneous if (|)i i P f f N is regardless of the relative position of site i in S . It is said to be isotropic if the clique potentials are in dependent of the orientation of all possible cliques C . The Hammersley-Clifford theorem states that F is an MRF
on S with respect to N if and only if F is a GRF on S with respect to N . B. Texture Mapping
We regard a glyph as an MRF. For one site in sample image, t the site as a center pixel to lect a texture block, denoted by block S , where the size of block is m n ×. In the same way, a texture block is lected in the object image, denoted by
block O . Then, the texture block S is mapped to the texture block O , as shown in Figure 2.
Affine transformation is its principle. We u 2D affine
transformation. The formula is:
00
cos sin 0sin cos 0111xx xy yx yy x x r r y y r r x y θθ
θθ′⎡⎤⎡⎤⎡⎤⎢⎥⎢⎥⎢⎥′=−⎢⎥⎢⎥⎢⎥⎢⎥⎢⎥⎢⎥⎣⎦⎣⎦⎣⎦
(5) where θ is the rotation parameter, ()00,x y is the shift vector, and xx r ,xy r , yx r , yy r are the scaling factors.
C. Implementation
To simulate the half-dry stroke effect of calligraphy, the sample image and the object image should be determined beforehand. Calligraphy styles can be transferred from the sample image to the object image by subdivision of strokes.
Consider a Chine character with half-dry stroke effect from the calligraphers as the sample image, such as Figure 1 (e). We should mark out the internal texture and the edge of the sample image, denoted by in S and edge S respectively, as shown
in Figure 3 (a). According to the texture feature of the half-dry
strokes of the sample image, we employ mathematical
morphological method to extract in S and edge S .
Usually, half-dry strokes are applied in Cao Shu font and Xing Shu font. And they are ldom en in Kai Shu font, Li Shu font and Zhuan Shu font. Here we lect some Chine characters with Cao Shu font style and Xing Shu font style from the Windows system fonts to be the object images, as
shown in Figure 1 (a), (b) and (c), (d). We extract the strokes
of the words in the object images bad on the canny edge detection method, and mark out the internal texture region and the edge part, denoted by in O and edge O respectively, as shown in Figure 3 (b) ~ (e). The texture mapping process is carried out block by block,
and the position of the texture block is random becau of its Markovianity. It can be described as the following pudo-code : Function Texturemapping for a site xy in p O ∈ % approximation mapping block block O S =; in in block NO O O =−;
同意做某事的英文
in
in
O NO =;
if impty(in O ) break; end end
(255)detail in O find O ==; % detail mapping
for a site xy detail p O ∈ block block O S =; detail detail block NO O O =−; detail detail O NO =; if impty(detail O ) break; end end
for a site xy edge p O ∈,xy edge q S ∈ % edge mapping xy xy p q =; end
Approximation texture mapping can obtain the overall effect simulated. For this stage, block S is mapped to block O and then mark the mapped part to reduce the regions of arching sites in the object image. That is:
in in block NO O O =−
where in NO reprents the non-mapping region of the object image. Repeat the mapping process until in O =Ø.
Different from approximation texture mapping, detail texture mapping pays more attention to analyzing the detail information, such as tho white regions left after having finished the approximation mapping. U detail O to reprents the needing to be mapped regions, repeat the mapping process until detail O =Ø.
For the edge mapping, for xy edge p O ∈,xy edge q S ∈, let
xy xy p q =. This step achieved the purpo of adding the sample image edge styles to the object image strokes.
III. E XPERIMENTS
In this paper, we have prented a new method of simulating the half-dry stroke effect of Chine calligraphy. Markov random field and texture mapping technology are the two basic theories. First, we consider a word from the calligraphers as sample image. And then extract the strokes of Windows system words. Finally, lect the appropriate texture block to finish the mapping, where the internal texture of sample image and object image is regarded as MRF respectively. The experimental results are shown in Figure 4.
IV. C ONCLUSION
The methods in paper [7] and [8] are mainly ud to simulate western painting effect. Unlike the existing calligraphy simulation algorithms, we u a simple way to achieve a similar effect. Although our thinking can enrich the means and methods of computer calligraphy, there is a gap between this method and similar methods in similarity. The effect is exactly what we want to achieve. We have summarized the reasons for this shortage according to our simulation. Becau oil paintings, water colors and many other western paintings have lf-similarity partly or globally, good results can be got in the published papers bad on MRF. However, what the Chine calligraphy pays attention to is the brush technique, such as pen force and pen movements. The lack in generating quality and aesthetic computer calligraphy effect is common. In a word, solving such problem is our next work.
R EFERENCES
[1] Jinhui Yu, Qunsheng Peng, “Realistic synthesis of cao shu of Chine
calligraphy,” Computers & Graphics, vol. 29, February, 2005, pp. 145-153, doi:10.1016/j.cag.2004.11.013.
[2] Zhang Junsong, Yu Jinhui, Mao Guohong, ye Xiqzi, “Generating Brush
Texture for Cuisive Style Calligraphy with Autoregressive and Stratified Sampling,” Journal of Computer-aided Design & Computer Graphics, vol. 19, 2007, pp.1399-1403. (In Chine)
[3] Sun Jizhou, Bai Haifei, Qi Yafeng, “Realization of the Half-Dry Stroke
Effect in Chine Ink-Wash Drawing Bad on Texture Mapping,” Journal of Tian Jin University, vol. 38, 2005, pp.74-79. (In Chine)
[4] Tu Changhe, Sun Yuhong, Meng Xiangxu, “Example-Bad Style
Translation and Customization for Line Drawings,” Chine Journal of Computers, vol.28, 2005, pp.965-971. (In Chine)
[5] Sun Meijun, Sun Jizhou, “The Realization of Bursh I the Simulation of
Chine Ink Wash Drawing,” Journal of Image and Graphics, vol.9, 2004, pp.184-189. (In Chine)
[6] Wang Zhing, Sun Jizhou, Sun Meijun, Zhang Haijiang, “Computer
Calligraphy Bad on Autoregrssive Model,” Journal of Engineering Graphics, vol. 27, 2006, pp.38-43. (In Chine)
[7] Aaron Hertzmann, Charles E. Jacobs, Nuria Oliver, Brian Curless,
David H.Salesin, “Image Analogies,” In: Computer Graphics Proceedings, Annual Conference Series, ACM SIGGRAPH, Los Angeles, California, 2001, pp.327-339.
[8] Xu Xiaogang, Zhang Quanfang, HuangJin, Bao Hujun, “Artisitc Style
Learning,” Journal of Computer-aided Design & Computer Graphics, vol. 14, Sept. 2002, pp.866-869. (In Chine).
中文域名
保密工作承诺书
(a) (b)
Figure 2. The process of texture mapping. There is a texture block in the sample image (a). It is mapped to the sub-block in object image (b).
(a) (b) (c) (d) (e)
Figure 1. (a) and (b) are Cao Shu Fonts. (c) and (d) are Xing Shu Fonts. (e) is a Chine character with half-dry strokes.
(a) (b) (c) (d) (e)
Figure 3. (a) is the extraction results of the sample image. (b) ~ (e) are the edge detection result of the object images.
(a) (b) (c) (d)
Figure 4. The simulation results.