CN101697234A - Stroke segmentation modeling-based handwritten Chinese character Lishu beautifying method - Google Patents

Stroke segmentation modeling-based handwritten Chinese character Lishu beautifying method Download PDF

Info

Publication number
CN101697234A
CN101697234A CN200910192676A CN200910192676A CN101697234A CN 101697234 A CN101697234 A CN 101697234A CN 200910192676 A CN200910192676 A CN 200910192676A CN 200910192676 A CN200910192676 A CN 200910192676A CN 101697234 A CN101697234 A CN 101697234A
Authority
CN
China
Prior art keywords
stroke
point
web member
chinese character
lishu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN200910192676A
Other languages
Chinese (zh)
Inventor
金连文
温智宁
夏伟平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China University of Technology SCUT
Original Assignee
South China University of Technology SCUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by South China University of Technology SCUT filed Critical South China University of Technology SCUT
Priority to CN200910192676A priority Critical patent/CN101697234A/en
Publication of CN101697234A publication Critical patent/CN101697234A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a stroke segmentation modeling-based handwritten Chinese character Lishu beautifying method, which comprises the following steps: (1) performing interpolation processing on a handwriting input point sequence of a user to ensure that Chinese characters input by the handwriting of the user are presented as the Chinese characters of which stroke points are continuous; (2) extracting the inflexion point information of strokes and segmenting the strokes according to the inflexion point information; and (3) rendering the strokes of the Chinese characters according to stroke segments and connecting piece models in a model base.

Description

A kind of handwritten Chinese character Lishu beautifying method based on stroke segmentation modeling
Technical field
The invention belongs to the technical field of computer Recognition handwritten Chinese character, particularly relate to a kind of handwritten Chinese character Lishu beautifying method based on stroke segmentation modeling.
Technical background
Beautification of handwritten Chinese characters is meant that generally the user passes through handwriting input device (such as touch-screen, mouse etc.) writing Chinese characters, simultaneous computer is handled the Chinese-character writing track that handwriting input device collects, and makes the Chinese character that finally is presented on the screen have the artistic characteristics of certain writing brush font.The beautification of handwritten Chinese characters technology computing machine development history the inside of decades does not in the past obtain too big development basically.It is the closest that present and Chinese character beautifies the field relation, and the research field of existing algorithm comparative maturity is the computer calligraphy field, and the technology path of computer calligraphy normally carries out coinage according to Chinese character in the standard character library, can not embody user's self writing feature.The beautification of handwritten Chinese characters technology has two essential characteristics: the one, be loyal to writing of user, and the 2nd, the style and features with certain writing brush font.Beautifying method for hand-written Chinese characters commonly used at present has following three kinds:
1, the standard word image is extracted profile or skeleton, by directly applying mechanically or affined transformation is beautified Chinese character;
2, lettering pen (writing brush) structure modeling to the structure and the action effect modeling of writing brush, is expected writing process that is virtually reality like reality and then is reappeared style;
3, adopt the technology of digital ink that stroke is carried out the match modeling.
More than these three kinds of methods all have in various degree defective.
For first method, directly apply mechanically the standard word profile if adopt, its defective is that the stroke style after beautifying is fixed.In fact, the style of various strokes all has a variety of, and as the cross break hook structure, for " habit " word and " plumage " word, first section length ratio is just different.And just bigger with the 4th difference of " plumage " word, be not only the problem of Aspect Ratio, the intersegmental angle of stroke is all inconsistent.If adopt to imitate conversion, its defective is that to beautify the complexity of algorithm too high, because for unknown stroke, can only obtain its length and width scope, if will be further to the angle of inner stroke section calculate angle of chamfer, that is too complex often.
For second method, its defective is the hardware facility that needs more complicated, and as the support of pressure inductor, so this method cost height, applicable surface is narrow.
For the third method, its defective is that to beautify effect too simple, can not simulate gratifying writing brush font effect.This be since the method for digital ink be calculate stroke according to the speed of writing width (at that rate, various strokes all are with a kind of style: two is pluckings, middle thin), and this method does not relate to the linking between the stroke section, only done the simplest stroke match work, so be difficult to reach the gratifying effect of beautifying.
Summary of the invention
The objective of the invention is to overcome the deficiency of above-mentioned beautifying method for hand-written Chinese characters, provide a kind of beautifying method for hand-written Chinese characters of writing but also can demonstrating fully lishu font artistic characteristics of not only being loyal to the user, promptly a kind of handwritten Chinese character Lishu beautifying method based on stroke segmentation modeling.
The technical solution used in the present invention is:
A kind of handwritten Chinese character Lishu beautifying method based on stroke segmentation modeling comprises the steps:
(1), user's handwriting input point sequence is carried out interpolation processing, make the Chinese character of user's handwriting input be rendered as the continuous Chinese character of stroke point;
(2), extract the flex point information of stroke, and according to flex point information stroke segmentation;
(3), according to stroke section in the model bank and web member model Chinese-character stroke is played up.
In the technique scheme, it is the DDA interpolation algorithm that described step (1) is carried out the method that interpolation processing adopted to user's handwriting input point sequence, and its step comprises:
(11), the coordinate of two adjacent points of sequential point sequence be defined as starting point (x1, y1), terminal point (x2 y2), calculates L1=abs (x1-x2), L2=abs (y1-y2), L=max (L1, L2);
(12) if L=0, EOP (end of program) does not need to carry out the DDA interpolation;
(13) if L ≠ 0 makes dx=(x2-x1)/L, dy=(y2-y1)/L;
(14), make point[0] [0]=x1+dx, point[0] [1]=y1+dy, point[0] [0] be the horizontal ordinate of first insertion point, point[0] [1] be the ordinate of first insertion point, makes j=1;
(15), when j<L, DO loop point[j] [0]=point[j-1] [0]+dxpoint[j] [1]=point[j-1] [0]+dy, point[j wherein] [0] be the horizontal ordinate of j-1 insertion point, point[0] [j] be the ordinate of j-1 insertion point, carry out j=j+1 then, next point is inserted in circulation;
(16), when j 〉=L, EOP (end of program), the DDA interpolation is finished.
Described step (2) is extracted the flex point information of stroke and the algorithm that stroke segmentation adopted is the flex point extraction algorithm based on the self-adaptation bending value, and in this algorithm, the expression formula of calculating bending value is b Ik=max (| x I-k-x i)+(x I+k-x i) |, | (y I-k-y i)+(y I+k-y i) |), (x wherein i, y i), (x I-k, y I-k) and (x I+k, y I+k) be respectively P i, P I-k, P I+kCoordinate, the value of k is the supporting domain of Pi, P I-k, P I+kBe respectively its preceding k point and back k point, the step of this algorithm comprises:
(21), the point that will belong to straight-line segment removes, method is for P i, P I-1, P I+13 points are judged P I-1, P i2 slope and P i, P I+1Whether 2 slope is identical, or judges whether the chain code between them is identical, as identical, proves that be on same straight line at these 3, can not be that point on the straight line of flex point is got rid of with these, remaining as the candidate point;
(22), calculate the bending value of candidate point, supporting domain k uses b since 1 IkExpression is when the size of supporting domain is k, and if the bending value that i is ordered is b Ik〉=b I, k+1, the k value increases by 1, otherwise the k value stops increase, is the supporting domain size of being asked;
(23), application of formula bv i = 1 k i Σ j = 1 k i b ij , calculate the bending value of each candidate point;
(24), judge and to meet one of following condition that just getting rid of it is flex point:
Condition 1:bv i<ε, ε is 1.1 here
Condition 2:bv i<bv j, for j=i-1 or j=i+1
Condition 3:bv i=bv I-1, and k i<k I-1
Condition 4:bv i=bv I+1, and k i≤ k I+1
Get rid of the flex point that the remaining conduct in back is calculated.
Described step (3) comprises sums up all stroke segment types in the lishu stroke, and it is carried out modeling, and concrete operations are as follows:
(31), simulate all lishu stroke sections, these six types comprise the thin slightly type in two pluckings centres with six kinds of stroke segment types, gradually thin type, and gradually thick type, thickness is modification not, and the thin type in middle thick both sides begins the thick type in mild back;
(32), according to the flex point information of step (2), the stroke section segmentation of user's input is become three rank Beziers with least square fitting;
(33), according near some directional information middle stroke segment type of summing up of step (31) and the flex point, to the interpolation of the Bezier after match width information;
(34), prolonging the draw circle of different radii of Bezier after the match, finish modeling to various stroke segment models according to the width information of adding to Bezier in the step (33).
Described step (3) comprises the type of summing up all web members in the lishu stroke, and it is carried out modeling, and concrete operations are as follows:
(311), with the shape of the stroke corner in the four class web members simulations lishu calligraphy, this four classes web member comprises, independent body web member, unidirectional web member, the distinctive type web member that colludes of two-way web member and lishu;
(312), by the drawing instrument plurality of sections three rank Bezier that draw, in order to the web member in the approximation step (311), note the controlled variable of every section Bezier, in order in program, to reappear;
(313), the web member after reappearing is carried out convergent-divergent, rotation, translation is finished modeling.Described step (3) is played up Chinese-character stroke according to stroke section and web member model, and its step comprises:
(321), judge and import counting of stroke that be less than 30 if count, the judgement stroke is a little, plays up EOP (end of program) with the independent body web member;
(322) if count more than 30, the flex point number that extracts in the determining step (2) again is if the flex point number is 2, illustrate that stroke has only stroke head and two flex points of stroke tail, judge that this stroke is a simple stroke, carry out simple stroke and play up (judgment rule of simple stroke such as following table), EOP (end of program);
??total ??cornercnt ??curvature ??dir Stroke type
??<30 ??2 ??---------- ??---------- The point
??>=30&&<100 ??2 ??<0.4 ??<10‖>350 Hyphen
??>=100 ??2 ??<0.4 ??<10‖>350 Long horizontal
??>=30 ??2 ??<1 ??>280&&<350 Carry
??>=30 ??2 ??<0.5 ??>70&&<100 Perpendicular
??>=30&&<70 ??2 ??<3 ??>10&&<70 Press down point
??>70 ??2 ??<3 ??>10&&<70 The long right-falling stroke
Other Other Other Other Cast aside
In the last table, total represents always counting of stroke, and cornercnt represents detected flex point number, and 2 flex points are meant first point and last point, and curvature refers to curvature, characterizes the degree of crook of stroke, and dir is the angle that first point arrives the end point.
(323) if the flex point number greater than 2, judge that stroke is compound stroke, and further judge this compound stroke whether be the other the first stroke of anti-dog, crouch collude, the end is that stroke or the end that collude on the right side is the stroke that collude on a left side, the compound stroke that belongs to these four kinds of strokes is played up;
The other the first stroke of described anti-dog, crouch collude, the end is that stroke or the end that collude on the right side is that the stroke that collude on a left side is called special stroke, its judgment rule is as shown in the table:
dir0 ??cornercnt ?dir1 ??dir2 ?dir3 Stroke type
<70 ??3 ?>45&&<145 ??>180&&<270 ?---------- The other the first stroke of anti-dog
---------- ??>=3 ?>300‖<70 ??>225&&<340 ?<35‖>330 Crouch and collude
---------- ??>=3 ?>45&&<145 ??>180&&<270 ?---------- Type is colluded on a left side
---------- ??>=3 ?>300‖<70 ??>225&&<340 ?---------- Type is colluded on the right side
(324), to not belonging to other compound strokes of step (323), carry out common compound stroke and play up EOP (end of program).
The present invention is summarized as following formulate with Chinese character:
Chinese character=(first stroke of a Chinese character web member)+stroke section+{ web member+stroke section }+(receiving a web member)
Wherein, { web member+stroke section } represents that web member and stroke section occur 0 time or repeatedly, (first stroke of a Chinese character web member) and (receiving an a web member) expression first stroke of a Chinese character web member and a receipts web member occur 0 time or 1 time.
Ultimate principle of the present invention is: each font all has the style of oneself, and style is mainly reflected in the thickness variation of stroke, the pause of stroke corner, the pause of first stroke of a Chinese character place, the vigour of style in writing at receipts pen place or the like.The performance of these above styles, the unified skin that is called Chinese character.The skeleton of Chinese character is coverd with skin, just given a kind of style.And beautify in the implementation procedure at concrete Chinese character, skin is made of stroke section and web member.The stroke section is exactly a section stroke in the Chinese character, and covers with skin for it.Web member is exactly the first stroke of a Chinese character, the connection located such as start to write and turn round is timed pen.This originally is a term in the mechanical engineering, is used for describing turning round a little of Chinese character skeleton here.
The present invention compares with existing beautifying method for hand-written Chinese characters, has following advantage and beneficial effect:
(1), be to finish owing to the present invention carries out Lishu beautifying to handwritten Chinese character by modeling reorganization to six kinds of stroke sections and 13 kinds of web members of four classes, need not store a large amount of information about Chinese character contour, so software systems scale involved in the present invention is little, cost also can reduce greatly;
(2), because the first abstract model of having summed up each stroke section and web member of the present invention, carry out covering according to the stroke skeleton of user's input then and handle, so the present invention can really accomplish to be loyal to user writing, do not lose the artistic characteristics of lishu Writing brush calligraphy again.Beautify effect and enrich changeablely, style changes to some extent because of the difference that the user imports style, this be computer calligraphy can not accomplish;
(3), because the modeling method of web member of the present invention is to approach the pause of the corner of true lishu stroke, the pause of first stroke of a Chinese character place and the vigour of style in writing of receiving the pen place with three rank Bezier earlier in drawing tools, three rank Bezier can embody the contour feature of lishu font fully, so of the present inventionly beautify effect to beautify (as digital ink technology) compared with tradition Chinese character more true to nature, effect is more attractive in appearance;
(4), the present invention realizes that simply, algorithm space complexity and time complexity are all lower, can really accomplish to beautify in real time;
Description of drawings
Fig. 1 is a system architecture diagram of the present invention;
Fig. 2 is 13 kinds of web member classification charts of four classes of the present invention;
Fig. 3 is an independent body web member modeling key diagram of the present invention;
Fig. 4 is a unidirectional web member modeling key diagram of the present invention;
Fig. 5 is a two-way web member modeling key diagram of the present invention;
Fig. 6 is the type web member modeling key diagram that colludes of the present invention;
Fig. 7 is that simple stroke of the present invention is played up programming flow diagram;
Fig. 8 is that compound stroke of the present invention is played up process flow diagram;
Fig. 9 is a handwritten Chinese character Lishu beautifying design sketch of the present invention;
Embodiment
The present invention is described further below in conjunction with accompanying drawing, implement the used identification equipment of the present invention and can adopt handwriting pad or mouse writing Chinese characters, with pure flat escope explicit user graphical interfaces, can adopt C Plus Plus to work out all kinds of handling procedures, just can implement the present invention preferably.
System architecture diagram of the present invention as shown in Figure 1, this system is divided into two modules.After the user imported handwritten Chinese character, system entered first module pretreatment module.The effect of this module is that user's handwriting input stroke is carried out pre-service, provides necessary parameter for the master of back beautifies module.This module is made up of two parts, first is that the stroke to the user carries out the DDA interpolation, because from the Chinese-character stroke of handwriting pad or mouse input may be discontinuous, if it is directly carried out Lishu beautifying, anti-aliasing effect can be very bad, for example rough phenomenon can appear in stroke section edge, has a strong impact on attractive in appearance.Second portion is the stroke that the user imports to be carried out flex point extract, its objective is to the later module of firmly beautifying parameter about flex point is provided, conveniently extract near the directional information of flex point and carry out segmentation for user's stroke, this is the prerequisite that beautification method of the present invention is realized.System enters second module master and beautifies module then, and the main effect of this module is to divide user's stroke three classes to beautify, and is respectively the independent body web member, simple stroke and compound stroke.All strokes all can be summed up in the middle of this three classes stroke, and this module is the main body of total system.
13 kinds of web member classification charts of four classes of modeling of the present invention are introduced four class web members as shown in Figure 2 below:
(A), independent body web member: have only " point " a kind of, this web member essence also is not used in connection stroke section, but whole section stroke become a little.
(B), unidirectional web member: comprised " cross-peen ", " horizontal tail ", " perpendicular head ", " perpendicular tail ", " left-falling stroke tail ", " right-falling stroke tail ", " crouch and collude " 7 kinds.This web member is used for the first stroke of a Chinese character of stroke or receives the pen place, so can be called " end is web member slightly " again.
(C), two-way web member: have only " cross break " a kind of, this web member is mainly used in the junction of stroke section and stroke section in the stroke, so can be called " joint web member " again.
(D), collude the type web member: comprise " collude on the right side ", " collude on a left side ", " crouch and collude ", the end of the type that the colludes stroke of " anti-dog is colluded " or the like.This web member only occurs in the lishu font, has demonstrated fully the style of lishu font, because the lishu font, lines are smoothly soft, and handwritten Chinese character often produces the flex point of wide-angle in the position at the place of colluding, so " colluding " type place occurring, need modeling again.
Independent body web member modeling key diagram among the present invention as shown in Figure 3, the modeling of four kinds of web members all can divide to adopt following two steps among the present invention in fact, difference only is the method that Bezier reference mark parameter reads, and independent body web member modeling procedure is as follows:
(A), in drawing instrument, approach the web member profile with the plurality of sections Bezier
The Bezier curve drawing tool that utilizes mapping software carries out modeling to the profile of " point ".By observing, its contour curve can be spliced with 3 sections Bezier curves, as shown in Figure 3.The reference mark coordinate record of these 3 sections curves is got off, in program, utilize the technique of painting of Bezier curve just it can be drawn.
(B), the convergent-divergent of web member, rotation are with translation
Obviously, web member will be adjusted the size and Orientation of self according to the direction of stroke section and thickness in the final rendering process, then whole model is moved in the position of stroke reality to go.This just need do convergent-divergent and rotation to the web member model.
Introduce the method for rotation earlier.Observing shown in the accompanying drawing 3, is 90 to place (place by other angles certainly and also be fine) with the shape of whole " point " according to presentation direction specially during draw outline.Like this, only need to detect user's presentation direction, and deduct 90, need the angle of rotating exactly with it.
Introduce the method for convergent-divergent again.Suppose and to amplify whole web member model is whole, just x identical with y direction scaling (but the scaling of this web member requires x different with the scaling of y direction in fact, will there be explanation the back).If the length of user writing is 40, and the default size of this model (being exactly the length of y direction among the figure) is roughly 4.Therefore, the ratio of convergent-divergent is 40/4=10.
Translation is very simple, directly the point coordinate in the model is added that the coordinate of impact point gets final product.
Unidirectional web member modeling key diagram among the present invention as shown in Figure 4, unidirectional web member is the web member that is in stroke Duan Yiduan, may be in the beginning of stroke section, also may be in ending.This is inessential.The method of graphic plotting is all identical with the method for independent body web member with the method for convergent-divergent, for rotation parameter, depends on shown in Figure 4ly, and setting acquiescence first stroke of a Chinese character direction when modeling is 0, and so only needing hand-written direction with the user deduct 0 is exactly to need the direction that rotate.Remaining web member is similar.Can see at the initial point right-hand member one section semi arch being arranged, this establishes for the seamless link between smooth connection part and the stroke section, also can use other shape, but circle can ensure connection preferably.
Two-way web member modeling key diagram among the present invention as shown in Figure 5, two-way web member is the important link that connects two sections strokes.Be example with lishu " cross break " below, the modeling process of two-way web member is described.
For " cross break ", control following parameter:
A, go into to hold width (w1)
B, go out to hold width (w2)
C, go into to hold angle (a1)
D, go out to hold angle (a2)
Can obtain rotation angle between in and out vector from the initial trace of Chinese-character stroke, be designated as θ, θ comprises direction, shown in the accompanying drawing 5 be on the occasion of.Following geometric relationship is easy to get.
α = ∠ XOA = arctan ( w / 2 / | OX | ) | OA | = | OC | = | OX | 2 + ( w / 2 ) 2
⇒ x A = | OA | · cos ( θ - α ) y A = | OA | · sin ( θ - α )
⇒ x B = x A + | AB | · cos ( θ + π ) y B = y A + | AB | · sin ( θ + π ) , Here set | AB|=1.2
In like manner:
⇒ x C = | OC | · cos ( θ + α ) y C = | OC | · sin ( θ + α )
⇒ x D = x C + | CD | · cos ( θ + π ) y D = y C + | CD | · sin ( θ + π ) , Here set | CD|=0.6
Other parameter directly reads from accompanying drawing 5 and gets final product.Like this, add that global proportionality convergent-divergent and overall situation rotation just can apply it to reality and suffer.
The type that colludes web member modeling key diagram among the present invention as shown in Figure 6, the type web member of colluding can be regarded a kind of special unidirectional web member as, wherein most of process of modeling all is the same.Just effect by the mild transition of last unicursal section to be arranged owing to collude the type web member, so it is not to begin at the flex point place, it can extend to preceding unicursal section place, and the distance of indicating among the last figure 1 is exactly the distance that needs extension, can contrast accompanying drawing 4, unidirectional web member does not have this segment distance.
Need specify be A, B are ordered in the accompanying drawing 6 horizontal ordinate determine that the w among the last figure is the width size of web member, in the process of change of scale, gives its different value, just can produce different thickness effects.And 1 distance is relevant with the stroke of user's handwriting input.15 some places of unicursal section before unification extends to web member, the distance of flex point that calculating earlier is last and preceding unicursal section the 15th point reciprocal, vacation
20 pixels in this way, and stroke width is made as 10 pixels, because the fixed distance of w is 2 (can be read by accompanying drawing 6) when modeling, so apart from 1=w/10*20, just is 4, A like that in the drawings, the horizontal ordinate that B order is-4 just.Other coordinate can directly be read.
Simple stroke among the present invention is played up process flow diagram as shown in Figure 7, the meaning representation of parameter is in the accompanying drawing 7: curvature represents to store the curvature of simple stroke, dir represents to store the stroke direction between 2 from beginning to end, len represents to store stroke length, SegX represents to select for use certain stroke segment type to carry out the stroke section to play up, and jointX represents to select for use certain type web member to carry out web member to play up.
Compound stroke among the present invention is played up process flow diagram as shown in Figure 8, for compound stroke, will pick out four kinds of special strokes earlier, is respectively the other the first stroke of anti-dog, crouches and colludes, and the end is that stroke and the end that collude on the right side is the stroke that collude on a left side.These four kinds of strokes are write the independent algorithm of playing up.The judgment rule of four kinds of special strokes is as shown in table 2.After having recognized above four kinds of compound stroke sections, other compound stroke Duan Douyong is unified plays up algorithm.It is as follows that algorithm is played up in unification:
(A), play up the stroke head
If dir0<30 ‖ dir0>330 plays up nib with cross-peen, otherwise play up nib with perpendicular head.
(B), play up middle flex point web member
If (dir1<45 ‖ dir1>315) ﹠amp; ﹠amp; (dir2>70﹠amp; ﹠amp; Dir2<180) or (dir1>80﹠amp; ﹠amp; Dir1<170) ﹠amp; ﹠amp; (dir2>290 ‖ dir2<20) plays up with the cross break web member, otherwise do not play up.
(C), play up middle stroke section
Middle stroke Duan Douyong two pluckings middle thin stroke sections are played up.
(D), head and the tail stroke section
Ending stroke section is played up with the stroke section of different-style above-mentioned according to different situations.
Dir0 storage stroke starts a fraction of direction, and dir1 storage stroke enters penult flex point (last flex point except the stroke terminal point) direction, and dir2 storage stroke is walked out the direction of penult flex point.
Handwritten Chinese character Lishu beautifying design sketch of the present invention has been selected 18 Chinese characters the present invention has been tested as shown in Figure 9 among the figure, the test effect as shown in Figure 9, it is more satisfactory to beautify effect.

Claims (7)

1. the handwritten Chinese character Lishu beautifying method based on stroke segmentation modeling is characterized in that comprising the steps:
(1), user's handwriting input point sequence is carried out interpolation processing, make the Chinese character of user's handwriting input be rendered as the continuous Chinese character of stroke point;
(2), extract the flex point information of stroke, and according to flex point information stroke segmentation;
(3), according to stroke section in the model bank and web member model Chinese-character stroke is played up.
2. the handwritten Chinese character Lishu beautifying method based on stroke segmentation modeling according to claim 1 is characterized in that it is the DDA interpolation algorithm that described step (1) is carried out the method that interpolation processing adopted to user's handwriting input point sequence, and its step comprises:
(11), the coordinate of two adjacent points of sequential point sequence be defined as starting point (x1, y1), terminal point (x2 y2), calculates L1=abs (x1-x2), L2=abs (y1-y2), L=max (L1, L2);
(12) if L=0, EOP (end of program) does not need to carry out the DDA interpolation;
(13) if L ≠ 0 makes dx=(x2-x1)/L, dy=(y2-y1)/L;
(14), make point[0] [0]=x1+dx, point[0] [1]=y1+dy, point[0] [0] be the horizontal ordinate of first insertion point, point[0] [1] be the ordinate of first insertion point, makes j=1;
(15), when j<L, DO loop point[j] [0]=point[j-1] [0]+dxpoint[j] [1]=point[j-1] [0]+dy, point[j wherein] [0] be the horizontal ordinate of j-1 insertion point, point[0] [j] be the ordinate of j-1 insertion point, carry out j=j+1 then, next point is inserted in circulation;
(16), when j 〉=L, EOP (end of program), the DDA interpolation is finished.
3. the handwritten Chinese character Lishu beautifying method based on stroke segmentation modeling according to claim 1, it is characterized in that the flex point information of step (2) extraction stroke and the algorithm that stroke segmentation adopted is the flex point extraction algorithm based on the self-adaptation bending value, in this algorithm, the expression formula of calculating bending value is b Ik=max (| x I-k-x i)+(x I+k-x i) |, | (y I-k-y i)+(y I+k-y i) |), (x wherein i, y i), (x I-k, y I-k) and (x I+k, y I+k) be respectively P i, P I-k, P I+kCoordinate, the value of k is P iSupporting domain, P I-k, P I+kBe respectively its preceding k point and back k point, the step of this algorithm comprises:
(21), the point that will belong to straight-line segment removes, method is for P i, P I-1, P I+13 points are judged P I-1, P i2 slope and P i, P I+1Whether 2 slope is identical, or judges whether the chain code between them is identical, as identical, proves that be on same straight line at these 3, can not be that point on the straight line of flex point is got rid of with these, remaining as the candidate point;
(22), calculate the bending value of candidate point, supporting domain k uses b since 1 IkExpression is when the size of supporting domain is k, and if the bending value that i is ordered is b Ik〉=b I, k+1, the k value increases by 1, otherwise the k value stops increase, is the supporting domain size of being asked;
(23), application of formula
Figure F2009101926764C0000021
Calculate the bending value of each candidate point;
(24), judge and to meet one of following condition that just getting rid of it is flex point:
Condition 1:bv i<ε, ε is 1.1 here
Condition 2:bv i<bv j, for j=i-1 or j=i+1
Condition 3:bv i=bv I-1, and k i<k I-1
Condition 4:bv i=b V+1, and k i≤ k I+1
Get rid of the flex point that the remaining conduct in back is calculated.
4. the handwritten Chinese character Lishu beautifying method based on stroke segmentation modeling according to claim 1 is characterized in that described step (3) comprises all stroke segment types in the summary lishu stroke, and it is carried out modeling, and concrete operations are as follows:
(31), simulate all lishu stroke sections, these six types comprise the thin slightly type in two pluckings centres with six kinds of stroke segment types, gradually thin type, and gradually thick type, thickness is modification not, and the thin type in middle thick both sides begins the thick type in mild back;
(32), according to the flex point information of step (2), the stroke section segmentation of user's input is become three rank Beziers with least square fitting;
(33), according to some directional information before and after middle stroke segment type of summing up of step (31) and the flex point, to the interpolation of the Bezier after match width information;
(34), prolonging the draw circle of different radii of Bezier after the match, finish modeling to various stroke segment models according to the width information of adding to Bezier in the step (33).
5. the handwritten Chinese character Lishu beautifying method based on stroke segmentation modeling according to claim 1 is characterized in that described step (3) comprises the type of summing up all web members in the lishu stroke, and it is carried out modeling, and concrete operations are as follows:
(311), with the shape of the stroke corner in the four class web members simulations lishu calligraphy, this four classes web member comprises, independent body web member, unidirectional web member, the distinctive type web member that colludes of two-way web member and lishu;
(312), by the drawing instrument plurality of sections three rank Beziers that draw, in order to the profile of web member in the approximation step (311), note the controlled variable of every section Bezier, in order in program, to reappear;
(313), the web member after reappearing is carried out convergent-divergent, rotation, translation is finished modeling.
6. the handwritten Chinese character Lishu beautifying method based on stroke segmentation modeling according to claim 1 is characterized in that described step (3) plays up Chinese-character stroke according to stroke section and web member category of model, and its step comprises:
(321), judge and import counting of stroke that be less than 30 if count, the judgement stroke is a little, plays up EOP (end of program) with the independent body web member;
(322) if count more than 30, the flex point number that extracts in the determining step (2) if the flex point number is 2, judges that this stroke is a simple stroke, carries out simple stroke and plays up EOP (end of program) again;
(323) if the flex point number greater than 2, judge that stroke is compound stroke, and further judge this compound stroke whether be the other the first stroke of anti-dog, crouch collude, the end is that stroke or the end that collude on the right side is the stroke that collude on a left side, the compound stroke that belongs to these four kinds of strokes is played up;
(324), to not belonging to other compound strokes of step (323), carry out common compound stroke and play up EOP (end of program).
7. according to each described handwritten Chinese character Lishu beautifying method of claim 1 to 6, it is characterized in that Chinese character is summarized as following formulate based on stroke segmentation modeling:
Chinese character=(first stroke of a Chinese character web member)+stroke section+{ web member+stroke section }+(receiving a web member)
Wherein, { web member+stroke section } represents that web member and stroke section occur 0 time or repeatedly, (first stroke of a Chinese character web member) and (receiving an a web member) expression first stroke of a Chinese character web member and a receipts web member occur 0 time or 1 time.
CN200910192676A 2009-09-25 2009-09-25 Stroke segmentation modeling-based handwritten Chinese character Lishu beautifying method Pending CN101697234A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910192676A CN101697234A (en) 2009-09-25 2009-09-25 Stroke segmentation modeling-based handwritten Chinese character Lishu beautifying method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910192676A CN101697234A (en) 2009-09-25 2009-09-25 Stroke segmentation modeling-based handwritten Chinese character Lishu beautifying method

Publications (1)

Publication Number Publication Date
CN101697234A true CN101697234A (en) 2010-04-21

Family

ID=42142337

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910192676A Pending CN101697234A (en) 2009-09-25 2009-09-25 Stroke segmentation modeling-based handwritten Chinese character Lishu beautifying method

Country Status (1)

Country Link
CN (1) CN101697234A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102332173A (en) * 2011-09-13 2012-01-25 浙江万朋网络技术有限公司 Vector algebra-based simple and clear soft pen effect generation method
CN102939575A (en) * 2010-06-14 2013-02-20 微软公司 Ink rendering
CN103488711A (en) * 2013-09-09 2014-01-01 北京大学 Method and system for fast making vector font library
CN104424473A (en) * 2013-09-06 2015-03-18 北京三星通信技术研究有限公司 Method and device for identifying and editing freehand sketch
CN105046730A (en) * 2015-07-09 2015-11-11 北京盛世宣合信息科技有限公司 Writing trace demonstration method and apparatus applied to writing brush
CN105956547A (en) * 2016-04-28 2016-09-21 宁波工程学院 Decomposition method based on array surface electromyogram signal smoothing
CN111105478A (en) * 2019-12-06 2020-05-05 中国联合网络通信集团有限公司 Handwriting processing method, handwriting processing device, handwriting processing equipment and computer readable storage medium
CN113515919A (en) * 2021-09-14 2021-10-19 北京江融信科技有限公司 Method and system for generating Chinese TrueType font

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102939575A (en) * 2010-06-14 2013-02-20 微软公司 Ink rendering
CN102939575B (en) * 2010-06-14 2016-05-18 微软技术许可有限责任公司 Ink presents
CN102332173A (en) * 2011-09-13 2012-01-25 浙江万朋网络技术有限公司 Vector algebra-based simple and clear soft pen effect generation method
CN104424473A (en) * 2013-09-06 2015-03-18 北京三星通信技术研究有限公司 Method and device for identifying and editing freehand sketch
CN103488711A (en) * 2013-09-09 2014-01-01 北京大学 Method and system for fast making vector font library
CN103488711B (en) * 2013-09-09 2017-06-27 北京大学 A kind of method and system of quick Fabrication vector font library
CN105046730B (en) * 2015-07-09 2018-11-02 北京盛世宣合信息科技有限公司 Written handwriting rendering method and device applied to writing brush
CN105046730A (en) * 2015-07-09 2015-11-11 北京盛世宣合信息科技有限公司 Writing trace demonstration method and apparatus applied to writing brush
CN105956547A (en) * 2016-04-28 2016-09-21 宁波工程学院 Decomposition method based on array surface electromyogram signal smoothing
CN105956547B (en) * 2016-04-28 2019-05-03 宁波工程学院 Based on the smooth decomposition method of array surface electromyogram signal
CN111105478A (en) * 2019-12-06 2020-05-05 中国联合网络通信集团有限公司 Handwriting processing method, handwriting processing device, handwriting processing equipment and computer readable storage medium
CN111105478B (en) * 2019-12-06 2023-04-25 中国联合网络通信集团有限公司 Handwriting processing method, handwriting processing device, handwriting processing equipment and computer readable storage medium
CN113515919A (en) * 2021-09-14 2021-10-19 北京江融信科技有限公司 Method and system for generating Chinese TrueType font

Similar Documents

Publication Publication Date Title
CN101697234A (en) Stroke segmentation modeling-based handwritten Chinese character Lishu beautifying method
US9268418B2 (en) Simulation of an erodible tip in a natural media drawing and/or painting simulation
CN107610200B (en) Character library rapid generation method based on characteristic template
CN100407798C (en) Three-dimensional geometric mode building system and method
US9020266B2 (en) Methods and devices for processing handwriting input
CN105046730B (en) Written handwriting rendering method and device applied to writing brush
Davis Magic paper: Sketch-understanding research
CN103020085B (en) A kind of implementation method of personal style calligraphy dynamic word-base and application thereof
CN111127596B (en) Incremental Voronoi sequence-based layered oil painting brush drawing method
CN109746916A (en) A kind of method and system of machine person writing calligraphy
Bhattacharjee et al. A survey on sketch based content creation: from the desktop to virtual and augmented reality
Wang et al. Evaluation of Chinese calligraphy by using DBSC vectorization and ICP algorithm
Liu On-line graphics recognition: State-of-the-art
CN1996347A (en) Visualized reproduction method based on handwriting image
Morrison et al. Triangle refinement in a constrained Delaunay triangulation skeleton
Su et al. Simulating artistic brushstrokes using interval splines
CN104951811A (en) Handwriting trace recognition method and device for writing with writing brush
CN115841671B (en) Handwriting skeleton correction method, system and storage medium
CN104268915A (en) Real-time contour beautifying method of handwritten Chinese characters
Yang et al. Animating the brush-writing process of Chinese calligraphy characters
Rajan et al. From paper to machine: extracting strokes from images for use in sketch recognition.
CN111063005B (en) Handwriting processing method and device
Bae et al. Digital styling for designers: Sketch emulation in computer environment
Kim Analysis of children's sketches to improve recognition accuracy in sketch-based applications
CN112861709A (en) Hand-drawn sketch recognition method based on simple strokes

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20100421