CN105046730A - Writing trace demonstration method and apparatus applied to writing brush - Google Patents

Writing trace demonstration method and apparatus applied to writing brush Download PDF

Info

Publication number
CN105046730A
CN105046730A CN201510401837.1A CN201510401837A CN105046730A CN 105046730 A CN105046730 A CN 105046730A CN 201510401837 A CN201510401837 A CN 201510401837A CN 105046730 A CN105046730 A CN 105046730A
Authority
CN
China
Prior art keywords
stroke
section
writing
stage group
sample
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.)
Granted
Application number
CN201510401837.1A
Other languages
Chinese (zh)
Other versions
CN105046730B (en
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.)
BEIJING SHENGSHI XUANHE INFORMATION TECHNOLOGY Co Ltd
Original Assignee
BEIJING SHENGSHI XUANHE INFORMATION TECHNOLOGY Co Ltd
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 BEIJING SHENGSHI XUANHE INFORMATION TECHNOLOGY Co Ltd filed Critical BEIJING SHENGSHI XUANHE INFORMATION TECHNOLOGY Co Ltd
Priority to CN201510401837.1A priority Critical patent/CN105046730B/en
Publication of CN105046730A publication Critical patent/CN105046730A/en
Application granted granted Critical
Publication of CN105046730B publication Critical patent/CN105046730B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a writing trace demonstration method and apparatus applied to a writing brush. The method includes the following steps that: writing trace data in a process from a time point when a user presses a handwriting input device to a time point when the user lifts his or her hand is read; the read writing trace data are divided into a plurality of stroke segments, and main stroke segments and auxiliary stroke segments are determined from the plurality of stroke segments; the features of corresponding stroke segments and the directions of the main stroke segments are determined; samples corresponding to the strokes written by the user are determined according to a pre-built stroke sample library; and the strokes written by the user can be drawn on a screen according to sampling data of the samples and the traces of the written strokes. With the method and apparatus of the invention adopted, the traces approximate to the strokes written through the writing brush can be demonstrated for the user, and user experience can be improved.

Description

Be applied to written handwriting rendering method and the device of writing brush
Technical field
The present invention relates to image processing field, in particular to a kind of the written handwriting rendering method and the device that are applied to writing brush.
Background technology
Chinese calligraphy, as the Calligraph Art of Chinese character, is a kind of ancient art form with having rich connotation.It presents the intension of traditional Chinese culture along with the development of Chinese civilization with the art form of its uniqueness and artistic speech, traditional Chinese culture history occupies an important position.Chinese character, once generation, just presents the rudiment of calligraphy art.Develop from the inscriptions on bones or tortoise shells, inscription on ancient bronze objects and be an ancient style of calligraphy, the lesser seal character, lishu, to the rapid style of writing of shaping in the Eastern Han Dynasty, Wei, Shanxi, regular script, running hand volumes, calligraphy distributes the glamour of art always.The calligraphy art of China is with a long history, of long standing and well established, has a far reaching influence.Today, in nearly all scenic spots and historical sites, we can see the calligraphy work that the countless men of literature and writing from ancient times to the present stay.These calligraphy wories or be written on paper or make horizontal inscribed board or carve in stone tablet or be engraved on cliff are all the rarities of chinese tradition art culture.
Along with the progress of modern science and technology, the develop rapidly of the universal and correlation technique of computing machine, people have new calligraphy creation mode.Traditional pen, ink, paper, inkstone are also no longer the essential tool of writing words.As a rule, people carry out text event detection work by keyboard and mouse.Therefore, on the basis of drawing traditional calligraphy art, in order to inherit, carry forward and developing calligraphy art, its emulation carrying out science is just become to one of problem of current art and the challenge of sciemtifec and technical sphere most.
Meanwhile, calligraphy beginner will carry out a large amount of imitation training with knowledge and skills such as use pen, structure, the art of composition and the artistic conceptions of learning calligraphy to much outstanding calligraphy work.Computer simulation is carried out to calligraphic copying and production process and is conducive to quicker, easy, clean the practicing calligraphy of people, and decrease the waste of writing brushes, ink sticks, paper and ink stones, also excite the enthusiasm of people's learning calligraphy.
In Writing brush calligraphy, each stroke has various ways, and thickness differs, different style, and the effectiveness comparison of active computer analog form simulation is coarse, cannot the writing style of real embodiment user, and Consumer's Experience is poor.
Summary of the invention
In view of this, the object of the embodiment of the present invention is to provide a kind of the written handwriting rendering method and the device that are applied to writing brush, to promote the authenticity of stroke simulation.
First aspect, embodiments provides a kind of written handwriting rendering method being applied to writing brush, comprising:
Reading user presses handwriting input device and writes to lifting the writing track data stopped in writing process; Wherein, described writing track data to comprise in the stroke of described user writing each and writes coordinate a little and time;
The stroke of described user writing is divided into multiple stroke section with the coordinate write a little by the time order and function order of writing a little according to each, and described multiple stroke section is divided into chief editor's section of picture and auxiliary stroke section by the length according to stroke section;
Determine the feature of corresponding stroke section according to described chief editor's section of picture and the intersegmental annexation of described auxiliary stroke, the feature of described stroke section comprises: first stroke of a Chinese character Zang Feng, the first stroke of a Chinese character pause pen, the first stroke of a Chinese character turn to, receive a Hui Feng, receive pen pause pen, to receive pen full to the brim and receive pen and turn to;
Determine the direction of described chief editor's section of picture from all directions to rule according to the stroke section preset;
According to feature and the stroke Sample Storehouse comparison of setting up in advance of the direction of the described chief editor's section of picture determined and described stroke section, determine according to the result of comparison the sample that described writing track data is corresponding; Wherein, described stroke Sample Storehouse preserves the sampled data of sample corresponding to each stroke and described sample each stroke section corresponding; Described sampled data comprises: the corresponding position of described stroke section of described current sampling point, the angle of the perpendicular line of described stroke section, described sampled point are apart from the distance on described sample profile border;
Described writing track data is converted to Bezier, using described Bayside curve as the path of the stroke of described user writing;
The sampled data corresponding according to the sampled point of described sample each stroke section corresponding, the stroke along described path by described user writing is plotted on screen.
In conjunction with first aspect, embodiments provide the first possible embodiment of first aspect, the sampled data corresponding according to the sampled point of described sample each stroke section corresponding, along described path, the stroke of described user writing is plotted on screen and comprises: respectively based on chief editor's section of picture, stroke stage group is divided to each stroke section of described sample and each stroke section corresponding to the stroke of described user writing, the division rule of described stroke stage group comprises: the auxiliary stroke section before first chief editor's section of picture together with described first chief editor's section of picture as first stroke stage group, after first chief editor's section of picture to the stroke section between second chief editor's section of picture as second stroke stage group, so until last chief editor's section of picture, auxiliary stroke section after last chief editor's section of picture is merged into last stroke stage group, along described path respectively by first stroke stage group of corresponding for first of the stroke of described user writing stroke stage group described sample, and last stroke stage group of described sample that is corresponding for last stroke stage group of the stroke section of described user writing is started to draw, until when the stroke that the stroke of described user writing only remains a stroke stage group or described sample only remains a stroke stage group, the stroke stage group of stroke stage group residue number more than one is merged into one, continues corresponding drafting.
In conjunction with the first embodiment of first aspect, embodiments provide the embodiment that the second of first aspect is possible, said method also comprises: when drawing each stroke stage group, first draw the chief editor's section of picture in described stroke stage group, for the auxiliary stroke section in described stroke stage group, draw from the auxiliary stroke section of first in described stroke stage group and last auxiliary stroke section, until when the stroke that the stroke of described user writing only remains an auxiliary stroke section or described sample only remains an auxiliary stroke section, the auxiliary stroke section of auxiliary stroke section residue number more than one is merged into one, continue corresponding drafting.
In conjunction with the second embodiment of first aspect, embodiments provide the third possible embodiment of first aspect, said method also comprises: when drawing a stroke section, extract sampled point one by one according to the sampled data recorded in described sample; For each sampled point, the position calculation according to the corresponding described stroke section of described sampled point goes out the position of described sampled point in the described Bayside curve of correspondence; According to described sampled point apart from described sample profile border Distance geometry described in the angle of perpendicular line the oval pitch angle of section, major axis dimension and central point are set, minor axis dimension using the slice thickness of setting as described section ellipse, uses described section oval along stroke section described in described path drawing.
In conjunction with the third embodiment of first aspect, embodiments provide the 4th kind of possible embodiment of first aspect, said method also comprises: judge the distance threshold whether being greater than setting along the distance between the sampled point of two on described path, if, new sampled point is inserted between described two sampled points, the number arranging described new sampled point equals the round values of the distance between described two sampled points divided by described distance threshold, with the sampled data of described two sampled points for according to arranging the sampled data of described new sampled point; New section ellipse drawing stroke section is inserted according to the position of described new sampled point and the sampled data of correspondence.
Second aspect, the embodiment of the present invention additionally provides a kind of written handwriting being applied to writing brush and presents device, comprising:
Track data read module, presses handwriting input device write to lifting the writing track data stopped in writing process for reading user; Wherein, described writing track data to comprise in the stroke of described user writing each and writes coordinate a little and time;
Stroke section divides module, and with the coordinate write a little, the stroke of described user writing is divided into multiple stroke section for the time order and function order of writing according to each a little, described multiple stroke section is divided into chief editor's section of picture and auxiliary stroke section by the length according to stroke section;
Stroke feature determination module, for determining the feature of corresponding stroke section according to described chief editor's section of picture and the intersegmental annexation of described auxiliary stroke, the feature of described stroke section comprises: first stroke of a Chinese character Zang Feng, the first stroke of a Chinese character pause pen, the first stroke of a Chinese character turn to, receive a Hui Feng, receive pen pause pen, to receive pen full to the brim and receive pen and turn to;
Chief editor's section of picture direction determination module, for determining the direction of described chief editor's section of picture from all directions to rule according to the stroke section preset;
Sample determination module, for according to the feature in the direction of the described chief editor's section of picture determined and described stroke section and the stroke Sample Storehouse comparison of setting up in advance, determines according to the result of comparison the sample that described writing track data is corresponding; Wherein, described stroke Sample Storehouse preserves the sampled data of sample corresponding to each stroke and described sample each stroke section corresponding; Described sampled data comprises: the corresponding position of described stroke section of described current sampling point, the angle of the perpendicular line of described stroke section, described sampled point are apart from the distance on described sample profile border;
Stroke path determination module, for described writing track data is converted to Bezier, using described Bayside curve as the path of the stroke of described user writing;
Stroke display module, for the sampled data corresponding according to the sampled point of described sample each stroke section corresponding, the stroke along described path by described user writing is plotted on screen.
In conjunction with second aspect, embodiments provide the first possible embodiment of second aspect, above-mentioned stroke display module comprises: stroke stage group division unit, for dividing stroke stage group to each stroke section of described sample and each stroke section corresponding to the stroke of described user writing based on chief editor's section of picture respectively, the division rule of described stroke stage group comprises: the auxiliary stroke section before first chief editor's section of picture together with described first chief editor's section of picture as first stroke stage group, after first chief editor's section of picture to the stroke section between second chief editor's section of picture as second stroke stage group, so until last chief editor's section of picture, auxiliary stroke section after last chief editor's section of picture is merged into last stroke stage group, stroke section drawing unit, for along described path respectively by first stroke stage group of corresponding for first of the stroke of described user writing stroke stage group described sample, and last stroke stage group of described sample that is corresponding for last stroke stage group of the stroke section of described user writing is started to draw, until when the stroke that the stroke of described user writing only remains a stroke stage group or described sample only remains a stroke stage group, the stroke stage group of stroke stage group residue number more than one is merged into one, continues corresponding drafting.
In conjunction with the first embodiment of second aspect, embodiments provide the embodiment that the second of second aspect is possible, described stroke section drawing unit comprises: chief editor draws drafting subelement, for when drawing each stroke stage group, first draws the chief editor's section of picture in described stroke stage group; Auxiliary stroke section draws subelement, for for the auxiliary stroke section in described stroke stage group, draw from the auxiliary stroke section of first in described stroke stage group and last auxiliary stroke section, until when the stroke that the stroke of described user writing only remains an auxiliary stroke section or described sample only remains an auxiliary stroke section, the auxiliary stroke section of auxiliary stroke section residue number more than one is merged into one, continues corresponding drafting.
In conjunction with the second embodiment of second aspect, embodiments provide the third possible embodiment of second aspect, described stroke section drawing unit comprises: sampled point extracts subelement, during for drawing a stroke section, extract sampled point one by one according to the sampled data recorded in described sample; Stroke section draws subelement, and for for each sampled point, the position calculation according to the corresponding described stroke section of described sampled point goes out the position of described sampled point in the described Bayside curve of correspondence; According to described sampled point apart from described sample profile border Distance geometry described in the angle of perpendicular line the oval pitch angle of section, major axis dimension and central point are set, minor axis dimension using the slice thickness of setting as described section ellipse, uses described section oval along stroke section described in described path drawing.
In conjunction with the third embodiment of second aspect, embodiments provide the 4th kind of possible embodiment of second aspect, described stroke section drawing unit also comprises: Distance Judgment subelement, for judging the distance threshold whether being greater than setting along the distance between the sampled point of two on described path; Data arrange subelement, for when the judged result of described Distance Judgment subelement is for being, new sampled point is inserted between described two sampled points, the number arranging described new sampled point equals the round values of the distance between described two sampled points divided by described distance threshold, with the sampled data of described two sampled points for according to arranging the sampled data of described new sampled point; Interpolation draws subelement, for inserting new section ellipse drawing stroke section according to the position of described new sampled point and the sampled data of correspondence.
The method and apparatus that the embodiment of the present invention provides, the writing track data of reading is divided into multiple stroke section, chief editor's section of picture and auxiliary stroke section is determined from multiple stroke section, and then determine the direction of the characteristic sum chief editor section of picture of corresponding stroke section, by the sample that the stroke of the stroke Sample Storehouse determination user writing set up in advance is corresponding, according to the sampled data of this sample and the trajectory path of stroke writing, stroke corresponding in Sample Storehouse is plotted on screen, make the person's handwriting being similar to true writing brush stroke be presented on user at the moment, improve the Experience Degree of user.
For making above-mentioned purpose of the present invention, feature and advantage become apparent, preferred embodiment cited below particularly, and coordinate appended accompanying drawing, be described in detail below.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, be briefly described to the accompanying drawing used required in embodiment below, be to be understood that, the following drawings illustrate only some embodiment of the present invention, therefore the restriction to scope should be counted as, for those of ordinary skill in the art, under the prerequisite not paying creative work, other relevant accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 shows the written handwriting rendering method process flow diagram being applied to writing brush that the embodiment of the present invention provides;
Fig. 2 shows the stroke section angle schematic diagram that the embodiment of the present invention provides;
The written handwriting being applied to writing brush that Fig. 3 shows the embodiment of the present invention to be provided presents the structured flowchart of device.
Embodiment
Below in conjunction with accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.The assembly of the embodiment of the present invention describing and illustrate in usual accompanying drawing herein can be arranged with various different configuration and design.Therefore, below to the detailed description of the embodiments of the invention provided in the accompanying drawings and the claimed scope of the present invention of not intended to be limiting, but selected embodiment of the present invention is only represented.Based on embodiments of the invention, the every other embodiment that those skilled in the art obtain under the prerequisite not making creative work, all belongs to the scope of protection of the invention.
Owing to printing calligraphy submitting a written statement to a higher authority without pressure sensitivity handwriting equipment, be merely able to the planimetric coordinates information getting a certain moment, in order to brush writing effect can be produced according to these two-dimensional points coordinate informations, embodiments provide a kind of the written handwriting rendering method and the device that are applied to writing brush, be described below by embodiment.
The shown in Figure 1 process flow diagram being applied to the written handwriting rendering method of writing brush, the method comprises the following steps S102-S114:
Step S102, reading user presses handwriting input device and writes to lifting the writing track data stopped in writing process; Wherein, writing track data to comprise in the stroke of user writing each and writes coordinate a little and time;
Usually, the stroke of Chinese character comprises about 31 kinds strokes, each stroke is divided into multiple concrete form according to the difference of row style line, when user writes on handwriting equipment (being equivalent to above-mentioned handwriting input device), start when writing pencil falls to record writing track data (also can be called stroke data), when writing pencil lifts, stroke end of record (EOR), and start to process stroke data.
In order to obtain the track writing a stroke, when handwriting input device (such as mouse or writing pencil) is pressed, start the dot information that recording unit moves across, this comprises: X, Y-coordinate and time, recorded information is stopped when handwriting input device lifts, now a stroke writes end, then starts to analyze the row style line of this stroke, process, paint.
If the X of the current stroke path point information got, Y-coordinate being coupled together according to time sequencing is exactly the row style line tracking of this stroke; shake can be produced when considering that user is hand-written; this track has a lot of sawtooth; error can be produced when data processing; therefore preferably; after reading above-mentioned writing track data, can also according to each write a little time order and function order to the smoothing process of writing track data and interpolation processing.Such as adopt Douglas-Pu grams smoothing according to subduction algorithm, carry out smooth curve by the point removing side-play amount larger, this algorithm is simple, speed is fast, less to former geometric locus distortion, be relatively applicable to the process of handwriting tracks.Owing to adopting data subduction algorithm smoothing, after level and smooth, the point coordinate of handwriting trace can reduce, and spacing distance is different in size, and this is unfavorable for the data processing in later stage, therefore the present embodiment is along track data inserting point at equal intervals after smoothly, and the point on track is evenly distributed.Based on this, above-mentioned smoothing processing and interpolation processing specifically comprise: the time order and function order that (1) writes a little according to each sorts to writing track data; (2) Douglas-Pu Ke smoothing processing is carried out to the writing track data after sequence; (3) the writing track data equal intervals data inserting point after smoothing processing.
Above-mentioned employing Douglas-Pu grams according to the smoothing method of subduction algorithm be one preferred embodiment, in actual applications, can choose other smoothing algorithm according to computing velocity and accuracy requirement, the above-mentioned concrete mode of the present embodiment does not limit the scope of the invention.
Step S104, write time order and function order a little according to each and write coordinate a little the stroke of user writing is divided into multiple stroke section, multiple stroke section is divided into chief editor's section of picture and auxiliary stroke section by the length according to stroke section;
When carrying out stroke section and dividing, can detect and write a corresponding angle changing value in above-mentioned writing track data, some angle changing value being exceeded setting threshold value is defined as unique point (also can be called turning point).Cross and judge that angle change point is greatly defined as unique point, the turning point namely between pen section (or stroke section).The process of this detection is: each point on traversal stroke track, calculate this point and the more front straight line that form and and the rear angle a bit formed between straight line, first point of track is set to 180 degree with last angle put.Two angle thresholds can be set: entering angle threshold value, leave angle threshold value, suppose that these two values are all set to 160 degree.Institute again on traversal track a little, judges the angle of current point, if be less than entering angle threshold value, then mark turnover detects and starts, and compare and record the point of minimum angle, when the angle put be greater than leave angle threshold value time current turnover detect end, minimum clamp angle point is unique point.Based on this, above-mentioned feature point detection specifically comprises the steps (1)-(3):
(1) each point in the writing track data after traversal processing, calculate straight line and current data point that current data point and last data point form and a rear group of data points be in line between angle;
(2) if the angle of current data point is less than default entering angle threshold value, the turnover of mark first paragraph detects and starts, record the angle of the data point of follow-up traversal, until the angle of data point of record is greater than default when leaving angle threshold value, terminates first paragraph turnover and detect; Data point corresponding for angle minimum in the angle of the data point of record is defined as first paragraph to transfer the unique point detected;
(3) continue the follow-up data point of traversal and carry out next section of turning point detection, until each the some traversal in writing track data is complete.
The detection mode of this unique point can find each turning point in handwriting trace more accurately, and reliability is stronger.
Above-mentioned feature point detection mode is only citing, and in actual applications, can convert it according to computing velocity and accuracy requirement or choose other detection mode, the above-mentioned concrete mode of the present embodiment limit the scope of the invention.
A stroke is made up of multiple stroke section, and such as cross break comprises horizontal and perpendicular two strokes, and in addition, writing brush needs the action such as Zang Feng, a pen when writing, this also can produce stroke section.Adjacent unique point is connected and just defines stroke section.After obtaining stroke section, can calculate the parameter of stroke section, the angle (angle of the straight line that stroke section two end points are formed) of such as stroke section and the length of stroke section; In order to simplify calculating and logic complexity, stroke section is divided into 8 directions according to the angle of stroke section by the present embodiment, be divided into: the right side, bottom right, under, lower-left, a left side, upper left, upper, upper right 8 directions, for simplicity, stroke section angle schematic diagram shown in Figure 2, above-mentioned 8 direction number consecutivelies are 0,1,2,3,4,5,6,7 by the present embodiment.Angle between these 8 directions is also incomplete same, rule of thumb the angular range of upper and lower, left and right is decided to be 30 °, and the angular range of upper left, lower-left, upper right, bottom right is 60 °.8 directions are as above categorized as according to the deflection of stroke section.
When Feature point recognition, sometimes due to the fluctuating of row style line or bending, unnecessary unique point may be identified, again because direction is reduced to 8 directions, so just there will be the stroke section that adjacent direction is consistent, easy in order to Stroke discrimination below, can merge the stroke section of this equidirectional in practical application.
Above-mentioned stroke section had both comprised chief editor's section of picture (also can be called main stroke section) of mark stroke type, also comprised the auxiliary stroke section (also can be called auxiliary stroke section) of to carry out Zang Feng, a pen etc. in order to write out font attractive in appearance and wieling the pen.Auxiliary stroke section and main stroke section can be distinguished by stroke segment length, the present embodiment setting pen wide with a multiplication as the boundary identifying main stroke section and auxiliary stroke section, if length is less than this boundary, think auxiliary stroke section, otherwise think main stroke section, this coefficient can value be 1.2.Based on this, the step that multiple stroke section is divided into chief editor's section of picture and auxiliary stroke section is specifically comprised according to the length of stroke section in above-mentioned steps S104: the length detecting current stroke section; Judge whether the length of current stroke section is less than the length threshold of setting; Wherein, this length threshold is the wide value with setting multiplication of pen; If be less than, determine that current stroke section is auxiliary stroke section; If be not less than, determine that current stroke section is chief editor's section of picture.The realistic row of a differentiation mode style of this stroke section, the identification for follow-up stroke provides reliable data.
Step S106, determine the feature of corresponding stroke section according to above-mentioned chief editor's section of picture and the intersegmental annexation of auxiliary stroke, the feature of this stroke section comprises: first stroke of a Chinese character Zang Feng, the first stroke of a Chinese character pause pen, the first stroke of a Chinese character turn to, receive a Hui Feng, receive pen pause pen, to receive pen full to the brim and receive pen and turn to.
According to " feature of wieling the pen of Chinese calligraphy ", the details of wieling the pen can learning by detecting pen picture head portion and stroke afterbody can judge the Morphological Features of this stroke, such as hides the cutting edge of a knife or a sword first stroke of a Chinese character or the dew peak first stroke of a Chinese character etc.The feature of stroke section is divided into by the present embodiment: first stroke of a Chinese character Zang Feng, the first stroke of a Chinese character pause pen, the first stroke of a Chinese character turn to, receive a Hui Feng, receive pen pause pen, receive pen full to the brim, receive pen and turn to this 7 kinds of features.
One, first stroke of a Chinese character Zang Feng: this is a Boolean type parameter, is worth for true respresentation hides the cutting edge of a knife or a sword first stroke of a Chinese character, and hiding the cutting edge of a knife or a sword first stroke of a Chinese character needs first to wield the pen in the other direction when the first stroke of a Chinese character, and then pause pen, more just march forward.When judging that this indicates, first a main pen section is found, if have at least two auxiliary pen sections before this main pen section, and with have one in main pen section non-conterminous auxiliary pen section at least with the direction of main pen section close to contrary, then think that this stroke is first stroke of a Chinese character Zang Feng.
Two, the first stroke of a Chinese character is paused pen: this is a Boolean type parameter, and be worth for true respresentation is paused pen, a pen alleged is here the stroke very little along of stroke progress path longitudinal direction when writing.Method of this mark of interpretation is: if not first stroke of a Chinese character Zang Feng, and have at least one auxiliary pen section before first main pen section, then think that the first stroke of a Chinese character is paused pen.
Three, the first stroke of a Chinese character turns to: here turn to as sense of rotation, both clockwise, counterclockwise and directly to, because writing brush is when stroke writing, Zang Feng or a pen might not turn to along fixed-direction, in the horizontal stroke of the inverse peak first stroke of a Chinese character, the first stroke of a Chinese character is according to turning to counterclockwise, and the perpendicular middle first stroke of a Chinese character of pen is received according to moving towards clockwise in time peak.The present embodiment can be judged clockwise or counterclockwise by the differential seat angle between the main pen section of calculating first and previous auxiliary pen section, does not have auxiliary pen section this situation before only having first main pen section for the first stroke of a Chinese character, just can be labeled as directly to.
Four, receive a Hui Feng: hide cutting edge of a knife or a sword with the first stroke of a Chinese character similar, receive the method for wieling the pen to opposite direction when a Hui Feng is receipts.Whether reverse with last main pen section according to pen section direction non-conterminous after last main pen section when judging that this indicates.
Five, receive pen to pause pen: similar with the first stroke of a Chinese character pen that pauses, difference judges last main Duan Yuqi auxiliary pen section below.
Six, receive pen full to the brim: this situation occurs in the ending stroke full to the brim such as slashs, hook, both do not had Hui Feng also not pause pen if in fact receive pen, and represented full to the brim, this mark of increase is to simplify decision logic separately.
Seven, receive pen to turn to: turn to the first stroke of a Chinese character, what only record is the sense of rotation receiving pen.
Based on the feature of the above-mentioned various vigour of style in writing, above-mentioned steps S106 specifically comprises the following steps (1)-(4):
(1) two auxiliary stroke sections whether are had before judging first chief editor's section of picture at least, and with first non-conterminous auxiliary stroke section of chief editor's section of picture in have at least one reverse with the direction of first chief editor's section of picture, if so, determine that the stroke section at first chief editor's section of picture place is first stroke of a Chinese character Zang Feng; If not, and before first chief editor's section of picture, there is at least one auxiliary stroke section, determine that the stroke section at first chief editor's section of picture place is that the first stroke of a Chinese character is paused pen;
(2) calculate the differential seat angle between first chief editor's section of picture and previous auxiliary stroke section, determine that the stroke section at first chief editor's section of picture place is that up time turns to or the inverse time turns to according to differential seat angle; When there is no auxiliary stroke section before first chief editor's section of picture, determine the stroke Duan Weizhi at first chief editor's section of picture place to;
(3) judge that whether the direction of the direction of non-conterminous auxiliary stroke section after last chief editor's section of picture and last chief editor's section of picture is reverse, if so, determine last chief editor's section of picture place stroke Duan Weishou Hui Feng; If not, and after last chief editor's section of picture, there is at least one auxiliary stroke section, determine that the stroke Duan Weishou pen at last chief editor's section of picture place pauses pen;
(4) calculate last chief editor and draw differential seat angle between the auxiliary stroke section of Duan Yuhou mono-, determine that the stroke section at last chief editor's section of picture place is that up time turns to or the inverse time turns to according to differential seat angle; After last chief editor's section of picture, there is no auxiliary stroke section, determine that the stroke Duan Weishou pen at last chief editor's section of picture place is full to the brim.
Step S108, determines the direction of above-mentioned chief editor's section of picture from all directions to rule according to the stroke section preset.
Here the stroke section preset all directions can be that the direction shown in Fig. 2 arranges rule to rule, by this rule, the direction of each chief editor's section of picture above-mentioned can be determined, and the direction of each chief editor's section of picture determines the current stroke write of user and is specially which kind of stroke, and then provide reliable data for the identification of follow-up stroke.
Step S110, according to feature and the stroke Sample Storehouse comparison of setting up in advance of the direction of the above-mentioned chief editor's section of picture determined and stroke section, the sample corresponding according to the result determination writing track data of comparison; Wherein, this stroke Sample Storehouse preserves the sampled data of sample corresponding to each stroke and sample each stroke section corresponding; This sampled data comprises: the angle of the corresponding position of stroke section of current sampling point, the perpendicular line of stroke section, sampled point are apart from the distance on described sample profile border.
Because there is multiple style handwriting in Chinese calligraphy, such as Ouyang Style, the Yan style, the Liu style, the calligraphy style of Zhao Mengfu of the Yuan Dynasty etc., different style strokes has difference, therefore can set up multiple stroke Sample Storehouse.First require accurately to identify stroke, but due to the randomness of user writing, the difficulty of Stroke discrimination is very high, be difficult to ensure that all strokes are identified, therefore in stroke storehouse, establish an acquiescence sample, the stroke for None-identified uses this acquiescence sample to paint.
Stroke Sample Storehouse can obtain the stroke rubbings of each style of calligraphy corresponding to standard stroke in advance; For each stroke rubbings, from this stroke rubbings, extract stroke, and image procossing is carried out to the stroke extracted, obtain the sample of the stroke meeting prespecified pattern, such as, the stroke extracted is modified, highlight and the process such as convergent-divergent; Be converted to by stroke after process, size requirement, stroke weight requirement, writing and background color require that all unified stroke originally; Obtain the sampled data of the sample of each stroke rubbings respectively, sample and sampled data correspondence are kept in stroke Sample Storehouse.
The process of Stroke discrimination is when after the complete stroke of user writing, first the analytical calculation of above-mentioned stroke is carried out, then compare with the sample in stroke Sample Storehouse, determine the type of stroke, as horizontal, vertical, slash, cross break hook etc., and then according to the feature of stroke, the stroke sample be applicable to is selected at such as Zang Feng, dew peak etc. from stroke Sample Storehouse, None-identified being gone out to the use acquiescence sample of stroke, for identifying stroke, but can not determine the acquiescence sample of this stroke of selection of stroke sample.Particularly, the type of the stroke of user writing is specially any, mainly according to 8 direction orders of stroke section, disclosed 8 direction calculating of stroke section, during identification, the direction of chief editor's section of picture is arranged sequentially, contrast one by one with the stroke type in stroke Sample Storehouse, if mutual coupling, judge stroke type for this reason.If can not find applicable stroke type (such as: the strokes such as horizontal, vertical, slash, right-falling stroke) in stroke Sample Storehouse, then by the process of acquiescence stroke.After identifying stroke type (i.e. the direction of above-mentioned chief editor's section of picture), also need the concrete sample selecting this stroke type, this is mainly according to the stroke section feature of previous calculations: first stroke of a Chinese character Zang Feng, the first stroke of a Chinese character pause pen, the first stroke of a Chinese character turn to, receive a Hui Feng, receive pen pause pen, receive pen full to the brim, receive that pen turns to determine, if these features are consistent with certain sample in stroke Sample Storehouse, use this sample, otherwise use the acquiescence sample of this stroke type.
Step S112, is converted to Bezier by writing track data, using Bayside curve as the path of the stroke of user writing; When writing track data is converted to Bezier, can process respectively according to stroke section, namely each stroke section above-mentioned is converted into a Bayside curve.
Step S114, the sampled data corresponding according to the sampled point of above-mentioned sample each stroke section corresponding, the stroke along above-mentioned path by user writing is plotted on screen.
Because there is multiple style handwriting in Chinese calligraphy, such as Ouyang Style, the Yan style, the Liu style, the calligraphy style of Zhao Mengfu of the Yuan Dynasty etc., different style strokes has difference, therefore can set up multiple stroke Sample Storehouse in advance, user, when writing, can choose corresponding stroke Sample Storehouse according to writing wish.
The said method of the present embodiment, the writing track data of reading is divided into multiple stroke section, chief editor's section of picture and auxiliary stroke section is determined from multiple stroke section, and then determine the direction of the characteristic sum chief editor section of picture of corresponding stroke section, by the sample that the stroke of the stroke Sample Storehouse determination user writing set up in advance is corresponding, according to the sampled data of this sample and the trajectory path of stroke writing, stroke corresponding in Sample Storehouse is plotted on screen, make the person's handwriting being similar to true writing brush stroke be presented on user at the moment, improve the Experience Degree of user.
In said method, stroke sample can be extracted according to existing rubbings, a set of basic stroke Sample Storehouse is set up in advance according to these samples, stroke storehouse comprises 31 kinds of strokes of standard, each stroke is divided into several sample according to the difference of row style line again, in the process of establishing of stroke Sample Storehouse, need to imitate the stroke of sample in rubbings, concrete process of imitation is similar with above-mentioned stroke writing process, user writes on handwriting equipment, read the writing track data of the stroke imitated, and the data of this imitation stroke are processed, such as: signature analysis is carried out to the data of imitating stroke, mark each unique point of imitating stroke, mark off pen section, calculate the supplemental characteristic of needs, as a segment length, angle between section, tell critical path pen section, and judge stroke feature, as first stroke of a Chinese character Zang Feng, dew peak, receive a Hui Feng, the information such as full to the brim, the sample in above-mentioned rubbings is loaded afterwards in above-mentioned writing track data, for each the stroke section in the above-mentioned pen section marked off, according to the handwriting trace determination current sampling point of the sampling interval set along current stroke section, sampled point does perpendicular line in this prior, using the point of the profile overlapping margins of above-mentioned perpendicular line and above-mentioned sample as the starting point of sampling and terminal, according to starting point and sampled data corresponding to terminal position acquisition current sampling point in the sample, according to the next sampled point of the sampling interval determination current stroke section of setting, until the sampling of current stroke section terminates, wherein, this sampled data comprises: the length of the position of current sampling point, the angle of above-mentioned perpendicular line, sampled point distance starting point and sampled point length from home, length and the sampled point length from home of sampled point distance starting point are equivalent to the distance of above-mentioned sampled point apart from described sample profile border.
Consider that the head and the tail of stroke embody the style of whole stroke usually, therefore the process of the head and the tail information of stroke is important, based on this, the above-mentioned sampled data corresponding according to the sampled point of sample each stroke section corresponding, is plotted to the stroke of user writing on screen along above-mentioned path and can comprises:
(1) respectively based on chief editor's section of picture, stroke stage group is divided to each stroke section of sample and each stroke section corresponding to the stroke of user writing, the division rule of stroke stage group comprises: the auxiliary stroke section before first chief editor's section of picture together with first chief editor's section of picture as first stroke stage group, after first chief editor's section of picture to the stroke section between second chief editor's section of picture as second stroke stage group, so until last chief editor's section of picture, the auxiliary stroke section after last chief editor's section of picture is merged into last stroke stage group;
(2) along path respectively by first stroke stage group of corresponding for first of the stroke of user writing stroke stage group sample, and last stroke stage group of sample that is corresponding for last stroke stage group of the stroke section of user writing is started to draw, until when the stroke that the stroke of user writing only remains a stroke stage group or sample only remains a stroke stage group, the stroke stage group of stroke stage group residue number more than one is merged into one, continues corresponding drafting.
Particularly, when drawing each stroke stage group, first draw the chief editor's section of picture in stroke stage group, for the auxiliary stroke section in stroke stage group, draw from the auxiliary stroke section of first in stroke stage group and last auxiliary stroke section, until when the stroke that the stroke of user writing only remains an auxiliary stroke section or sample only remains an auxiliary stroke section, the auxiliary stroke section of auxiliary stroke section residue number more than one is merged into one, continues corresponding drafting.
And when a drafting stroke section, extract sampled point one by one according to the sampled data recorded in sample; For each sampled point, the position calculation according to the corresponding stroke section of sampled point goes out the position of sampled point in the Bayside curve of correspondence; According to the angle of the Distance geometry perpendicular line apart from described sample profile border of sampled point, the oval pitch angle (this pitch angle equals the angle of perpendicular line) of section, major axis dimension and central point are set, minor axis dimension using the slice thickness of setting as section ellipse, uses section oval along path drawing stroke section.
Because the stroke segment length in stroke Sample Storehouse may be different from the stroke segment length of user writing, if user's stroke section is shorter than sample, the ellipse (above-mentioned section is oval) drawn compares comparatively dense, on display not impact, but when if user's stroke section is more a lot of than sample stroke segment length, because between ellipse, space is larger, the person's handwriting then shown seems just smoothly discontinuous, in order to address this problem, the place that the method for interpolation is larger in space is adopted to increase oval, the Measures compare of current interpolation is simple, by calculating the distance between two continuous sampling points between same semiaxis, if this distance exceedes certain threshold value, insert N number of ellipse, N=distance/threshold value.A sampled point after the elliptic parameter inserted changes to from last sampled point gradually.Based on this, said method also comprises: judge the distance threshold whether being greater than setting along the distance between the sampled point of two on above-mentioned path, if, new sampled point is inserted between two sampled points, the number arranging new sampled point equals the round values of the distance between these two sampled points divided by above-mentioned distance threshold, with the sampled data of these two sampled points for according to arrange the sampled data of sampled point; New section ellipse drawing stroke section is inserted according to the position of new sampled point and the sampled data of correspondence.This mode ensure that the person's handwriting of display seems continuously smooth.
Corresponding to said method, the embodiment of the present invention additionally provides a kind of written handwriting being applied to writing brush and presents device, and the shown in Figure 3 written handwriting being applied to writing brush presents the structured flowchart of device, and this device comprises with lower module:
Track data read module 31, presses handwriting input device write to lifting the writing track data stopped in writing process for reading user; Wherein, this writing track data to comprise in the stroke of user writing each and writes coordinate a little and time;
Stroke section divides module 32, and for writing time order and function order a little according to each and writing coordinate a little the stroke of user writing is divided into multiple stroke section, above-mentioned multiple stroke section is divided into chief editor's section of picture and auxiliary stroke section by the length according to stroke section;
Stroke feature determination module 33, for determining the feature of corresponding stroke section according to above-mentioned chief editor's section of picture and the intersegmental annexation of auxiliary stroke, the feature of this stroke section comprises: first stroke of a Chinese character Zang Feng, the first stroke of a Chinese character pause pen, the first stroke of a Chinese character turn to, receive a Hui Feng, receive pen pause pen, to receive pen full to the brim and receive pen and turn to;
Chief editor's section of picture direction determination module 34, for determining the direction of chief editor's section of picture from all directions to rule according to the stroke section preset;
Sample determination module 35, for according to the feature in the direction of the chief editor's section of picture determined and stroke section and the stroke Sample Storehouse comparison of setting up in advance, determines according to the result of comparison the sample that above-mentioned writing track data is corresponding; Wherein, this stroke Sample Storehouse preserves the sampled data of sample corresponding to each stroke and sample each stroke section corresponding; This sampled data comprises: the angle of the corresponding position of stroke section of current sampling point, the perpendicular line of stroke section, sampled point are apart from the distance on above-mentioned sample profile border;
Stroke path determination module 36, for above-mentioned writing track data is converted to Bezier, the path using Bayside curve as the stroke of above-mentioned user writing;
Stroke display module 37, for the sampled data corresponding according to the sampled point of sample each stroke section corresponding, the stroke along above-mentioned path by user writing is plotted on screen.
The said apparatus of the present embodiment, the writing track data of reading is divided into multiple stroke section, chief editor's section of picture and auxiliary stroke section is determined from multiple stroke section, and then determine the direction of the characteristic sum chief editor section of picture of corresponding stroke section, by the sample that the stroke of the stroke Sample Storehouse determination user writing set up in advance is corresponding, according to the sampled data of this sample and the trajectory path of stroke writing, stroke corresponding in Sample Storehouse is plotted on screen, make the person's handwriting being similar to true writing brush stroke be presented on user at the moment, improve the Experience Degree of user.
Above-mentioned stroke display module comprises: stroke stage group division unit, for dividing stroke stage group to each stroke section of sample and each stroke section corresponding to the stroke of user writing based on chief editor's section of picture respectively, the division rule of stroke stage group comprises: the auxiliary stroke section before first chief editor's section of picture together with first chief editor's section of picture as first stroke stage group, after first chief editor's section of picture to the stroke section between second chief editor's section of picture as second stroke stage group, so until last chief editor's section of picture, auxiliary stroke section after last chief editor's section of picture is merged into last stroke stage group, stroke section drawing unit, for along path respectively by first stroke stage group of corresponding for first of the stroke of user writing stroke stage group sample, and last stroke stage group of sample that is corresponding for last stroke stage group of the stroke section of user writing is started to draw, until when the stroke that the stroke of user writing only remains a stroke stage group or sample only remains a stroke stage group, the stroke stage group of stroke stage group residue number more than one is merged into one, continues corresponding drafting.
Above-mentioned stroke section drawing unit comprises: chief editor draws drafting subelement, for when drawing each stroke stage group, first draws the chief editor's section of picture in stroke stage group; Auxiliary stroke section draws subelement, for for the auxiliary stroke section in stroke stage group, draw from the auxiliary stroke section of first in stroke stage group and last auxiliary stroke section, until when the stroke that the stroke of user writing only remains an auxiliary stroke section or sample only remains an auxiliary stroke section, the auxiliary stroke section of auxiliary stroke section residue number more than one is merged into one, continues corresponding drafting.
Above-mentioned stroke section drawing unit can also comprise: sampled point extracts subelement, during for drawing a stroke section, extracts sampled point one by one according to the sampled data recorded in sample; Stroke section draws subelement, and for for each sampled point, the position calculation according to the corresponding stroke section of sampled point goes out the position of sampled point in the Bayside curve of correspondence; The oval pitch angle of section, major axis dimension and central point are set according to the angle of the Distance geometry perpendicular line apart from described sample profile border of sampled point, the minor axis dimension using the slice thickness set as section ellipse, use section oval along path drawing stroke section.
When considering that user's stroke section is more a lot of than sample stroke segment length, owing to cutting into slices, space between ellipse is larger, the stroke drawn may be smoothly discontinuous, in order to avoid this situation, above-mentioned stroke section drawing unit also comprises: Distance Judgment subelement, for judging the distance threshold whether being greater than setting along the distance between the sampled point of two on path; Data arrange subelement, for when the judged result of Distance Judgment subelement is for being, new sampled point is inserted between two sampled points, the number arranging new sampled point equals the round values of the distance between two sampled points divided by distance threshold, with the sampled data of two sampled points for according to arranging the sampled data of new sampled point; Interpolation draws subelement, for inserting new section ellipse drawing stroke section according to the position of new sampled point and the sampled data of correspondence.
The device that the embodiment of the present invention provides, its technique effect realizing principle and generation is identical with preceding method embodiment, is concise and to the point description, and the not mentioned part of device embodiment part can with reference to corresponding contents in preceding method embodiment.
Process flow diagram in accompanying drawing and block diagram show system according to multiple embodiment of the present invention, the architectural framework in the cards of method and computer program product, function and operation.In this, each square frame in process flow diagram or block diagram can represent a part for module, program segment or a code, and a part for described module, program segment or code comprises one or more executable instruction for realizing the logic function specified.Also it should be noted that at some as in the realization of replacing, the function marked in square frame also can be different from occurring in sequence of marking in accompanying drawing.Such as, in fact two continuous print square frames can perform substantially concurrently, and they also can perform by contrary order sometimes, and this determines according to involved function.Also it should be noted that, the combination of the square frame in each square frame in block diagram and/or process flow diagram and block diagram and/or process flow diagram, can realize by the special hardware based system of the function put rules into practice or action, or can realize with the combination of specialized hardware and computer instruction.
The embodiment of the present invention additionally provides the computer program that a kind of written handwriting being applied to writing brush presents, comprise the computer-readable recording medium storing program code, the instruction that described program code comprises can be used for performing the method described in previous methods embodiment, specific implementation see embodiment of the method, can not repeat them here.
In several embodiments that the application provides, should be understood that disclosed apparatus and method can realize by another way.Device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, again such as, multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some communication interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.
If described function using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part of the part that technical scheme of the present invention contributes to prior art in essence in other words or this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disc or CD etc. various can be program code stored medium.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should described be as the criterion with the protection domain of claim.

Claims (10)

1. be applied to a written handwriting rendering method for writing brush, it is characterized in that, comprising:
Reading user presses handwriting input device and writes to lifting the writing track data stopped in writing process; Wherein, described writing track data to comprise in the stroke of described user writing each and writes coordinate a little and time;
The stroke of described user writing is divided into multiple stroke section with the coordinate write a little by the time order and function order of writing a little according to each, and described multiple stroke section is divided into chief editor's section of picture and auxiliary stroke section by the length according to stroke section;
Determine the feature of corresponding stroke section according to described chief editor's section of picture and the intersegmental annexation of described auxiliary stroke, the feature of described stroke section comprises: first stroke of a Chinese character Zang Feng, the first stroke of a Chinese character pause pen, the first stroke of a Chinese character turn to, receive a Hui Feng, receive pen pause pen, to receive pen full to the brim and receive pen and turn to;
Determine the direction of described chief editor's section of picture from all directions to rule according to the stroke section preset;
According to feature and the stroke Sample Storehouse comparison of setting up in advance of the direction of the described chief editor's section of picture determined and described stroke section, determine according to the result of comparison the sample that described writing track data is corresponding; Wherein, described stroke Sample Storehouse preserves the sampled data of sample corresponding to each stroke and described sample each stroke section corresponding; Described sampled data comprises: the corresponding position of described stroke section of described current sampling point, the angle of the perpendicular line of described stroke section, described sampled point are apart from the distance on described sample profile border;
Described writing track data is converted to Bezier, using described Bayside curve as the path of the stroke of described user writing;
The sampled data corresponding according to the sampled point of described sample each stroke section corresponding, the stroke along described path by described user writing is plotted on screen.
2. method according to claim 1, is characterized in that, the sampled data corresponding according to the sampled point of described sample each stroke section corresponding, is plotted to the stroke of described user writing on screen along described path and comprises:
Respectively based on chief editor's section of picture, stroke stage group is divided to each stroke section of described sample and each stroke section corresponding to the stroke of described user writing, the division rule of described stroke stage group comprises: the auxiliary stroke section before first chief editor's section of picture together with described first chief editor's section of picture as first stroke stage group, after first chief editor's section of picture to the stroke section between second chief editor's section of picture as second stroke stage group, so until last chief editor's section of picture, the auxiliary stroke section after last chief editor's section of picture is merged into last stroke stage group;
Along described path respectively by first stroke stage group of corresponding for first of the stroke of described user writing stroke stage group described sample, and last stroke stage group of described sample that is corresponding for last stroke stage group of the stroke section of described user writing is started to draw, until when the stroke that the stroke of described user writing only remains a stroke stage group or described sample only remains a stroke stage group, the stroke stage group of stroke stage group residue number more than one is merged into one, continues corresponding drafting.
3. method according to claim 2, is characterized in that, described method also comprises:
When drawing each stroke stage group, first draw the chief editor's section of picture in described stroke stage group, for the auxiliary stroke section in described stroke stage group, draw from the auxiliary stroke section of first in described stroke stage group and last auxiliary stroke section, until when the stroke that the stroke of described user writing only remains an auxiliary stroke section or described sample only remains an auxiliary stroke section, the auxiliary stroke section of auxiliary stroke section residue number more than one is merged into one, continues corresponding drafting.
4. method according to claim 3, is characterized in that, described method also comprises:
When drawing a stroke section, extract sampled point one by one according to the sampled data recorded in described sample;
For each sampled point, the position calculation according to the corresponding described stroke section of described sampled point goes out the position of described sampled point in the described Bayside curve of correspondence; According to described sampled point apart from described sample profile border Distance geometry described in the angle of perpendicular line the oval pitch angle of section, major axis dimension and central point are set, minor axis dimension using the slice thickness of setting as described section ellipse, uses described section oval along stroke section described in described path drawing.
5. method according to claim 4, is characterized in that, described method also comprises:
Judge the distance threshold whether being greater than setting along the distance between the sampled point of two on described path, if, new sampled point is inserted between described two sampled points, the number arranging described new sampled point equals the round values of the distance between described two sampled points divided by described distance threshold, with the sampled data of described two sampled points for according to arranging the sampled data of described new sampled point;
New section ellipse drawing stroke section is inserted according to the position of described new sampled point and the sampled data of correspondence.
6. the written handwriting being applied to writing brush presents a device, it is characterized in that, comprising:
Track data read module, presses handwriting input device write to lifting the writing track data stopped in writing process for reading user; Wherein, described writing track data to comprise in the stroke of described user writing each and writes coordinate a little and time;
Stroke section divides module, and with the coordinate write a little, the stroke of described user writing is divided into multiple stroke section for the time order and function order of writing according to each a little, described multiple stroke section is divided into chief editor's section of picture and auxiliary stroke section by the length according to stroke section;
Stroke feature determination module, for determining the feature of corresponding stroke section according to described chief editor's section of picture and the intersegmental annexation of described auxiliary stroke, the feature of described stroke section comprises: first stroke of a Chinese character Zang Feng, the first stroke of a Chinese character pause pen, the first stroke of a Chinese character turn to, receive a Hui Feng, receive pen pause pen, to receive pen full to the brim and receive pen and turn to;
Chief editor's section of picture direction determination module, for determining the direction of described chief editor's section of picture from all directions to rule according to the stroke section preset;
Sample determination module, for according to the feature in the direction of the described chief editor's section of picture determined and described stroke section and the stroke Sample Storehouse comparison of setting up in advance, determines according to the result of comparison the sample that described writing track data is corresponding; Wherein, described stroke Sample Storehouse preserves the sampled data of sample corresponding to each stroke and described sample each stroke section corresponding; Described sampled data comprises: the corresponding position of described stroke section of described current sampling point, the angle of the perpendicular line of described stroke section, described sampled point are apart from the distance on described sample profile border;
Stroke path determination module, for described writing track data is converted to Bezier, using described Bayside curve as the path of the stroke of described user writing;
Stroke display module, for the sampled data corresponding according to the sampled point of described sample each stroke section corresponding, the stroke along described path by described user writing is plotted on screen.
7. device according to claim 6, is characterized in that, described stroke display module comprises:
Stroke stage group division unit, for dividing stroke stage group to each stroke section of described sample and each stroke section corresponding to the stroke of described user writing based on chief editor's section of picture respectively, the division rule of described stroke stage group comprises: the auxiliary stroke section before first chief editor's section of picture together with described first chief editor's section of picture as first stroke stage group, after first chief editor's section of picture to the stroke section between second chief editor's section of picture as second stroke stage group, so until last chief editor's section of picture, auxiliary stroke section after last chief editor's section of picture is merged into last stroke stage group,
Stroke section drawing unit, for along described path respectively by first stroke stage group of corresponding for first of the stroke of described user writing stroke stage group described sample, and last stroke stage group of described sample that is corresponding for last stroke stage group of the stroke section of described user writing is started to draw, until when the stroke that the stroke of described user writing only remains a stroke stage group or described sample only remains a stroke stage group, the stroke stage group of stroke stage group residue number more than one is merged into one, continues corresponding drafting.
8. device according to claim 7, is characterized in that, described stroke section drawing unit comprises:
Chief editor draws drafting subelement, for when drawing each stroke stage group, first draws the chief editor's section of picture in described stroke stage group;
Auxiliary stroke section draws subelement, for for the auxiliary stroke section in described stroke stage group, draw from the auxiliary stroke section of first in described stroke stage group and last auxiliary stroke section, until when the stroke that the stroke of described user writing only remains an auxiliary stroke section or described sample only remains an auxiliary stroke section, the auxiliary stroke section of auxiliary stroke section residue number more than one is merged into one, continues corresponding drafting.
9. device according to claim 8, is characterized in that, described stroke section drawing unit comprises:
Sampled point extracts subelement, during for drawing a stroke section, extracts sampled point one by one according to the sampled data recorded in described sample;
Stroke section draws subelement, and for for each sampled point, the position calculation according to the corresponding described stroke section of described sampled point goes out the position of described sampled point in the described Bezier of correspondence; According to described sampled point apart from described sample profile border Distance geometry described in the angle of perpendicular line the oval pitch angle of section, major axis dimension and central point are set, minor axis dimension using the slice thickness of setting as described section ellipse, uses described section oval along stroke section described in described path drawing.
10. device according to claim 9, is characterized in that, described stroke section drawing unit also comprises:
Distance Judgment subelement, for judging the distance threshold whether being greater than setting along the distance between the sampled point of two on described path;
Data arrange subelement, for when the judged result of described Distance Judgment subelement is for being, new sampled point is inserted between described two sampled points, the number arranging described new sampled point equals the round values of the distance between described two sampled points divided by described distance threshold, with the sampled data of described two sampled points for according to arranging the sampled data of described new sampled point;
Interpolation draws subelement, for inserting new section ellipse drawing stroke section according to the position of described new sampled point and the sampled data of correspondence.
CN201510401837.1A 2015-07-09 2015-07-09 Written handwriting rendering method and device applied to writing brush Active CN105046730B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510401837.1A CN105046730B (en) 2015-07-09 2015-07-09 Written handwriting rendering method and device applied to writing brush

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510401837.1A CN105046730B (en) 2015-07-09 2015-07-09 Written handwriting rendering method and device applied to writing brush

Publications (2)

Publication Number Publication Date
CN105046730A true CN105046730A (en) 2015-11-11
CN105046730B CN105046730B (en) 2018-11-02

Family

ID=54453247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510401837.1A Active CN105046730B (en) 2015-07-09 2015-07-09 Written handwriting rendering method and device applied to writing brush

Country Status (1)

Country Link
CN (1) CN105046730B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105654531A (en) * 2015-12-30 2016-06-08 北京金山安全软件有限公司 Method and device for drawing image contour
CN107577412A (en) * 2017-08-08 2018-01-12 北京鑫博腾飞科技有限公司 A kind of digital painting and calligraphy implementation method and device that sensing is lifted based on pressing
WO2018014570A1 (en) * 2016-07-18 2018-01-25 广州视源电子科技股份有限公司 Method and apparatus for converting voice into handwriting
CN108492870A (en) * 2017-02-23 2018-09-04 中国科学院软件研究所 Picture clock test detection method based on digital pen and system
CN109284059A (en) * 2018-08-28 2019-01-29 广州视源电子科技股份有限公司 Handwriting drawing method and device, interactive intelligent panel and storage medium
CN110489724A (en) * 2019-03-13 2019-11-22 北京壹人壹本信息科技有限公司 Synthetic method, mobile terminal and the storage medium of hand-written script
CN110531875A (en) * 2019-08-21 2019-12-03 深圳市威屏科技有限公司 Write generation method, terminal device and the storage medium of the vigour of style in writing
CN111105478A (en) * 2019-12-06 2020-05-05 中国联合网络通信集团有限公司 Handwriting processing method, handwriting processing device, handwriting processing equipment and computer readable storage medium
CN111294659A (en) * 2018-12-10 2020-06-16 北京乐柏信息咨询有限公司 Method and device for controlling track playing speed, medium and processing equipment
CN111381754A (en) * 2020-04-30 2020-07-07 京东方科技集团股份有限公司 Handwriting processing method, equipment and medium
CN112270730A (en) * 2020-11-17 2021-01-26 Oppo广东移动通信有限公司 Curve generation method and device, electronic equipment and readable storage medium
CN112649049A (en) * 2020-12-29 2021-04-13 青岛罗博数码科技有限公司 Digital pen and holding posture detection method
CN113468972A (en) * 2021-06-07 2021-10-01 中金金融认证中心有限公司 Handwriting track segmentation method and computer product for handwriting recognition in complex scene
CN113743302A (en) * 2021-09-03 2021-12-03 科大讯飞股份有限公司 Handwriting generating method, device, equipment and storage medium
CN113934395A (en) * 2021-10-19 2022-01-14 河北师达教育科技有限公司 Method and device for synchronously displaying scripts in display screen and terminal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697234A (en) * 2009-09-25 2010-04-21 华南理工大学 Stroke segmentation modeling-based handwritten Chinese character Lishu beautifying method
CN101706969A (en) * 2009-10-30 2010-05-12 华南理工大学 Method for imitating calligraphic stroke-dragging effect in beautification of handwritten Chinese characters
CN103488339A (en) * 2013-09-09 2014-01-01 北京大学 Method for generating individualized digital ink of Chinese characters
CN104239910A (en) * 2014-07-31 2014-12-24 南京师范大学 Stroke addition recognition method for online handwritten Chinese characters
US8989441B2 (en) * 2013-02-07 2015-03-24 Zepp Labs, Inc. Data acquisition method and device for motion recognition, motion recognition system and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697234A (en) * 2009-09-25 2010-04-21 华南理工大学 Stroke segmentation modeling-based handwritten Chinese character Lishu beautifying method
CN101706969A (en) * 2009-10-30 2010-05-12 华南理工大学 Method for imitating calligraphic stroke-dragging effect in beautification of handwritten Chinese characters
US8989441B2 (en) * 2013-02-07 2015-03-24 Zepp Labs, Inc. Data acquisition method and device for motion recognition, motion recognition system and computer readable storage medium
CN103488339A (en) * 2013-09-09 2014-01-01 北京大学 Method for generating individualized digital ink of Chinese characters
CN104239910A (en) * 2014-07-31 2014-12-24 南京师范大学 Stroke addition recognition method for online handwritten Chinese characters

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HELOISE HWAWEN HSE等: "Recognition and beautification of multi-stroke symbols in digital ink", 《COMPUTERS & GRAPHICS》 *
刑冲等: "基于三维力信息的笔交互毛笔书法效果表达", 《计算机系统应用》 *
白本督等: "基于中国书法的虚拟毛笔模型", 《西北工业大学学报》 *

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105654531A (en) * 2015-12-30 2016-06-08 北京金山安全软件有限公司 Method and device for drawing image contour
CN105654531B (en) * 2015-12-30 2019-01-08 北京金山安全软件有限公司 Method and device for drawing image contour
WO2018014570A1 (en) * 2016-07-18 2018-01-25 广州视源电子科技股份有限公司 Method and apparatus for converting voice into handwriting
CN108492870A (en) * 2017-02-23 2018-09-04 中国科学院软件研究所 Picture clock test detection method based on digital pen and system
CN108492870B (en) * 2017-02-23 2022-01-18 中国科学院软件研究所 Method and system for testing and detecting picture clock based on digital pen
CN107577412A (en) * 2017-08-08 2018-01-12 北京鑫博腾飞科技有限公司 A kind of digital painting and calligraphy implementation method and device that sensing is lifted based on pressing
CN109284059A (en) * 2018-08-28 2019-01-29 广州视源电子科技股份有限公司 Handwriting drawing method and device, interactive intelligent panel and storage medium
CN111294659B (en) * 2018-12-10 2021-02-09 北京乐柏信息咨询有限公司 Method and device for controlling track playing speed, medium and processing equipment
CN111294659A (en) * 2018-12-10 2020-06-16 北京乐柏信息咨询有限公司 Method and device for controlling track playing speed, medium and processing equipment
CN110489724A (en) * 2019-03-13 2019-11-22 北京壹人壹本信息科技有限公司 Synthetic method, mobile terminal and the storage medium of hand-written script
CN110531875B (en) * 2019-08-21 2023-12-12 华诺科技武汉有限公司 Writing stroke generation method, terminal equipment and storage medium
CN110531875A (en) * 2019-08-21 2019-12-03 深圳市威屏科技有限公司 Write generation method, terminal device and the storage medium of the vigour of style in writing
CN111105478A (en) * 2019-12-06 2020-05-05 中国联合网络通信集团有限公司 Handwriting processing method, handwriting processing device, handwriting processing equipment and computer readable storage medium
US11687233B2 (en) 2020-04-30 2023-06-27 Boe Technology Group Co., Ltd. Handwriting processing method, touch display device, computer device and storage medium
CN111381754B (en) * 2020-04-30 2021-10-22 京东方科技集团股份有限公司 Handwriting processing method, equipment and medium
CN111381754A (en) * 2020-04-30 2020-07-07 京东方科技集团股份有限公司 Handwriting processing method, equipment and medium
CN112270730A (en) * 2020-11-17 2021-01-26 Oppo广东移动通信有限公司 Curve generation method and device, electronic equipment and readable storage medium
CN112649049A (en) * 2020-12-29 2021-04-13 青岛罗博数码科技有限公司 Digital pen and holding posture detection method
CN112649049B (en) * 2020-12-29 2022-07-22 青岛罗博数码科技有限公司 Digital pen and holding posture detection method
CN113468972A (en) * 2021-06-07 2021-10-01 中金金融认证中心有限公司 Handwriting track segmentation method and computer product for handwriting recognition in complex scene
CN113468972B (en) * 2021-06-07 2024-02-27 中金金融认证中心有限公司 Handwriting track segmentation method for handwriting recognition of complex scene and computer product
CN113743302A (en) * 2021-09-03 2021-12-03 科大讯飞股份有限公司 Handwriting generating method, device, equipment and storage medium
CN113743302B (en) * 2021-09-03 2024-04-30 科大讯飞股份有限公司 Handwriting generation method, device, equipment and storage medium
CN113934395A (en) * 2021-10-19 2022-01-14 河北师达教育科技有限公司 Method and device for synchronously displaying scripts in display screen and terminal equipment
CN113934395B (en) * 2021-10-19 2024-01-26 河北师达教育科技有限公司 Method, device and terminal equipment for synchronously displaying books in display screen

Also Published As

Publication number Publication date
CN105046730B (en) 2018-11-02

Similar Documents

Publication Publication Date Title
CN105046730A (en) Writing trace demonstration method and apparatus applied to writing brush
Song et al. ModelCraft: capturing freehand annotations and edits on physical 3D models
US6600834B1 (en) Handwriting information processing system with character segmentation user interface
CN101551724B (en) Method and device for writing characters on touch screen
US7983478B2 (en) Hidden markov model based handwriting/calligraphy generation
US7302099B2 (en) Stroke segmentation for template-based cursive handwriting recognition
JP2008532175A (en) Segmentation-based recognition
US11256946B2 (en) Method of processing and recognizing hand-written characters
Kumar et al. A lexicon-free approach for 3D handwriting recognition using classifier combination
CN109886256A (en) Intelligence evaluation and test equipment and system
CN112836542B (en) Handwriting practicing method and system based on dot matrix codes and computer readable medium
CN104951811A (en) Handwriting trace recognition method and device for writing with writing brush
KR102677200B1 (en) Gesture stroke recognition in touch-based user interface input
CN104978581B (en) The handwriting trace method of sampling and device applied to writing brush
CN107209862A (en) Program, information storage medium and identifying device
CN101364271B (en) Method for recognizing hand-written Chinese character strokes and recognition device
Garz et al. A user-centered segmentation method for complex historical manuscripts based on document graphs
CN105046288B (en) Stroke sample database method for building up and device applied to brush writing
Yang et al. Animating the brush-writing process of Chinese calligraphy characters
Kotak et al. An accelerometer based handwriting recognition of English alphabets using basic strokes
CN109062498A (en) A kind of fast Chinese character hand-writing input method
EP4086744A1 (en) Gesture stroke recognition in touch-based user interface input
JPS63286978A (en) Method for generating calligraphic style
CN114237432A (en) Handwriting processing method and device, electronic equipment and storage medium
KR20160111146A (en) Method for rendering character of digital text type into character image of digital ink type and character image generating processor for performing the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant