research article evaluation of chinese calligraphy...

12
Research Article Evaluation of Chinese Calligraphy by Using DBSC Vectorization and ICP Algorithm Mengdi Wang, 1,2 Qian Fu, 1,2 Xingce Wang, 1,2 Zhongke Wu, 1,2 and Mingquan Zhou 1,2 1 Engineering Research Center of Virtual Reality and Applications, Ministry of Education, Beijing 100875, China 2 Beijing Key Laboratory of Digital Preservation and Virtual Reality for Cultural Heritage, Beijing Normal University, Beijing 100875, China Correspondence should be addressed to Xingce Wang; [email protected] Received 22 April 2015; Revised 14 September 2015; Accepted 18 October 2015 Academic Editor: Konstantinos Karamanos Copyright © 2016 Mengdi Wang et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Chinese calligraphy is a charismatic ancient art form with high artistic value in Chinese culture. Virtual calligraphy learning system is a research hotspot in recent years. In such system, a judging mechanism for user’s practice result is quite important. Sometimes, user’s handwritten character is not that standard, the size and position are not fixed, and the whole character may be even askew, which brings difficulty for its evaluation. In this paper, we propose an approach by using DBSCs (disk B-spline curves) vectorization and ICP (iterative closest point) algorithm, which cannot only evaluate a calligraphic character without knowing what it is, but also deal with the above problems commendably. Firstly we find the promising candidate characters from the database according to the angular difference relations as quickly as possible. en we check these vectorized candidates by using ICP algorithm based upon the skeleton, hence finding out the best matching character. Finally a comprehensive evaluation involving global (the whole character) and local (strokes) similarities is implemented, and a final composited evaluation score can be worked out. 1. Introduction Chinese character is one of the fundamental elements of Chi- nese culture. Chinese calligraphy is produced and developed based on Chinese characters, and it belongs to the domain of visual art. Calligraphy has brought the writing of characters into an aesthetic stage. It fuses the creator’s idea, thought, and spirit and can arouse aesthetic emotions of the appreciator. Calligraphy can even reflect one’s personality, temperament, knowledge, and self-cultivation. Practicing calligraphy is conductive to training learning abilities, developing minds, and cultivating physical and mental qualities. Aſter thousand years of development, a lot of calligra- phy styles are established. Many famous calligraphers have formed their own unique writing characteristics and Mr. Qi Gong is one of them. Qi Gong is a great master of traditional Chinese painting and calligraphy. His calligraphy is slender, comely, and elegant and is known as “Qi font.” Mr. Qi Gong leſt behind a large amount of art treasure to the world and has gained worldwide reputation. He is a role model for later generations in terms of both artistic achievements and moral quality. In this paper, we choose Qi font as basic data to support our research. With the rapid development of computer graphics and image processing technologies, calligraphy research and cre- ation have been brought into a new field. Many researchers are devoting themselves to the study of computer-aided virtual calligraphy. Existing researches mainly involve the following aspects: modeling of calligraphy elements such as brush, stroke, dip, and paper; calligraphy retrieval; character recognition; calligraphy generation; calligraphy analysis and evaluation; and feature extraction and style synthesis. In addi- tion, designing an interactive and user-friendly calligraphy learning system based on the above techniques is a hot issue now and very helpful for calligraphy learners. In such system, a judging mechanism is quite important and essential. With an evaluation result, users could know how well they write, and this helps to improve writing skills. In this paper, we propose an evaluation approach based on DBSCs (disk B-spline curves) vectorized Qi Gong calligra- phy database. Firstly, via angular difference relations, we can find the promising candidate characters from the database, Hindawi Publishing Corporation Mathematical Problems in Engineering Volume 2016, Article ID 4845092, 11 pages http://dx.doi.org/10.1155/2016/4845092

Upload: ngocong

Post on 03-Sep-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

Research ArticleEvaluation of Chinese Calligraphy by Using DBSCVectorization and ICP Algorithm

Mengdi Wang12 Qian Fu12 Xingce Wang12 Zhongke Wu12 and Mingquan Zhou12

1Engineering Research Center of Virtual Reality and Applications Ministry of Education Beijing 100875 China2Beijing Key Laboratory of Digital Preservation and Virtual Reality for Cultural Heritage Beijing Normal UniversityBeijing 100875 China

Correspondence should be addressed to Xingce Wang wangxingcebnueducn

Received 22 April 2015 Revised 14 September 2015 Accepted 18 October 2015

Academic Editor Konstantinos Karamanos

Copyright copy 2016 Mengdi Wang et al This is an open access article distributed under the Creative Commons Attribution Licensewhich permits unrestricted use distribution and reproduction in any medium provided the original work is properly cited

Chinese calligraphy is a charismatic ancient art formwith high artistic value in Chinese culture Virtual calligraphy learning systemis a research hotspot in recent years In such system a judging mechanism for userrsquos practice result is quite important Sometimesuserrsquos handwritten character is not that standard the size and position are not fixed and the whole character may be even askewwhich brings difficulty for its evaluation In this paper we propose an approach by usingDBSCs (disk B-spline curves) vectorizationand ICP (iterative closest point) algorithm which cannot only evaluate a calligraphic character without knowing what it is but alsodeal with the above problems commendably Firstly we find the promising candidate characters from the database according tothe angular difference relations as quickly as possible Then we check these vectorized candidates by using ICP algorithm basedupon the skeleton hence finding out the best matching character Finally a comprehensive evaluation involving global (the wholecharacter) and local (strokes) similarities is implemented and a final composited evaluation score can be worked out

1 Introduction

Chinese character is one of the fundamental elements of Chi-nese culture Chinese calligraphy is produced and developedbased on Chinese characters and it belongs to the domain ofvisual art Calligraphy has brought the writing of charactersinto an aesthetic stage It fuses the creatorrsquos idea thought andspirit and can arouse aesthetic emotions of the appreciatorCalligraphy can even reflect onersquos personality temperamentknowledge and self-cultivation Practicing calligraphy isconductive to training learning abilities developing mindsand cultivating physical and mental qualities

After thousand years of development a lot of calligra-phy styles are established Many famous calligraphers haveformed their own unique writing characteristics and Mr QiGong is one of them Qi Gong is a great master of traditionalChinese painting and calligraphy His calligraphy is slendercomely and elegant and is known as ldquoQi fontrdquo Mr Qi Gongleft behind a large amount of art treasure to the world andhas gained worldwide reputation He is a role model for latergenerations in terms of both artistic achievements and moral

quality In this paper we choose Qi font as basic data tosupport our research

With the rapid development of computer graphics andimage processing technologies calligraphy research and cre-ation have been brought into a new field Many researchersare devoting themselves to the study of computer-aidedvirtual calligraphy Existing researches mainly involve thefollowing aspects modeling of calligraphy elements such asbrush stroke dip and paper calligraphy retrieval characterrecognition calligraphy generation calligraphy analysis andevaluation and feature extraction and style synthesis In addi-tion designing an interactive and user-friendly calligraphylearning system based on the above techniques is a hot issuenow and very helpful for calligraphy learners In such systema judging mechanism is quite important and essential Withan evaluation result users could know how well they writeand this helps to improve writing skills

In this paper we propose an evaluation approach basedonDBSCs (disk B-spline curves) vectorizedQiGong calligra-phy database Firstly via angular difference relations we canfind the promising candidate characters from the database

Hindawi Publishing CorporationMathematical Problems in EngineeringVolume 2016 Article ID 4845092 11 pageshttpdxdoiorg10115520164845092

2 Mathematical Problems in Engineering

thus reducing the search space Then these vectorized can-didates are registrated with userrsquos handwriting by using ICP(iterative closest point) algorithm based upon the skeletonhence the best matching character is found Finally thecharacter and strokes similarities are calculated accordingto their shape features A great advantage of this evaluationapproach is that it provides a mechanism to deal withthe different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiments prove this approach is feasible effective andobjective

The rest of this paper is organized as follows InSection 2 related works on virtual calligraphy are presentedIn Section 3 the database establishment of vectorized QiGong calligraphy is given In Section 4 the preprocessingmethod of how to reduce the search space is describedIn Section 5 character registration based on ICP algorithmis described In Section 6 the comprehensive evaluationmethod is investigated In Section 7 the experiment resultsare analyzed Conclusions and our future work are summa-rized in the final section

2 Related Work

Computer-aided virtual calligraphy research is a frontierand many research achievements on this subject have beenpublished Here we will introduce some research resultswhich are closely related to our work in this paper

In 1986 Strassmann [1] proposed a 2D virtual brushmodel to generate paintings at the SIGGRAPH conferencefor the first time This model consists of four parts that isbrush stroke dip and paper Although the simulation resultof thismodel is simple it is still a great reference for the futurestudyThere are a lot of researches on themodeling ofChineseink calligraphy and paintings afterwards Chursquos [2] renderingof realistic brushwork is realized by responding input datacaptured from a device with six degrees of freedom Seahrsquos [3]modeling and representation approach for brushstroke andanimation is based on disk B-spline curves The modelingmethod in this paper is like Strassmann Chu and Seahrsquosmodels

Calligraphy analysis and evaluation are quite importantand widely used in calligraphy style synthesis calligraphygeneration and calligraphy learning system and so forthHanet al [4] proposed an interactive grading and learning systemof Chinese calligraphy which uses the image processing andfuzzy inference techniques to evaluate characters based on theposition size and projection features Gao et al [5] proposeda Chinese handwriting quality evaluation method based onthe analysis of online handwriting recognition confidenceShichinohe et al [6] designed an augmented calligraphysystem by monitoring the calligraphy learnerrsquos posture itcan give feedback to the learner and support the learnerrsquosself-training process Murata et al [7] built a real-timemeasurement system of eye-hand coordination to extract theskilled elements in calligraphy Xu et al [8] introduced anumerical machine-learning approach to evaluate the visualquality of calligraphic writings from human aesthetic viewsHan et al [9] put forward a similarity assessment method

which is based on the context of the skeleton to evaluate thesimilarity between two brush inks

Calligraphy system is a synthesis of the calligraphyresearches such as calligraphy modeling feature extractionand style synthesis calligraphy generation and calligraphyanalysis and evaluation aiming at offering an integratedand systematic application for calligraphy learners andresearchers Henmi and Yoshikawa [10] developed a virtualcalligraphy system that can display teacherrsquos skillfulmotion tostudents by recording the position and force trajectories of theteacherrsquos writing brush Shin et al [11] presented a calligraphylearning system by using Yongzi-Bafa which can also give anevaluation result of every stroke of userrsquos input

The key issue of this paper is the evaluation of userrsquoshandwritten calligraphy in a calligraphy learning systemSo far most of the evaluation researches are raster imageprocessing based but our work is carried out based on thevectorized calligraphy

3 Database Establishment ofQi Gong Calligraphy

A good and complete calligraphy database is the basis ofevaluation research especially when evaluating a calligra-phy character without knowing what it is Our Qi Gongcalligraphy database contains 3755 frequently used Qi fontChinese characters according to GB 2312 (Chinese IdeogramCoded Character Set) including both vector representationand binary image data

31 Stroke Segmentation Stroke is the minimum componentof a Chinese characterThere are mainly five kinds of strokes

(1) ldquoheng (一)rdquo which is a horizontal line(2) ldquoshu (丨)rdquo which is a top-down vertical line(3) ldquopie ()rdquo which is a left-downward slope line(4) ldquodian (丶)rdquo or called ldquonardquo which is a right-downward

short pausing stroke(5) ldquozhe ()rdquo which is a turning stroke having large

angular variations

Stroke segmentation means decomposing a characterinto a number of strokes according to their correct strokesequence and each stroke is saved as a separate part Cornerdetection method is used to mark crossover points wherecurvature is large enough or gradient changes dramaticallyWhen these corners are obtained joinable corner pointpairs are picked out by alternately human interaction Hencecomplete and independent strokes can be separated from acharacter For an optimized result interpolation is appliedto make the strokes smooth Stroke segmentation work forQi Gong calligraphy has been finished [12] Figure 2 shows asegmentation example of character ldquo她rdquo

32 Representing Characters by DBSCs Raster characterimage usually bitmap requires large storage space and alwayscauses anamorphosis and aliasing when they are zoomedor rotated while on the contrary vector representation

Mathematical Problems in Engineering 3

Figure 1 Evaluation result of Chinese calligraphy Left is the famous calligraphy ldquoPreface to Orchid Pavilionrdquo (蘭亭序) written by Mr QiGong top right is the original standardQiGong character ldquo永rdquo from calligraphy (left) bottom right is the same character handwritten by userWith our evaluation method we can achieve the following result The character shape similarity is 0823234 and strokesrsquo shape similaritiesare 0906372 0878092 0690590 0710224 and 0857143 Obviously the evaluation result including not only a shape similarity but also eachstroke shape similarity can help users improve their calligraphy study well

Character

Stroke 1 Stroke 2 Stroke 3

Stroke 4 Stroke 5 Stroke 6

Figure 2 Stroke segmentation of character ldquo她rdquo

cannot only reduce the storage space but also realize fasttransformation and arbitrary scaling without anamorphosisDisk B-spline curves are always used to represent Chinesecharacters in recent years

321 Disk B-Spline Curve (DBSC) Definition Let 119873119894119901(119905)

be the 119894th B-spline basis of degree 119901 with knot vector[1199050 119905

119898] = 119886 119886⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟

119901

119905119901+1 119905

119898minus119901minus1 119887 119887⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟

119901

Here 119898 =

119899 + 119901 + 1 Then the disk B-spline curve (DBSC) is defined asfollows

⟨119863⟩ (119905) =

119899

sum

119894=0

119873119894119901 (119905) ⟨119875119894 119903119894⟩ (1)

where 119875119894is control point and 119903

119894is control radii

DBSC can be viewed as 2 parts the center curvesum119899

119894=0119873119894119901(119905)119875119894 which is a B-spline curve and the radius

functionsum119899119894=0119873119894119901(119905)119903119894 which is a B-spline scalar function

Owing to the perfect symmetry property of disks thecurve constructed from the centers of disks is exactly theskeleton of the 2D region represented by DBSC Most of theproperties and algorithms can be obtained by applying B-spline curve and function to the 2 parts of the disk B-splinecurve respectively More details can be found in [3]

322 DBSC Based Stroke Representation The DBSC isderived from B-spline curves The difference between B-spline curves and DBSC is that instead of being defined bypoints DBSC is defined by a set of disks It derives nature offlexibility for transformation deformation and morphing

A disk B-spline curve is a skeleton based parametric 2Drepresentation which represents the 2D region as well as thecenter curve (skeleton) of the 2D region explicitly DBSC isa proper tool to describe a brushstroke Therefore we useDBSCs to represent the geometric data of each stroke incharacters The first stroke of a Qi font ldquo她rdquo is representedby a disk B-spline curve as shown in Figure 3

Vectorized 3755 Qi font characters are included in ourQi Gong calligraphy database so that they can be used forthe evaluation approach in the rest of our paper Figure 4 isan example of some vectorized characters in our Qi Gongcalligraphy database

4 Preprocessing of the Search Space

In order to improve the whole efficiency of ourmethod somesteps will be taken to reduce the search space at first Thisreducing algorithm mainly involves two aspects one is totalstroke number and the other is angular difference betweenadjacent strokes

41 Reducing the Search Space according to Total StrokeNumber The input device of our system is digital tabletwhich is based on electromagnetic induction It can perceivevery subtle pressure changes convert touch pressures andpositions into pixels and eventually form the handwritingWhen the pressure between ldquobrushrdquo and ldquopaperrdquo changesfrom zero to a nonzero number the system considers a stroke

4 Mathematical Problems in Engineering

Figure 3 The first stroke of ldquo她rdquo represented by DBSC

Figure 4 Vectorized Qi Gong calligraphy database

begins When the pressure turns back to zero system consid-ers the stroke finishes Positions of virtual pen form the strokeskeleton pressures represent stroke radii Hence track andshape information of every stroke namely the skeleton andradii as well as the total stroke number of userrsquos handwritingcan be recorded

Since our calligraphy database contains the total strokenumber information of all characters when user finishesinput the search space can then be reduced into a subspace inwhich the characters have the same total stroke number withuserrsquos handwriting And the next reducing step will be takenbased on this subspace

42 Reducing the Search Space according to Angular Differencebetween Adjacent Strokes Every stroke in a character hasa direction namely the correct writing direction So thereexists an angle relation between two strokes which areadjacent in writing order we name this relation ldquoangulardifferencerdquo No matter what kind of size or position thecharacter has or even if the character is written askew theangular differences between adjacent strokes will still bealmost invariable So according to the similarities betweenuserrsquos handwriting and standardQiGong calligraphy in termsof angular difference we can exclude a large number ofcharacters or even recognize what user writes thus reducingthe search space

Figure 5 Optimal approximating line of a stroke

But the actual situation of strokes is much more com-plicated The direction of a stroke is not constant it maychange slightly or greatly A most typical example is ldquozherdquo Itcan be horizontal in the beginning and then become verticalfrom the middle and it can also be vertical in the beginningand then become horizontal from the middle In the formersituation we call it ldquoheng zhe ()rdquo and in the latter wecall it ldquoshu zhe ()rdquo So in order to avoid the directiondeviation caused by large and small angular variation we willdistinguish the strokersquos classification in our approach

The reducing process of the search space in this phasemainly includes four steps Firstly a curve fitting algorithmis used to obtain the line segment that can approximatethe stroke in maximum Secondly strokes are classified intostraight or curving according to the approximating distanceThirdly the fitting lines are used to represent strokes andcalculate angular differences Finally a weighted algorithm isused to calculate similarities between userrsquos handwriting andstandard Qi Gong characters according to stroke classifica-tions and angular differences hence we can find out the topseveral most similar characters

421 Optimal Approximating Line Segment of Strokes Weuse a least square method based curve fitting algorithm [13]to obtain the optimal approximating line segment of eachstroke

Figure 5 shows a fitting line exampleThe red points in thepicture stand for the equidistant sampling data points of thestroke skeleton and the green line stands for the calculatedoptimal approximating line segment of the stroke

422 Classification of Strokes The fitting line of a strokewhose direction changes greatly such as ldquozherdquo may be quitesimilar to the fitting line of a stroke whose direction isalmost unchanged This situation may bring errors to ourapproach So in order to be more accurate it is necessaryto classify the stroke into straight and curving according tothe approximating distance We use Euclidean distance todistinguish strokes

Let 119897119894be the Euclidean distance from sampling point

119909119894 119910119894 to the optimal approximating line segment 119894 =

1 2 119899 Let 119871 be the length of the approximating segmentThen if (1119871)sum119899

119894=1119897119894lt 120576 we judge the stroke to be straight

otherwise curving Here 120576 is a threshold value

Mathematical Problems in Engineering 5

Table 1 Stroke classification of characters ldquo工rdquo and ldquo口rdquo

Stroke 1 Stroke 2 Stroke 3

Character ldquo工rdquoStraight Straight Straight

Character ldquo口rdquoStraight Curving Straight

Classification comparison Same Different Same

AB

D

C

A998400

B998400

C998400

D998400

Figure 6 Characters ldquo二rdquo and ldquo十rdquo

We denote 119878119888as the stroke classification similarity

between a standard Qi Gong character and userrsquos handwrit-ing Let119898 be total stroke number of a character If there are 119896strokes whose classifications are different then

119878119888=119898 minus 119896

119898 (2)

Now we give an example As shown in Table 1 there aretwo characters whose total stroke numbers are both 3 Wecan see that the strokes of character ldquo工rdquo are all straight butin character ldquo口rdquo the first and third stoke are straight andthe second stroke is curving So there is one stroke whoseclassification is different According to (2) 119878

119888= (3 minus 1)3 =

23

423 Calculation of Angular Differences After figuring outthe approximating line segments we can use them to cal-culate angular differences If the total stroke number of acharacter is 119898 then there will be 119898 minus 1 angular differencesFor convenience the value of angular difference ranges from0 to 120587

Here we use characters ldquo二rdquo and ldquo十rdquo in Figure 5 to showhow to calculate the angular differences Assume 997888997888rarr119860119861 997888997888rarr119862119863 arethe approximating line segments of the two strokes in charac-

ter ldquo二rdquo and997888997888997888rarr

11986010158401198611015840997888997888997888rarr

11986210158401198631015840 are the approximating line segments

of the two strokes in character ldquo十rdquo Segment directions are

the correct writing directions of their corresponding strokesThen the angular differences of ldquo二rdquo and ldquo十rdquo are

arccos(997888997888rarr119860119861 sdot

997888997888rarr119862119863

100381610038161003816100381610038161003816

997888997888rarr119860119861100381610038161003816100381610038161003816

100381610038161003816100381610038161003816

997888997888rarr119862119863100381610038161003816100381610038161003816

)

arccos(997888997888997888rarr

11986010158401198611015840sdot

997888997888997888rarr

11986210158401198631015840

10038161003816100381610038161003816100381610038161003816

997888997888997888rarr

11986010158401198611015840

10038161003816100381610038161003816100381610038161003816

10038161003816100381610038161003816100381610038161003816

997888997888997888rarr

11986210158401198631015840

10038161003816100381610038161003816100381610038161003816

)

(3)

Clearlywe can see that the angular differences of ldquo二rdquo andldquo十rdquo in Figure 6 are quite unlike they differ by almost 90∘ sothey can be judged to be two different characters qualitativelyIn the next part we will give the quantitive evaluation criteria

Let 119875 = 1199011 1199012 119901

119894 119901

119898minus1 be the angular dif-

ference sequence of a standard Qi Gong character and let119876 = 119902

1 1199022 119902

119894 119902

119898minus1 be the sequence of userrsquos

handwriting 119875 here is equivalent to a character template 119901119894

and 119902119894are the angular difference between stroke 119894 and stroke

119894 + 1119898 is the total stroke number and119898 ge 2 Then the meandeviation of the two charactersrsquo angular differences Dev canbe calculated as follows

Dev =sum119898minus1

119894=1

1003816100381610038161003816119901119894 minus 1199021198941003816100381610038161003816

119898 minus 1 (4)

The smaller the Dev is the more similar the charactersare

6 Mathematical Problems in Engineering

424Weighted Similarity Calculation Algorithm Here we settwo threshold values 120585 and 120575 to control the size of searchspace 120585 is used to limit 119896 namely the number of strokeswith different classifications which has been introducedin Section 422 120575 is used to limit Dev namely the meandeviation of the two charactersrsquo angular differences whichhas been introduced in Section 423

We denote 119878119889as the angular difference similarity between

a standard Qi Gong character and userrsquos handwritingThen itcan be figured out according to the following equation

119878119889=120575 minus Dev120575

(5)

If 119896 gt 120585 or Dev gt 120575 we consider that the current twocharacters being compared are not the same thus excludinga number of characters from the search space

If 119896 le 120585 and Dev le 120575 we will calculate a compositiveweighted similarity 119878

119878 = 1199081119878119888+ 1199082119878119889 (6)

Here 1199081and 119908

2are weight parameters 119908

1+ 1199082= 1

Combining (2) (4) (5) and (6) we could get a final detailedsimilarity calculation equation

119878 = 1199081sdot (1 minus

119896

119898) + 119908

2sdot (1 minus

sum119898minus1

119894=1

1003816100381610038161003816119901119894 minus 1199021198941003816100381610038161003816

120575 (119898 minus 1)) (7)

After scanning all the characters in the search space wecan find out the top several characters which have the highest119878 according to the sorting result

5 Character Registration byUsing ICP Algorithm

Iterative closest point (ICP) algorithm [14] is one of the mostcommonly used registration algorithms based on point setto point set The basic steps of this algorithm are [15] tofind out the closest matching point pairs in the two pointsets being processed compute the transformationmatrix thatminimizes the sum of the squares between the paired pointsand then apply the transformation iterate the above two stepsuntil the distance satisfies a given convergence precisionWhen the iteration is stopped we can get the final translationand rotation parametersTherefore we can consider the userrsquoshandwritten character and the standard Qi font charactercandidates selected from the previous preprocessing step aspoint sets and match them via ICP algorithm

Skeleton is an important descriptor for shape matchingand sometimes it performs better than contour or the wholepixel point set of an object What is more computation ofskeleton-based ICP algorithm will be much faster than thecomputation based on whole points of the object Since theQi Gong calligraphy characters in our database are vectorizedby DBSCs the skeletons and shapes are easy to get And as wesaid in Section 41 the skeleton and radii of userrsquos handwrittencharacter are also recorded so in this paper we will use the

skeleton point set to realize ICP registration and find out thebest matching character

51 Scaling of the Standard Qi Gong Character Our ICPregistration is rigid so before applying this algorithm wemust scale the standard character at first and make the twocharacters to be processed have the same size so that we canget a more accurate registration result in the following step

Let 119883119904be the skeleton point set of standard Qi Gong

character and let 119883119906be the skeleton point set of userrsquos

handwritten character Here we take 119883119906as the referenced

point set First the geometric centers 119874119904and 119874

119906of 119883119904and

119883119906are calculated Then the smallest disks which can cover

the whole character are found and the corresponding radiiare denoted by 119903

119904and 119903119906 With 119903

119904and 119903119906 we can scale the

vectorized standard Qi Gong character thus making it havethe same covering disk size with userrsquos handwritten character

52 ICP Registration of Characters

521 ICP Algorithm Registration operation of ICP algo-rithm actuallymeans finding an optimal rigid transformationfrom one coordinate system to another which can minimizethe sum of the squares between two point sets This transfor-mation can be represented by a 3 times 3 rotation matrix 119877 and athree-dimensional translation vector 119879

Let 119875 = 119901119894| 119901119894isin 1198773 119894 = 1 2 119873 and 119876 = 119902

119894|

119902119894isin 1198773 119894 = 1 2 119872 be two point sets to be registrated

Suppose 119901 is an arbitrary point in 119875 and its coordinate valueis (1199091119901 1199101

119901 1199111

119901) After transforming the coordinate value of 119901

is (1199092119901 1199102

119901 1199112

119901) Then

[[[

[

1199092

119901

1199102

119901

1199112

119901

]]]

]

= 119877[[[

[

1199091

119901

1199101

119901

1199111

119901

]]]

]

+ 119879 (8)

So the registration goal is to figure out the transformationof 119877 and 119879 which can minimize the value of the followingfunction

119891 (119877 119879) = min119873

sum

119894=1

10038171003817100381710038171003817119901119894

119896minus (119877119901

119894+ 119879)10038171003817100381710038171003817

2

(9)

where 119896 is iteration times 119901119894

119896 is the closest matching pointof 119901119894 119901119894

119896isin 119876 and 119873 is the total point number of 119875 In

this iteration process 119875 and 119901119894

119896 are not fixed they are alwayschanging After each iteration 119875 and the closest matchingpoint pairs will be updated 119877119901

119894+ 119879119894=12119873

will be the new119875 in next iteration

522 Character Registration Steps In our approach weuse ICP registration algorithm to make standard Qi Gongcharacter and userrsquos handwritten character match best andthe algorithm is carried out in two-dimensional space119883119904and 119883

119906are the two skeleton point sets of standard

Qi Gong character and userrsquos handwritten character andthey have been scaled to the same size after the process in

Mathematical Problems in Engineering 7

q

p

ds

(a) Point to point

q

p

ds

q998400

(b) Point to plane

q

p

ds

OP

OQ

(c) Point to projection

Figure 7 Methods of searching the closest point in ICP

(a) (b) (c) (d)

Figure 8 ICP registration of character ldquo永永永rdquo (a) Skeleton of userrsquos handwritten character (b) skeleton of original standard Qi Gong character(c) transformed skeleton of standard Qi Gong character after ICP registration and (d) overlapping comparison

Section 51 Then the registration steps can be described asfollows

(1) Search all the closest corresponding points of 119883119904in

119883119906

(2) Figure out the rigid transformation which can min-imize the sum of the squares between the pairedpoints above mentioned and then acquire rotationparameter 119877 and translation parameter 119879

(3) Apply 119877 and 119879 to 119883119904and get the transformed point

set(4) If the transformed point set of 119883

119904and the referenced

point set119883119906can satisfy a given convergence precision

of function 119891(119877 119879) in (9) namely the sum of thesquares of the two point sets being less than a giventhreshold value then stop iterating Otherwise set thetransformed point set as the new 119883

119904 and iterate the

above four steps until the function value is acceptable

There are several commonly used methods of searchingthe closest corresponding point pairs in step (1) such as pointto point [14] point to plane [16] and point to projection[17] as shown in Figure 7 Since our registration is basedon skeleton point set we use the point to point searchingmethod Figure 8 is a registration example of our experimentcharacter ldquo永rdquo

6 Comprehensive Evaluation

Skeleton represents the global topological information of acharacter which can reflect the balance and arrangementof all the strokes Local similarity of each stroke is also animportant metric in calligraphy evaluationmechanismWithstroke evaluation score learners could find out about whichstroke they wrote well and which stroke they need to practicefurther more So we compare both the global similarity andthe local similarity in our approach

However skeleton distance is not easy to convert into acertain score based on the percentage grading system Whatis more it has lost the width information So in this paper weuse the whole character shape instead of skeleton to representthe topological feature Similarly we use stroke shape tocalculate stroke similarity Here the shape data is defined asthe pixel distribution information of a character or strokethat is the most direct and easy way to measure the distancebetween two characters or two strokesWith the skeleton andradii of a character and the stroke segmentation data in ourdatabase we can easily get the shape information of eachstroke and the whole character

61 Character Shape Similarity When the registration stepis finished the best matching character will be found thencharacter shape similarity denoted by 119878

1 can be calculated

8 Mathematical Problems in Engineering

according to the overlapping situation of userrsquos handwritingand transformed standard Qi Gong character as follows

1198781=

sum119870

119894=1sum119870

119895=1119883119894119895sdot 119884119894119895

sum119870

119894=1sum119870

119895=1(119883119894119895sdot 119884119894119895+10038161003816100381610038161003816119883119894119895minus 119884119894119895

10038161003816100381610038161003816)

(10)

where 119870 is the length of the smallest square which can coverthe two registrated characters 119883

119894119895is the pixel value of userrsquos

character 119884119894119895is the pixel value of Qi Gong character and we

define

119883119894119895

or 119884119894119895=

1 if pixel (119894 119895) is black

0 if pixel (119894 119895) is white(11)

In (10) numerator represents the total number of pixelsthat both are black namely the overlapping black areadenominator represents the total number of pixels that aredifferent or both black namely the remaining part afterremoving the overlapping white area

62 Stroke Shape Similarity In order to avoid the errorbrought by position and size of the strokes to be comparedwe first normalize their ldquoeffective areardquo to 80 times 80 in pixelsHere the ldquoeffective areardquo of a stroke is calculated as follows

First we find four boundaries of a stroke that is thetop the bottom the left and the right Then this rectangleis turned into a square region according to its longer sideand we make sure that the rectangle is right in the middleof the square This square region is called the effective area ofa stroke Figure 9 shows an example of finding the effectivearea of a stroke

When the effective areas of userrsquos handwritten strokes andstandard Qi Gong strokes are normalized to 80times80 in pixelsthe shape similarity of 119899th stroke denoted by 119878(119899) can becalculated according to the following equation which is quitesimilar to (10)

119878 (119899)

=

sum119870

119894=1sum119870

119895=1119883119894119895 (119899) sdot 119884119894119895 (119899)

sum119870

119894=1sum119870

119895=1(119883119894119895 (119899) sdot 119884119894119895 (119899) +

10038161003816100381610038161003816119883119894119895 (119899) minus 119884119894119895 (119899)

10038161003816100381610038161003816)

(12)

where 1 le 119899 le 119873119873 is the total stroke number of the currentcharacter and 119870 = 80 119883

119894119895(119899) is the pixel value of userrsquos 119899th

stroke 119884119894119895(119899) is the pixel value of 119899th standard stroke

63 Composited Score With character shape similarity 1198781

and stroke shape similarities 119878(119899) we can also compute acomposited single evaluation score Eva

The mean similarity of all strokes is taken as the finalstroke shape similarity denoted by 119878

2

1198782=1

119873

119873

sum

119899=1

119878 (119899) (13)

The maximal values of 1198781and 1198782are both 1 Hence

Eva = (120593 sdot 1198781+ 120596 sdot 119878

2) sdot 100 (14)

where 120593 and 120596 are weight parameters 120593 + 120596 = 1

Top

Right

Bottom

Left

Figure 9 Finding the effective area of a stroke

So far the introduction of the detailed steps of ourevaluation approach has been finished Figure 10 shows thewhole architecture of the approach in this paper

7 Experiment Results and Analysis

71 Validity of the Recognition Algorithm Aiming at findingout the best matching character our character recognitionalgorithm mainly consists of two parts reducing the searchspace and ICP registration namely steps (1) to (5) inFigure 10 We have given one example as shown in Figure 8In order to avoid the Type-I or Type-II error we did severalexperiments by using a sample database containing 30 char-acters of 5 writers to validate the validity and make our algo-rithmmore convincing Table 2 shows the experiment resultWe can see that in this sample database only one character isrecognized as a wrong Qi Gong character User wrote a char-acter ldquo己rdquo (ji) but our algorithm recognized it as ldquo已rdquo (yi)their shape is quite similar The proportion of two characterslike ldquo己rdquo and ldquo已rdquo which not only are very similar in shapebut also have the same total stroke number is quite smallSo this error can be accepted The experiment proves ouralgorithm is effective In these 30 test characters 21 of themare recognized at the stage of reducing the search space beforeICP registration which proves ourmethod is efficient as well

72 Composited Shape Evaluation We take ldquo永rdquo as ourexperiment character ldquo永rdquo is the first character of calligraphyldquoPreface to Orchid Pavilionrdquo (蘭亭序) shown in Figure 1 andTable 3The ICP registration of its skeleton has been shown inFigure 8 and we analyze its shape similarity Likewise othercharacters in calligraphy ldquoPreface to Orchid Pavilionrdquo or ourvector Qi Gong calligraphy database can also be evaluated byour method

In Table 3(a) we can see the userrsquos askew handwrittencharacter (left) the original standard Qi Gong character(middle) and the overlapping comparison after registration(right) Global similarity is calculated According to thissimilarity users could know how well they wrote in termsof structure and shape of this character Table 3(b) showsthe comparison of each stroke with these stroke similaritiesusers can get to know which stroke they wrote well andwhich stroke they need to practice more For example thebest stroke of userrsquos handwriting is the first stroke with

Mathematical Problems in Engineering 9

Table2Ex

perim

ento

ffind

ingtheb

estm

atchingcharacter

12

34

56

78

910

1112

1314

15Userrsquos

hand

writtencharacter

十才

己云

艺车

月去

石白

永西

自问

麦Th

ebestm

atchingQiG

ongcharacter

十才

已云

艺车

月去

石白

永西

自问

麦Truefa

lseT

TF

TT

TT

TT

TT

TT

TT

1617

1819

2021

2223

2425

2627

2829

30Userrsquos

hand

writtencharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Th

ebestm

atchingQiG

ongcharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Truefa

lseT

TT

TT

TT

TT

TT

TT

TT

10 Mathematical Problems in Engineering

Table 3 Experiment of character ldquo永rdquo

(a) Character shape similarity

Userrsquos handwriting Original Qi Gong character Overlapping comparison Similarity

0823234

(b) Stroke shape similarities

Stroke 1 Stroke 2 Stroke 3 Stroke 4 Stroke 5

Userrsquos stroke

TransformedQi GongStroke

Similarity 0906372 0878092 0690590 0710224 0857143(c) Composited evaluation score

1198781

1198782

Eva ()0823234 0808484 8159

Yes

(5)

No

(1)

(2)

(3)

(4)

(6)

(7)

Begin to receive user input

Record stroke information

Stroke input finished

Reducing the search space according to total stroke number and angular differences

Find out the best matching Qi Gong character according to ICP registration based on skeleton

Calculate the character shape similarity and stroke shape similarities between userrsquos handwriting and

ICP-registrated Qi Gong calligraphy

Figure out a composited evaluation score

Evaluation process

Database

Segmented and DBSC vectorizedQi Gong

calligraphy

Figure 10 Architecture of the evaluation approach in this paper

Mathematical Problems in Engineering 11

a similarity of 0906372 and the worst stroke is the thirdstroke with a similarity of 0690590 Table 3(c) gives thecomposited evaluation score which can show the overallquality of userrsquos practice Here the 120593 and 120596 in (14) are bothset as 05 in our experiment

We consulted several calligraphy teachers and asked themto evaluate experiment result They concluded the result isrelatively objective which proves our approach is effectiveand satisfactory

8 Conclusions

This paper presents the establishment of our vectorizedQi Gong calligraphy database and we propose an effectiveevaluation approach by using angular difference relationsICP algorithm and shape features In the proposed approachcharacter shape similarity can reflect the global whole struc-ture and stroke arrangement of the character and strokeshape similarity can reflect the local detail features Theproposed approach is comprehensive and it is able to dealwith the different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiment results show that this approach is feasible andeffective Furthermore it can be extended to other calligraphydatabases

Conflict of Interests

The authors declare no conflict of interests

Acknowledgment

This work is partially supported by National Natural ScienceFoundation of China (no 61170170 and no 61271366)

References

[1] S Strassmann ldquoHairy brushesrdquo ACM SIGGRAPH ComputerGraphics vol 20 no 4 pp 225ndash232 1986

[2] N S H Chu and C-L Tai ldquoReal-time painting with anexpressive virtual Chinese brushrdquo IEEE Computer Graphics andApplications vol 24 no 5 pp 76ndash85 2004

[3] H S Seah Z Wu F Tian X Xiao and B Xie ldquoArtistic brush-stroke representation and animation with disk B-spline curverdquoin Proceedings of the ACM SIGCHI International Conference onAdvances in Computer Entertainment Technology (ACE rsquo05) pp88ndash93 Valencia Spain June 2005

[4] C-C Han C-H Chou and C-S Wu ldquoAn interactive gradingand learning system for chinese calligraphyrdquo Machine Visionand Applications vol 19 no 1 pp 43ndash55 2008

[5] Y Gao L Jin and N Li ldquoChinese handwriting qualityevaluation based on analysis of recognition confidencerdquo inProceedings of the IEEE International Conference on InformationandAutomation (ICIA rsquo11) pp 221ndash225 IEEE Shenzhen ChinaJune 2011

[6] T Shichinohe T Yamabe T Iwata and T Nakajima ldquoAug-mented calligraphy experimental feedback design for writingskill developmentrdquo in Proceedings of the 5th InternationalConference on Tangible Embedded and Embodied Interaction(TEI rsquo11) pp 301ndash302 ACM Funchal Portugal January 2011

[7] A Murata K Inoue and M Moriwaka ldquoReal-time mea-surement system of eye-hand coordination in calligraphyrdquoin Proceedings of the 50th Annual Conference on Society ofInstrument and Control Engineers (SICE rsquo11) pp 2696ndash2701Tokyo Japan September 2011

[8] S Xu H Jiang F C M Lau and Y Pan ldquoComputationallyevaluating and reproducing the beauty of Chinese calligraphyrdquoIEEE Intelligent Systems vol 27 no 3 pp 63ndash72 2012

[9] L Han Y Sun and W Huang ldquoAn assessment method for inkmarksrdquo in Proceedings of the 4th International Conference onIntelligent Human-Machine Systems and Cybernetics (IHMSCrsquo12) vol 2 pp 256ndash259 Nanchang China August 2012

[10] K Henmi and T Yoshikawa ldquoVirtual lesson and its applicationto virtual calligraphy systemrdquo in Proceedings of the IEEEInternational Conference on Robotics and Automation vol 2 pp1275ndash1280 Leuven Belgium 1998

[11] J Shin T Okuyama and K Yun ldquoSensory calligraphy learningsystem using Yongzi-Bafardquo in Proceedings of the 8th Interna-tional Forum on Strategic Technology (IFOST rsquo13) vol 2 pp 128ndash131 IEEE Ulaanbaatar Mongolia July 2013

[12] F Cao Z Wu P Xu M Zhou and X Ao ldquoA learning system ofQi Gong calligraphyrdquo in Proceedings of the 14th Global ChineseConference on Computers in Education (GCCCE rsquo10) SingaporeJune 2010

[13] ZWuH Jiao andGDai ldquoAn algorithmof approximating line-segment and circular arcs and its application in vectorizationof engineering drawingsrdquo Journal of Computer Aided Design ampComputer Graphics vol 10 no 4 pp 328ndash332 1998

[14] P J Besl and N D McKay ldquoMethod for registration of 3-Dshapesrdquo in Sensor Fusion IV Control Paradigms and Data Struc-tures vol 1611 of Proceedings of SPIE pp 586ndash606 InternationalSociety for Optics and Photonics Boston Mass USA April1992

[15] D Chetverikov D Svirko D Stepanov and P Krsek ldquoThetrimmed iterative closest point algorithmrdquo in Proceedings of the16th International Conference on Pattern Recognition vol 3 pp545ndash548 2002

[16] R Bergevin M Soucy H Qagnon and D LaurendeauldquoTowards a general multi-view registration techniquerdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol18 no 5 pp 540ndash547 1996

[17] S Rusinkiewicz and M Levoy ldquoEfficient variants of the ICPalgorithmrdquo in Proceedings of the IEEE 3rd International Confer-ence on 3-D Digital Imaging and Modeling pp 145ndash152 2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

2 Mathematical Problems in Engineering

thus reducing the search space Then these vectorized can-didates are registrated with userrsquos handwriting by using ICP(iterative closest point) algorithm based upon the skeletonhence the best matching character is found Finally thecharacter and strokes similarities are calculated accordingto their shape features A great advantage of this evaluationapproach is that it provides a mechanism to deal withthe different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiments prove this approach is feasible effective andobjective

The rest of this paper is organized as follows InSection 2 related works on virtual calligraphy are presentedIn Section 3 the database establishment of vectorized QiGong calligraphy is given In Section 4 the preprocessingmethod of how to reduce the search space is describedIn Section 5 character registration based on ICP algorithmis described In Section 6 the comprehensive evaluationmethod is investigated In Section 7 the experiment resultsare analyzed Conclusions and our future work are summa-rized in the final section

2 Related Work

Computer-aided virtual calligraphy research is a frontierand many research achievements on this subject have beenpublished Here we will introduce some research resultswhich are closely related to our work in this paper

In 1986 Strassmann [1] proposed a 2D virtual brushmodel to generate paintings at the SIGGRAPH conferencefor the first time This model consists of four parts that isbrush stroke dip and paper Although the simulation resultof thismodel is simple it is still a great reference for the futurestudyThere are a lot of researches on themodeling ofChineseink calligraphy and paintings afterwards Chursquos [2] renderingof realistic brushwork is realized by responding input datacaptured from a device with six degrees of freedom Seahrsquos [3]modeling and representation approach for brushstroke andanimation is based on disk B-spline curves The modelingmethod in this paper is like Strassmann Chu and Seahrsquosmodels

Calligraphy analysis and evaluation are quite importantand widely used in calligraphy style synthesis calligraphygeneration and calligraphy learning system and so forthHanet al [4] proposed an interactive grading and learning systemof Chinese calligraphy which uses the image processing andfuzzy inference techniques to evaluate characters based on theposition size and projection features Gao et al [5] proposeda Chinese handwriting quality evaluation method based onthe analysis of online handwriting recognition confidenceShichinohe et al [6] designed an augmented calligraphysystem by monitoring the calligraphy learnerrsquos posture itcan give feedback to the learner and support the learnerrsquosself-training process Murata et al [7] built a real-timemeasurement system of eye-hand coordination to extract theskilled elements in calligraphy Xu et al [8] introduced anumerical machine-learning approach to evaluate the visualquality of calligraphic writings from human aesthetic viewsHan et al [9] put forward a similarity assessment method

which is based on the context of the skeleton to evaluate thesimilarity between two brush inks

Calligraphy system is a synthesis of the calligraphyresearches such as calligraphy modeling feature extractionand style synthesis calligraphy generation and calligraphyanalysis and evaluation aiming at offering an integratedand systematic application for calligraphy learners andresearchers Henmi and Yoshikawa [10] developed a virtualcalligraphy system that can display teacherrsquos skillfulmotion tostudents by recording the position and force trajectories of theteacherrsquos writing brush Shin et al [11] presented a calligraphylearning system by using Yongzi-Bafa which can also give anevaluation result of every stroke of userrsquos input

The key issue of this paper is the evaluation of userrsquoshandwritten calligraphy in a calligraphy learning systemSo far most of the evaluation researches are raster imageprocessing based but our work is carried out based on thevectorized calligraphy

3 Database Establishment ofQi Gong Calligraphy

A good and complete calligraphy database is the basis ofevaluation research especially when evaluating a calligra-phy character without knowing what it is Our Qi Gongcalligraphy database contains 3755 frequently used Qi fontChinese characters according to GB 2312 (Chinese IdeogramCoded Character Set) including both vector representationand binary image data

31 Stroke Segmentation Stroke is the minimum componentof a Chinese characterThere are mainly five kinds of strokes

(1) ldquoheng (一)rdquo which is a horizontal line(2) ldquoshu (丨)rdquo which is a top-down vertical line(3) ldquopie ()rdquo which is a left-downward slope line(4) ldquodian (丶)rdquo or called ldquonardquo which is a right-downward

short pausing stroke(5) ldquozhe ()rdquo which is a turning stroke having large

angular variations

Stroke segmentation means decomposing a characterinto a number of strokes according to their correct strokesequence and each stroke is saved as a separate part Cornerdetection method is used to mark crossover points wherecurvature is large enough or gradient changes dramaticallyWhen these corners are obtained joinable corner pointpairs are picked out by alternately human interaction Hencecomplete and independent strokes can be separated from acharacter For an optimized result interpolation is appliedto make the strokes smooth Stroke segmentation work forQi Gong calligraphy has been finished [12] Figure 2 shows asegmentation example of character ldquo她rdquo

32 Representing Characters by DBSCs Raster characterimage usually bitmap requires large storage space and alwayscauses anamorphosis and aliasing when they are zoomedor rotated while on the contrary vector representation

Mathematical Problems in Engineering 3

Figure 1 Evaluation result of Chinese calligraphy Left is the famous calligraphy ldquoPreface to Orchid Pavilionrdquo (蘭亭序) written by Mr QiGong top right is the original standardQiGong character ldquo永rdquo from calligraphy (left) bottom right is the same character handwritten by userWith our evaluation method we can achieve the following result The character shape similarity is 0823234 and strokesrsquo shape similaritiesare 0906372 0878092 0690590 0710224 and 0857143 Obviously the evaluation result including not only a shape similarity but also eachstroke shape similarity can help users improve their calligraphy study well

Character

Stroke 1 Stroke 2 Stroke 3

Stroke 4 Stroke 5 Stroke 6

Figure 2 Stroke segmentation of character ldquo她rdquo

cannot only reduce the storage space but also realize fasttransformation and arbitrary scaling without anamorphosisDisk B-spline curves are always used to represent Chinesecharacters in recent years

321 Disk B-Spline Curve (DBSC) Definition Let 119873119894119901(119905)

be the 119894th B-spline basis of degree 119901 with knot vector[1199050 119905

119898] = 119886 119886⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟

119901

119905119901+1 119905

119898minus119901minus1 119887 119887⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟

119901

Here 119898 =

119899 + 119901 + 1 Then the disk B-spline curve (DBSC) is defined asfollows

⟨119863⟩ (119905) =

119899

sum

119894=0

119873119894119901 (119905) ⟨119875119894 119903119894⟩ (1)

where 119875119894is control point and 119903

119894is control radii

DBSC can be viewed as 2 parts the center curvesum119899

119894=0119873119894119901(119905)119875119894 which is a B-spline curve and the radius

functionsum119899119894=0119873119894119901(119905)119903119894 which is a B-spline scalar function

Owing to the perfect symmetry property of disks thecurve constructed from the centers of disks is exactly theskeleton of the 2D region represented by DBSC Most of theproperties and algorithms can be obtained by applying B-spline curve and function to the 2 parts of the disk B-splinecurve respectively More details can be found in [3]

322 DBSC Based Stroke Representation The DBSC isderived from B-spline curves The difference between B-spline curves and DBSC is that instead of being defined bypoints DBSC is defined by a set of disks It derives nature offlexibility for transformation deformation and morphing

A disk B-spline curve is a skeleton based parametric 2Drepresentation which represents the 2D region as well as thecenter curve (skeleton) of the 2D region explicitly DBSC isa proper tool to describe a brushstroke Therefore we useDBSCs to represent the geometric data of each stroke incharacters The first stroke of a Qi font ldquo她rdquo is representedby a disk B-spline curve as shown in Figure 3

Vectorized 3755 Qi font characters are included in ourQi Gong calligraphy database so that they can be used forthe evaluation approach in the rest of our paper Figure 4 isan example of some vectorized characters in our Qi Gongcalligraphy database

4 Preprocessing of the Search Space

In order to improve the whole efficiency of ourmethod somesteps will be taken to reduce the search space at first Thisreducing algorithm mainly involves two aspects one is totalstroke number and the other is angular difference betweenadjacent strokes

41 Reducing the Search Space according to Total StrokeNumber The input device of our system is digital tabletwhich is based on electromagnetic induction It can perceivevery subtle pressure changes convert touch pressures andpositions into pixels and eventually form the handwritingWhen the pressure between ldquobrushrdquo and ldquopaperrdquo changesfrom zero to a nonzero number the system considers a stroke

4 Mathematical Problems in Engineering

Figure 3 The first stroke of ldquo她rdquo represented by DBSC

Figure 4 Vectorized Qi Gong calligraphy database

begins When the pressure turns back to zero system consid-ers the stroke finishes Positions of virtual pen form the strokeskeleton pressures represent stroke radii Hence track andshape information of every stroke namely the skeleton andradii as well as the total stroke number of userrsquos handwritingcan be recorded

Since our calligraphy database contains the total strokenumber information of all characters when user finishesinput the search space can then be reduced into a subspace inwhich the characters have the same total stroke number withuserrsquos handwriting And the next reducing step will be takenbased on this subspace

42 Reducing the Search Space according to Angular Differencebetween Adjacent Strokes Every stroke in a character hasa direction namely the correct writing direction So thereexists an angle relation between two strokes which areadjacent in writing order we name this relation ldquoangulardifferencerdquo No matter what kind of size or position thecharacter has or even if the character is written askew theangular differences between adjacent strokes will still bealmost invariable So according to the similarities betweenuserrsquos handwriting and standardQiGong calligraphy in termsof angular difference we can exclude a large number ofcharacters or even recognize what user writes thus reducingthe search space

Figure 5 Optimal approximating line of a stroke

But the actual situation of strokes is much more com-plicated The direction of a stroke is not constant it maychange slightly or greatly A most typical example is ldquozherdquo Itcan be horizontal in the beginning and then become verticalfrom the middle and it can also be vertical in the beginningand then become horizontal from the middle In the formersituation we call it ldquoheng zhe ()rdquo and in the latter wecall it ldquoshu zhe ()rdquo So in order to avoid the directiondeviation caused by large and small angular variation we willdistinguish the strokersquos classification in our approach

The reducing process of the search space in this phasemainly includes four steps Firstly a curve fitting algorithmis used to obtain the line segment that can approximatethe stroke in maximum Secondly strokes are classified intostraight or curving according to the approximating distanceThirdly the fitting lines are used to represent strokes andcalculate angular differences Finally a weighted algorithm isused to calculate similarities between userrsquos handwriting andstandard Qi Gong characters according to stroke classifica-tions and angular differences hence we can find out the topseveral most similar characters

421 Optimal Approximating Line Segment of Strokes Weuse a least square method based curve fitting algorithm [13]to obtain the optimal approximating line segment of eachstroke

Figure 5 shows a fitting line exampleThe red points in thepicture stand for the equidistant sampling data points of thestroke skeleton and the green line stands for the calculatedoptimal approximating line segment of the stroke

422 Classification of Strokes The fitting line of a strokewhose direction changes greatly such as ldquozherdquo may be quitesimilar to the fitting line of a stroke whose direction isalmost unchanged This situation may bring errors to ourapproach So in order to be more accurate it is necessaryto classify the stroke into straight and curving according tothe approximating distance We use Euclidean distance todistinguish strokes

Let 119897119894be the Euclidean distance from sampling point

119909119894 119910119894 to the optimal approximating line segment 119894 =

1 2 119899 Let 119871 be the length of the approximating segmentThen if (1119871)sum119899

119894=1119897119894lt 120576 we judge the stroke to be straight

otherwise curving Here 120576 is a threshold value

Mathematical Problems in Engineering 5

Table 1 Stroke classification of characters ldquo工rdquo and ldquo口rdquo

Stroke 1 Stroke 2 Stroke 3

Character ldquo工rdquoStraight Straight Straight

Character ldquo口rdquoStraight Curving Straight

Classification comparison Same Different Same

AB

D

C

A998400

B998400

C998400

D998400

Figure 6 Characters ldquo二rdquo and ldquo十rdquo

We denote 119878119888as the stroke classification similarity

between a standard Qi Gong character and userrsquos handwrit-ing Let119898 be total stroke number of a character If there are 119896strokes whose classifications are different then

119878119888=119898 minus 119896

119898 (2)

Now we give an example As shown in Table 1 there aretwo characters whose total stroke numbers are both 3 Wecan see that the strokes of character ldquo工rdquo are all straight butin character ldquo口rdquo the first and third stoke are straight andthe second stroke is curving So there is one stroke whoseclassification is different According to (2) 119878

119888= (3 minus 1)3 =

23

423 Calculation of Angular Differences After figuring outthe approximating line segments we can use them to cal-culate angular differences If the total stroke number of acharacter is 119898 then there will be 119898 minus 1 angular differencesFor convenience the value of angular difference ranges from0 to 120587

Here we use characters ldquo二rdquo and ldquo十rdquo in Figure 5 to showhow to calculate the angular differences Assume 997888997888rarr119860119861 997888997888rarr119862119863 arethe approximating line segments of the two strokes in charac-

ter ldquo二rdquo and997888997888997888rarr

11986010158401198611015840997888997888997888rarr

11986210158401198631015840 are the approximating line segments

of the two strokes in character ldquo十rdquo Segment directions are

the correct writing directions of their corresponding strokesThen the angular differences of ldquo二rdquo and ldquo十rdquo are

arccos(997888997888rarr119860119861 sdot

997888997888rarr119862119863

100381610038161003816100381610038161003816

997888997888rarr119860119861100381610038161003816100381610038161003816

100381610038161003816100381610038161003816

997888997888rarr119862119863100381610038161003816100381610038161003816

)

arccos(997888997888997888rarr

11986010158401198611015840sdot

997888997888997888rarr

11986210158401198631015840

10038161003816100381610038161003816100381610038161003816

997888997888997888rarr

11986010158401198611015840

10038161003816100381610038161003816100381610038161003816

10038161003816100381610038161003816100381610038161003816

997888997888997888rarr

11986210158401198631015840

10038161003816100381610038161003816100381610038161003816

)

(3)

Clearlywe can see that the angular differences of ldquo二rdquo andldquo十rdquo in Figure 6 are quite unlike they differ by almost 90∘ sothey can be judged to be two different characters qualitativelyIn the next part we will give the quantitive evaluation criteria

Let 119875 = 1199011 1199012 119901

119894 119901

119898minus1 be the angular dif-

ference sequence of a standard Qi Gong character and let119876 = 119902

1 1199022 119902

119894 119902

119898minus1 be the sequence of userrsquos

handwriting 119875 here is equivalent to a character template 119901119894

and 119902119894are the angular difference between stroke 119894 and stroke

119894 + 1119898 is the total stroke number and119898 ge 2 Then the meandeviation of the two charactersrsquo angular differences Dev canbe calculated as follows

Dev =sum119898minus1

119894=1

1003816100381610038161003816119901119894 minus 1199021198941003816100381610038161003816

119898 minus 1 (4)

The smaller the Dev is the more similar the charactersare

6 Mathematical Problems in Engineering

424Weighted Similarity Calculation Algorithm Here we settwo threshold values 120585 and 120575 to control the size of searchspace 120585 is used to limit 119896 namely the number of strokeswith different classifications which has been introducedin Section 422 120575 is used to limit Dev namely the meandeviation of the two charactersrsquo angular differences whichhas been introduced in Section 423

We denote 119878119889as the angular difference similarity between

a standard Qi Gong character and userrsquos handwritingThen itcan be figured out according to the following equation

119878119889=120575 minus Dev120575

(5)

If 119896 gt 120585 or Dev gt 120575 we consider that the current twocharacters being compared are not the same thus excludinga number of characters from the search space

If 119896 le 120585 and Dev le 120575 we will calculate a compositiveweighted similarity 119878

119878 = 1199081119878119888+ 1199082119878119889 (6)

Here 1199081and 119908

2are weight parameters 119908

1+ 1199082= 1

Combining (2) (4) (5) and (6) we could get a final detailedsimilarity calculation equation

119878 = 1199081sdot (1 minus

119896

119898) + 119908

2sdot (1 minus

sum119898minus1

119894=1

1003816100381610038161003816119901119894 minus 1199021198941003816100381610038161003816

120575 (119898 minus 1)) (7)

After scanning all the characters in the search space wecan find out the top several characters which have the highest119878 according to the sorting result

5 Character Registration byUsing ICP Algorithm

Iterative closest point (ICP) algorithm [14] is one of the mostcommonly used registration algorithms based on point setto point set The basic steps of this algorithm are [15] tofind out the closest matching point pairs in the two pointsets being processed compute the transformationmatrix thatminimizes the sum of the squares between the paired pointsand then apply the transformation iterate the above two stepsuntil the distance satisfies a given convergence precisionWhen the iteration is stopped we can get the final translationand rotation parametersTherefore we can consider the userrsquoshandwritten character and the standard Qi font charactercandidates selected from the previous preprocessing step aspoint sets and match them via ICP algorithm

Skeleton is an important descriptor for shape matchingand sometimes it performs better than contour or the wholepixel point set of an object What is more computation ofskeleton-based ICP algorithm will be much faster than thecomputation based on whole points of the object Since theQi Gong calligraphy characters in our database are vectorizedby DBSCs the skeletons and shapes are easy to get And as wesaid in Section 41 the skeleton and radii of userrsquos handwrittencharacter are also recorded so in this paper we will use the

skeleton point set to realize ICP registration and find out thebest matching character

51 Scaling of the Standard Qi Gong Character Our ICPregistration is rigid so before applying this algorithm wemust scale the standard character at first and make the twocharacters to be processed have the same size so that we canget a more accurate registration result in the following step

Let 119883119904be the skeleton point set of standard Qi Gong

character and let 119883119906be the skeleton point set of userrsquos

handwritten character Here we take 119883119906as the referenced

point set First the geometric centers 119874119904and 119874

119906of 119883119904and

119883119906are calculated Then the smallest disks which can cover

the whole character are found and the corresponding radiiare denoted by 119903

119904and 119903119906 With 119903

119904and 119903119906 we can scale the

vectorized standard Qi Gong character thus making it havethe same covering disk size with userrsquos handwritten character

52 ICP Registration of Characters

521 ICP Algorithm Registration operation of ICP algo-rithm actuallymeans finding an optimal rigid transformationfrom one coordinate system to another which can minimizethe sum of the squares between two point sets This transfor-mation can be represented by a 3 times 3 rotation matrix 119877 and athree-dimensional translation vector 119879

Let 119875 = 119901119894| 119901119894isin 1198773 119894 = 1 2 119873 and 119876 = 119902

119894|

119902119894isin 1198773 119894 = 1 2 119872 be two point sets to be registrated

Suppose 119901 is an arbitrary point in 119875 and its coordinate valueis (1199091119901 1199101

119901 1199111

119901) After transforming the coordinate value of 119901

is (1199092119901 1199102

119901 1199112

119901) Then

[[[

[

1199092

119901

1199102

119901

1199112

119901

]]]

]

= 119877[[[

[

1199091

119901

1199101

119901

1199111

119901

]]]

]

+ 119879 (8)

So the registration goal is to figure out the transformationof 119877 and 119879 which can minimize the value of the followingfunction

119891 (119877 119879) = min119873

sum

119894=1

10038171003817100381710038171003817119901119894

119896minus (119877119901

119894+ 119879)10038171003817100381710038171003817

2

(9)

where 119896 is iteration times 119901119894

119896 is the closest matching pointof 119901119894 119901119894

119896isin 119876 and 119873 is the total point number of 119875 In

this iteration process 119875 and 119901119894

119896 are not fixed they are alwayschanging After each iteration 119875 and the closest matchingpoint pairs will be updated 119877119901

119894+ 119879119894=12119873

will be the new119875 in next iteration

522 Character Registration Steps In our approach weuse ICP registration algorithm to make standard Qi Gongcharacter and userrsquos handwritten character match best andthe algorithm is carried out in two-dimensional space119883119904and 119883

119906are the two skeleton point sets of standard

Qi Gong character and userrsquos handwritten character andthey have been scaled to the same size after the process in

Mathematical Problems in Engineering 7

q

p

ds

(a) Point to point

q

p

ds

q998400

(b) Point to plane

q

p

ds

OP

OQ

(c) Point to projection

Figure 7 Methods of searching the closest point in ICP

(a) (b) (c) (d)

Figure 8 ICP registration of character ldquo永永永rdquo (a) Skeleton of userrsquos handwritten character (b) skeleton of original standard Qi Gong character(c) transformed skeleton of standard Qi Gong character after ICP registration and (d) overlapping comparison

Section 51 Then the registration steps can be described asfollows

(1) Search all the closest corresponding points of 119883119904in

119883119906

(2) Figure out the rigid transformation which can min-imize the sum of the squares between the pairedpoints above mentioned and then acquire rotationparameter 119877 and translation parameter 119879

(3) Apply 119877 and 119879 to 119883119904and get the transformed point

set(4) If the transformed point set of 119883

119904and the referenced

point set119883119906can satisfy a given convergence precision

of function 119891(119877 119879) in (9) namely the sum of thesquares of the two point sets being less than a giventhreshold value then stop iterating Otherwise set thetransformed point set as the new 119883

119904 and iterate the

above four steps until the function value is acceptable

There are several commonly used methods of searchingthe closest corresponding point pairs in step (1) such as pointto point [14] point to plane [16] and point to projection[17] as shown in Figure 7 Since our registration is basedon skeleton point set we use the point to point searchingmethod Figure 8 is a registration example of our experimentcharacter ldquo永rdquo

6 Comprehensive Evaluation

Skeleton represents the global topological information of acharacter which can reflect the balance and arrangementof all the strokes Local similarity of each stroke is also animportant metric in calligraphy evaluationmechanismWithstroke evaluation score learners could find out about whichstroke they wrote well and which stroke they need to practicefurther more So we compare both the global similarity andthe local similarity in our approach

However skeleton distance is not easy to convert into acertain score based on the percentage grading system Whatis more it has lost the width information So in this paper weuse the whole character shape instead of skeleton to representthe topological feature Similarly we use stroke shape tocalculate stroke similarity Here the shape data is defined asthe pixel distribution information of a character or strokethat is the most direct and easy way to measure the distancebetween two characters or two strokesWith the skeleton andradii of a character and the stroke segmentation data in ourdatabase we can easily get the shape information of eachstroke and the whole character

61 Character Shape Similarity When the registration stepis finished the best matching character will be found thencharacter shape similarity denoted by 119878

1 can be calculated

8 Mathematical Problems in Engineering

according to the overlapping situation of userrsquos handwritingand transformed standard Qi Gong character as follows

1198781=

sum119870

119894=1sum119870

119895=1119883119894119895sdot 119884119894119895

sum119870

119894=1sum119870

119895=1(119883119894119895sdot 119884119894119895+10038161003816100381610038161003816119883119894119895minus 119884119894119895

10038161003816100381610038161003816)

(10)

where 119870 is the length of the smallest square which can coverthe two registrated characters 119883

119894119895is the pixel value of userrsquos

character 119884119894119895is the pixel value of Qi Gong character and we

define

119883119894119895

or 119884119894119895=

1 if pixel (119894 119895) is black

0 if pixel (119894 119895) is white(11)

In (10) numerator represents the total number of pixelsthat both are black namely the overlapping black areadenominator represents the total number of pixels that aredifferent or both black namely the remaining part afterremoving the overlapping white area

62 Stroke Shape Similarity In order to avoid the errorbrought by position and size of the strokes to be comparedwe first normalize their ldquoeffective areardquo to 80 times 80 in pixelsHere the ldquoeffective areardquo of a stroke is calculated as follows

First we find four boundaries of a stroke that is thetop the bottom the left and the right Then this rectangleis turned into a square region according to its longer sideand we make sure that the rectangle is right in the middleof the square This square region is called the effective area ofa stroke Figure 9 shows an example of finding the effectivearea of a stroke

When the effective areas of userrsquos handwritten strokes andstandard Qi Gong strokes are normalized to 80times80 in pixelsthe shape similarity of 119899th stroke denoted by 119878(119899) can becalculated according to the following equation which is quitesimilar to (10)

119878 (119899)

=

sum119870

119894=1sum119870

119895=1119883119894119895 (119899) sdot 119884119894119895 (119899)

sum119870

119894=1sum119870

119895=1(119883119894119895 (119899) sdot 119884119894119895 (119899) +

10038161003816100381610038161003816119883119894119895 (119899) minus 119884119894119895 (119899)

10038161003816100381610038161003816)

(12)

where 1 le 119899 le 119873119873 is the total stroke number of the currentcharacter and 119870 = 80 119883

119894119895(119899) is the pixel value of userrsquos 119899th

stroke 119884119894119895(119899) is the pixel value of 119899th standard stroke

63 Composited Score With character shape similarity 1198781

and stroke shape similarities 119878(119899) we can also compute acomposited single evaluation score Eva

The mean similarity of all strokes is taken as the finalstroke shape similarity denoted by 119878

2

1198782=1

119873

119873

sum

119899=1

119878 (119899) (13)

The maximal values of 1198781and 1198782are both 1 Hence

Eva = (120593 sdot 1198781+ 120596 sdot 119878

2) sdot 100 (14)

where 120593 and 120596 are weight parameters 120593 + 120596 = 1

Top

Right

Bottom

Left

Figure 9 Finding the effective area of a stroke

So far the introduction of the detailed steps of ourevaluation approach has been finished Figure 10 shows thewhole architecture of the approach in this paper

7 Experiment Results and Analysis

71 Validity of the Recognition Algorithm Aiming at findingout the best matching character our character recognitionalgorithm mainly consists of two parts reducing the searchspace and ICP registration namely steps (1) to (5) inFigure 10 We have given one example as shown in Figure 8In order to avoid the Type-I or Type-II error we did severalexperiments by using a sample database containing 30 char-acters of 5 writers to validate the validity and make our algo-rithmmore convincing Table 2 shows the experiment resultWe can see that in this sample database only one character isrecognized as a wrong Qi Gong character User wrote a char-acter ldquo己rdquo (ji) but our algorithm recognized it as ldquo已rdquo (yi)their shape is quite similar The proportion of two characterslike ldquo己rdquo and ldquo已rdquo which not only are very similar in shapebut also have the same total stroke number is quite smallSo this error can be accepted The experiment proves ouralgorithm is effective In these 30 test characters 21 of themare recognized at the stage of reducing the search space beforeICP registration which proves ourmethod is efficient as well

72 Composited Shape Evaluation We take ldquo永rdquo as ourexperiment character ldquo永rdquo is the first character of calligraphyldquoPreface to Orchid Pavilionrdquo (蘭亭序) shown in Figure 1 andTable 3The ICP registration of its skeleton has been shown inFigure 8 and we analyze its shape similarity Likewise othercharacters in calligraphy ldquoPreface to Orchid Pavilionrdquo or ourvector Qi Gong calligraphy database can also be evaluated byour method

In Table 3(a) we can see the userrsquos askew handwrittencharacter (left) the original standard Qi Gong character(middle) and the overlapping comparison after registration(right) Global similarity is calculated According to thissimilarity users could know how well they wrote in termsof structure and shape of this character Table 3(b) showsthe comparison of each stroke with these stroke similaritiesusers can get to know which stroke they wrote well andwhich stroke they need to practice more For example thebest stroke of userrsquos handwriting is the first stroke with

Mathematical Problems in Engineering 9

Table2Ex

perim

ento

ffind

ingtheb

estm

atchingcharacter

12

34

56

78

910

1112

1314

15Userrsquos

hand

writtencharacter

十才

己云

艺车

月去

石白

永西

自问

麦Th

ebestm

atchingQiG

ongcharacter

十才

已云

艺车

月去

石白

永西

自问

麦Truefa

lseT

TF

TT

TT

TT

TT

TT

TT

1617

1819

2021

2223

2425

2627

2829

30Userrsquos

hand

writtencharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Th

ebestm

atchingQiG

ongcharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Truefa

lseT

TT

TT

TT

TT

TT

TT

TT

10 Mathematical Problems in Engineering

Table 3 Experiment of character ldquo永rdquo

(a) Character shape similarity

Userrsquos handwriting Original Qi Gong character Overlapping comparison Similarity

0823234

(b) Stroke shape similarities

Stroke 1 Stroke 2 Stroke 3 Stroke 4 Stroke 5

Userrsquos stroke

TransformedQi GongStroke

Similarity 0906372 0878092 0690590 0710224 0857143(c) Composited evaluation score

1198781

1198782

Eva ()0823234 0808484 8159

Yes

(5)

No

(1)

(2)

(3)

(4)

(6)

(7)

Begin to receive user input

Record stroke information

Stroke input finished

Reducing the search space according to total stroke number and angular differences

Find out the best matching Qi Gong character according to ICP registration based on skeleton

Calculate the character shape similarity and stroke shape similarities between userrsquos handwriting and

ICP-registrated Qi Gong calligraphy

Figure out a composited evaluation score

Evaluation process

Database

Segmented and DBSC vectorizedQi Gong

calligraphy

Figure 10 Architecture of the evaluation approach in this paper

Mathematical Problems in Engineering 11

a similarity of 0906372 and the worst stroke is the thirdstroke with a similarity of 0690590 Table 3(c) gives thecomposited evaluation score which can show the overallquality of userrsquos practice Here the 120593 and 120596 in (14) are bothset as 05 in our experiment

We consulted several calligraphy teachers and asked themto evaluate experiment result They concluded the result isrelatively objective which proves our approach is effectiveand satisfactory

8 Conclusions

This paper presents the establishment of our vectorizedQi Gong calligraphy database and we propose an effectiveevaluation approach by using angular difference relationsICP algorithm and shape features In the proposed approachcharacter shape similarity can reflect the global whole struc-ture and stroke arrangement of the character and strokeshape similarity can reflect the local detail features Theproposed approach is comprehensive and it is able to dealwith the different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiment results show that this approach is feasible andeffective Furthermore it can be extended to other calligraphydatabases

Conflict of Interests

The authors declare no conflict of interests

Acknowledgment

This work is partially supported by National Natural ScienceFoundation of China (no 61170170 and no 61271366)

References

[1] S Strassmann ldquoHairy brushesrdquo ACM SIGGRAPH ComputerGraphics vol 20 no 4 pp 225ndash232 1986

[2] N S H Chu and C-L Tai ldquoReal-time painting with anexpressive virtual Chinese brushrdquo IEEE Computer Graphics andApplications vol 24 no 5 pp 76ndash85 2004

[3] H S Seah Z Wu F Tian X Xiao and B Xie ldquoArtistic brush-stroke representation and animation with disk B-spline curverdquoin Proceedings of the ACM SIGCHI International Conference onAdvances in Computer Entertainment Technology (ACE rsquo05) pp88ndash93 Valencia Spain June 2005

[4] C-C Han C-H Chou and C-S Wu ldquoAn interactive gradingand learning system for chinese calligraphyrdquo Machine Visionand Applications vol 19 no 1 pp 43ndash55 2008

[5] Y Gao L Jin and N Li ldquoChinese handwriting qualityevaluation based on analysis of recognition confidencerdquo inProceedings of the IEEE International Conference on InformationandAutomation (ICIA rsquo11) pp 221ndash225 IEEE Shenzhen ChinaJune 2011

[6] T Shichinohe T Yamabe T Iwata and T Nakajima ldquoAug-mented calligraphy experimental feedback design for writingskill developmentrdquo in Proceedings of the 5th InternationalConference on Tangible Embedded and Embodied Interaction(TEI rsquo11) pp 301ndash302 ACM Funchal Portugal January 2011

[7] A Murata K Inoue and M Moriwaka ldquoReal-time mea-surement system of eye-hand coordination in calligraphyrdquoin Proceedings of the 50th Annual Conference on Society ofInstrument and Control Engineers (SICE rsquo11) pp 2696ndash2701Tokyo Japan September 2011

[8] S Xu H Jiang F C M Lau and Y Pan ldquoComputationallyevaluating and reproducing the beauty of Chinese calligraphyrdquoIEEE Intelligent Systems vol 27 no 3 pp 63ndash72 2012

[9] L Han Y Sun and W Huang ldquoAn assessment method for inkmarksrdquo in Proceedings of the 4th International Conference onIntelligent Human-Machine Systems and Cybernetics (IHMSCrsquo12) vol 2 pp 256ndash259 Nanchang China August 2012

[10] K Henmi and T Yoshikawa ldquoVirtual lesson and its applicationto virtual calligraphy systemrdquo in Proceedings of the IEEEInternational Conference on Robotics and Automation vol 2 pp1275ndash1280 Leuven Belgium 1998

[11] J Shin T Okuyama and K Yun ldquoSensory calligraphy learningsystem using Yongzi-Bafardquo in Proceedings of the 8th Interna-tional Forum on Strategic Technology (IFOST rsquo13) vol 2 pp 128ndash131 IEEE Ulaanbaatar Mongolia July 2013

[12] F Cao Z Wu P Xu M Zhou and X Ao ldquoA learning system ofQi Gong calligraphyrdquo in Proceedings of the 14th Global ChineseConference on Computers in Education (GCCCE rsquo10) SingaporeJune 2010

[13] ZWuH Jiao andGDai ldquoAn algorithmof approximating line-segment and circular arcs and its application in vectorizationof engineering drawingsrdquo Journal of Computer Aided Design ampComputer Graphics vol 10 no 4 pp 328ndash332 1998

[14] P J Besl and N D McKay ldquoMethod for registration of 3-Dshapesrdquo in Sensor Fusion IV Control Paradigms and Data Struc-tures vol 1611 of Proceedings of SPIE pp 586ndash606 InternationalSociety for Optics and Photonics Boston Mass USA April1992

[15] D Chetverikov D Svirko D Stepanov and P Krsek ldquoThetrimmed iterative closest point algorithmrdquo in Proceedings of the16th International Conference on Pattern Recognition vol 3 pp545ndash548 2002

[16] R Bergevin M Soucy H Qagnon and D LaurendeauldquoTowards a general multi-view registration techniquerdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol18 no 5 pp 540ndash547 1996

[17] S Rusinkiewicz and M Levoy ldquoEfficient variants of the ICPalgorithmrdquo in Proceedings of the IEEE 3rd International Confer-ence on 3-D Digital Imaging and Modeling pp 145ndash152 2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Mathematical Problems in Engineering 3

Figure 1 Evaluation result of Chinese calligraphy Left is the famous calligraphy ldquoPreface to Orchid Pavilionrdquo (蘭亭序) written by Mr QiGong top right is the original standardQiGong character ldquo永rdquo from calligraphy (left) bottom right is the same character handwritten by userWith our evaluation method we can achieve the following result The character shape similarity is 0823234 and strokesrsquo shape similaritiesare 0906372 0878092 0690590 0710224 and 0857143 Obviously the evaluation result including not only a shape similarity but also eachstroke shape similarity can help users improve their calligraphy study well

Character

Stroke 1 Stroke 2 Stroke 3

Stroke 4 Stroke 5 Stroke 6

Figure 2 Stroke segmentation of character ldquo她rdquo

cannot only reduce the storage space but also realize fasttransformation and arbitrary scaling without anamorphosisDisk B-spline curves are always used to represent Chinesecharacters in recent years

321 Disk B-Spline Curve (DBSC) Definition Let 119873119894119901(119905)

be the 119894th B-spline basis of degree 119901 with knot vector[1199050 119905

119898] = 119886 119886⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟

119901

119905119901+1 119905

119898minus119901minus1 119887 119887⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟

119901

Here 119898 =

119899 + 119901 + 1 Then the disk B-spline curve (DBSC) is defined asfollows

⟨119863⟩ (119905) =

119899

sum

119894=0

119873119894119901 (119905) ⟨119875119894 119903119894⟩ (1)

where 119875119894is control point and 119903

119894is control radii

DBSC can be viewed as 2 parts the center curvesum119899

119894=0119873119894119901(119905)119875119894 which is a B-spline curve and the radius

functionsum119899119894=0119873119894119901(119905)119903119894 which is a B-spline scalar function

Owing to the perfect symmetry property of disks thecurve constructed from the centers of disks is exactly theskeleton of the 2D region represented by DBSC Most of theproperties and algorithms can be obtained by applying B-spline curve and function to the 2 parts of the disk B-splinecurve respectively More details can be found in [3]

322 DBSC Based Stroke Representation The DBSC isderived from B-spline curves The difference between B-spline curves and DBSC is that instead of being defined bypoints DBSC is defined by a set of disks It derives nature offlexibility for transformation deformation and morphing

A disk B-spline curve is a skeleton based parametric 2Drepresentation which represents the 2D region as well as thecenter curve (skeleton) of the 2D region explicitly DBSC isa proper tool to describe a brushstroke Therefore we useDBSCs to represent the geometric data of each stroke incharacters The first stroke of a Qi font ldquo她rdquo is representedby a disk B-spline curve as shown in Figure 3

Vectorized 3755 Qi font characters are included in ourQi Gong calligraphy database so that they can be used forthe evaluation approach in the rest of our paper Figure 4 isan example of some vectorized characters in our Qi Gongcalligraphy database

4 Preprocessing of the Search Space

In order to improve the whole efficiency of ourmethod somesteps will be taken to reduce the search space at first Thisreducing algorithm mainly involves two aspects one is totalstroke number and the other is angular difference betweenadjacent strokes

41 Reducing the Search Space according to Total StrokeNumber The input device of our system is digital tabletwhich is based on electromagnetic induction It can perceivevery subtle pressure changes convert touch pressures andpositions into pixels and eventually form the handwritingWhen the pressure between ldquobrushrdquo and ldquopaperrdquo changesfrom zero to a nonzero number the system considers a stroke

4 Mathematical Problems in Engineering

Figure 3 The first stroke of ldquo她rdquo represented by DBSC

Figure 4 Vectorized Qi Gong calligraphy database

begins When the pressure turns back to zero system consid-ers the stroke finishes Positions of virtual pen form the strokeskeleton pressures represent stroke radii Hence track andshape information of every stroke namely the skeleton andradii as well as the total stroke number of userrsquos handwritingcan be recorded

Since our calligraphy database contains the total strokenumber information of all characters when user finishesinput the search space can then be reduced into a subspace inwhich the characters have the same total stroke number withuserrsquos handwriting And the next reducing step will be takenbased on this subspace

42 Reducing the Search Space according to Angular Differencebetween Adjacent Strokes Every stroke in a character hasa direction namely the correct writing direction So thereexists an angle relation between two strokes which areadjacent in writing order we name this relation ldquoangulardifferencerdquo No matter what kind of size or position thecharacter has or even if the character is written askew theangular differences between adjacent strokes will still bealmost invariable So according to the similarities betweenuserrsquos handwriting and standardQiGong calligraphy in termsof angular difference we can exclude a large number ofcharacters or even recognize what user writes thus reducingthe search space

Figure 5 Optimal approximating line of a stroke

But the actual situation of strokes is much more com-plicated The direction of a stroke is not constant it maychange slightly or greatly A most typical example is ldquozherdquo Itcan be horizontal in the beginning and then become verticalfrom the middle and it can also be vertical in the beginningand then become horizontal from the middle In the formersituation we call it ldquoheng zhe ()rdquo and in the latter wecall it ldquoshu zhe ()rdquo So in order to avoid the directiondeviation caused by large and small angular variation we willdistinguish the strokersquos classification in our approach

The reducing process of the search space in this phasemainly includes four steps Firstly a curve fitting algorithmis used to obtain the line segment that can approximatethe stroke in maximum Secondly strokes are classified intostraight or curving according to the approximating distanceThirdly the fitting lines are used to represent strokes andcalculate angular differences Finally a weighted algorithm isused to calculate similarities between userrsquos handwriting andstandard Qi Gong characters according to stroke classifica-tions and angular differences hence we can find out the topseveral most similar characters

421 Optimal Approximating Line Segment of Strokes Weuse a least square method based curve fitting algorithm [13]to obtain the optimal approximating line segment of eachstroke

Figure 5 shows a fitting line exampleThe red points in thepicture stand for the equidistant sampling data points of thestroke skeleton and the green line stands for the calculatedoptimal approximating line segment of the stroke

422 Classification of Strokes The fitting line of a strokewhose direction changes greatly such as ldquozherdquo may be quitesimilar to the fitting line of a stroke whose direction isalmost unchanged This situation may bring errors to ourapproach So in order to be more accurate it is necessaryto classify the stroke into straight and curving according tothe approximating distance We use Euclidean distance todistinguish strokes

Let 119897119894be the Euclidean distance from sampling point

119909119894 119910119894 to the optimal approximating line segment 119894 =

1 2 119899 Let 119871 be the length of the approximating segmentThen if (1119871)sum119899

119894=1119897119894lt 120576 we judge the stroke to be straight

otherwise curving Here 120576 is a threshold value

Mathematical Problems in Engineering 5

Table 1 Stroke classification of characters ldquo工rdquo and ldquo口rdquo

Stroke 1 Stroke 2 Stroke 3

Character ldquo工rdquoStraight Straight Straight

Character ldquo口rdquoStraight Curving Straight

Classification comparison Same Different Same

AB

D

C

A998400

B998400

C998400

D998400

Figure 6 Characters ldquo二rdquo and ldquo十rdquo

We denote 119878119888as the stroke classification similarity

between a standard Qi Gong character and userrsquos handwrit-ing Let119898 be total stroke number of a character If there are 119896strokes whose classifications are different then

119878119888=119898 minus 119896

119898 (2)

Now we give an example As shown in Table 1 there aretwo characters whose total stroke numbers are both 3 Wecan see that the strokes of character ldquo工rdquo are all straight butin character ldquo口rdquo the first and third stoke are straight andthe second stroke is curving So there is one stroke whoseclassification is different According to (2) 119878

119888= (3 minus 1)3 =

23

423 Calculation of Angular Differences After figuring outthe approximating line segments we can use them to cal-culate angular differences If the total stroke number of acharacter is 119898 then there will be 119898 minus 1 angular differencesFor convenience the value of angular difference ranges from0 to 120587

Here we use characters ldquo二rdquo and ldquo十rdquo in Figure 5 to showhow to calculate the angular differences Assume 997888997888rarr119860119861 997888997888rarr119862119863 arethe approximating line segments of the two strokes in charac-

ter ldquo二rdquo and997888997888997888rarr

11986010158401198611015840997888997888997888rarr

11986210158401198631015840 are the approximating line segments

of the two strokes in character ldquo十rdquo Segment directions are

the correct writing directions of their corresponding strokesThen the angular differences of ldquo二rdquo and ldquo十rdquo are

arccos(997888997888rarr119860119861 sdot

997888997888rarr119862119863

100381610038161003816100381610038161003816

997888997888rarr119860119861100381610038161003816100381610038161003816

100381610038161003816100381610038161003816

997888997888rarr119862119863100381610038161003816100381610038161003816

)

arccos(997888997888997888rarr

11986010158401198611015840sdot

997888997888997888rarr

11986210158401198631015840

10038161003816100381610038161003816100381610038161003816

997888997888997888rarr

11986010158401198611015840

10038161003816100381610038161003816100381610038161003816

10038161003816100381610038161003816100381610038161003816

997888997888997888rarr

11986210158401198631015840

10038161003816100381610038161003816100381610038161003816

)

(3)

Clearlywe can see that the angular differences of ldquo二rdquo andldquo十rdquo in Figure 6 are quite unlike they differ by almost 90∘ sothey can be judged to be two different characters qualitativelyIn the next part we will give the quantitive evaluation criteria

Let 119875 = 1199011 1199012 119901

119894 119901

119898minus1 be the angular dif-

ference sequence of a standard Qi Gong character and let119876 = 119902

1 1199022 119902

119894 119902

119898minus1 be the sequence of userrsquos

handwriting 119875 here is equivalent to a character template 119901119894

and 119902119894are the angular difference between stroke 119894 and stroke

119894 + 1119898 is the total stroke number and119898 ge 2 Then the meandeviation of the two charactersrsquo angular differences Dev canbe calculated as follows

Dev =sum119898minus1

119894=1

1003816100381610038161003816119901119894 minus 1199021198941003816100381610038161003816

119898 minus 1 (4)

The smaller the Dev is the more similar the charactersare

6 Mathematical Problems in Engineering

424Weighted Similarity Calculation Algorithm Here we settwo threshold values 120585 and 120575 to control the size of searchspace 120585 is used to limit 119896 namely the number of strokeswith different classifications which has been introducedin Section 422 120575 is used to limit Dev namely the meandeviation of the two charactersrsquo angular differences whichhas been introduced in Section 423

We denote 119878119889as the angular difference similarity between

a standard Qi Gong character and userrsquos handwritingThen itcan be figured out according to the following equation

119878119889=120575 minus Dev120575

(5)

If 119896 gt 120585 or Dev gt 120575 we consider that the current twocharacters being compared are not the same thus excludinga number of characters from the search space

If 119896 le 120585 and Dev le 120575 we will calculate a compositiveweighted similarity 119878

119878 = 1199081119878119888+ 1199082119878119889 (6)

Here 1199081and 119908

2are weight parameters 119908

1+ 1199082= 1

Combining (2) (4) (5) and (6) we could get a final detailedsimilarity calculation equation

119878 = 1199081sdot (1 minus

119896

119898) + 119908

2sdot (1 minus

sum119898minus1

119894=1

1003816100381610038161003816119901119894 minus 1199021198941003816100381610038161003816

120575 (119898 minus 1)) (7)

After scanning all the characters in the search space wecan find out the top several characters which have the highest119878 according to the sorting result

5 Character Registration byUsing ICP Algorithm

Iterative closest point (ICP) algorithm [14] is one of the mostcommonly used registration algorithms based on point setto point set The basic steps of this algorithm are [15] tofind out the closest matching point pairs in the two pointsets being processed compute the transformationmatrix thatminimizes the sum of the squares between the paired pointsand then apply the transformation iterate the above two stepsuntil the distance satisfies a given convergence precisionWhen the iteration is stopped we can get the final translationand rotation parametersTherefore we can consider the userrsquoshandwritten character and the standard Qi font charactercandidates selected from the previous preprocessing step aspoint sets and match them via ICP algorithm

Skeleton is an important descriptor for shape matchingand sometimes it performs better than contour or the wholepixel point set of an object What is more computation ofskeleton-based ICP algorithm will be much faster than thecomputation based on whole points of the object Since theQi Gong calligraphy characters in our database are vectorizedby DBSCs the skeletons and shapes are easy to get And as wesaid in Section 41 the skeleton and radii of userrsquos handwrittencharacter are also recorded so in this paper we will use the

skeleton point set to realize ICP registration and find out thebest matching character

51 Scaling of the Standard Qi Gong Character Our ICPregistration is rigid so before applying this algorithm wemust scale the standard character at first and make the twocharacters to be processed have the same size so that we canget a more accurate registration result in the following step

Let 119883119904be the skeleton point set of standard Qi Gong

character and let 119883119906be the skeleton point set of userrsquos

handwritten character Here we take 119883119906as the referenced

point set First the geometric centers 119874119904and 119874

119906of 119883119904and

119883119906are calculated Then the smallest disks which can cover

the whole character are found and the corresponding radiiare denoted by 119903

119904and 119903119906 With 119903

119904and 119903119906 we can scale the

vectorized standard Qi Gong character thus making it havethe same covering disk size with userrsquos handwritten character

52 ICP Registration of Characters

521 ICP Algorithm Registration operation of ICP algo-rithm actuallymeans finding an optimal rigid transformationfrom one coordinate system to another which can minimizethe sum of the squares between two point sets This transfor-mation can be represented by a 3 times 3 rotation matrix 119877 and athree-dimensional translation vector 119879

Let 119875 = 119901119894| 119901119894isin 1198773 119894 = 1 2 119873 and 119876 = 119902

119894|

119902119894isin 1198773 119894 = 1 2 119872 be two point sets to be registrated

Suppose 119901 is an arbitrary point in 119875 and its coordinate valueis (1199091119901 1199101

119901 1199111

119901) After transforming the coordinate value of 119901

is (1199092119901 1199102

119901 1199112

119901) Then

[[[

[

1199092

119901

1199102

119901

1199112

119901

]]]

]

= 119877[[[

[

1199091

119901

1199101

119901

1199111

119901

]]]

]

+ 119879 (8)

So the registration goal is to figure out the transformationof 119877 and 119879 which can minimize the value of the followingfunction

119891 (119877 119879) = min119873

sum

119894=1

10038171003817100381710038171003817119901119894

119896minus (119877119901

119894+ 119879)10038171003817100381710038171003817

2

(9)

where 119896 is iteration times 119901119894

119896 is the closest matching pointof 119901119894 119901119894

119896isin 119876 and 119873 is the total point number of 119875 In

this iteration process 119875 and 119901119894

119896 are not fixed they are alwayschanging After each iteration 119875 and the closest matchingpoint pairs will be updated 119877119901

119894+ 119879119894=12119873

will be the new119875 in next iteration

522 Character Registration Steps In our approach weuse ICP registration algorithm to make standard Qi Gongcharacter and userrsquos handwritten character match best andthe algorithm is carried out in two-dimensional space119883119904and 119883

119906are the two skeleton point sets of standard

Qi Gong character and userrsquos handwritten character andthey have been scaled to the same size after the process in

Mathematical Problems in Engineering 7

q

p

ds

(a) Point to point

q

p

ds

q998400

(b) Point to plane

q

p

ds

OP

OQ

(c) Point to projection

Figure 7 Methods of searching the closest point in ICP

(a) (b) (c) (d)

Figure 8 ICP registration of character ldquo永永永rdquo (a) Skeleton of userrsquos handwritten character (b) skeleton of original standard Qi Gong character(c) transformed skeleton of standard Qi Gong character after ICP registration and (d) overlapping comparison

Section 51 Then the registration steps can be described asfollows

(1) Search all the closest corresponding points of 119883119904in

119883119906

(2) Figure out the rigid transformation which can min-imize the sum of the squares between the pairedpoints above mentioned and then acquire rotationparameter 119877 and translation parameter 119879

(3) Apply 119877 and 119879 to 119883119904and get the transformed point

set(4) If the transformed point set of 119883

119904and the referenced

point set119883119906can satisfy a given convergence precision

of function 119891(119877 119879) in (9) namely the sum of thesquares of the two point sets being less than a giventhreshold value then stop iterating Otherwise set thetransformed point set as the new 119883

119904 and iterate the

above four steps until the function value is acceptable

There are several commonly used methods of searchingthe closest corresponding point pairs in step (1) such as pointto point [14] point to plane [16] and point to projection[17] as shown in Figure 7 Since our registration is basedon skeleton point set we use the point to point searchingmethod Figure 8 is a registration example of our experimentcharacter ldquo永rdquo

6 Comprehensive Evaluation

Skeleton represents the global topological information of acharacter which can reflect the balance and arrangementof all the strokes Local similarity of each stroke is also animportant metric in calligraphy evaluationmechanismWithstroke evaluation score learners could find out about whichstroke they wrote well and which stroke they need to practicefurther more So we compare both the global similarity andthe local similarity in our approach

However skeleton distance is not easy to convert into acertain score based on the percentage grading system Whatis more it has lost the width information So in this paper weuse the whole character shape instead of skeleton to representthe topological feature Similarly we use stroke shape tocalculate stroke similarity Here the shape data is defined asthe pixel distribution information of a character or strokethat is the most direct and easy way to measure the distancebetween two characters or two strokesWith the skeleton andradii of a character and the stroke segmentation data in ourdatabase we can easily get the shape information of eachstroke and the whole character

61 Character Shape Similarity When the registration stepis finished the best matching character will be found thencharacter shape similarity denoted by 119878

1 can be calculated

8 Mathematical Problems in Engineering

according to the overlapping situation of userrsquos handwritingand transformed standard Qi Gong character as follows

1198781=

sum119870

119894=1sum119870

119895=1119883119894119895sdot 119884119894119895

sum119870

119894=1sum119870

119895=1(119883119894119895sdot 119884119894119895+10038161003816100381610038161003816119883119894119895minus 119884119894119895

10038161003816100381610038161003816)

(10)

where 119870 is the length of the smallest square which can coverthe two registrated characters 119883

119894119895is the pixel value of userrsquos

character 119884119894119895is the pixel value of Qi Gong character and we

define

119883119894119895

or 119884119894119895=

1 if pixel (119894 119895) is black

0 if pixel (119894 119895) is white(11)

In (10) numerator represents the total number of pixelsthat both are black namely the overlapping black areadenominator represents the total number of pixels that aredifferent or both black namely the remaining part afterremoving the overlapping white area

62 Stroke Shape Similarity In order to avoid the errorbrought by position and size of the strokes to be comparedwe first normalize their ldquoeffective areardquo to 80 times 80 in pixelsHere the ldquoeffective areardquo of a stroke is calculated as follows

First we find four boundaries of a stroke that is thetop the bottom the left and the right Then this rectangleis turned into a square region according to its longer sideand we make sure that the rectangle is right in the middleof the square This square region is called the effective area ofa stroke Figure 9 shows an example of finding the effectivearea of a stroke

When the effective areas of userrsquos handwritten strokes andstandard Qi Gong strokes are normalized to 80times80 in pixelsthe shape similarity of 119899th stroke denoted by 119878(119899) can becalculated according to the following equation which is quitesimilar to (10)

119878 (119899)

=

sum119870

119894=1sum119870

119895=1119883119894119895 (119899) sdot 119884119894119895 (119899)

sum119870

119894=1sum119870

119895=1(119883119894119895 (119899) sdot 119884119894119895 (119899) +

10038161003816100381610038161003816119883119894119895 (119899) minus 119884119894119895 (119899)

10038161003816100381610038161003816)

(12)

where 1 le 119899 le 119873119873 is the total stroke number of the currentcharacter and 119870 = 80 119883

119894119895(119899) is the pixel value of userrsquos 119899th

stroke 119884119894119895(119899) is the pixel value of 119899th standard stroke

63 Composited Score With character shape similarity 1198781

and stroke shape similarities 119878(119899) we can also compute acomposited single evaluation score Eva

The mean similarity of all strokes is taken as the finalstroke shape similarity denoted by 119878

2

1198782=1

119873

119873

sum

119899=1

119878 (119899) (13)

The maximal values of 1198781and 1198782are both 1 Hence

Eva = (120593 sdot 1198781+ 120596 sdot 119878

2) sdot 100 (14)

where 120593 and 120596 are weight parameters 120593 + 120596 = 1

Top

Right

Bottom

Left

Figure 9 Finding the effective area of a stroke

So far the introduction of the detailed steps of ourevaluation approach has been finished Figure 10 shows thewhole architecture of the approach in this paper

7 Experiment Results and Analysis

71 Validity of the Recognition Algorithm Aiming at findingout the best matching character our character recognitionalgorithm mainly consists of two parts reducing the searchspace and ICP registration namely steps (1) to (5) inFigure 10 We have given one example as shown in Figure 8In order to avoid the Type-I or Type-II error we did severalexperiments by using a sample database containing 30 char-acters of 5 writers to validate the validity and make our algo-rithmmore convincing Table 2 shows the experiment resultWe can see that in this sample database only one character isrecognized as a wrong Qi Gong character User wrote a char-acter ldquo己rdquo (ji) but our algorithm recognized it as ldquo已rdquo (yi)their shape is quite similar The proportion of two characterslike ldquo己rdquo and ldquo已rdquo which not only are very similar in shapebut also have the same total stroke number is quite smallSo this error can be accepted The experiment proves ouralgorithm is effective In these 30 test characters 21 of themare recognized at the stage of reducing the search space beforeICP registration which proves ourmethod is efficient as well

72 Composited Shape Evaluation We take ldquo永rdquo as ourexperiment character ldquo永rdquo is the first character of calligraphyldquoPreface to Orchid Pavilionrdquo (蘭亭序) shown in Figure 1 andTable 3The ICP registration of its skeleton has been shown inFigure 8 and we analyze its shape similarity Likewise othercharacters in calligraphy ldquoPreface to Orchid Pavilionrdquo or ourvector Qi Gong calligraphy database can also be evaluated byour method

In Table 3(a) we can see the userrsquos askew handwrittencharacter (left) the original standard Qi Gong character(middle) and the overlapping comparison after registration(right) Global similarity is calculated According to thissimilarity users could know how well they wrote in termsof structure and shape of this character Table 3(b) showsthe comparison of each stroke with these stroke similaritiesusers can get to know which stroke they wrote well andwhich stroke they need to practice more For example thebest stroke of userrsquos handwriting is the first stroke with

Mathematical Problems in Engineering 9

Table2Ex

perim

ento

ffind

ingtheb

estm

atchingcharacter

12

34

56

78

910

1112

1314

15Userrsquos

hand

writtencharacter

十才

己云

艺车

月去

石白

永西

自问

麦Th

ebestm

atchingQiG

ongcharacter

十才

已云

艺车

月去

石白

永西

自问

麦Truefa

lseT

TF

TT

TT

TT

TT

TT

TT

1617

1819

2021

2223

2425

2627

2829

30Userrsquos

hand

writtencharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Th

ebestm

atchingQiG

ongcharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Truefa

lseT

TT

TT

TT

TT

TT

TT

TT

10 Mathematical Problems in Engineering

Table 3 Experiment of character ldquo永rdquo

(a) Character shape similarity

Userrsquos handwriting Original Qi Gong character Overlapping comparison Similarity

0823234

(b) Stroke shape similarities

Stroke 1 Stroke 2 Stroke 3 Stroke 4 Stroke 5

Userrsquos stroke

TransformedQi GongStroke

Similarity 0906372 0878092 0690590 0710224 0857143(c) Composited evaluation score

1198781

1198782

Eva ()0823234 0808484 8159

Yes

(5)

No

(1)

(2)

(3)

(4)

(6)

(7)

Begin to receive user input

Record stroke information

Stroke input finished

Reducing the search space according to total stroke number and angular differences

Find out the best matching Qi Gong character according to ICP registration based on skeleton

Calculate the character shape similarity and stroke shape similarities between userrsquos handwriting and

ICP-registrated Qi Gong calligraphy

Figure out a composited evaluation score

Evaluation process

Database

Segmented and DBSC vectorizedQi Gong

calligraphy

Figure 10 Architecture of the evaluation approach in this paper

Mathematical Problems in Engineering 11

a similarity of 0906372 and the worst stroke is the thirdstroke with a similarity of 0690590 Table 3(c) gives thecomposited evaluation score which can show the overallquality of userrsquos practice Here the 120593 and 120596 in (14) are bothset as 05 in our experiment

We consulted several calligraphy teachers and asked themto evaluate experiment result They concluded the result isrelatively objective which proves our approach is effectiveand satisfactory

8 Conclusions

This paper presents the establishment of our vectorizedQi Gong calligraphy database and we propose an effectiveevaluation approach by using angular difference relationsICP algorithm and shape features In the proposed approachcharacter shape similarity can reflect the global whole struc-ture and stroke arrangement of the character and strokeshape similarity can reflect the local detail features Theproposed approach is comprehensive and it is able to dealwith the different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiment results show that this approach is feasible andeffective Furthermore it can be extended to other calligraphydatabases

Conflict of Interests

The authors declare no conflict of interests

Acknowledgment

This work is partially supported by National Natural ScienceFoundation of China (no 61170170 and no 61271366)

References

[1] S Strassmann ldquoHairy brushesrdquo ACM SIGGRAPH ComputerGraphics vol 20 no 4 pp 225ndash232 1986

[2] N S H Chu and C-L Tai ldquoReal-time painting with anexpressive virtual Chinese brushrdquo IEEE Computer Graphics andApplications vol 24 no 5 pp 76ndash85 2004

[3] H S Seah Z Wu F Tian X Xiao and B Xie ldquoArtistic brush-stroke representation and animation with disk B-spline curverdquoin Proceedings of the ACM SIGCHI International Conference onAdvances in Computer Entertainment Technology (ACE rsquo05) pp88ndash93 Valencia Spain June 2005

[4] C-C Han C-H Chou and C-S Wu ldquoAn interactive gradingand learning system for chinese calligraphyrdquo Machine Visionand Applications vol 19 no 1 pp 43ndash55 2008

[5] Y Gao L Jin and N Li ldquoChinese handwriting qualityevaluation based on analysis of recognition confidencerdquo inProceedings of the IEEE International Conference on InformationandAutomation (ICIA rsquo11) pp 221ndash225 IEEE Shenzhen ChinaJune 2011

[6] T Shichinohe T Yamabe T Iwata and T Nakajima ldquoAug-mented calligraphy experimental feedback design for writingskill developmentrdquo in Proceedings of the 5th InternationalConference on Tangible Embedded and Embodied Interaction(TEI rsquo11) pp 301ndash302 ACM Funchal Portugal January 2011

[7] A Murata K Inoue and M Moriwaka ldquoReal-time mea-surement system of eye-hand coordination in calligraphyrdquoin Proceedings of the 50th Annual Conference on Society ofInstrument and Control Engineers (SICE rsquo11) pp 2696ndash2701Tokyo Japan September 2011

[8] S Xu H Jiang F C M Lau and Y Pan ldquoComputationallyevaluating and reproducing the beauty of Chinese calligraphyrdquoIEEE Intelligent Systems vol 27 no 3 pp 63ndash72 2012

[9] L Han Y Sun and W Huang ldquoAn assessment method for inkmarksrdquo in Proceedings of the 4th International Conference onIntelligent Human-Machine Systems and Cybernetics (IHMSCrsquo12) vol 2 pp 256ndash259 Nanchang China August 2012

[10] K Henmi and T Yoshikawa ldquoVirtual lesson and its applicationto virtual calligraphy systemrdquo in Proceedings of the IEEEInternational Conference on Robotics and Automation vol 2 pp1275ndash1280 Leuven Belgium 1998

[11] J Shin T Okuyama and K Yun ldquoSensory calligraphy learningsystem using Yongzi-Bafardquo in Proceedings of the 8th Interna-tional Forum on Strategic Technology (IFOST rsquo13) vol 2 pp 128ndash131 IEEE Ulaanbaatar Mongolia July 2013

[12] F Cao Z Wu P Xu M Zhou and X Ao ldquoA learning system ofQi Gong calligraphyrdquo in Proceedings of the 14th Global ChineseConference on Computers in Education (GCCCE rsquo10) SingaporeJune 2010

[13] ZWuH Jiao andGDai ldquoAn algorithmof approximating line-segment and circular arcs and its application in vectorizationof engineering drawingsrdquo Journal of Computer Aided Design ampComputer Graphics vol 10 no 4 pp 328ndash332 1998

[14] P J Besl and N D McKay ldquoMethod for registration of 3-Dshapesrdquo in Sensor Fusion IV Control Paradigms and Data Struc-tures vol 1611 of Proceedings of SPIE pp 586ndash606 InternationalSociety for Optics and Photonics Boston Mass USA April1992

[15] D Chetverikov D Svirko D Stepanov and P Krsek ldquoThetrimmed iterative closest point algorithmrdquo in Proceedings of the16th International Conference on Pattern Recognition vol 3 pp545ndash548 2002

[16] R Bergevin M Soucy H Qagnon and D LaurendeauldquoTowards a general multi-view registration techniquerdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol18 no 5 pp 540ndash547 1996

[17] S Rusinkiewicz and M Levoy ldquoEfficient variants of the ICPalgorithmrdquo in Proceedings of the IEEE 3rd International Confer-ence on 3-D Digital Imaging and Modeling pp 145ndash152 2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

4 Mathematical Problems in Engineering

Figure 3 The first stroke of ldquo她rdquo represented by DBSC

Figure 4 Vectorized Qi Gong calligraphy database

begins When the pressure turns back to zero system consid-ers the stroke finishes Positions of virtual pen form the strokeskeleton pressures represent stroke radii Hence track andshape information of every stroke namely the skeleton andradii as well as the total stroke number of userrsquos handwritingcan be recorded

Since our calligraphy database contains the total strokenumber information of all characters when user finishesinput the search space can then be reduced into a subspace inwhich the characters have the same total stroke number withuserrsquos handwriting And the next reducing step will be takenbased on this subspace

42 Reducing the Search Space according to Angular Differencebetween Adjacent Strokes Every stroke in a character hasa direction namely the correct writing direction So thereexists an angle relation between two strokes which areadjacent in writing order we name this relation ldquoangulardifferencerdquo No matter what kind of size or position thecharacter has or even if the character is written askew theangular differences between adjacent strokes will still bealmost invariable So according to the similarities betweenuserrsquos handwriting and standardQiGong calligraphy in termsof angular difference we can exclude a large number ofcharacters or even recognize what user writes thus reducingthe search space

Figure 5 Optimal approximating line of a stroke

But the actual situation of strokes is much more com-plicated The direction of a stroke is not constant it maychange slightly or greatly A most typical example is ldquozherdquo Itcan be horizontal in the beginning and then become verticalfrom the middle and it can also be vertical in the beginningand then become horizontal from the middle In the formersituation we call it ldquoheng zhe ()rdquo and in the latter wecall it ldquoshu zhe ()rdquo So in order to avoid the directiondeviation caused by large and small angular variation we willdistinguish the strokersquos classification in our approach

The reducing process of the search space in this phasemainly includes four steps Firstly a curve fitting algorithmis used to obtain the line segment that can approximatethe stroke in maximum Secondly strokes are classified intostraight or curving according to the approximating distanceThirdly the fitting lines are used to represent strokes andcalculate angular differences Finally a weighted algorithm isused to calculate similarities between userrsquos handwriting andstandard Qi Gong characters according to stroke classifica-tions and angular differences hence we can find out the topseveral most similar characters

421 Optimal Approximating Line Segment of Strokes Weuse a least square method based curve fitting algorithm [13]to obtain the optimal approximating line segment of eachstroke

Figure 5 shows a fitting line exampleThe red points in thepicture stand for the equidistant sampling data points of thestroke skeleton and the green line stands for the calculatedoptimal approximating line segment of the stroke

422 Classification of Strokes The fitting line of a strokewhose direction changes greatly such as ldquozherdquo may be quitesimilar to the fitting line of a stroke whose direction isalmost unchanged This situation may bring errors to ourapproach So in order to be more accurate it is necessaryto classify the stroke into straight and curving according tothe approximating distance We use Euclidean distance todistinguish strokes

Let 119897119894be the Euclidean distance from sampling point

119909119894 119910119894 to the optimal approximating line segment 119894 =

1 2 119899 Let 119871 be the length of the approximating segmentThen if (1119871)sum119899

119894=1119897119894lt 120576 we judge the stroke to be straight

otherwise curving Here 120576 is a threshold value

Mathematical Problems in Engineering 5

Table 1 Stroke classification of characters ldquo工rdquo and ldquo口rdquo

Stroke 1 Stroke 2 Stroke 3

Character ldquo工rdquoStraight Straight Straight

Character ldquo口rdquoStraight Curving Straight

Classification comparison Same Different Same

AB

D

C

A998400

B998400

C998400

D998400

Figure 6 Characters ldquo二rdquo and ldquo十rdquo

We denote 119878119888as the stroke classification similarity

between a standard Qi Gong character and userrsquos handwrit-ing Let119898 be total stroke number of a character If there are 119896strokes whose classifications are different then

119878119888=119898 minus 119896

119898 (2)

Now we give an example As shown in Table 1 there aretwo characters whose total stroke numbers are both 3 Wecan see that the strokes of character ldquo工rdquo are all straight butin character ldquo口rdquo the first and third stoke are straight andthe second stroke is curving So there is one stroke whoseclassification is different According to (2) 119878

119888= (3 minus 1)3 =

23

423 Calculation of Angular Differences After figuring outthe approximating line segments we can use them to cal-culate angular differences If the total stroke number of acharacter is 119898 then there will be 119898 minus 1 angular differencesFor convenience the value of angular difference ranges from0 to 120587

Here we use characters ldquo二rdquo and ldquo十rdquo in Figure 5 to showhow to calculate the angular differences Assume 997888997888rarr119860119861 997888997888rarr119862119863 arethe approximating line segments of the two strokes in charac-

ter ldquo二rdquo and997888997888997888rarr

11986010158401198611015840997888997888997888rarr

11986210158401198631015840 are the approximating line segments

of the two strokes in character ldquo十rdquo Segment directions are

the correct writing directions of their corresponding strokesThen the angular differences of ldquo二rdquo and ldquo十rdquo are

arccos(997888997888rarr119860119861 sdot

997888997888rarr119862119863

100381610038161003816100381610038161003816

997888997888rarr119860119861100381610038161003816100381610038161003816

100381610038161003816100381610038161003816

997888997888rarr119862119863100381610038161003816100381610038161003816

)

arccos(997888997888997888rarr

11986010158401198611015840sdot

997888997888997888rarr

11986210158401198631015840

10038161003816100381610038161003816100381610038161003816

997888997888997888rarr

11986010158401198611015840

10038161003816100381610038161003816100381610038161003816

10038161003816100381610038161003816100381610038161003816

997888997888997888rarr

11986210158401198631015840

10038161003816100381610038161003816100381610038161003816

)

(3)

Clearlywe can see that the angular differences of ldquo二rdquo andldquo十rdquo in Figure 6 are quite unlike they differ by almost 90∘ sothey can be judged to be two different characters qualitativelyIn the next part we will give the quantitive evaluation criteria

Let 119875 = 1199011 1199012 119901

119894 119901

119898minus1 be the angular dif-

ference sequence of a standard Qi Gong character and let119876 = 119902

1 1199022 119902

119894 119902

119898minus1 be the sequence of userrsquos

handwriting 119875 here is equivalent to a character template 119901119894

and 119902119894are the angular difference between stroke 119894 and stroke

119894 + 1119898 is the total stroke number and119898 ge 2 Then the meandeviation of the two charactersrsquo angular differences Dev canbe calculated as follows

Dev =sum119898minus1

119894=1

1003816100381610038161003816119901119894 minus 1199021198941003816100381610038161003816

119898 minus 1 (4)

The smaller the Dev is the more similar the charactersare

6 Mathematical Problems in Engineering

424Weighted Similarity Calculation Algorithm Here we settwo threshold values 120585 and 120575 to control the size of searchspace 120585 is used to limit 119896 namely the number of strokeswith different classifications which has been introducedin Section 422 120575 is used to limit Dev namely the meandeviation of the two charactersrsquo angular differences whichhas been introduced in Section 423

We denote 119878119889as the angular difference similarity between

a standard Qi Gong character and userrsquos handwritingThen itcan be figured out according to the following equation

119878119889=120575 minus Dev120575

(5)

If 119896 gt 120585 or Dev gt 120575 we consider that the current twocharacters being compared are not the same thus excludinga number of characters from the search space

If 119896 le 120585 and Dev le 120575 we will calculate a compositiveweighted similarity 119878

119878 = 1199081119878119888+ 1199082119878119889 (6)

Here 1199081and 119908

2are weight parameters 119908

1+ 1199082= 1

Combining (2) (4) (5) and (6) we could get a final detailedsimilarity calculation equation

119878 = 1199081sdot (1 minus

119896

119898) + 119908

2sdot (1 minus

sum119898minus1

119894=1

1003816100381610038161003816119901119894 minus 1199021198941003816100381610038161003816

120575 (119898 minus 1)) (7)

After scanning all the characters in the search space wecan find out the top several characters which have the highest119878 according to the sorting result

5 Character Registration byUsing ICP Algorithm

Iterative closest point (ICP) algorithm [14] is one of the mostcommonly used registration algorithms based on point setto point set The basic steps of this algorithm are [15] tofind out the closest matching point pairs in the two pointsets being processed compute the transformationmatrix thatminimizes the sum of the squares between the paired pointsand then apply the transformation iterate the above two stepsuntil the distance satisfies a given convergence precisionWhen the iteration is stopped we can get the final translationand rotation parametersTherefore we can consider the userrsquoshandwritten character and the standard Qi font charactercandidates selected from the previous preprocessing step aspoint sets and match them via ICP algorithm

Skeleton is an important descriptor for shape matchingand sometimes it performs better than contour or the wholepixel point set of an object What is more computation ofskeleton-based ICP algorithm will be much faster than thecomputation based on whole points of the object Since theQi Gong calligraphy characters in our database are vectorizedby DBSCs the skeletons and shapes are easy to get And as wesaid in Section 41 the skeleton and radii of userrsquos handwrittencharacter are also recorded so in this paper we will use the

skeleton point set to realize ICP registration and find out thebest matching character

51 Scaling of the Standard Qi Gong Character Our ICPregistration is rigid so before applying this algorithm wemust scale the standard character at first and make the twocharacters to be processed have the same size so that we canget a more accurate registration result in the following step

Let 119883119904be the skeleton point set of standard Qi Gong

character and let 119883119906be the skeleton point set of userrsquos

handwritten character Here we take 119883119906as the referenced

point set First the geometric centers 119874119904and 119874

119906of 119883119904and

119883119906are calculated Then the smallest disks which can cover

the whole character are found and the corresponding radiiare denoted by 119903

119904and 119903119906 With 119903

119904and 119903119906 we can scale the

vectorized standard Qi Gong character thus making it havethe same covering disk size with userrsquos handwritten character

52 ICP Registration of Characters

521 ICP Algorithm Registration operation of ICP algo-rithm actuallymeans finding an optimal rigid transformationfrom one coordinate system to another which can minimizethe sum of the squares between two point sets This transfor-mation can be represented by a 3 times 3 rotation matrix 119877 and athree-dimensional translation vector 119879

Let 119875 = 119901119894| 119901119894isin 1198773 119894 = 1 2 119873 and 119876 = 119902

119894|

119902119894isin 1198773 119894 = 1 2 119872 be two point sets to be registrated

Suppose 119901 is an arbitrary point in 119875 and its coordinate valueis (1199091119901 1199101

119901 1199111

119901) After transforming the coordinate value of 119901

is (1199092119901 1199102

119901 1199112

119901) Then

[[[

[

1199092

119901

1199102

119901

1199112

119901

]]]

]

= 119877[[[

[

1199091

119901

1199101

119901

1199111

119901

]]]

]

+ 119879 (8)

So the registration goal is to figure out the transformationof 119877 and 119879 which can minimize the value of the followingfunction

119891 (119877 119879) = min119873

sum

119894=1

10038171003817100381710038171003817119901119894

119896minus (119877119901

119894+ 119879)10038171003817100381710038171003817

2

(9)

where 119896 is iteration times 119901119894

119896 is the closest matching pointof 119901119894 119901119894

119896isin 119876 and 119873 is the total point number of 119875 In

this iteration process 119875 and 119901119894

119896 are not fixed they are alwayschanging After each iteration 119875 and the closest matchingpoint pairs will be updated 119877119901

119894+ 119879119894=12119873

will be the new119875 in next iteration

522 Character Registration Steps In our approach weuse ICP registration algorithm to make standard Qi Gongcharacter and userrsquos handwritten character match best andthe algorithm is carried out in two-dimensional space119883119904and 119883

119906are the two skeleton point sets of standard

Qi Gong character and userrsquos handwritten character andthey have been scaled to the same size after the process in

Mathematical Problems in Engineering 7

q

p

ds

(a) Point to point

q

p

ds

q998400

(b) Point to plane

q

p

ds

OP

OQ

(c) Point to projection

Figure 7 Methods of searching the closest point in ICP

(a) (b) (c) (d)

Figure 8 ICP registration of character ldquo永永永rdquo (a) Skeleton of userrsquos handwritten character (b) skeleton of original standard Qi Gong character(c) transformed skeleton of standard Qi Gong character after ICP registration and (d) overlapping comparison

Section 51 Then the registration steps can be described asfollows

(1) Search all the closest corresponding points of 119883119904in

119883119906

(2) Figure out the rigid transformation which can min-imize the sum of the squares between the pairedpoints above mentioned and then acquire rotationparameter 119877 and translation parameter 119879

(3) Apply 119877 and 119879 to 119883119904and get the transformed point

set(4) If the transformed point set of 119883

119904and the referenced

point set119883119906can satisfy a given convergence precision

of function 119891(119877 119879) in (9) namely the sum of thesquares of the two point sets being less than a giventhreshold value then stop iterating Otherwise set thetransformed point set as the new 119883

119904 and iterate the

above four steps until the function value is acceptable

There are several commonly used methods of searchingthe closest corresponding point pairs in step (1) such as pointto point [14] point to plane [16] and point to projection[17] as shown in Figure 7 Since our registration is basedon skeleton point set we use the point to point searchingmethod Figure 8 is a registration example of our experimentcharacter ldquo永rdquo

6 Comprehensive Evaluation

Skeleton represents the global topological information of acharacter which can reflect the balance and arrangementof all the strokes Local similarity of each stroke is also animportant metric in calligraphy evaluationmechanismWithstroke evaluation score learners could find out about whichstroke they wrote well and which stroke they need to practicefurther more So we compare both the global similarity andthe local similarity in our approach

However skeleton distance is not easy to convert into acertain score based on the percentage grading system Whatis more it has lost the width information So in this paper weuse the whole character shape instead of skeleton to representthe topological feature Similarly we use stroke shape tocalculate stroke similarity Here the shape data is defined asthe pixel distribution information of a character or strokethat is the most direct and easy way to measure the distancebetween two characters or two strokesWith the skeleton andradii of a character and the stroke segmentation data in ourdatabase we can easily get the shape information of eachstroke and the whole character

61 Character Shape Similarity When the registration stepis finished the best matching character will be found thencharacter shape similarity denoted by 119878

1 can be calculated

8 Mathematical Problems in Engineering

according to the overlapping situation of userrsquos handwritingand transformed standard Qi Gong character as follows

1198781=

sum119870

119894=1sum119870

119895=1119883119894119895sdot 119884119894119895

sum119870

119894=1sum119870

119895=1(119883119894119895sdot 119884119894119895+10038161003816100381610038161003816119883119894119895minus 119884119894119895

10038161003816100381610038161003816)

(10)

where 119870 is the length of the smallest square which can coverthe two registrated characters 119883

119894119895is the pixel value of userrsquos

character 119884119894119895is the pixel value of Qi Gong character and we

define

119883119894119895

or 119884119894119895=

1 if pixel (119894 119895) is black

0 if pixel (119894 119895) is white(11)

In (10) numerator represents the total number of pixelsthat both are black namely the overlapping black areadenominator represents the total number of pixels that aredifferent or both black namely the remaining part afterremoving the overlapping white area

62 Stroke Shape Similarity In order to avoid the errorbrought by position and size of the strokes to be comparedwe first normalize their ldquoeffective areardquo to 80 times 80 in pixelsHere the ldquoeffective areardquo of a stroke is calculated as follows

First we find four boundaries of a stroke that is thetop the bottom the left and the right Then this rectangleis turned into a square region according to its longer sideand we make sure that the rectangle is right in the middleof the square This square region is called the effective area ofa stroke Figure 9 shows an example of finding the effectivearea of a stroke

When the effective areas of userrsquos handwritten strokes andstandard Qi Gong strokes are normalized to 80times80 in pixelsthe shape similarity of 119899th stroke denoted by 119878(119899) can becalculated according to the following equation which is quitesimilar to (10)

119878 (119899)

=

sum119870

119894=1sum119870

119895=1119883119894119895 (119899) sdot 119884119894119895 (119899)

sum119870

119894=1sum119870

119895=1(119883119894119895 (119899) sdot 119884119894119895 (119899) +

10038161003816100381610038161003816119883119894119895 (119899) minus 119884119894119895 (119899)

10038161003816100381610038161003816)

(12)

where 1 le 119899 le 119873119873 is the total stroke number of the currentcharacter and 119870 = 80 119883

119894119895(119899) is the pixel value of userrsquos 119899th

stroke 119884119894119895(119899) is the pixel value of 119899th standard stroke

63 Composited Score With character shape similarity 1198781

and stroke shape similarities 119878(119899) we can also compute acomposited single evaluation score Eva

The mean similarity of all strokes is taken as the finalstroke shape similarity denoted by 119878

2

1198782=1

119873

119873

sum

119899=1

119878 (119899) (13)

The maximal values of 1198781and 1198782are both 1 Hence

Eva = (120593 sdot 1198781+ 120596 sdot 119878

2) sdot 100 (14)

where 120593 and 120596 are weight parameters 120593 + 120596 = 1

Top

Right

Bottom

Left

Figure 9 Finding the effective area of a stroke

So far the introduction of the detailed steps of ourevaluation approach has been finished Figure 10 shows thewhole architecture of the approach in this paper

7 Experiment Results and Analysis

71 Validity of the Recognition Algorithm Aiming at findingout the best matching character our character recognitionalgorithm mainly consists of two parts reducing the searchspace and ICP registration namely steps (1) to (5) inFigure 10 We have given one example as shown in Figure 8In order to avoid the Type-I or Type-II error we did severalexperiments by using a sample database containing 30 char-acters of 5 writers to validate the validity and make our algo-rithmmore convincing Table 2 shows the experiment resultWe can see that in this sample database only one character isrecognized as a wrong Qi Gong character User wrote a char-acter ldquo己rdquo (ji) but our algorithm recognized it as ldquo已rdquo (yi)their shape is quite similar The proportion of two characterslike ldquo己rdquo and ldquo已rdquo which not only are very similar in shapebut also have the same total stroke number is quite smallSo this error can be accepted The experiment proves ouralgorithm is effective In these 30 test characters 21 of themare recognized at the stage of reducing the search space beforeICP registration which proves ourmethod is efficient as well

72 Composited Shape Evaluation We take ldquo永rdquo as ourexperiment character ldquo永rdquo is the first character of calligraphyldquoPreface to Orchid Pavilionrdquo (蘭亭序) shown in Figure 1 andTable 3The ICP registration of its skeleton has been shown inFigure 8 and we analyze its shape similarity Likewise othercharacters in calligraphy ldquoPreface to Orchid Pavilionrdquo or ourvector Qi Gong calligraphy database can also be evaluated byour method

In Table 3(a) we can see the userrsquos askew handwrittencharacter (left) the original standard Qi Gong character(middle) and the overlapping comparison after registration(right) Global similarity is calculated According to thissimilarity users could know how well they wrote in termsof structure and shape of this character Table 3(b) showsthe comparison of each stroke with these stroke similaritiesusers can get to know which stroke they wrote well andwhich stroke they need to practice more For example thebest stroke of userrsquos handwriting is the first stroke with

Mathematical Problems in Engineering 9

Table2Ex

perim

ento

ffind

ingtheb

estm

atchingcharacter

12

34

56

78

910

1112

1314

15Userrsquos

hand

writtencharacter

十才

己云

艺车

月去

石白

永西

自问

麦Th

ebestm

atchingQiG

ongcharacter

十才

已云

艺车

月去

石白

永西

自问

麦Truefa

lseT

TF

TT

TT

TT

TT

TT

TT

1617

1819

2021

2223

2425

2627

2829

30Userrsquos

hand

writtencharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Th

ebestm

atchingQiG

ongcharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Truefa

lseT

TT

TT

TT

TT

TT

TT

TT

10 Mathematical Problems in Engineering

Table 3 Experiment of character ldquo永rdquo

(a) Character shape similarity

Userrsquos handwriting Original Qi Gong character Overlapping comparison Similarity

0823234

(b) Stroke shape similarities

Stroke 1 Stroke 2 Stroke 3 Stroke 4 Stroke 5

Userrsquos stroke

TransformedQi GongStroke

Similarity 0906372 0878092 0690590 0710224 0857143(c) Composited evaluation score

1198781

1198782

Eva ()0823234 0808484 8159

Yes

(5)

No

(1)

(2)

(3)

(4)

(6)

(7)

Begin to receive user input

Record stroke information

Stroke input finished

Reducing the search space according to total stroke number and angular differences

Find out the best matching Qi Gong character according to ICP registration based on skeleton

Calculate the character shape similarity and stroke shape similarities between userrsquos handwriting and

ICP-registrated Qi Gong calligraphy

Figure out a composited evaluation score

Evaluation process

Database

Segmented and DBSC vectorizedQi Gong

calligraphy

Figure 10 Architecture of the evaluation approach in this paper

Mathematical Problems in Engineering 11

a similarity of 0906372 and the worst stroke is the thirdstroke with a similarity of 0690590 Table 3(c) gives thecomposited evaluation score which can show the overallquality of userrsquos practice Here the 120593 and 120596 in (14) are bothset as 05 in our experiment

We consulted several calligraphy teachers and asked themto evaluate experiment result They concluded the result isrelatively objective which proves our approach is effectiveand satisfactory

8 Conclusions

This paper presents the establishment of our vectorizedQi Gong calligraphy database and we propose an effectiveevaluation approach by using angular difference relationsICP algorithm and shape features In the proposed approachcharacter shape similarity can reflect the global whole struc-ture and stroke arrangement of the character and strokeshape similarity can reflect the local detail features Theproposed approach is comprehensive and it is able to dealwith the different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiment results show that this approach is feasible andeffective Furthermore it can be extended to other calligraphydatabases

Conflict of Interests

The authors declare no conflict of interests

Acknowledgment

This work is partially supported by National Natural ScienceFoundation of China (no 61170170 and no 61271366)

References

[1] S Strassmann ldquoHairy brushesrdquo ACM SIGGRAPH ComputerGraphics vol 20 no 4 pp 225ndash232 1986

[2] N S H Chu and C-L Tai ldquoReal-time painting with anexpressive virtual Chinese brushrdquo IEEE Computer Graphics andApplications vol 24 no 5 pp 76ndash85 2004

[3] H S Seah Z Wu F Tian X Xiao and B Xie ldquoArtistic brush-stroke representation and animation with disk B-spline curverdquoin Proceedings of the ACM SIGCHI International Conference onAdvances in Computer Entertainment Technology (ACE rsquo05) pp88ndash93 Valencia Spain June 2005

[4] C-C Han C-H Chou and C-S Wu ldquoAn interactive gradingand learning system for chinese calligraphyrdquo Machine Visionand Applications vol 19 no 1 pp 43ndash55 2008

[5] Y Gao L Jin and N Li ldquoChinese handwriting qualityevaluation based on analysis of recognition confidencerdquo inProceedings of the IEEE International Conference on InformationandAutomation (ICIA rsquo11) pp 221ndash225 IEEE Shenzhen ChinaJune 2011

[6] T Shichinohe T Yamabe T Iwata and T Nakajima ldquoAug-mented calligraphy experimental feedback design for writingskill developmentrdquo in Proceedings of the 5th InternationalConference on Tangible Embedded and Embodied Interaction(TEI rsquo11) pp 301ndash302 ACM Funchal Portugal January 2011

[7] A Murata K Inoue and M Moriwaka ldquoReal-time mea-surement system of eye-hand coordination in calligraphyrdquoin Proceedings of the 50th Annual Conference on Society ofInstrument and Control Engineers (SICE rsquo11) pp 2696ndash2701Tokyo Japan September 2011

[8] S Xu H Jiang F C M Lau and Y Pan ldquoComputationallyevaluating and reproducing the beauty of Chinese calligraphyrdquoIEEE Intelligent Systems vol 27 no 3 pp 63ndash72 2012

[9] L Han Y Sun and W Huang ldquoAn assessment method for inkmarksrdquo in Proceedings of the 4th International Conference onIntelligent Human-Machine Systems and Cybernetics (IHMSCrsquo12) vol 2 pp 256ndash259 Nanchang China August 2012

[10] K Henmi and T Yoshikawa ldquoVirtual lesson and its applicationto virtual calligraphy systemrdquo in Proceedings of the IEEEInternational Conference on Robotics and Automation vol 2 pp1275ndash1280 Leuven Belgium 1998

[11] J Shin T Okuyama and K Yun ldquoSensory calligraphy learningsystem using Yongzi-Bafardquo in Proceedings of the 8th Interna-tional Forum on Strategic Technology (IFOST rsquo13) vol 2 pp 128ndash131 IEEE Ulaanbaatar Mongolia July 2013

[12] F Cao Z Wu P Xu M Zhou and X Ao ldquoA learning system ofQi Gong calligraphyrdquo in Proceedings of the 14th Global ChineseConference on Computers in Education (GCCCE rsquo10) SingaporeJune 2010

[13] ZWuH Jiao andGDai ldquoAn algorithmof approximating line-segment and circular arcs and its application in vectorizationof engineering drawingsrdquo Journal of Computer Aided Design ampComputer Graphics vol 10 no 4 pp 328ndash332 1998

[14] P J Besl and N D McKay ldquoMethod for registration of 3-Dshapesrdquo in Sensor Fusion IV Control Paradigms and Data Struc-tures vol 1611 of Proceedings of SPIE pp 586ndash606 InternationalSociety for Optics and Photonics Boston Mass USA April1992

[15] D Chetverikov D Svirko D Stepanov and P Krsek ldquoThetrimmed iterative closest point algorithmrdquo in Proceedings of the16th International Conference on Pattern Recognition vol 3 pp545ndash548 2002

[16] R Bergevin M Soucy H Qagnon and D LaurendeauldquoTowards a general multi-view registration techniquerdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol18 no 5 pp 540ndash547 1996

[17] S Rusinkiewicz and M Levoy ldquoEfficient variants of the ICPalgorithmrdquo in Proceedings of the IEEE 3rd International Confer-ence on 3-D Digital Imaging and Modeling pp 145ndash152 2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Mathematical Problems in Engineering 5

Table 1 Stroke classification of characters ldquo工rdquo and ldquo口rdquo

Stroke 1 Stroke 2 Stroke 3

Character ldquo工rdquoStraight Straight Straight

Character ldquo口rdquoStraight Curving Straight

Classification comparison Same Different Same

AB

D

C

A998400

B998400

C998400

D998400

Figure 6 Characters ldquo二rdquo and ldquo十rdquo

We denote 119878119888as the stroke classification similarity

between a standard Qi Gong character and userrsquos handwrit-ing Let119898 be total stroke number of a character If there are 119896strokes whose classifications are different then

119878119888=119898 minus 119896

119898 (2)

Now we give an example As shown in Table 1 there aretwo characters whose total stroke numbers are both 3 Wecan see that the strokes of character ldquo工rdquo are all straight butin character ldquo口rdquo the first and third stoke are straight andthe second stroke is curving So there is one stroke whoseclassification is different According to (2) 119878

119888= (3 minus 1)3 =

23

423 Calculation of Angular Differences After figuring outthe approximating line segments we can use them to cal-culate angular differences If the total stroke number of acharacter is 119898 then there will be 119898 minus 1 angular differencesFor convenience the value of angular difference ranges from0 to 120587

Here we use characters ldquo二rdquo and ldquo十rdquo in Figure 5 to showhow to calculate the angular differences Assume 997888997888rarr119860119861 997888997888rarr119862119863 arethe approximating line segments of the two strokes in charac-

ter ldquo二rdquo and997888997888997888rarr

11986010158401198611015840997888997888997888rarr

11986210158401198631015840 are the approximating line segments

of the two strokes in character ldquo十rdquo Segment directions are

the correct writing directions of their corresponding strokesThen the angular differences of ldquo二rdquo and ldquo十rdquo are

arccos(997888997888rarr119860119861 sdot

997888997888rarr119862119863

100381610038161003816100381610038161003816

997888997888rarr119860119861100381610038161003816100381610038161003816

100381610038161003816100381610038161003816

997888997888rarr119862119863100381610038161003816100381610038161003816

)

arccos(997888997888997888rarr

11986010158401198611015840sdot

997888997888997888rarr

11986210158401198631015840

10038161003816100381610038161003816100381610038161003816

997888997888997888rarr

11986010158401198611015840

10038161003816100381610038161003816100381610038161003816

10038161003816100381610038161003816100381610038161003816

997888997888997888rarr

11986210158401198631015840

10038161003816100381610038161003816100381610038161003816

)

(3)

Clearlywe can see that the angular differences of ldquo二rdquo andldquo十rdquo in Figure 6 are quite unlike they differ by almost 90∘ sothey can be judged to be two different characters qualitativelyIn the next part we will give the quantitive evaluation criteria

Let 119875 = 1199011 1199012 119901

119894 119901

119898minus1 be the angular dif-

ference sequence of a standard Qi Gong character and let119876 = 119902

1 1199022 119902

119894 119902

119898minus1 be the sequence of userrsquos

handwriting 119875 here is equivalent to a character template 119901119894

and 119902119894are the angular difference between stroke 119894 and stroke

119894 + 1119898 is the total stroke number and119898 ge 2 Then the meandeviation of the two charactersrsquo angular differences Dev canbe calculated as follows

Dev =sum119898minus1

119894=1

1003816100381610038161003816119901119894 minus 1199021198941003816100381610038161003816

119898 minus 1 (4)

The smaller the Dev is the more similar the charactersare

6 Mathematical Problems in Engineering

424Weighted Similarity Calculation Algorithm Here we settwo threshold values 120585 and 120575 to control the size of searchspace 120585 is used to limit 119896 namely the number of strokeswith different classifications which has been introducedin Section 422 120575 is used to limit Dev namely the meandeviation of the two charactersrsquo angular differences whichhas been introduced in Section 423

We denote 119878119889as the angular difference similarity between

a standard Qi Gong character and userrsquos handwritingThen itcan be figured out according to the following equation

119878119889=120575 minus Dev120575

(5)

If 119896 gt 120585 or Dev gt 120575 we consider that the current twocharacters being compared are not the same thus excludinga number of characters from the search space

If 119896 le 120585 and Dev le 120575 we will calculate a compositiveweighted similarity 119878

119878 = 1199081119878119888+ 1199082119878119889 (6)

Here 1199081and 119908

2are weight parameters 119908

1+ 1199082= 1

Combining (2) (4) (5) and (6) we could get a final detailedsimilarity calculation equation

119878 = 1199081sdot (1 minus

119896

119898) + 119908

2sdot (1 minus

sum119898minus1

119894=1

1003816100381610038161003816119901119894 minus 1199021198941003816100381610038161003816

120575 (119898 minus 1)) (7)

After scanning all the characters in the search space wecan find out the top several characters which have the highest119878 according to the sorting result

5 Character Registration byUsing ICP Algorithm

Iterative closest point (ICP) algorithm [14] is one of the mostcommonly used registration algorithms based on point setto point set The basic steps of this algorithm are [15] tofind out the closest matching point pairs in the two pointsets being processed compute the transformationmatrix thatminimizes the sum of the squares between the paired pointsand then apply the transformation iterate the above two stepsuntil the distance satisfies a given convergence precisionWhen the iteration is stopped we can get the final translationand rotation parametersTherefore we can consider the userrsquoshandwritten character and the standard Qi font charactercandidates selected from the previous preprocessing step aspoint sets and match them via ICP algorithm

Skeleton is an important descriptor for shape matchingand sometimes it performs better than contour or the wholepixel point set of an object What is more computation ofskeleton-based ICP algorithm will be much faster than thecomputation based on whole points of the object Since theQi Gong calligraphy characters in our database are vectorizedby DBSCs the skeletons and shapes are easy to get And as wesaid in Section 41 the skeleton and radii of userrsquos handwrittencharacter are also recorded so in this paper we will use the

skeleton point set to realize ICP registration and find out thebest matching character

51 Scaling of the Standard Qi Gong Character Our ICPregistration is rigid so before applying this algorithm wemust scale the standard character at first and make the twocharacters to be processed have the same size so that we canget a more accurate registration result in the following step

Let 119883119904be the skeleton point set of standard Qi Gong

character and let 119883119906be the skeleton point set of userrsquos

handwritten character Here we take 119883119906as the referenced

point set First the geometric centers 119874119904and 119874

119906of 119883119904and

119883119906are calculated Then the smallest disks which can cover

the whole character are found and the corresponding radiiare denoted by 119903

119904and 119903119906 With 119903

119904and 119903119906 we can scale the

vectorized standard Qi Gong character thus making it havethe same covering disk size with userrsquos handwritten character

52 ICP Registration of Characters

521 ICP Algorithm Registration operation of ICP algo-rithm actuallymeans finding an optimal rigid transformationfrom one coordinate system to another which can minimizethe sum of the squares between two point sets This transfor-mation can be represented by a 3 times 3 rotation matrix 119877 and athree-dimensional translation vector 119879

Let 119875 = 119901119894| 119901119894isin 1198773 119894 = 1 2 119873 and 119876 = 119902

119894|

119902119894isin 1198773 119894 = 1 2 119872 be two point sets to be registrated

Suppose 119901 is an arbitrary point in 119875 and its coordinate valueis (1199091119901 1199101

119901 1199111

119901) After transforming the coordinate value of 119901

is (1199092119901 1199102

119901 1199112

119901) Then

[[[

[

1199092

119901

1199102

119901

1199112

119901

]]]

]

= 119877[[[

[

1199091

119901

1199101

119901

1199111

119901

]]]

]

+ 119879 (8)

So the registration goal is to figure out the transformationof 119877 and 119879 which can minimize the value of the followingfunction

119891 (119877 119879) = min119873

sum

119894=1

10038171003817100381710038171003817119901119894

119896minus (119877119901

119894+ 119879)10038171003817100381710038171003817

2

(9)

where 119896 is iteration times 119901119894

119896 is the closest matching pointof 119901119894 119901119894

119896isin 119876 and 119873 is the total point number of 119875 In

this iteration process 119875 and 119901119894

119896 are not fixed they are alwayschanging After each iteration 119875 and the closest matchingpoint pairs will be updated 119877119901

119894+ 119879119894=12119873

will be the new119875 in next iteration

522 Character Registration Steps In our approach weuse ICP registration algorithm to make standard Qi Gongcharacter and userrsquos handwritten character match best andthe algorithm is carried out in two-dimensional space119883119904and 119883

119906are the two skeleton point sets of standard

Qi Gong character and userrsquos handwritten character andthey have been scaled to the same size after the process in

Mathematical Problems in Engineering 7

q

p

ds

(a) Point to point

q

p

ds

q998400

(b) Point to plane

q

p

ds

OP

OQ

(c) Point to projection

Figure 7 Methods of searching the closest point in ICP

(a) (b) (c) (d)

Figure 8 ICP registration of character ldquo永永永rdquo (a) Skeleton of userrsquos handwritten character (b) skeleton of original standard Qi Gong character(c) transformed skeleton of standard Qi Gong character after ICP registration and (d) overlapping comparison

Section 51 Then the registration steps can be described asfollows

(1) Search all the closest corresponding points of 119883119904in

119883119906

(2) Figure out the rigid transformation which can min-imize the sum of the squares between the pairedpoints above mentioned and then acquire rotationparameter 119877 and translation parameter 119879

(3) Apply 119877 and 119879 to 119883119904and get the transformed point

set(4) If the transformed point set of 119883

119904and the referenced

point set119883119906can satisfy a given convergence precision

of function 119891(119877 119879) in (9) namely the sum of thesquares of the two point sets being less than a giventhreshold value then stop iterating Otherwise set thetransformed point set as the new 119883

119904 and iterate the

above four steps until the function value is acceptable

There are several commonly used methods of searchingthe closest corresponding point pairs in step (1) such as pointto point [14] point to plane [16] and point to projection[17] as shown in Figure 7 Since our registration is basedon skeleton point set we use the point to point searchingmethod Figure 8 is a registration example of our experimentcharacter ldquo永rdquo

6 Comprehensive Evaluation

Skeleton represents the global topological information of acharacter which can reflect the balance and arrangementof all the strokes Local similarity of each stroke is also animportant metric in calligraphy evaluationmechanismWithstroke evaluation score learners could find out about whichstroke they wrote well and which stroke they need to practicefurther more So we compare both the global similarity andthe local similarity in our approach

However skeleton distance is not easy to convert into acertain score based on the percentage grading system Whatis more it has lost the width information So in this paper weuse the whole character shape instead of skeleton to representthe topological feature Similarly we use stroke shape tocalculate stroke similarity Here the shape data is defined asthe pixel distribution information of a character or strokethat is the most direct and easy way to measure the distancebetween two characters or two strokesWith the skeleton andradii of a character and the stroke segmentation data in ourdatabase we can easily get the shape information of eachstroke and the whole character

61 Character Shape Similarity When the registration stepis finished the best matching character will be found thencharacter shape similarity denoted by 119878

1 can be calculated

8 Mathematical Problems in Engineering

according to the overlapping situation of userrsquos handwritingand transformed standard Qi Gong character as follows

1198781=

sum119870

119894=1sum119870

119895=1119883119894119895sdot 119884119894119895

sum119870

119894=1sum119870

119895=1(119883119894119895sdot 119884119894119895+10038161003816100381610038161003816119883119894119895minus 119884119894119895

10038161003816100381610038161003816)

(10)

where 119870 is the length of the smallest square which can coverthe two registrated characters 119883

119894119895is the pixel value of userrsquos

character 119884119894119895is the pixel value of Qi Gong character and we

define

119883119894119895

or 119884119894119895=

1 if pixel (119894 119895) is black

0 if pixel (119894 119895) is white(11)

In (10) numerator represents the total number of pixelsthat both are black namely the overlapping black areadenominator represents the total number of pixels that aredifferent or both black namely the remaining part afterremoving the overlapping white area

62 Stroke Shape Similarity In order to avoid the errorbrought by position and size of the strokes to be comparedwe first normalize their ldquoeffective areardquo to 80 times 80 in pixelsHere the ldquoeffective areardquo of a stroke is calculated as follows

First we find four boundaries of a stroke that is thetop the bottom the left and the right Then this rectangleis turned into a square region according to its longer sideand we make sure that the rectangle is right in the middleof the square This square region is called the effective area ofa stroke Figure 9 shows an example of finding the effectivearea of a stroke

When the effective areas of userrsquos handwritten strokes andstandard Qi Gong strokes are normalized to 80times80 in pixelsthe shape similarity of 119899th stroke denoted by 119878(119899) can becalculated according to the following equation which is quitesimilar to (10)

119878 (119899)

=

sum119870

119894=1sum119870

119895=1119883119894119895 (119899) sdot 119884119894119895 (119899)

sum119870

119894=1sum119870

119895=1(119883119894119895 (119899) sdot 119884119894119895 (119899) +

10038161003816100381610038161003816119883119894119895 (119899) minus 119884119894119895 (119899)

10038161003816100381610038161003816)

(12)

where 1 le 119899 le 119873119873 is the total stroke number of the currentcharacter and 119870 = 80 119883

119894119895(119899) is the pixel value of userrsquos 119899th

stroke 119884119894119895(119899) is the pixel value of 119899th standard stroke

63 Composited Score With character shape similarity 1198781

and stroke shape similarities 119878(119899) we can also compute acomposited single evaluation score Eva

The mean similarity of all strokes is taken as the finalstroke shape similarity denoted by 119878

2

1198782=1

119873

119873

sum

119899=1

119878 (119899) (13)

The maximal values of 1198781and 1198782are both 1 Hence

Eva = (120593 sdot 1198781+ 120596 sdot 119878

2) sdot 100 (14)

where 120593 and 120596 are weight parameters 120593 + 120596 = 1

Top

Right

Bottom

Left

Figure 9 Finding the effective area of a stroke

So far the introduction of the detailed steps of ourevaluation approach has been finished Figure 10 shows thewhole architecture of the approach in this paper

7 Experiment Results and Analysis

71 Validity of the Recognition Algorithm Aiming at findingout the best matching character our character recognitionalgorithm mainly consists of two parts reducing the searchspace and ICP registration namely steps (1) to (5) inFigure 10 We have given one example as shown in Figure 8In order to avoid the Type-I or Type-II error we did severalexperiments by using a sample database containing 30 char-acters of 5 writers to validate the validity and make our algo-rithmmore convincing Table 2 shows the experiment resultWe can see that in this sample database only one character isrecognized as a wrong Qi Gong character User wrote a char-acter ldquo己rdquo (ji) but our algorithm recognized it as ldquo已rdquo (yi)their shape is quite similar The proportion of two characterslike ldquo己rdquo and ldquo已rdquo which not only are very similar in shapebut also have the same total stroke number is quite smallSo this error can be accepted The experiment proves ouralgorithm is effective In these 30 test characters 21 of themare recognized at the stage of reducing the search space beforeICP registration which proves ourmethod is efficient as well

72 Composited Shape Evaluation We take ldquo永rdquo as ourexperiment character ldquo永rdquo is the first character of calligraphyldquoPreface to Orchid Pavilionrdquo (蘭亭序) shown in Figure 1 andTable 3The ICP registration of its skeleton has been shown inFigure 8 and we analyze its shape similarity Likewise othercharacters in calligraphy ldquoPreface to Orchid Pavilionrdquo or ourvector Qi Gong calligraphy database can also be evaluated byour method

In Table 3(a) we can see the userrsquos askew handwrittencharacter (left) the original standard Qi Gong character(middle) and the overlapping comparison after registration(right) Global similarity is calculated According to thissimilarity users could know how well they wrote in termsof structure and shape of this character Table 3(b) showsthe comparison of each stroke with these stroke similaritiesusers can get to know which stroke they wrote well andwhich stroke they need to practice more For example thebest stroke of userrsquos handwriting is the first stroke with

Mathematical Problems in Engineering 9

Table2Ex

perim

ento

ffind

ingtheb

estm

atchingcharacter

12

34

56

78

910

1112

1314

15Userrsquos

hand

writtencharacter

十才

己云

艺车

月去

石白

永西

自问

麦Th

ebestm

atchingQiG

ongcharacter

十才

已云

艺车

月去

石白

永西

自问

麦Truefa

lseT

TF

TT

TT

TT

TT

TT

TT

1617

1819

2021

2223

2425

2627

2829

30Userrsquos

hand

writtencharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Th

ebestm

atchingQiG

ongcharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Truefa

lseT

TT

TT

TT

TT

TT

TT

TT

10 Mathematical Problems in Engineering

Table 3 Experiment of character ldquo永rdquo

(a) Character shape similarity

Userrsquos handwriting Original Qi Gong character Overlapping comparison Similarity

0823234

(b) Stroke shape similarities

Stroke 1 Stroke 2 Stroke 3 Stroke 4 Stroke 5

Userrsquos stroke

TransformedQi GongStroke

Similarity 0906372 0878092 0690590 0710224 0857143(c) Composited evaluation score

1198781

1198782

Eva ()0823234 0808484 8159

Yes

(5)

No

(1)

(2)

(3)

(4)

(6)

(7)

Begin to receive user input

Record stroke information

Stroke input finished

Reducing the search space according to total stroke number and angular differences

Find out the best matching Qi Gong character according to ICP registration based on skeleton

Calculate the character shape similarity and stroke shape similarities between userrsquos handwriting and

ICP-registrated Qi Gong calligraphy

Figure out a composited evaluation score

Evaluation process

Database

Segmented and DBSC vectorizedQi Gong

calligraphy

Figure 10 Architecture of the evaluation approach in this paper

Mathematical Problems in Engineering 11

a similarity of 0906372 and the worst stroke is the thirdstroke with a similarity of 0690590 Table 3(c) gives thecomposited evaluation score which can show the overallquality of userrsquos practice Here the 120593 and 120596 in (14) are bothset as 05 in our experiment

We consulted several calligraphy teachers and asked themto evaluate experiment result They concluded the result isrelatively objective which proves our approach is effectiveand satisfactory

8 Conclusions

This paper presents the establishment of our vectorizedQi Gong calligraphy database and we propose an effectiveevaluation approach by using angular difference relationsICP algorithm and shape features In the proposed approachcharacter shape similarity can reflect the global whole struc-ture and stroke arrangement of the character and strokeshape similarity can reflect the local detail features Theproposed approach is comprehensive and it is able to dealwith the different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiment results show that this approach is feasible andeffective Furthermore it can be extended to other calligraphydatabases

Conflict of Interests

The authors declare no conflict of interests

Acknowledgment

This work is partially supported by National Natural ScienceFoundation of China (no 61170170 and no 61271366)

References

[1] S Strassmann ldquoHairy brushesrdquo ACM SIGGRAPH ComputerGraphics vol 20 no 4 pp 225ndash232 1986

[2] N S H Chu and C-L Tai ldquoReal-time painting with anexpressive virtual Chinese brushrdquo IEEE Computer Graphics andApplications vol 24 no 5 pp 76ndash85 2004

[3] H S Seah Z Wu F Tian X Xiao and B Xie ldquoArtistic brush-stroke representation and animation with disk B-spline curverdquoin Proceedings of the ACM SIGCHI International Conference onAdvances in Computer Entertainment Technology (ACE rsquo05) pp88ndash93 Valencia Spain June 2005

[4] C-C Han C-H Chou and C-S Wu ldquoAn interactive gradingand learning system for chinese calligraphyrdquo Machine Visionand Applications vol 19 no 1 pp 43ndash55 2008

[5] Y Gao L Jin and N Li ldquoChinese handwriting qualityevaluation based on analysis of recognition confidencerdquo inProceedings of the IEEE International Conference on InformationandAutomation (ICIA rsquo11) pp 221ndash225 IEEE Shenzhen ChinaJune 2011

[6] T Shichinohe T Yamabe T Iwata and T Nakajima ldquoAug-mented calligraphy experimental feedback design for writingskill developmentrdquo in Proceedings of the 5th InternationalConference on Tangible Embedded and Embodied Interaction(TEI rsquo11) pp 301ndash302 ACM Funchal Portugal January 2011

[7] A Murata K Inoue and M Moriwaka ldquoReal-time mea-surement system of eye-hand coordination in calligraphyrdquoin Proceedings of the 50th Annual Conference on Society ofInstrument and Control Engineers (SICE rsquo11) pp 2696ndash2701Tokyo Japan September 2011

[8] S Xu H Jiang F C M Lau and Y Pan ldquoComputationallyevaluating and reproducing the beauty of Chinese calligraphyrdquoIEEE Intelligent Systems vol 27 no 3 pp 63ndash72 2012

[9] L Han Y Sun and W Huang ldquoAn assessment method for inkmarksrdquo in Proceedings of the 4th International Conference onIntelligent Human-Machine Systems and Cybernetics (IHMSCrsquo12) vol 2 pp 256ndash259 Nanchang China August 2012

[10] K Henmi and T Yoshikawa ldquoVirtual lesson and its applicationto virtual calligraphy systemrdquo in Proceedings of the IEEEInternational Conference on Robotics and Automation vol 2 pp1275ndash1280 Leuven Belgium 1998

[11] J Shin T Okuyama and K Yun ldquoSensory calligraphy learningsystem using Yongzi-Bafardquo in Proceedings of the 8th Interna-tional Forum on Strategic Technology (IFOST rsquo13) vol 2 pp 128ndash131 IEEE Ulaanbaatar Mongolia July 2013

[12] F Cao Z Wu P Xu M Zhou and X Ao ldquoA learning system ofQi Gong calligraphyrdquo in Proceedings of the 14th Global ChineseConference on Computers in Education (GCCCE rsquo10) SingaporeJune 2010

[13] ZWuH Jiao andGDai ldquoAn algorithmof approximating line-segment and circular arcs and its application in vectorizationof engineering drawingsrdquo Journal of Computer Aided Design ampComputer Graphics vol 10 no 4 pp 328ndash332 1998

[14] P J Besl and N D McKay ldquoMethod for registration of 3-Dshapesrdquo in Sensor Fusion IV Control Paradigms and Data Struc-tures vol 1611 of Proceedings of SPIE pp 586ndash606 InternationalSociety for Optics and Photonics Boston Mass USA April1992

[15] D Chetverikov D Svirko D Stepanov and P Krsek ldquoThetrimmed iterative closest point algorithmrdquo in Proceedings of the16th International Conference on Pattern Recognition vol 3 pp545ndash548 2002

[16] R Bergevin M Soucy H Qagnon and D LaurendeauldquoTowards a general multi-view registration techniquerdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol18 no 5 pp 540ndash547 1996

[17] S Rusinkiewicz and M Levoy ldquoEfficient variants of the ICPalgorithmrdquo in Proceedings of the IEEE 3rd International Confer-ence on 3-D Digital Imaging and Modeling pp 145ndash152 2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

6 Mathematical Problems in Engineering

424Weighted Similarity Calculation Algorithm Here we settwo threshold values 120585 and 120575 to control the size of searchspace 120585 is used to limit 119896 namely the number of strokeswith different classifications which has been introducedin Section 422 120575 is used to limit Dev namely the meandeviation of the two charactersrsquo angular differences whichhas been introduced in Section 423

We denote 119878119889as the angular difference similarity between

a standard Qi Gong character and userrsquos handwritingThen itcan be figured out according to the following equation

119878119889=120575 minus Dev120575

(5)

If 119896 gt 120585 or Dev gt 120575 we consider that the current twocharacters being compared are not the same thus excludinga number of characters from the search space

If 119896 le 120585 and Dev le 120575 we will calculate a compositiveweighted similarity 119878

119878 = 1199081119878119888+ 1199082119878119889 (6)

Here 1199081and 119908

2are weight parameters 119908

1+ 1199082= 1

Combining (2) (4) (5) and (6) we could get a final detailedsimilarity calculation equation

119878 = 1199081sdot (1 minus

119896

119898) + 119908

2sdot (1 minus

sum119898minus1

119894=1

1003816100381610038161003816119901119894 minus 1199021198941003816100381610038161003816

120575 (119898 minus 1)) (7)

After scanning all the characters in the search space wecan find out the top several characters which have the highest119878 according to the sorting result

5 Character Registration byUsing ICP Algorithm

Iterative closest point (ICP) algorithm [14] is one of the mostcommonly used registration algorithms based on point setto point set The basic steps of this algorithm are [15] tofind out the closest matching point pairs in the two pointsets being processed compute the transformationmatrix thatminimizes the sum of the squares between the paired pointsand then apply the transformation iterate the above two stepsuntil the distance satisfies a given convergence precisionWhen the iteration is stopped we can get the final translationand rotation parametersTherefore we can consider the userrsquoshandwritten character and the standard Qi font charactercandidates selected from the previous preprocessing step aspoint sets and match them via ICP algorithm

Skeleton is an important descriptor for shape matchingand sometimes it performs better than contour or the wholepixel point set of an object What is more computation ofskeleton-based ICP algorithm will be much faster than thecomputation based on whole points of the object Since theQi Gong calligraphy characters in our database are vectorizedby DBSCs the skeletons and shapes are easy to get And as wesaid in Section 41 the skeleton and radii of userrsquos handwrittencharacter are also recorded so in this paper we will use the

skeleton point set to realize ICP registration and find out thebest matching character

51 Scaling of the Standard Qi Gong Character Our ICPregistration is rigid so before applying this algorithm wemust scale the standard character at first and make the twocharacters to be processed have the same size so that we canget a more accurate registration result in the following step

Let 119883119904be the skeleton point set of standard Qi Gong

character and let 119883119906be the skeleton point set of userrsquos

handwritten character Here we take 119883119906as the referenced

point set First the geometric centers 119874119904and 119874

119906of 119883119904and

119883119906are calculated Then the smallest disks which can cover

the whole character are found and the corresponding radiiare denoted by 119903

119904and 119903119906 With 119903

119904and 119903119906 we can scale the

vectorized standard Qi Gong character thus making it havethe same covering disk size with userrsquos handwritten character

52 ICP Registration of Characters

521 ICP Algorithm Registration operation of ICP algo-rithm actuallymeans finding an optimal rigid transformationfrom one coordinate system to another which can minimizethe sum of the squares between two point sets This transfor-mation can be represented by a 3 times 3 rotation matrix 119877 and athree-dimensional translation vector 119879

Let 119875 = 119901119894| 119901119894isin 1198773 119894 = 1 2 119873 and 119876 = 119902

119894|

119902119894isin 1198773 119894 = 1 2 119872 be two point sets to be registrated

Suppose 119901 is an arbitrary point in 119875 and its coordinate valueis (1199091119901 1199101

119901 1199111

119901) After transforming the coordinate value of 119901

is (1199092119901 1199102

119901 1199112

119901) Then

[[[

[

1199092

119901

1199102

119901

1199112

119901

]]]

]

= 119877[[[

[

1199091

119901

1199101

119901

1199111

119901

]]]

]

+ 119879 (8)

So the registration goal is to figure out the transformationof 119877 and 119879 which can minimize the value of the followingfunction

119891 (119877 119879) = min119873

sum

119894=1

10038171003817100381710038171003817119901119894

119896minus (119877119901

119894+ 119879)10038171003817100381710038171003817

2

(9)

where 119896 is iteration times 119901119894

119896 is the closest matching pointof 119901119894 119901119894

119896isin 119876 and 119873 is the total point number of 119875 In

this iteration process 119875 and 119901119894

119896 are not fixed they are alwayschanging After each iteration 119875 and the closest matchingpoint pairs will be updated 119877119901

119894+ 119879119894=12119873

will be the new119875 in next iteration

522 Character Registration Steps In our approach weuse ICP registration algorithm to make standard Qi Gongcharacter and userrsquos handwritten character match best andthe algorithm is carried out in two-dimensional space119883119904and 119883

119906are the two skeleton point sets of standard

Qi Gong character and userrsquos handwritten character andthey have been scaled to the same size after the process in

Mathematical Problems in Engineering 7

q

p

ds

(a) Point to point

q

p

ds

q998400

(b) Point to plane

q

p

ds

OP

OQ

(c) Point to projection

Figure 7 Methods of searching the closest point in ICP

(a) (b) (c) (d)

Figure 8 ICP registration of character ldquo永永永rdquo (a) Skeleton of userrsquos handwritten character (b) skeleton of original standard Qi Gong character(c) transformed skeleton of standard Qi Gong character after ICP registration and (d) overlapping comparison

Section 51 Then the registration steps can be described asfollows

(1) Search all the closest corresponding points of 119883119904in

119883119906

(2) Figure out the rigid transformation which can min-imize the sum of the squares between the pairedpoints above mentioned and then acquire rotationparameter 119877 and translation parameter 119879

(3) Apply 119877 and 119879 to 119883119904and get the transformed point

set(4) If the transformed point set of 119883

119904and the referenced

point set119883119906can satisfy a given convergence precision

of function 119891(119877 119879) in (9) namely the sum of thesquares of the two point sets being less than a giventhreshold value then stop iterating Otherwise set thetransformed point set as the new 119883

119904 and iterate the

above four steps until the function value is acceptable

There are several commonly used methods of searchingthe closest corresponding point pairs in step (1) such as pointto point [14] point to plane [16] and point to projection[17] as shown in Figure 7 Since our registration is basedon skeleton point set we use the point to point searchingmethod Figure 8 is a registration example of our experimentcharacter ldquo永rdquo

6 Comprehensive Evaluation

Skeleton represents the global topological information of acharacter which can reflect the balance and arrangementof all the strokes Local similarity of each stroke is also animportant metric in calligraphy evaluationmechanismWithstroke evaluation score learners could find out about whichstroke they wrote well and which stroke they need to practicefurther more So we compare both the global similarity andthe local similarity in our approach

However skeleton distance is not easy to convert into acertain score based on the percentage grading system Whatis more it has lost the width information So in this paper weuse the whole character shape instead of skeleton to representthe topological feature Similarly we use stroke shape tocalculate stroke similarity Here the shape data is defined asthe pixel distribution information of a character or strokethat is the most direct and easy way to measure the distancebetween two characters or two strokesWith the skeleton andradii of a character and the stroke segmentation data in ourdatabase we can easily get the shape information of eachstroke and the whole character

61 Character Shape Similarity When the registration stepis finished the best matching character will be found thencharacter shape similarity denoted by 119878

1 can be calculated

8 Mathematical Problems in Engineering

according to the overlapping situation of userrsquos handwritingand transformed standard Qi Gong character as follows

1198781=

sum119870

119894=1sum119870

119895=1119883119894119895sdot 119884119894119895

sum119870

119894=1sum119870

119895=1(119883119894119895sdot 119884119894119895+10038161003816100381610038161003816119883119894119895minus 119884119894119895

10038161003816100381610038161003816)

(10)

where 119870 is the length of the smallest square which can coverthe two registrated characters 119883

119894119895is the pixel value of userrsquos

character 119884119894119895is the pixel value of Qi Gong character and we

define

119883119894119895

or 119884119894119895=

1 if pixel (119894 119895) is black

0 if pixel (119894 119895) is white(11)

In (10) numerator represents the total number of pixelsthat both are black namely the overlapping black areadenominator represents the total number of pixels that aredifferent or both black namely the remaining part afterremoving the overlapping white area

62 Stroke Shape Similarity In order to avoid the errorbrought by position and size of the strokes to be comparedwe first normalize their ldquoeffective areardquo to 80 times 80 in pixelsHere the ldquoeffective areardquo of a stroke is calculated as follows

First we find four boundaries of a stroke that is thetop the bottom the left and the right Then this rectangleis turned into a square region according to its longer sideand we make sure that the rectangle is right in the middleof the square This square region is called the effective area ofa stroke Figure 9 shows an example of finding the effectivearea of a stroke

When the effective areas of userrsquos handwritten strokes andstandard Qi Gong strokes are normalized to 80times80 in pixelsthe shape similarity of 119899th stroke denoted by 119878(119899) can becalculated according to the following equation which is quitesimilar to (10)

119878 (119899)

=

sum119870

119894=1sum119870

119895=1119883119894119895 (119899) sdot 119884119894119895 (119899)

sum119870

119894=1sum119870

119895=1(119883119894119895 (119899) sdot 119884119894119895 (119899) +

10038161003816100381610038161003816119883119894119895 (119899) minus 119884119894119895 (119899)

10038161003816100381610038161003816)

(12)

where 1 le 119899 le 119873119873 is the total stroke number of the currentcharacter and 119870 = 80 119883

119894119895(119899) is the pixel value of userrsquos 119899th

stroke 119884119894119895(119899) is the pixel value of 119899th standard stroke

63 Composited Score With character shape similarity 1198781

and stroke shape similarities 119878(119899) we can also compute acomposited single evaluation score Eva

The mean similarity of all strokes is taken as the finalstroke shape similarity denoted by 119878

2

1198782=1

119873

119873

sum

119899=1

119878 (119899) (13)

The maximal values of 1198781and 1198782are both 1 Hence

Eva = (120593 sdot 1198781+ 120596 sdot 119878

2) sdot 100 (14)

where 120593 and 120596 are weight parameters 120593 + 120596 = 1

Top

Right

Bottom

Left

Figure 9 Finding the effective area of a stroke

So far the introduction of the detailed steps of ourevaluation approach has been finished Figure 10 shows thewhole architecture of the approach in this paper

7 Experiment Results and Analysis

71 Validity of the Recognition Algorithm Aiming at findingout the best matching character our character recognitionalgorithm mainly consists of two parts reducing the searchspace and ICP registration namely steps (1) to (5) inFigure 10 We have given one example as shown in Figure 8In order to avoid the Type-I or Type-II error we did severalexperiments by using a sample database containing 30 char-acters of 5 writers to validate the validity and make our algo-rithmmore convincing Table 2 shows the experiment resultWe can see that in this sample database only one character isrecognized as a wrong Qi Gong character User wrote a char-acter ldquo己rdquo (ji) but our algorithm recognized it as ldquo已rdquo (yi)their shape is quite similar The proportion of two characterslike ldquo己rdquo and ldquo已rdquo which not only are very similar in shapebut also have the same total stroke number is quite smallSo this error can be accepted The experiment proves ouralgorithm is effective In these 30 test characters 21 of themare recognized at the stage of reducing the search space beforeICP registration which proves ourmethod is efficient as well

72 Composited Shape Evaluation We take ldquo永rdquo as ourexperiment character ldquo永rdquo is the first character of calligraphyldquoPreface to Orchid Pavilionrdquo (蘭亭序) shown in Figure 1 andTable 3The ICP registration of its skeleton has been shown inFigure 8 and we analyze its shape similarity Likewise othercharacters in calligraphy ldquoPreface to Orchid Pavilionrdquo or ourvector Qi Gong calligraphy database can also be evaluated byour method

In Table 3(a) we can see the userrsquos askew handwrittencharacter (left) the original standard Qi Gong character(middle) and the overlapping comparison after registration(right) Global similarity is calculated According to thissimilarity users could know how well they wrote in termsof structure and shape of this character Table 3(b) showsthe comparison of each stroke with these stroke similaritiesusers can get to know which stroke they wrote well andwhich stroke they need to practice more For example thebest stroke of userrsquos handwriting is the first stroke with

Mathematical Problems in Engineering 9

Table2Ex

perim

ento

ffind

ingtheb

estm

atchingcharacter

12

34

56

78

910

1112

1314

15Userrsquos

hand

writtencharacter

十才

己云

艺车

月去

石白

永西

自问

麦Th

ebestm

atchingQiG

ongcharacter

十才

已云

艺车

月去

石白

永西

自问

麦Truefa

lseT

TF

TT

TT

TT

TT

TT

TT

1617

1819

2021

2223

2425

2627

2829

30Userrsquos

hand

writtencharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Th

ebestm

atchingQiG

ongcharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Truefa

lseT

TT

TT

TT

TT

TT

TT

TT

10 Mathematical Problems in Engineering

Table 3 Experiment of character ldquo永rdquo

(a) Character shape similarity

Userrsquos handwriting Original Qi Gong character Overlapping comparison Similarity

0823234

(b) Stroke shape similarities

Stroke 1 Stroke 2 Stroke 3 Stroke 4 Stroke 5

Userrsquos stroke

TransformedQi GongStroke

Similarity 0906372 0878092 0690590 0710224 0857143(c) Composited evaluation score

1198781

1198782

Eva ()0823234 0808484 8159

Yes

(5)

No

(1)

(2)

(3)

(4)

(6)

(7)

Begin to receive user input

Record stroke information

Stroke input finished

Reducing the search space according to total stroke number and angular differences

Find out the best matching Qi Gong character according to ICP registration based on skeleton

Calculate the character shape similarity and stroke shape similarities between userrsquos handwriting and

ICP-registrated Qi Gong calligraphy

Figure out a composited evaluation score

Evaluation process

Database

Segmented and DBSC vectorizedQi Gong

calligraphy

Figure 10 Architecture of the evaluation approach in this paper

Mathematical Problems in Engineering 11

a similarity of 0906372 and the worst stroke is the thirdstroke with a similarity of 0690590 Table 3(c) gives thecomposited evaluation score which can show the overallquality of userrsquos practice Here the 120593 and 120596 in (14) are bothset as 05 in our experiment

We consulted several calligraphy teachers and asked themto evaluate experiment result They concluded the result isrelatively objective which proves our approach is effectiveand satisfactory

8 Conclusions

This paper presents the establishment of our vectorizedQi Gong calligraphy database and we propose an effectiveevaluation approach by using angular difference relationsICP algorithm and shape features In the proposed approachcharacter shape similarity can reflect the global whole struc-ture and stroke arrangement of the character and strokeshape similarity can reflect the local detail features Theproposed approach is comprehensive and it is able to dealwith the different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiment results show that this approach is feasible andeffective Furthermore it can be extended to other calligraphydatabases

Conflict of Interests

The authors declare no conflict of interests

Acknowledgment

This work is partially supported by National Natural ScienceFoundation of China (no 61170170 and no 61271366)

References

[1] S Strassmann ldquoHairy brushesrdquo ACM SIGGRAPH ComputerGraphics vol 20 no 4 pp 225ndash232 1986

[2] N S H Chu and C-L Tai ldquoReal-time painting with anexpressive virtual Chinese brushrdquo IEEE Computer Graphics andApplications vol 24 no 5 pp 76ndash85 2004

[3] H S Seah Z Wu F Tian X Xiao and B Xie ldquoArtistic brush-stroke representation and animation with disk B-spline curverdquoin Proceedings of the ACM SIGCHI International Conference onAdvances in Computer Entertainment Technology (ACE rsquo05) pp88ndash93 Valencia Spain June 2005

[4] C-C Han C-H Chou and C-S Wu ldquoAn interactive gradingand learning system for chinese calligraphyrdquo Machine Visionand Applications vol 19 no 1 pp 43ndash55 2008

[5] Y Gao L Jin and N Li ldquoChinese handwriting qualityevaluation based on analysis of recognition confidencerdquo inProceedings of the IEEE International Conference on InformationandAutomation (ICIA rsquo11) pp 221ndash225 IEEE Shenzhen ChinaJune 2011

[6] T Shichinohe T Yamabe T Iwata and T Nakajima ldquoAug-mented calligraphy experimental feedback design for writingskill developmentrdquo in Proceedings of the 5th InternationalConference on Tangible Embedded and Embodied Interaction(TEI rsquo11) pp 301ndash302 ACM Funchal Portugal January 2011

[7] A Murata K Inoue and M Moriwaka ldquoReal-time mea-surement system of eye-hand coordination in calligraphyrdquoin Proceedings of the 50th Annual Conference on Society ofInstrument and Control Engineers (SICE rsquo11) pp 2696ndash2701Tokyo Japan September 2011

[8] S Xu H Jiang F C M Lau and Y Pan ldquoComputationallyevaluating and reproducing the beauty of Chinese calligraphyrdquoIEEE Intelligent Systems vol 27 no 3 pp 63ndash72 2012

[9] L Han Y Sun and W Huang ldquoAn assessment method for inkmarksrdquo in Proceedings of the 4th International Conference onIntelligent Human-Machine Systems and Cybernetics (IHMSCrsquo12) vol 2 pp 256ndash259 Nanchang China August 2012

[10] K Henmi and T Yoshikawa ldquoVirtual lesson and its applicationto virtual calligraphy systemrdquo in Proceedings of the IEEEInternational Conference on Robotics and Automation vol 2 pp1275ndash1280 Leuven Belgium 1998

[11] J Shin T Okuyama and K Yun ldquoSensory calligraphy learningsystem using Yongzi-Bafardquo in Proceedings of the 8th Interna-tional Forum on Strategic Technology (IFOST rsquo13) vol 2 pp 128ndash131 IEEE Ulaanbaatar Mongolia July 2013

[12] F Cao Z Wu P Xu M Zhou and X Ao ldquoA learning system ofQi Gong calligraphyrdquo in Proceedings of the 14th Global ChineseConference on Computers in Education (GCCCE rsquo10) SingaporeJune 2010

[13] ZWuH Jiao andGDai ldquoAn algorithmof approximating line-segment and circular arcs and its application in vectorizationof engineering drawingsrdquo Journal of Computer Aided Design ampComputer Graphics vol 10 no 4 pp 328ndash332 1998

[14] P J Besl and N D McKay ldquoMethod for registration of 3-Dshapesrdquo in Sensor Fusion IV Control Paradigms and Data Struc-tures vol 1611 of Proceedings of SPIE pp 586ndash606 InternationalSociety for Optics and Photonics Boston Mass USA April1992

[15] D Chetverikov D Svirko D Stepanov and P Krsek ldquoThetrimmed iterative closest point algorithmrdquo in Proceedings of the16th International Conference on Pattern Recognition vol 3 pp545ndash548 2002

[16] R Bergevin M Soucy H Qagnon and D LaurendeauldquoTowards a general multi-view registration techniquerdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol18 no 5 pp 540ndash547 1996

[17] S Rusinkiewicz and M Levoy ldquoEfficient variants of the ICPalgorithmrdquo in Proceedings of the IEEE 3rd International Confer-ence on 3-D Digital Imaging and Modeling pp 145ndash152 2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Mathematical Problems in Engineering 7

q

p

ds

(a) Point to point

q

p

ds

q998400

(b) Point to plane

q

p

ds

OP

OQ

(c) Point to projection

Figure 7 Methods of searching the closest point in ICP

(a) (b) (c) (d)

Figure 8 ICP registration of character ldquo永永永rdquo (a) Skeleton of userrsquos handwritten character (b) skeleton of original standard Qi Gong character(c) transformed skeleton of standard Qi Gong character after ICP registration and (d) overlapping comparison

Section 51 Then the registration steps can be described asfollows

(1) Search all the closest corresponding points of 119883119904in

119883119906

(2) Figure out the rigid transformation which can min-imize the sum of the squares between the pairedpoints above mentioned and then acquire rotationparameter 119877 and translation parameter 119879

(3) Apply 119877 and 119879 to 119883119904and get the transformed point

set(4) If the transformed point set of 119883

119904and the referenced

point set119883119906can satisfy a given convergence precision

of function 119891(119877 119879) in (9) namely the sum of thesquares of the two point sets being less than a giventhreshold value then stop iterating Otherwise set thetransformed point set as the new 119883

119904 and iterate the

above four steps until the function value is acceptable

There are several commonly used methods of searchingthe closest corresponding point pairs in step (1) such as pointto point [14] point to plane [16] and point to projection[17] as shown in Figure 7 Since our registration is basedon skeleton point set we use the point to point searchingmethod Figure 8 is a registration example of our experimentcharacter ldquo永rdquo

6 Comprehensive Evaluation

Skeleton represents the global topological information of acharacter which can reflect the balance and arrangementof all the strokes Local similarity of each stroke is also animportant metric in calligraphy evaluationmechanismWithstroke evaluation score learners could find out about whichstroke they wrote well and which stroke they need to practicefurther more So we compare both the global similarity andthe local similarity in our approach

However skeleton distance is not easy to convert into acertain score based on the percentage grading system Whatis more it has lost the width information So in this paper weuse the whole character shape instead of skeleton to representthe topological feature Similarly we use stroke shape tocalculate stroke similarity Here the shape data is defined asthe pixel distribution information of a character or strokethat is the most direct and easy way to measure the distancebetween two characters or two strokesWith the skeleton andradii of a character and the stroke segmentation data in ourdatabase we can easily get the shape information of eachstroke and the whole character

61 Character Shape Similarity When the registration stepis finished the best matching character will be found thencharacter shape similarity denoted by 119878

1 can be calculated

8 Mathematical Problems in Engineering

according to the overlapping situation of userrsquos handwritingand transformed standard Qi Gong character as follows

1198781=

sum119870

119894=1sum119870

119895=1119883119894119895sdot 119884119894119895

sum119870

119894=1sum119870

119895=1(119883119894119895sdot 119884119894119895+10038161003816100381610038161003816119883119894119895minus 119884119894119895

10038161003816100381610038161003816)

(10)

where 119870 is the length of the smallest square which can coverthe two registrated characters 119883

119894119895is the pixel value of userrsquos

character 119884119894119895is the pixel value of Qi Gong character and we

define

119883119894119895

or 119884119894119895=

1 if pixel (119894 119895) is black

0 if pixel (119894 119895) is white(11)

In (10) numerator represents the total number of pixelsthat both are black namely the overlapping black areadenominator represents the total number of pixels that aredifferent or both black namely the remaining part afterremoving the overlapping white area

62 Stroke Shape Similarity In order to avoid the errorbrought by position and size of the strokes to be comparedwe first normalize their ldquoeffective areardquo to 80 times 80 in pixelsHere the ldquoeffective areardquo of a stroke is calculated as follows

First we find four boundaries of a stroke that is thetop the bottom the left and the right Then this rectangleis turned into a square region according to its longer sideand we make sure that the rectangle is right in the middleof the square This square region is called the effective area ofa stroke Figure 9 shows an example of finding the effectivearea of a stroke

When the effective areas of userrsquos handwritten strokes andstandard Qi Gong strokes are normalized to 80times80 in pixelsthe shape similarity of 119899th stroke denoted by 119878(119899) can becalculated according to the following equation which is quitesimilar to (10)

119878 (119899)

=

sum119870

119894=1sum119870

119895=1119883119894119895 (119899) sdot 119884119894119895 (119899)

sum119870

119894=1sum119870

119895=1(119883119894119895 (119899) sdot 119884119894119895 (119899) +

10038161003816100381610038161003816119883119894119895 (119899) minus 119884119894119895 (119899)

10038161003816100381610038161003816)

(12)

where 1 le 119899 le 119873119873 is the total stroke number of the currentcharacter and 119870 = 80 119883

119894119895(119899) is the pixel value of userrsquos 119899th

stroke 119884119894119895(119899) is the pixel value of 119899th standard stroke

63 Composited Score With character shape similarity 1198781

and stroke shape similarities 119878(119899) we can also compute acomposited single evaluation score Eva

The mean similarity of all strokes is taken as the finalstroke shape similarity denoted by 119878

2

1198782=1

119873

119873

sum

119899=1

119878 (119899) (13)

The maximal values of 1198781and 1198782are both 1 Hence

Eva = (120593 sdot 1198781+ 120596 sdot 119878

2) sdot 100 (14)

where 120593 and 120596 are weight parameters 120593 + 120596 = 1

Top

Right

Bottom

Left

Figure 9 Finding the effective area of a stroke

So far the introduction of the detailed steps of ourevaluation approach has been finished Figure 10 shows thewhole architecture of the approach in this paper

7 Experiment Results and Analysis

71 Validity of the Recognition Algorithm Aiming at findingout the best matching character our character recognitionalgorithm mainly consists of two parts reducing the searchspace and ICP registration namely steps (1) to (5) inFigure 10 We have given one example as shown in Figure 8In order to avoid the Type-I or Type-II error we did severalexperiments by using a sample database containing 30 char-acters of 5 writers to validate the validity and make our algo-rithmmore convincing Table 2 shows the experiment resultWe can see that in this sample database only one character isrecognized as a wrong Qi Gong character User wrote a char-acter ldquo己rdquo (ji) but our algorithm recognized it as ldquo已rdquo (yi)their shape is quite similar The proportion of two characterslike ldquo己rdquo and ldquo已rdquo which not only are very similar in shapebut also have the same total stroke number is quite smallSo this error can be accepted The experiment proves ouralgorithm is effective In these 30 test characters 21 of themare recognized at the stage of reducing the search space beforeICP registration which proves ourmethod is efficient as well

72 Composited Shape Evaluation We take ldquo永rdquo as ourexperiment character ldquo永rdquo is the first character of calligraphyldquoPreface to Orchid Pavilionrdquo (蘭亭序) shown in Figure 1 andTable 3The ICP registration of its skeleton has been shown inFigure 8 and we analyze its shape similarity Likewise othercharacters in calligraphy ldquoPreface to Orchid Pavilionrdquo or ourvector Qi Gong calligraphy database can also be evaluated byour method

In Table 3(a) we can see the userrsquos askew handwrittencharacter (left) the original standard Qi Gong character(middle) and the overlapping comparison after registration(right) Global similarity is calculated According to thissimilarity users could know how well they wrote in termsof structure and shape of this character Table 3(b) showsthe comparison of each stroke with these stroke similaritiesusers can get to know which stroke they wrote well andwhich stroke they need to practice more For example thebest stroke of userrsquos handwriting is the first stroke with

Mathematical Problems in Engineering 9

Table2Ex

perim

ento

ffind

ingtheb

estm

atchingcharacter

12

34

56

78

910

1112

1314

15Userrsquos

hand

writtencharacter

十才

己云

艺车

月去

石白

永西

自问

麦Th

ebestm

atchingQiG

ongcharacter

十才

已云

艺车

月去

石白

永西

自问

麦Truefa

lseT

TF

TT

TT

TT

TT

TT

TT

1617

1819

2021

2223

2425

2627

2829

30Userrsquos

hand

writtencharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Th

ebestm

atchingQiG

ongcharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Truefa

lseT

TT

TT

TT

TT

TT

TT

TT

10 Mathematical Problems in Engineering

Table 3 Experiment of character ldquo永rdquo

(a) Character shape similarity

Userrsquos handwriting Original Qi Gong character Overlapping comparison Similarity

0823234

(b) Stroke shape similarities

Stroke 1 Stroke 2 Stroke 3 Stroke 4 Stroke 5

Userrsquos stroke

TransformedQi GongStroke

Similarity 0906372 0878092 0690590 0710224 0857143(c) Composited evaluation score

1198781

1198782

Eva ()0823234 0808484 8159

Yes

(5)

No

(1)

(2)

(3)

(4)

(6)

(7)

Begin to receive user input

Record stroke information

Stroke input finished

Reducing the search space according to total stroke number and angular differences

Find out the best matching Qi Gong character according to ICP registration based on skeleton

Calculate the character shape similarity and stroke shape similarities between userrsquos handwriting and

ICP-registrated Qi Gong calligraphy

Figure out a composited evaluation score

Evaluation process

Database

Segmented and DBSC vectorizedQi Gong

calligraphy

Figure 10 Architecture of the evaluation approach in this paper

Mathematical Problems in Engineering 11

a similarity of 0906372 and the worst stroke is the thirdstroke with a similarity of 0690590 Table 3(c) gives thecomposited evaluation score which can show the overallquality of userrsquos practice Here the 120593 and 120596 in (14) are bothset as 05 in our experiment

We consulted several calligraphy teachers and asked themto evaluate experiment result They concluded the result isrelatively objective which proves our approach is effectiveand satisfactory

8 Conclusions

This paper presents the establishment of our vectorizedQi Gong calligraphy database and we propose an effectiveevaluation approach by using angular difference relationsICP algorithm and shape features In the proposed approachcharacter shape similarity can reflect the global whole struc-ture and stroke arrangement of the character and strokeshape similarity can reflect the local detail features Theproposed approach is comprehensive and it is able to dealwith the different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiment results show that this approach is feasible andeffective Furthermore it can be extended to other calligraphydatabases

Conflict of Interests

The authors declare no conflict of interests

Acknowledgment

This work is partially supported by National Natural ScienceFoundation of China (no 61170170 and no 61271366)

References

[1] S Strassmann ldquoHairy brushesrdquo ACM SIGGRAPH ComputerGraphics vol 20 no 4 pp 225ndash232 1986

[2] N S H Chu and C-L Tai ldquoReal-time painting with anexpressive virtual Chinese brushrdquo IEEE Computer Graphics andApplications vol 24 no 5 pp 76ndash85 2004

[3] H S Seah Z Wu F Tian X Xiao and B Xie ldquoArtistic brush-stroke representation and animation with disk B-spline curverdquoin Proceedings of the ACM SIGCHI International Conference onAdvances in Computer Entertainment Technology (ACE rsquo05) pp88ndash93 Valencia Spain June 2005

[4] C-C Han C-H Chou and C-S Wu ldquoAn interactive gradingand learning system for chinese calligraphyrdquo Machine Visionand Applications vol 19 no 1 pp 43ndash55 2008

[5] Y Gao L Jin and N Li ldquoChinese handwriting qualityevaluation based on analysis of recognition confidencerdquo inProceedings of the IEEE International Conference on InformationandAutomation (ICIA rsquo11) pp 221ndash225 IEEE Shenzhen ChinaJune 2011

[6] T Shichinohe T Yamabe T Iwata and T Nakajima ldquoAug-mented calligraphy experimental feedback design for writingskill developmentrdquo in Proceedings of the 5th InternationalConference on Tangible Embedded and Embodied Interaction(TEI rsquo11) pp 301ndash302 ACM Funchal Portugal January 2011

[7] A Murata K Inoue and M Moriwaka ldquoReal-time mea-surement system of eye-hand coordination in calligraphyrdquoin Proceedings of the 50th Annual Conference on Society ofInstrument and Control Engineers (SICE rsquo11) pp 2696ndash2701Tokyo Japan September 2011

[8] S Xu H Jiang F C M Lau and Y Pan ldquoComputationallyevaluating and reproducing the beauty of Chinese calligraphyrdquoIEEE Intelligent Systems vol 27 no 3 pp 63ndash72 2012

[9] L Han Y Sun and W Huang ldquoAn assessment method for inkmarksrdquo in Proceedings of the 4th International Conference onIntelligent Human-Machine Systems and Cybernetics (IHMSCrsquo12) vol 2 pp 256ndash259 Nanchang China August 2012

[10] K Henmi and T Yoshikawa ldquoVirtual lesson and its applicationto virtual calligraphy systemrdquo in Proceedings of the IEEEInternational Conference on Robotics and Automation vol 2 pp1275ndash1280 Leuven Belgium 1998

[11] J Shin T Okuyama and K Yun ldquoSensory calligraphy learningsystem using Yongzi-Bafardquo in Proceedings of the 8th Interna-tional Forum on Strategic Technology (IFOST rsquo13) vol 2 pp 128ndash131 IEEE Ulaanbaatar Mongolia July 2013

[12] F Cao Z Wu P Xu M Zhou and X Ao ldquoA learning system ofQi Gong calligraphyrdquo in Proceedings of the 14th Global ChineseConference on Computers in Education (GCCCE rsquo10) SingaporeJune 2010

[13] ZWuH Jiao andGDai ldquoAn algorithmof approximating line-segment and circular arcs and its application in vectorizationof engineering drawingsrdquo Journal of Computer Aided Design ampComputer Graphics vol 10 no 4 pp 328ndash332 1998

[14] P J Besl and N D McKay ldquoMethod for registration of 3-Dshapesrdquo in Sensor Fusion IV Control Paradigms and Data Struc-tures vol 1611 of Proceedings of SPIE pp 586ndash606 InternationalSociety for Optics and Photonics Boston Mass USA April1992

[15] D Chetverikov D Svirko D Stepanov and P Krsek ldquoThetrimmed iterative closest point algorithmrdquo in Proceedings of the16th International Conference on Pattern Recognition vol 3 pp545ndash548 2002

[16] R Bergevin M Soucy H Qagnon and D LaurendeauldquoTowards a general multi-view registration techniquerdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol18 no 5 pp 540ndash547 1996

[17] S Rusinkiewicz and M Levoy ldquoEfficient variants of the ICPalgorithmrdquo in Proceedings of the IEEE 3rd International Confer-ence on 3-D Digital Imaging and Modeling pp 145ndash152 2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

8 Mathematical Problems in Engineering

according to the overlapping situation of userrsquos handwritingand transformed standard Qi Gong character as follows

1198781=

sum119870

119894=1sum119870

119895=1119883119894119895sdot 119884119894119895

sum119870

119894=1sum119870

119895=1(119883119894119895sdot 119884119894119895+10038161003816100381610038161003816119883119894119895minus 119884119894119895

10038161003816100381610038161003816)

(10)

where 119870 is the length of the smallest square which can coverthe two registrated characters 119883

119894119895is the pixel value of userrsquos

character 119884119894119895is the pixel value of Qi Gong character and we

define

119883119894119895

or 119884119894119895=

1 if pixel (119894 119895) is black

0 if pixel (119894 119895) is white(11)

In (10) numerator represents the total number of pixelsthat both are black namely the overlapping black areadenominator represents the total number of pixels that aredifferent or both black namely the remaining part afterremoving the overlapping white area

62 Stroke Shape Similarity In order to avoid the errorbrought by position and size of the strokes to be comparedwe first normalize their ldquoeffective areardquo to 80 times 80 in pixelsHere the ldquoeffective areardquo of a stroke is calculated as follows

First we find four boundaries of a stroke that is thetop the bottom the left and the right Then this rectangleis turned into a square region according to its longer sideand we make sure that the rectangle is right in the middleof the square This square region is called the effective area ofa stroke Figure 9 shows an example of finding the effectivearea of a stroke

When the effective areas of userrsquos handwritten strokes andstandard Qi Gong strokes are normalized to 80times80 in pixelsthe shape similarity of 119899th stroke denoted by 119878(119899) can becalculated according to the following equation which is quitesimilar to (10)

119878 (119899)

=

sum119870

119894=1sum119870

119895=1119883119894119895 (119899) sdot 119884119894119895 (119899)

sum119870

119894=1sum119870

119895=1(119883119894119895 (119899) sdot 119884119894119895 (119899) +

10038161003816100381610038161003816119883119894119895 (119899) minus 119884119894119895 (119899)

10038161003816100381610038161003816)

(12)

where 1 le 119899 le 119873119873 is the total stroke number of the currentcharacter and 119870 = 80 119883

119894119895(119899) is the pixel value of userrsquos 119899th

stroke 119884119894119895(119899) is the pixel value of 119899th standard stroke

63 Composited Score With character shape similarity 1198781

and stroke shape similarities 119878(119899) we can also compute acomposited single evaluation score Eva

The mean similarity of all strokes is taken as the finalstroke shape similarity denoted by 119878

2

1198782=1

119873

119873

sum

119899=1

119878 (119899) (13)

The maximal values of 1198781and 1198782are both 1 Hence

Eva = (120593 sdot 1198781+ 120596 sdot 119878

2) sdot 100 (14)

where 120593 and 120596 are weight parameters 120593 + 120596 = 1

Top

Right

Bottom

Left

Figure 9 Finding the effective area of a stroke

So far the introduction of the detailed steps of ourevaluation approach has been finished Figure 10 shows thewhole architecture of the approach in this paper

7 Experiment Results and Analysis

71 Validity of the Recognition Algorithm Aiming at findingout the best matching character our character recognitionalgorithm mainly consists of two parts reducing the searchspace and ICP registration namely steps (1) to (5) inFigure 10 We have given one example as shown in Figure 8In order to avoid the Type-I or Type-II error we did severalexperiments by using a sample database containing 30 char-acters of 5 writers to validate the validity and make our algo-rithmmore convincing Table 2 shows the experiment resultWe can see that in this sample database only one character isrecognized as a wrong Qi Gong character User wrote a char-acter ldquo己rdquo (ji) but our algorithm recognized it as ldquo已rdquo (yi)their shape is quite similar The proportion of two characterslike ldquo己rdquo and ldquo已rdquo which not only are very similar in shapebut also have the same total stroke number is quite smallSo this error can be accepted The experiment proves ouralgorithm is effective In these 30 test characters 21 of themare recognized at the stage of reducing the search space beforeICP registration which proves ourmethod is efficient as well

72 Composited Shape Evaluation We take ldquo永rdquo as ourexperiment character ldquo永rdquo is the first character of calligraphyldquoPreface to Orchid Pavilionrdquo (蘭亭序) shown in Figure 1 andTable 3The ICP registration of its skeleton has been shown inFigure 8 and we analyze its shape similarity Likewise othercharacters in calligraphy ldquoPreface to Orchid Pavilionrdquo or ourvector Qi Gong calligraphy database can also be evaluated byour method

In Table 3(a) we can see the userrsquos askew handwrittencharacter (left) the original standard Qi Gong character(middle) and the overlapping comparison after registration(right) Global similarity is calculated According to thissimilarity users could know how well they wrote in termsof structure and shape of this character Table 3(b) showsthe comparison of each stroke with these stroke similaritiesusers can get to know which stroke they wrote well andwhich stroke they need to practice more For example thebest stroke of userrsquos handwriting is the first stroke with

Mathematical Problems in Engineering 9

Table2Ex

perim

ento

ffind

ingtheb

estm

atchingcharacter

12

34

56

78

910

1112

1314

15Userrsquos

hand

writtencharacter

十才

己云

艺车

月去

石白

永西

自问

麦Th

ebestm

atchingQiG

ongcharacter

十才

已云

艺车

月去

石白

永西

自问

麦Truefa

lseT

TF

TT

TT

TT

TT

TT

TT

1617

1819

2021

2223

2425

2627

2829

30Userrsquos

hand

writtencharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Th

ebestm

atchingQiG

ongcharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Truefa

lseT

TT

TT

TT

TT

TT

TT

TT

10 Mathematical Problems in Engineering

Table 3 Experiment of character ldquo永rdquo

(a) Character shape similarity

Userrsquos handwriting Original Qi Gong character Overlapping comparison Similarity

0823234

(b) Stroke shape similarities

Stroke 1 Stroke 2 Stroke 3 Stroke 4 Stroke 5

Userrsquos stroke

TransformedQi GongStroke

Similarity 0906372 0878092 0690590 0710224 0857143(c) Composited evaluation score

1198781

1198782

Eva ()0823234 0808484 8159

Yes

(5)

No

(1)

(2)

(3)

(4)

(6)

(7)

Begin to receive user input

Record stroke information

Stroke input finished

Reducing the search space according to total stroke number and angular differences

Find out the best matching Qi Gong character according to ICP registration based on skeleton

Calculate the character shape similarity and stroke shape similarities between userrsquos handwriting and

ICP-registrated Qi Gong calligraphy

Figure out a composited evaluation score

Evaluation process

Database

Segmented and DBSC vectorizedQi Gong

calligraphy

Figure 10 Architecture of the evaluation approach in this paper

Mathematical Problems in Engineering 11

a similarity of 0906372 and the worst stroke is the thirdstroke with a similarity of 0690590 Table 3(c) gives thecomposited evaluation score which can show the overallquality of userrsquos practice Here the 120593 and 120596 in (14) are bothset as 05 in our experiment

We consulted several calligraphy teachers and asked themto evaluate experiment result They concluded the result isrelatively objective which proves our approach is effectiveand satisfactory

8 Conclusions

This paper presents the establishment of our vectorizedQi Gong calligraphy database and we propose an effectiveevaluation approach by using angular difference relationsICP algorithm and shape features In the proposed approachcharacter shape similarity can reflect the global whole struc-ture and stroke arrangement of the character and strokeshape similarity can reflect the local detail features Theproposed approach is comprehensive and it is able to dealwith the different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiment results show that this approach is feasible andeffective Furthermore it can be extended to other calligraphydatabases

Conflict of Interests

The authors declare no conflict of interests

Acknowledgment

This work is partially supported by National Natural ScienceFoundation of China (no 61170170 and no 61271366)

References

[1] S Strassmann ldquoHairy brushesrdquo ACM SIGGRAPH ComputerGraphics vol 20 no 4 pp 225ndash232 1986

[2] N S H Chu and C-L Tai ldquoReal-time painting with anexpressive virtual Chinese brushrdquo IEEE Computer Graphics andApplications vol 24 no 5 pp 76ndash85 2004

[3] H S Seah Z Wu F Tian X Xiao and B Xie ldquoArtistic brush-stroke representation and animation with disk B-spline curverdquoin Proceedings of the ACM SIGCHI International Conference onAdvances in Computer Entertainment Technology (ACE rsquo05) pp88ndash93 Valencia Spain June 2005

[4] C-C Han C-H Chou and C-S Wu ldquoAn interactive gradingand learning system for chinese calligraphyrdquo Machine Visionand Applications vol 19 no 1 pp 43ndash55 2008

[5] Y Gao L Jin and N Li ldquoChinese handwriting qualityevaluation based on analysis of recognition confidencerdquo inProceedings of the IEEE International Conference on InformationandAutomation (ICIA rsquo11) pp 221ndash225 IEEE Shenzhen ChinaJune 2011

[6] T Shichinohe T Yamabe T Iwata and T Nakajima ldquoAug-mented calligraphy experimental feedback design for writingskill developmentrdquo in Proceedings of the 5th InternationalConference on Tangible Embedded and Embodied Interaction(TEI rsquo11) pp 301ndash302 ACM Funchal Portugal January 2011

[7] A Murata K Inoue and M Moriwaka ldquoReal-time mea-surement system of eye-hand coordination in calligraphyrdquoin Proceedings of the 50th Annual Conference on Society ofInstrument and Control Engineers (SICE rsquo11) pp 2696ndash2701Tokyo Japan September 2011

[8] S Xu H Jiang F C M Lau and Y Pan ldquoComputationallyevaluating and reproducing the beauty of Chinese calligraphyrdquoIEEE Intelligent Systems vol 27 no 3 pp 63ndash72 2012

[9] L Han Y Sun and W Huang ldquoAn assessment method for inkmarksrdquo in Proceedings of the 4th International Conference onIntelligent Human-Machine Systems and Cybernetics (IHMSCrsquo12) vol 2 pp 256ndash259 Nanchang China August 2012

[10] K Henmi and T Yoshikawa ldquoVirtual lesson and its applicationto virtual calligraphy systemrdquo in Proceedings of the IEEEInternational Conference on Robotics and Automation vol 2 pp1275ndash1280 Leuven Belgium 1998

[11] J Shin T Okuyama and K Yun ldquoSensory calligraphy learningsystem using Yongzi-Bafardquo in Proceedings of the 8th Interna-tional Forum on Strategic Technology (IFOST rsquo13) vol 2 pp 128ndash131 IEEE Ulaanbaatar Mongolia July 2013

[12] F Cao Z Wu P Xu M Zhou and X Ao ldquoA learning system ofQi Gong calligraphyrdquo in Proceedings of the 14th Global ChineseConference on Computers in Education (GCCCE rsquo10) SingaporeJune 2010

[13] ZWuH Jiao andGDai ldquoAn algorithmof approximating line-segment and circular arcs and its application in vectorizationof engineering drawingsrdquo Journal of Computer Aided Design ampComputer Graphics vol 10 no 4 pp 328ndash332 1998

[14] P J Besl and N D McKay ldquoMethod for registration of 3-Dshapesrdquo in Sensor Fusion IV Control Paradigms and Data Struc-tures vol 1611 of Proceedings of SPIE pp 586ndash606 InternationalSociety for Optics and Photonics Boston Mass USA April1992

[15] D Chetverikov D Svirko D Stepanov and P Krsek ldquoThetrimmed iterative closest point algorithmrdquo in Proceedings of the16th International Conference on Pattern Recognition vol 3 pp545ndash548 2002

[16] R Bergevin M Soucy H Qagnon and D LaurendeauldquoTowards a general multi-view registration techniquerdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol18 no 5 pp 540ndash547 1996

[17] S Rusinkiewicz and M Levoy ldquoEfficient variants of the ICPalgorithmrdquo in Proceedings of the IEEE 3rd International Confer-ence on 3-D Digital Imaging and Modeling pp 145ndash152 2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Mathematical Problems in Engineering 9

Table2Ex

perim

ento

ffind

ingtheb

estm

atchingcharacter

12

34

56

78

910

1112

1314

15Userrsquos

hand

writtencharacter

十才

己云

艺车

月去

石白

永西

自问

麦Th

ebestm

atchingQiG

ongcharacter

十才

已云

艺车

月去

石白

永西

自问

麦Truefa

lseT

TF

TT

TT

TT

TT

TT

TT

1617

1819

2021

2223

2425

2627

2829

30Userrsquos

hand

writtencharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Th

ebestm

atchingQiG

ongcharacter

巫我

言画

贤知

京城

星斋

家都

梦彩

森Truefa

lseT

TT

TT

TT

TT

TT

TT

TT

10 Mathematical Problems in Engineering

Table 3 Experiment of character ldquo永rdquo

(a) Character shape similarity

Userrsquos handwriting Original Qi Gong character Overlapping comparison Similarity

0823234

(b) Stroke shape similarities

Stroke 1 Stroke 2 Stroke 3 Stroke 4 Stroke 5

Userrsquos stroke

TransformedQi GongStroke

Similarity 0906372 0878092 0690590 0710224 0857143(c) Composited evaluation score

1198781

1198782

Eva ()0823234 0808484 8159

Yes

(5)

No

(1)

(2)

(3)

(4)

(6)

(7)

Begin to receive user input

Record stroke information

Stroke input finished

Reducing the search space according to total stroke number and angular differences

Find out the best matching Qi Gong character according to ICP registration based on skeleton

Calculate the character shape similarity and stroke shape similarities between userrsquos handwriting and

ICP-registrated Qi Gong calligraphy

Figure out a composited evaluation score

Evaluation process

Database

Segmented and DBSC vectorizedQi Gong

calligraphy

Figure 10 Architecture of the evaluation approach in this paper

Mathematical Problems in Engineering 11

a similarity of 0906372 and the worst stroke is the thirdstroke with a similarity of 0690590 Table 3(c) gives thecomposited evaluation score which can show the overallquality of userrsquos practice Here the 120593 and 120596 in (14) are bothset as 05 in our experiment

We consulted several calligraphy teachers and asked themto evaluate experiment result They concluded the result isrelatively objective which proves our approach is effectiveand satisfactory

8 Conclusions

This paper presents the establishment of our vectorizedQi Gong calligraphy database and we propose an effectiveevaluation approach by using angular difference relationsICP algorithm and shape features In the proposed approachcharacter shape similarity can reflect the global whole struc-ture and stroke arrangement of the character and strokeshape similarity can reflect the local detail features Theproposed approach is comprehensive and it is able to dealwith the different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiment results show that this approach is feasible andeffective Furthermore it can be extended to other calligraphydatabases

Conflict of Interests

The authors declare no conflict of interests

Acknowledgment

This work is partially supported by National Natural ScienceFoundation of China (no 61170170 and no 61271366)

References

[1] S Strassmann ldquoHairy brushesrdquo ACM SIGGRAPH ComputerGraphics vol 20 no 4 pp 225ndash232 1986

[2] N S H Chu and C-L Tai ldquoReal-time painting with anexpressive virtual Chinese brushrdquo IEEE Computer Graphics andApplications vol 24 no 5 pp 76ndash85 2004

[3] H S Seah Z Wu F Tian X Xiao and B Xie ldquoArtistic brush-stroke representation and animation with disk B-spline curverdquoin Proceedings of the ACM SIGCHI International Conference onAdvances in Computer Entertainment Technology (ACE rsquo05) pp88ndash93 Valencia Spain June 2005

[4] C-C Han C-H Chou and C-S Wu ldquoAn interactive gradingand learning system for chinese calligraphyrdquo Machine Visionand Applications vol 19 no 1 pp 43ndash55 2008

[5] Y Gao L Jin and N Li ldquoChinese handwriting qualityevaluation based on analysis of recognition confidencerdquo inProceedings of the IEEE International Conference on InformationandAutomation (ICIA rsquo11) pp 221ndash225 IEEE Shenzhen ChinaJune 2011

[6] T Shichinohe T Yamabe T Iwata and T Nakajima ldquoAug-mented calligraphy experimental feedback design for writingskill developmentrdquo in Proceedings of the 5th InternationalConference on Tangible Embedded and Embodied Interaction(TEI rsquo11) pp 301ndash302 ACM Funchal Portugal January 2011

[7] A Murata K Inoue and M Moriwaka ldquoReal-time mea-surement system of eye-hand coordination in calligraphyrdquoin Proceedings of the 50th Annual Conference on Society ofInstrument and Control Engineers (SICE rsquo11) pp 2696ndash2701Tokyo Japan September 2011

[8] S Xu H Jiang F C M Lau and Y Pan ldquoComputationallyevaluating and reproducing the beauty of Chinese calligraphyrdquoIEEE Intelligent Systems vol 27 no 3 pp 63ndash72 2012

[9] L Han Y Sun and W Huang ldquoAn assessment method for inkmarksrdquo in Proceedings of the 4th International Conference onIntelligent Human-Machine Systems and Cybernetics (IHMSCrsquo12) vol 2 pp 256ndash259 Nanchang China August 2012

[10] K Henmi and T Yoshikawa ldquoVirtual lesson and its applicationto virtual calligraphy systemrdquo in Proceedings of the IEEEInternational Conference on Robotics and Automation vol 2 pp1275ndash1280 Leuven Belgium 1998

[11] J Shin T Okuyama and K Yun ldquoSensory calligraphy learningsystem using Yongzi-Bafardquo in Proceedings of the 8th Interna-tional Forum on Strategic Technology (IFOST rsquo13) vol 2 pp 128ndash131 IEEE Ulaanbaatar Mongolia July 2013

[12] F Cao Z Wu P Xu M Zhou and X Ao ldquoA learning system ofQi Gong calligraphyrdquo in Proceedings of the 14th Global ChineseConference on Computers in Education (GCCCE rsquo10) SingaporeJune 2010

[13] ZWuH Jiao andGDai ldquoAn algorithmof approximating line-segment and circular arcs and its application in vectorizationof engineering drawingsrdquo Journal of Computer Aided Design ampComputer Graphics vol 10 no 4 pp 328ndash332 1998

[14] P J Besl and N D McKay ldquoMethod for registration of 3-Dshapesrdquo in Sensor Fusion IV Control Paradigms and Data Struc-tures vol 1611 of Proceedings of SPIE pp 586ndash606 InternationalSociety for Optics and Photonics Boston Mass USA April1992

[15] D Chetverikov D Svirko D Stepanov and P Krsek ldquoThetrimmed iterative closest point algorithmrdquo in Proceedings of the16th International Conference on Pattern Recognition vol 3 pp545ndash548 2002

[16] R Bergevin M Soucy H Qagnon and D LaurendeauldquoTowards a general multi-view registration techniquerdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol18 no 5 pp 540ndash547 1996

[17] S Rusinkiewicz and M Levoy ldquoEfficient variants of the ICPalgorithmrdquo in Proceedings of the IEEE 3rd International Confer-ence on 3-D Digital Imaging and Modeling pp 145ndash152 2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

10 Mathematical Problems in Engineering

Table 3 Experiment of character ldquo永rdquo

(a) Character shape similarity

Userrsquos handwriting Original Qi Gong character Overlapping comparison Similarity

0823234

(b) Stroke shape similarities

Stroke 1 Stroke 2 Stroke 3 Stroke 4 Stroke 5

Userrsquos stroke

TransformedQi GongStroke

Similarity 0906372 0878092 0690590 0710224 0857143(c) Composited evaluation score

1198781

1198782

Eva ()0823234 0808484 8159

Yes

(5)

No

(1)

(2)

(3)

(4)

(6)

(7)

Begin to receive user input

Record stroke information

Stroke input finished

Reducing the search space according to total stroke number and angular differences

Find out the best matching Qi Gong character according to ICP registration based on skeleton

Calculate the character shape similarity and stroke shape similarities between userrsquos handwriting and

ICP-registrated Qi Gong calligraphy

Figure out a composited evaluation score

Evaluation process

Database

Segmented and DBSC vectorizedQi Gong

calligraphy

Figure 10 Architecture of the evaluation approach in this paper

Mathematical Problems in Engineering 11

a similarity of 0906372 and the worst stroke is the thirdstroke with a similarity of 0690590 Table 3(c) gives thecomposited evaluation score which can show the overallquality of userrsquos practice Here the 120593 and 120596 in (14) are bothset as 05 in our experiment

We consulted several calligraphy teachers and asked themto evaluate experiment result They concluded the result isrelatively objective which proves our approach is effectiveand satisfactory

8 Conclusions

This paper presents the establishment of our vectorizedQi Gong calligraphy database and we propose an effectiveevaluation approach by using angular difference relationsICP algorithm and shape features In the proposed approachcharacter shape similarity can reflect the global whole struc-ture and stroke arrangement of the character and strokeshape similarity can reflect the local detail features Theproposed approach is comprehensive and it is able to dealwith the different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiment results show that this approach is feasible andeffective Furthermore it can be extended to other calligraphydatabases

Conflict of Interests

The authors declare no conflict of interests

Acknowledgment

This work is partially supported by National Natural ScienceFoundation of China (no 61170170 and no 61271366)

References

[1] S Strassmann ldquoHairy brushesrdquo ACM SIGGRAPH ComputerGraphics vol 20 no 4 pp 225ndash232 1986

[2] N S H Chu and C-L Tai ldquoReal-time painting with anexpressive virtual Chinese brushrdquo IEEE Computer Graphics andApplications vol 24 no 5 pp 76ndash85 2004

[3] H S Seah Z Wu F Tian X Xiao and B Xie ldquoArtistic brush-stroke representation and animation with disk B-spline curverdquoin Proceedings of the ACM SIGCHI International Conference onAdvances in Computer Entertainment Technology (ACE rsquo05) pp88ndash93 Valencia Spain June 2005

[4] C-C Han C-H Chou and C-S Wu ldquoAn interactive gradingand learning system for chinese calligraphyrdquo Machine Visionand Applications vol 19 no 1 pp 43ndash55 2008

[5] Y Gao L Jin and N Li ldquoChinese handwriting qualityevaluation based on analysis of recognition confidencerdquo inProceedings of the IEEE International Conference on InformationandAutomation (ICIA rsquo11) pp 221ndash225 IEEE Shenzhen ChinaJune 2011

[6] T Shichinohe T Yamabe T Iwata and T Nakajima ldquoAug-mented calligraphy experimental feedback design for writingskill developmentrdquo in Proceedings of the 5th InternationalConference on Tangible Embedded and Embodied Interaction(TEI rsquo11) pp 301ndash302 ACM Funchal Portugal January 2011

[7] A Murata K Inoue and M Moriwaka ldquoReal-time mea-surement system of eye-hand coordination in calligraphyrdquoin Proceedings of the 50th Annual Conference on Society ofInstrument and Control Engineers (SICE rsquo11) pp 2696ndash2701Tokyo Japan September 2011

[8] S Xu H Jiang F C M Lau and Y Pan ldquoComputationallyevaluating and reproducing the beauty of Chinese calligraphyrdquoIEEE Intelligent Systems vol 27 no 3 pp 63ndash72 2012

[9] L Han Y Sun and W Huang ldquoAn assessment method for inkmarksrdquo in Proceedings of the 4th International Conference onIntelligent Human-Machine Systems and Cybernetics (IHMSCrsquo12) vol 2 pp 256ndash259 Nanchang China August 2012

[10] K Henmi and T Yoshikawa ldquoVirtual lesson and its applicationto virtual calligraphy systemrdquo in Proceedings of the IEEEInternational Conference on Robotics and Automation vol 2 pp1275ndash1280 Leuven Belgium 1998

[11] J Shin T Okuyama and K Yun ldquoSensory calligraphy learningsystem using Yongzi-Bafardquo in Proceedings of the 8th Interna-tional Forum on Strategic Technology (IFOST rsquo13) vol 2 pp 128ndash131 IEEE Ulaanbaatar Mongolia July 2013

[12] F Cao Z Wu P Xu M Zhou and X Ao ldquoA learning system ofQi Gong calligraphyrdquo in Proceedings of the 14th Global ChineseConference on Computers in Education (GCCCE rsquo10) SingaporeJune 2010

[13] ZWuH Jiao andGDai ldquoAn algorithmof approximating line-segment and circular arcs and its application in vectorizationof engineering drawingsrdquo Journal of Computer Aided Design ampComputer Graphics vol 10 no 4 pp 328ndash332 1998

[14] P J Besl and N D McKay ldquoMethod for registration of 3-Dshapesrdquo in Sensor Fusion IV Control Paradigms and Data Struc-tures vol 1611 of Proceedings of SPIE pp 586ndash606 InternationalSociety for Optics and Photonics Boston Mass USA April1992

[15] D Chetverikov D Svirko D Stepanov and P Krsek ldquoThetrimmed iterative closest point algorithmrdquo in Proceedings of the16th International Conference on Pattern Recognition vol 3 pp545ndash548 2002

[16] R Bergevin M Soucy H Qagnon and D LaurendeauldquoTowards a general multi-view registration techniquerdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol18 no 5 pp 540ndash547 1996

[17] S Rusinkiewicz and M Levoy ldquoEfficient variants of the ICPalgorithmrdquo in Proceedings of the IEEE 3rd International Confer-ence on 3-D Digital Imaging and Modeling pp 145ndash152 2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Mathematical Problems in Engineering 11

a similarity of 0906372 and the worst stroke is the thirdstroke with a similarity of 0690590 Table 3(c) gives thecomposited evaluation score which can show the overallquality of userrsquos practice Here the 120593 and 120596 in (14) are bothset as 05 in our experiment

We consulted several calligraphy teachers and asked themto evaluate experiment result They concluded the result isrelatively objective which proves our approach is effectiveand satisfactory

8 Conclusions

This paper presents the establishment of our vectorizedQi Gong calligraphy database and we propose an effectiveevaluation approach by using angular difference relationsICP algorithm and shape features In the proposed approachcharacter shape similarity can reflect the global whole struc-ture and stroke arrangement of the character and strokeshape similarity can reflect the local detail features Theproposed approach is comprehensive and it is able to dealwith the different situation of position size and tilt of userrsquoshandwritten character without knowing what this characteris Experiment results show that this approach is feasible andeffective Furthermore it can be extended to other calligraphydatabases

Conflict of Interests

The authors declare no conflict of interests

Acknowledgment

This work is partially supported by National Natural ScienceFoundation of China (no 61170170 and no 61271366)

References

[1] S Strassmann ldquoHairy brushesrdquo ACM SIGGRAPH ComputerGraphics vol 20 no 4 pp 225ndash232 1986

[2] N S H Chu and C-L Tai ldquoReal-time painting with anexpressive virtual Chinese brushrdquo IEEE Computer Graphics andApplications vol 24 no 5 pp 76ndash85 2004

[3] H S Seah Z Wu F Tian X Xiao and B Xie ldquoArtistic brush-stroke representation and animation with disk B-spline curverdquoin Proceedings of the ACM SIGCHI International Conference onAdvances in Computer Entertainment Technology (ACE rsquo05) pp88ndash93 Valencia Spain June 2005

[4] C-C Han C-H Chou and C-S Wu ldquoAn interactive gradingand learning system for chinese calligraphyrdquo Machine Visionand Applications vol 19 no 1 pp 43ndash55 2008

[5] Y Gao L Jin and N Li ldquoChinese handwriting qualityevaluation based on analysis of recognition confidencerdquo inProceedings of the IEEE International Conference on InformationandAutomation (ICIA rsquo11) pp 221ndash225 IEEE Shenzhen ChinaJune 2011

[6] T Shichinohe T Yamabe T Iwata and T Nakajima ldquoAug-mented calligraphy experimental feedback design for writingskill developmentrdquo in Proceedings of the 5th InternationalConference on Tangible Embedded and Embodied Interaction(TEI rsquo11) pp 301ndash302 ACM Funchal Portugal January 2011

[7] A Murata K Inoue and M Moriwaka ldquoReal-time mea-surement system of eye-hand coordination in calligraphyrdquoin Proceedings of the 50th Annual Conference on Society ofInstrument and Control Engineers (SICE rsquo11) pp 2696ndash2701Tokyo Japan September 2011

[8] S Xu H Jiang F C M Lau and Y Pan ldquoComputationallyevaluating and reproducing the beauty of Chinese calligraphyrdquoIEEE Intelligent Systems vol 27 no 3 pp 63ndash72 2012

[9] L Han Y Sun and W Huang ldquoAn assessment method for inkmarksrdquo in Proceedings of the 4th International Conference onIntelligent Human-Machine Systems and Cybernetics (IHMSCrsquo12) vol 2 pp 256ndash259 Nanchang China August 2012

[10] K Henmi and T Yoshikawa ldquoVirtual lesson and its applicationto virtual calligraphy systemrdquo in Proceedings of the IEEEInternational Conference on Robotics and Automation vol 2 pp1275ndash1280 Leuven Belgium 1998

[11] J Shin T Okuyama and K Yun ldquoSensory calligraphy learningsystem using Yongzi-Bafardquo in Proceedings of the 8th Interna-tional Forum on Strategic Technology (IFOST rsquo13) vol 2 pp 128ndash131 IEEE Ulaanbaatar Mongolia July 2013

[12] F Cao Z Wu P Xu M Zhou and X Ao ldquoA learning system ofQi Gong calligraphyrdquo in Proceedings of the 14th Global ChineseConference on Computers in Education (GCCCE rsquo10) SingaporeJune 2010

[13] ZWuH Jiao andGDai ldquoAn algorithmof approximating line-segment and circular arcs and its application in vectorizationof engineering drawingsrdquo Journal of Computer Aided Design ampComputer Graphics vol 10 no 4 pp 328ndash332 1998

[14] P J Besl and N D McKay ldquoMethod for registration of 3-Dshapesrdquo in Sensor Fusion IV Control Paradigms and Data Struc-tures vol 1611 of Proceedings of SPIE pp 586ndash606 InternationalSociety for Optics and Photonics Boston Mass USA April1992

[15] D Chetverikov D Svirko D Stepanov and P Krsek ldquoThetrimmed iterative closest point algorithmrdquo in Proceedings of the16th International Conference on Pattern Recognition vol 3 pp545ndash548 2002

[16] R Bergevin M Soucy H Qagnon and D LaurendeauldquoTowards a general multi-view registration techniquerdquo IEEETransactions on Pattern Analysis and Machine Intelligence vol18 no 5 pp 540ndash547 1996

[17] S Rusinkiewicz and M Levoy ldquoEfficient variants of the ICPalgorithmrdquo in Proceedings of the IEEE 3rd International Confer-ence on 3-D Digital Imaging and Modeling pp 145ndash152 2001

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of