CN103838429A - Method and system for conducting drawing on touch screen to achieve writing brush effect - Google Patents

Method and system for conducting drawing on touch screen to achieve writing brush effect Download PDF

Info

Publication number
CN103838429A
CN103838429A CN201410051887.7A CN201410051887A CN103838429A CN 103838429 A CN103838429 A CN 103838429A CN 201410051887 A CN201410051887 A CN 201410051887A CN 103838429 A CN103838429 A CN 103838429A
Authority
CN
China
Prior art keywords
handwriting
person
scaling
sampled points
adjacent sampled
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
CN201410051887.7A
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.)
iFlytek Co Ltd
Original Assignee
iFlytek 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 iFlytek Co Ltd filed Critical iFlytek Co Ltd
Priority to CN201410051887.7A priority Critical patent/CN103838429A/en
Publication of CN103838429A publication Critical patent/CN103838429A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method and system for conducting drawing on a touch screen to achieve the writing brush effect. The method includes the steps that a track that a user moves brush marks on the touch screen is acquired, and information of sampling points is acquired; interpolating points between every two adjacent sampling points are calculated; according to the information of the sampling points, the moving speed of brush marks between every two adjacent sampling points is calculated; according to the moving speed of the brush marks, the scaling of brush mark bit maps between every two adjacent sampling points is determined; according to the scaling, original brush bit maps are scaled and then drawn to the corresponding sampling points and the corresponding interpolating points, and then writing brush marks between every two adjacent sampling points are acquired. By the utilization of the method and system, the writing brush marks drawn on the touch screen can be smooth and continuous, and then the good handwriting effect is displayed.

Description

The method for drafting of writing brush effect and system on touch-screen
Technical field
The present invention relates to writing technology field, be specifically related to method for drafting and the system of writing brush effect on a kind of touch-screen.
Background technology
Writing brush is the distinctive a kind of writing implement of China, in Chinese culture and arts history, has lofty value.The height abundant, that control difficulty of its stroke expressive force is that other any writing implements are all unapproachable.In this digital age nowadays, people start imagination can take digital field to expressive force abundant writing brush, in inheriting this great art, also makes it to be further developed.
In the prior art, the method for simulation brush writing person's handwriting is mainly to adopt hardware to obtain input data, by software algorithm, these data is carried out to correcting process, to realize the effect of brush writing, reaches the object of Reality simulation writing brush action.In these implementation methods, need to be exclusively used in the hardware device of writing brush handwriting, equipment cost is high.And, because writing brush nib is soft, carrying by degree pen while writing, the variation of the direction of starting writing etc., capital exerts an influence to the variation of handwriting, and in existing these methods, the track of wieling the pen is on device screen, to streak the track staying by felt pen, in the time that felt pen moves on device screen, equipment can be notified in the mode of touch event the position of the current felt pen of corresponding process software, pressure, time, the information such as slope, due to the CPU processing power of equipment and the machine-processed restriction of event notice, make person's handwriting display effect poor, cannot embody better the calligraphy art of writing brush.
Summary of the invention
The embodiment of the present invention provides method for drafting and the system of writing brush effect on a kind of touch-screen, makes the writing brush person's handwriting drawn on touch-screen more smooth continuously, represents better calligraphy effect.
For this reason, the embodiment of the present invention provides following technical scheme:
A method for drafting for writing brush effect on touch-screen, comprising:
Gather user's track that person's handwriting moves on touch-screen, obtain sampling point information;
Calculate the interpolation point between two adjacent sampled points;
Calculate the person's handwriting translational speed between two adjacent sampled points according to described sampling point information;
Determine the scaling of person's handwriting bitmap between two adjacent sampled points according to described person's handwriting translational speed;
According to described scaling, original brush bitmap is carried out being plotted to corresponding sampled point and interpolation point after scaling, obtain the writing brush person's handwriting between described two adjacent sampled points.
Preferably, describedly determine that according to described person's handwriting translational speed the scaling of person's handwriting bitmap between two adjacent sampled points comprises:
Determine the scaling of person's handwriting bitmap between current two adjacent sampled points according to the person's handwriting translational speed between current two adjacent sampled points;
Using the scaling of described scaling person's handwriting bitmap of each interpolation point as between current two adjacent sampled points.
Preferably, describedly determine that according to described person's handwriting translational speed the scaling of person's handwriting bitmap between two adjacent sampled points comprises:
Determine the scaling of person's handwriting bitmap between current two adjacent sampled points according to the person's handwriting translational speed between current two adjacent sampled points;
Calculate the scaling of the person's handwriting bitmap of each interpolation point between current two adjacent sampled points according to the scaling of person's handwriting bitmap between the scaling of person's handwriting bitmap between current two adjacent sampled points and previous two adjacent sampled points.
Preferably, the described person's handwriting translational speed of calculating between two adjacent sampled points according to described sampling point information comprises:
Calculate according to described sampling point information the absolute velocity that between two adjacent sampled points, person's handwriting moves;
Described absolute velocity is normalized, obtains the relative velocity that between two adjacent sampled points, person's handwriting moves;
Describedly determine that according to described person's handwriting translational speed the scaling of person's handwriting bitmap between two adjacent sampled points comprises:
Determine the scaling of person's handwriting bitmap between two adjacent sampled points according to described relative velocity.
Preferably, described method also comprises:
Before described absolute velocity is normalized to processing, judge that described absolute velocity is whether in the scope of setting;
If be less than the lower limit of described scope, using described lower limit as described absolute velocity;
If be greater than the higher limit of described scope, using described higher limit as described absolute velocity.
Preferably, described method also comprises:
Before determining the scaling of person's handwriting bitmap between two adjacent sampled points according to described relative velocity, judge whether the difference of the relative velocity that between relative velocity that between current two adjacent sampled points, person's handwriting moves and upper two adjacent sampled points, person's handwriting moves is greater than the threshold value of setting;
If so the relative velocity that, person's handwriting moves using between upper two adjacent sampled points adds or deducts the described threshold value relative velocity that person's handwriting moves as between current two adjacent sampled points.
Preferably, described method also comprises:
Pre-determine the relative velocity of described touch panel device and the corresponding relation of bitmap scaling;
Describedly determine that according to described relative velocity the scaling of person's handwriting bitmap between two adjacent sampled points comprises:
Determine the scaling of person's handwriting bitmap between two adjacent sampled points according to described corresponding relation and described relative velocity.
A drawing system for writing brush effect on touch-screen, comprising:
Acquisition module, for gathering user's track that person's handwriting moves on touch-screen, obtains sampling point information;
Interpolation point computing module, for calculating the interpolation point between two adjacent sampled points;
Translational speed computing module, for calculating the person's handwriting translational speed between two adjacent sampled points according to described sampling point information;
Scaling determination module, for determining the scaling of person's handwriting bitmap between two adjacent sampled points according to described person's handwriting translational speed;
Drafting module, for original brush bitmap being carried out being plotted to corresponding sampled point and interpolation point after scaling according to described scaling, obtains the writing brush person's handwriting between described two adjacent sampled points.
Preferably, described scaling determination module, specifically for determine the scaling of person's handwriting bitmap between current two adjacent sampled points according to the person's handwriting translational speed between current two adjacent sampled points, and using the scaling of described scaling person's handwriting bitmap of each interpolation point as between current two adjacent sampled points.
Preferably, described scaling determination module comprises:
The first computing unit, for determining the scaling of person's handwriting bitmap between current two adjacent sampled points according to the person's handwriting translational speed between current two adjacent sampled points;
The second computing unit, for calculating the scaling of the person's handwriting bitmap of each interpolation point between current two adjacent sampled points according to the scaling of person's handwriting bitmap between the scaling of person's handwriting bitmap between current two adjacent sampled points and previous two adjacent sampled points.
Preferably, described translational speed computing module comprises:
Absolute velocity computing unit, for calculating the absolute velocity that between two adjacent sampled points, person's handwriting moves according to described sampling point information;
Normalized unit, for described absolute velocity is normalized, obtains the relative velocity that between two adjacent sampled points, person's handwriting moves;
Described scaling determination module, specifically for determining the scaling of person's handwriting bitmap between two adjacent sampled points according to described relative velocity.
Preferably, described translational speed computing module also comprises:
The first judging unit, be connected with described absolute velocity computing unit and described normalized unit respectively, for judging that described absolute velocity is whether in the scope of setting, and in the time that described absolute velocity is less than the lower limit of described scope, using described lower limit as described absolute velocity, in the time that described absolute velocity is greater than the higher limit of described scope, using described higher limit as described absolute velocity.
Preferably, described translational speed computing module also comprises:
The second judging unit, be connected with described normalized unit, for judging whether the difference of the relative velocity that between relative velocity that between current two adjacent sampled points, person's handwriting moves and upper two adjacent sampled points, person's handwriting moves is greater than the threshold value of setting, and in the time that described difference is greater than the threshold value of setting, the relative velocity that person's handwriting moves using between upper two adjacent sampled points adds or deducts the described threshold value relative velocity that person's handwriting moves as between current two adjacent sampled points.
Preferably, described system also comprises:
Corresponding relation determination module, for pre-determining the relative velocity of described touch panel device and the corresponding relation of bitmap scaling;
Described scaling determination module, specifically for determining the scaling of person's handwriting bitmap between two adjacent sampled points according to described corresponding relation and described relative velocity.
The method for drafting of writing brush effect and system on the touch-screen that the embodiment of the present invention provides, determine the scaling of person's handwriting bitmap between two adjacent sampled points according to user handwriting translational speed on touch-screen, and then draw the person's handwriting in described displacement according to described scaling, ensure that the handwriting thickness of drawing changes the effect that relatively meets Writing brush calligraphy, there will not be the situation of paintbrush thickness sudden change, make the writing brush person's handwriting drawn on touch-screen more smooth continuously, can represent better calligraphy effect.And, in the time that the bitmap of corresponding scaling is obtained in calculating, be directly to obtain from buffer memory paintbrush array, instead of carry out bitmap convergent-divergent in real time, greatly reduce calculated amount, therefore on the equipment of lower arithmetic speed, also can show good performance.
Brief description of the drawings
In order to be illustrated more clearly in the embodiment of the present application or technical scheme of the prior art, to the accompanying drawing of required use in embodiment be briefly described below, apparently, the accompanying drawing the following describes is only some embodiment that record in the present invention, for those of ordinary skill in the art, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is a kind of process flow diagram of the method for drafting of writing brush effect on embodiment of the present invention touch-screen;
Fig. 2 is the schematic diagram of three sampled points adjacent in the embodiment of the present invention;
Fig. 3 is the schematic diagram of original brush bitmap in the embodiment of the present invention;
Fig. 4 is the structural representation of the drawing system of writing brush effect on embodiment of the present invention touch-screen;
Fig. 5 is a kind of structural representation of translational speed computing module in the present invention;
Fig. 6 is the another kind of structural representation of translational speed computing module in the present invention.
Embodiment
In order to make those skilled in the art person understand better the scheme of the embodiment of the present invention, below in conjunction with drawings and embodiments, the embodiment of the present invention is described in further detail.
As shown in Figure 1, be a kind of process flow diagram of the method for drafting of writing brush effect on embodiment of the present invention touch-screen, comprise the following steps:
Step 101, gathers user's track that person's handwriting moves on touch-screen, obtains sampling point information.
Particularly, can optimize sampling rate (give up for the sampled point that spacing is less, larger sampled point carries out interpolation) according to the resolution of touch panel device, record the two-dimensional coordinate of sampled point, obtain a two-dimensional coordinate point sequence.
Step 102, calculates the interpolation point between two adjacent sampled points.
Particularly, can calculate by Bezier interpolation, the computing formula of the coordinate (Pix, Piy) of i interpolation point Pi is as follows:
Pix = ( 1 - i count ) × ( 1 - i count ) × P 1 x + 2 × ( i count ) × ( 1 - i count ) × ( P 2 x - P 1 x 2 ) + i count × i count × P 2 x
Piy = ( 1 - i count ) × ( 1 - i count ) × P 1 y + 2 × ( i count ) × ( 1 - i count ) × ( P 2 y - P 1 y 2 ) + i count × i count × P 2 y
Wherein, count is interpolation point number, and the concrete numerical value of count can be determined by the distance between 2 o'clock and the length of each interpolation point.For the ease of calculating, the length of each interpolation point can be made as to 1 length in pixels.
Certainly, in actual applications, can also adopt other interpolation calculation mode, this embodiment of the present invention is not limited.
Step 103, calculates the person's handwriting translational speed between two adjacent sampled points according to described sampling point information.
It should be noted that, in actual applications, above-mentioned person's handwriting translational speed can adopt absolute velocity.Certainly, due to the touch panel device for dissimilar and brand, the user handwriting translational speed calculating can be subject to the impact of this touch panel device self-characteristic (such as resolution etc.) parameter, therefore, in order further to increase applicability and the convenience on the touch panel device of the dissimilar and brand of the inventive method, the person's handwriting translational speed (absolute velocity) calculating according to tracing point can be converted to relative velocity, like this, can set up the corresponding relation of relative velocity and bitmap scaling, can determine the scaling of person's handwriting in current displacement according to this corresponding relation and described person's handwriting translational speed, thereby also can obtain better smooth effect.
Below the computation process of relative velocity is described in detail.
First, calculate the distance of two adjacent sampled points (x1, y1) and (x2, y2):
Dis tan ce = [ ( x 2 - x 1 ) 2 + ( y 2 - y 1 ) 2 ] / 2 ;
Suppose that the sampling time is t1, the average absolute speed in this moving process is v1=Distance/t1(Point/s).
In order further to improve smooth effect, prevent sudden change, above-mentioned distance can be limited within the specific limits, such as, for the touch panel device of Android platform, if Distance is greater than D max(such as 30), make Distance equal D so maxif Distance is less than D min(such as 1), makes Distance equal D so min.So just can obtain maximum and minimum absolute translational speed: V max=D max=30, V min=D min=1.
Can adjust this span according to actual effect for the touch panel device of other platforms (as WindowsPhone, ios device and other have the equipment of similar demand).
Then, the absolute velocity calculating is above normalized, obtains relative velocity, specific formula for calculation is as follows:
V ‾ = v 1 - V min V max - V min
In order to prevent that person's handwriting from producing sudden change, affect its artistic effect, in another embodiment of the present invention, can also do further optimization process to above-mentioned relative velocity.Particularly, can judge whether the difference of the relative velocity that in described relative velocity and a upper displacement, person's handwriting moves is greater than the threshold value of setting; If so the relative velocity that, person's handwriting moves in a upper displacement adds or deducts the described threshold value relative velocity that person's handwriting moves in current displacement.
Suppose person's handwriting as shown in Figure 2, between P1 and P2, distance is d1, and the relative moving speed calculating is
Figure BDA0000465993140000072
between P2 and P3, distance is d2, and the average relative calculating is this moves for shifting to P3 point from P2 point:
(1) if V ‾ 2 > V ‾ 1 , If V ‾ 2 - V ‾ 1 > 0.1 , So V ‾ 2 = V ‾ 1 + 0.1 , Otherwise
Figure BDA0000465993140000077
constant;
(2) if V &OverBar; 2 < V &OverBar; 1 , If V &OverBar; 1 - V &OverBar; 2 > 0.1 , So V &OverBar; 2 = V &OverBar; 1 - 0.1 , Otherwise
Figure BDA00004659931400000711
constant.
Step 104, determines the scaling of person's handwriting bitmap between two adjacent sampled points according to described person's handwriting translational speed.
Particularly, the person's handwriting translational speed that can pre-determine described touch panel device (can be absolute velocity, also can be relative velocity) with the corresponding relation of bitmap scaling, can determine the scaling of person's handwriting bitmap between two adjacent sampled points according to this corresponding relation and described person's handwriting translational speed.
Experiment shows that scaling and person's handwriting translational speed are when linear, and the person's handwriting of the writing brush obtaining is comparatively level and smooth, has following relation:
Ratio=k*V;
Wherein, Ratio is scaling, and V is person's handwriting translational speed, and k is scale-up factor.
The size of above-mentioned k value is because of the characteristic difference difference of concrete touch panel device, the experimental formula of the described corresponding relation of expression that therefore, can obtain according to experiment and person's handwriting translational speed can obtain having the scaling of person's handwriting in the current displacement of smooth effect.
Such as, for the touch panel device of common Android platform, above-mentioned k value can get 1.0, for the touch panel device of other platform, can adjust accordingly with reference to actual effect.
Step 105, carries out original brush bitmap to be plotted to corresponding sampled point and interpolation point after scaling according to described scaling, obtains the writing brush person's handwriting between described two adjacent sampled points.
Determining after the scaling of person's handwriting bitmap between two adjacent sampled points, can calculate and obtain the paintbrush bitmap that current interpolation point need to be drawn according to this scaling, then drawing this bitmap at each interpolation point.Original brush bitmap as shown in Figure 3.
Such as, for the touch panel device of Android platform, the related realization method of carrying out bitmap convergent-divergent according to scaling is as follows:
Figure BDA0000465993140000081
Illustrate:
1, CACHED_BITMAP_COUNT is for creating buffer memory quantity, and concrete size is relevant with smoothness requirement, and higher this value of smoothness needing is larger, and EMS memory occupation amount is larger simultaneously.
2, the zoom factor that mBrushScaleRatio is overall thickness, for arranging writing brush effect entirety thickness.
3, mCachedBrush is a Bitmap array, for storing the cached bitmap of different zoom ratio.
4, brushWidth, brushHeight are the size of original brush image.
According to the scaling Ratio calculating above, obtain corresponding convergent-divergent paintbrush bitmap, concrete function is as follows:
Figure BDA0000465993140000082
The paintbrush array that wherein mCachedBrush is buffer memory.
For the touch panel device of other application platform, can realize with reference to the concrete API of aforesaid way and this touch panel device.
For the each interpolation point between two adjacent sampled points, can adopt same scaling to carry out convergent-divergent.Taking Fig. 2 as example, P1, P2, P3 are three adjacent sampled points, and the P1-P2 section figure scaling calculating is Ratio 1, P2-P3 section figure scaling is Ratio 2.According to Ratio 1scaling carries out the drafting of P1-P2 section, according to Ratio 2scaling carries out the drafting of P2-P3 section.
It should be noted that, in actual applications, above-mentioned steps 101 to the process of step 105 repeats in real time, that is to say, often collects two neighbouring sample points, carries out step 101 process to step 105.
The method of the embodiment of the present invention, determine the scaling of person's handwriting bitmap between two adjacent sampled points according to user handwriting translational speed on touch-screen, and then draw the person's handwriting in described displacement according to described scaling, ensure that the handwriting thickness of drawing changes the effect that relatively meets Writing brush calligraphy, there will not be the situation of paintbrush thickness sudden change, make the writing brush person's handwriting drawn on touch-screen more smooth continuously, can represent better calligraphy effect.And, in the time that the bitmap of corresponding scaling is obtained in calculating, be directly to obtain from buffer memory paintbrush array, instead of carry out bitmap convergent-divergent in real time, greatly reduce calculated amount, therefore on the equipment of lower arithmetic speed, also can show good performance.
Certainly, in order further to optimize bitmap effect, make its stroke showing have more flatness, in another embodiment of the present invention, can also further calculate according to the scaling of person's handwriting bitmap between the two adjacent sampled points that obtain the scaling of each interpolation point, and calculate and obtain the paintbrush bitmap that current interpolation point need to be drawn according to this scaling, then draw described bitmap at each interpolation point.
Still, taking Fig. 2 as example, P1, P2, P3 are three adjacent sampled points, and the P1-P2 section figure scaling calculating is Ratio 1, P2-P3 section figure scaling is Ratio 2.Utilize scaling Ratio 1with scaling Ratio 2draw P2-P3 section, P1-P2 section is by Ratio 1not shown in the figures with previous sampled point P0() the scaling Ratio that calculates with P1 0draw.
If P1 is starting point (P1 does not have more forward point), can directly make Ratio 0=Ratio 1, can calculate as follows the scaling of i interpolation point between P2-P3:
Ratio i = Ratio 1 + ( i count ) &times; ( Ratio 2 - Ratio 1 )
According to Ratio ito the bitmap Bitmap of i interpolation point between former bitmap convergent-divergent P2-P3 i, by Bitmap ibeing plotted in coordinate points (Pix, Piy) locates.
The method of this embodiment, has further considered that neighbouring sample puts the variation tendency of interval scaling, can make the writing brush person's handwriting drawn more smooth continuously.
Correspondingly, the embodiment of the present invention also provides the drawing system of writing brush effect on a kind of touch-screen, as shown in Figure 4, is a kind of structural representation of this system.
In this embodiment, described system comprises:
Acquisition module 401, for gathering user's track that person's handwriting moves on touch-screen, obtains sampling point information;
Interpolation point computing module 402, for calculating the interpolation point between two adjacent sampled points;
Translational speed computing module 403, for calculating the person's handwriting translational speed between two adjacent sampled points according to described sampling point information;
Scaling determination module 404, for determining the scaling of person's handwriting bitmap between two adjacent sampled points according to described person's handwriting translational speed;
Drafting module 405, for original brush bitmap being carried out being plotted to corresponding sampled point and interpolation point after scaling according to described scaling, obtains the writing brush person's handwriting between described two adjacent sampled points.
It should be noted that, in actual applications, above-mentioned person's handwriting translational speed can adopt absolute velocity, also can adopt relative velocity, and correspondingly, translational speed computing module 403 can have multiple implementation.
As shown in Figure 5, be a kind of structural representation of translational speed computing module in the embodiment of the present invention.
In this embodiment, described translational speed computing module comprises:
Absolute velocity computing unit 501, for calculating the absolute velocity that between two adjacent sampled points, person's handwriting moves according to described sampling point information;
Normalized unit 502, for described absolute velocity is normalized, obtains the relative velocity that between two adjacent sampled points, person's handwriting moves, and concrete processing procedure can, with reference to the description in the inventive method embodiment above, not repeat them here.
Translational speed computing module based on this embodiment, above-mentioned scaling determination module 404 can be determined according to described relative velocity the scaling of person's handwriting bitmap between two adjacent sampled points.
Further, as shown in Figure 6, in the another kind of structure of translational speed computing module, also can comprise: the first judging unit 601, be connected with absolute velocity computing unit 501 and normalized unit 502 respectively, for judging that described absolute velocity is whether in the scope of setting, and in the time that described absolute velocity is less than the lower limit of described scope, using described lower limit as described absolute velocity, in the time that described absolute velocity is greater than the higher limit of described scope, using described higher limit as described absolute velocity.Utilize this first judging unit 601, can further improve smooth effect, prevent sudden change.
In addition, in another embodiment of translational speed computing module, also can further comprise: the second judging unit 701, be connected with normalized unit 502, for judging whether the difference of the relative velocity that between relative velocity that between current two adjacent sampled points, person's handwriting moves and upper two adjacent sampled points, person's handwriting moves is greater than the threshold value of setting, and in the time that described difference is greater than the threshold value of setting, the relative velocity that person's handwriting moves using between upper two adjacent sampled points adds or deducts the described threshold value relative velocity that person's handwriting moves as between current two adjacent sampled points.
On touch-screen of the present invention in the drawing system of writing brush effect, for the person's handwriting bitmap at the each interpolation point place between two adjacent sampled points, can adopt identical scaling, also can adopt different scalings, consideration neighbouring sample is put the variation tendency of interval scaling, so that the writing brush person's handwriting of drawing is more smooth continuously.
For this reason, above-mentioned scaling determination module 404 can directly be determined the scaling of person's handwriting bitmap between current two adjacent sampled points according to the person's handwriting translational speed between current two adjacent sampled points, and using the scaling of described scaling person's handwriting bitmap of each interpolation point as between current two adjacent sampled points.
The another kind of implementation structure of above-mentioned scaling determination module 404 can comprise: the first computing unit and the second computing unit, wherein:
The first computing unit is for determining the scaling of person's handwriting bitmap between current two adjacent sampled points according to the person's handwriting translational speed between current two adjacent sampled points;
The second computing unit is for calculating the scaling of the person's handwriting bitmap of each interpolation point between current two adjacent sampled points according to the scaling of person's handwriting bitmap between the scaling of person's handwriting bitmap between current two adjacent sampled points and previous two adjacent sampled points.Concrete calculating can, with reference to the description in the inventive method embodiment above, not repeat them here.
The system of the embodiment of the present invention, determine the scaling of person's handwriting bitmap between two adjacent sampled points according to user handwriting translational speed on touch-screen, and then draw the person's handwriting in described displacement according to described scaling, ensure that the handwriting thickness of drawing changes the effect that relatively meets Writing brush calligraphy, there will not be the situation of paintbrush thickness sudden change, make the writing brush person's handwriting drawn on touch-screen more smooth continuously, can represent better calligraphy effect.And, in the time that the bitmap of corresponding scaling is obtained in calculating, be directly to obtain from buffer memory paintbrush array, instead of carry out bitmap convergent-divergent in real time, greatly reduce calculated amount, therefore on the equipment of lower arithmetic speed, also can show good performance.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually referring to, what each embodiment stressed is and the difference of other embodiment.Especially,, for system embodiment, because it is substantially similar in appearance to embodiment of the method, so describe fairly simplely, relevant part is referring to the part explanation of embodiment of the method.System embodiment described above is only schematic, the wherein said unit as separating component explanation can or can not be also physically to separate, the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed in multiple network element.Can select according to the actual needs some or all of module wherein to realize the object of the present embodiment scheme.Those of ordinary skill in the art, in the situation that not paying creative work, are appreciated that and implement.
Above the embodiment of the present invention is described in detail, has applied embodiment herein the present invention is set forth, the explanation of above embodiment is just for helping to understand method and apparatus of the present invention; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention meanwhile.

Claims (14)

1. a method for drafting for writing brush effect on touch-screen, is characterized in that, comprising:
Gather user's track that person's handwriting moves on touch-screen, obtain sampling point information;
Calculate the interpolation point between two adjacent sampled points;
Calculate the person's handwriting translational speed between two adjacent sampled points according to described sampling point information;
Determine the scaling of person's handwriting bitmap between two adjacent sampled points according to described person's handwriting translational speed;
According to described scaling, original brush bitmap is carried out being plotted to corresponding sampled point and interpolation point after scaling, obtain the writing brush person's handwriting between described two adjacent sampled points.
2. method according to claim 1, is characterized in that, describedly determines that according to described person's handwriting translational speed the scaling of person's handwriting bitmap between two adjacent sampled points comprises:
Determine the scaling of person's handwriting bitmap between current two adjacent sampled points according to the person's handwriting translational speed between current two adjacent sampled points;
Using the scaling of described scaling person's handwriting bitmap of each interpolation point as between current two adjacent sampled points.
3. method according to claim 1, is characterized in that, describedly determines that according to described person's handwriting translational speed the scaling of person's handwriting bitmap between two adjacent sampled points comprises:
Determine the scaling of person's handwriting bitmap between current two adjacent sampled points according to the person's handwriting translational speed between current two adjacent sampled points;
Calculate the scaling of the person's handwriting bitmap of each interpolation point between current two adjacent sampled points according to the scaling of person's handwriting bitmap between the scaling of person's handwriting bitmap between current two adjacent sampled points and previous two adjacent sampled points.
4. according to the method described in claim 1,2 or 3, it is characterized in that, the described person's handwriting translational speed of calculating between two adjacent sampled points according to described sampling point information comprises:
Calculate according to described sampling point information the absolute velocity that between two adjacent sampled points, person's handwriting moves;
Described absolute velocity is normalized, obtains the relative velocity that between two adjacent sampled points, person's handwriting moves;
Describedly determine that according to described person's handwriting translational speed the scaling of person's handwriting bitmap between two adjacent sampled points comprises:
Determine the scaling of person's handwriting bitmap between two adjacent sampled points according to described relative velocity.
5. method according to claim 4, is characterized in that, described method also comprises:
Before described absolute velocity is normalized to processing, judge that described absolute velocity is whether in the scope of setting;
If be less than the lower limit of described scope, using described lower limit as described absolute velocity;
If be greater than the higher limit of described scope, using described higher limit as described absolute velocity.
6. method according to claim 5, is characterized in that, described method also comprises:
Before determining the scaling of person's handwriting bitmap between two adjacent sampled points according to described relative velocity, judge whether the difference of the relative velocity that between relative velocity that between current two adjacent sampled points, person's handwriting moves and upper two adjacent sampled points, person's handwriting moves is greater than the threshold value of setting;
If so the relative velocity that, person's handwriting moves using between upper two adjacent sampled points adds or deducts the described threshold value relative velocity that person's handwriting moves as between current two adjacent sampled points.
7. method according to claim 6, is characterized in that, described method also comprises:
Pre-determine the relative velocity of described touch panel device and the corresponding relation of bitmap scaling;
Describedly determine that according to described relative velocity the scaling of person's handwriting bitmap between two adjacent sampled points comprises:
Determine the scaling of person's handwriting bitmap between two adjacent sampled points according to described corresponding relation and described relative velocity.
8. a drawing system for writing brush effect on touch-screen, is characterized in that, comprising:
Acquisition module, for gathering user's track that person's handwriting moves on touch-screen, obtains sampling point information;
Interpolation point computing module, for calculating the interpolation point between two adjacent sampled points;
Translational speed computing module, for calculating the person's handwriting translational speed between two adjacent sampled points according to described sampling point information;
Scaling determination module, for determining the scaling of person's handwriting bitmap between two adjacent sampled points according to described person's handwriting translational speed;
Drafting module, for original brush bitmap being carried out being plotted to corresponding sampled point and interpolation point after scaling according to described scaling, obtains the writing brush person's handwriting between described two adjacent sampled points.
9. system according to claim 8, is characterized in that,
Described scaling determination module, specifically for determine the scaling of person's handwriting bitmap between current two adjacent sampled points according to the person's handwriting translational speed between current two adjacent sampled points, and using the scaling of described scaling person's handwriting bitmap of each interpolation point as between current two adjacent sampled points.
10. system according to claim 8, is characterized in that, described scaling determination module comprises:
The first computing unit, for determining the scaling of person's handwriting bitmap between current two adjacent sampled points according to the person's handwriting translational speed between current two adjacent sampled points;
The second computing unit, for calculating the scaling of the person's handwriting bitmap of each interpolation point between current two adjacent sampled points according to the scaling of person's handwriting bitmap between the scaling of person's handwriting bitmap between current two adjacent sampled points and previous two adjacent sampled points.
System described in 11. according to Claim 8,9 or 10, is characterized in that, described translational speed computing module comprises:
Absolute velocity computing unit, for calculating the absolute velocity that between two adjacent sampled points, person's handwriting moves according to described sampling point information;
Normalized unit, for described absolute velocity is normalized, obtains the relative velocity that between two adjacent sampled points, person's handwriting moves;
Described scaling determination module, specifically for determining the scaling of person's handwriting bitmap between two adjacent sampled points according to described relative velocity.
12. systems according to claim 11, is characterized in that, described translational speed computing module also comprises:
The first judging unit, be connected with described absolute velocity computing unit and described normalized unit respectively, for judging that described absolute velocity is whether in the scope of setting, and in the time that described absolute velocity is less than the lower limit of described scope, using described lower limit as described absolute velocity, in the time that described absolute velocity is greater than the higher limit of described scope, using described higher limit as described absolute velocity.
13. systems according to claim 12, is characterized in that, described translational speed computing module also comprises:
The second judging unit, be connected with described normalized unit, for judging whether the difference of the relative velocity that between relative velocity that between current two adjacent sampled points, person's handwriting moves and upper two adjacent sampled points, person's handwriting moves is greater than the threshold value of setting, and in the time that described difference is greater than the threshold value of setting, the relative velocity that person's handwriting moves using between upper two adjacent sampled points adds or deducts the described threshold value relative velocity that person's handwriting moves as between current two adjacent sampled points.
14. systems according to claim 13, is characterized in that, described system also comprises:
Corresponding relation determination module, for pre-determining the relative velocity of described touch panel device and the corresponding relation of bitmap scaling;
Described scaling determination module, specifically for determining the scaling of person's handwriting bitmap between two adjacent sampled points according to described corresponding relation and described relative velocity.
CN201410051887.7A 2014-02-14 2014-02-14 Method and system for conducting drawing on touch screen to achieve writing brush effect Pending CN103838429A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410051887.7A CN103838429A (en) 2014-02-14 2014-02-14 Method and system for conducting drawing on touch screen to achieve writing brush effect

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410051887.7A CN103838429A (en) 2014-02-14 2014-02-14 Method and system for conducting drawing on touch screen to achieve writing brush effect

Publications (1)

Publication Number Publication Date
CN103838429A true CN103838429A (en) 2014-06-04

Family

ID=50802006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410051887.7A Pending CN103838429A (en) 2014-02-14 2014-02-14 Method and system for conducting drawing on touch screen to achieve writing brush effect

Country Status (1)

Country Link
CN (1) CN103838429A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109857322A (en) * 2019-01-24 2019-06-07 广东第二师范学院 A kind of paintbrush width control method and device based on Android
CN110007787A (en) * 2019-03-21 2019-07-12 深圳点猫科技有限公司 A kind of interpolation method under the network coordinate system based on artificial intelligence, storage medium and system
CN111275614A (en) * 2018-12-04 2020-06-12 苏州天鸿嘉汇软件有限公司 Method for realizing lossless image scaling
CN112346633A (en) * 2020-11-17 2021-02-09 Oppo广东移动通信有限公司 Input processing method, input processing device, electronic device, and storage medium
CN114510158A (en) * 2021-12-08 2022-05-17 深圳市康冠商用科技有限公司 Electronic stroke error correction method and device, touch screen device and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111275614A (en) * 2018-12-04 2020-06-12 苏州天鸿嘉汇软件有限公司 Method for realizing lossless image scaling
CN109857322A (en) * 2019-01-24 2019-06-07 广东第二师范学院 A kind of paintbrush width control method and device based on Android
CN110007787A (en) * 2019-03-21 2019-07-12 深圳点猫科技有限公司 A kind of interpolation method under the network coordinate system based on artificial intelligence, storage medium and system
CN112346633A (en) * 2020-11-17 2021-02-09 Oppo广东移动通信有限公司 Input processing method, input processing device, electronic device, and storage medium
CN114510158A (en) * 2021-12-08 2022-05-17 深圳市康冠商用科技有限公司 Electronic stroke error correction method and device, touch screen device and storage medium
CN114510158B (en) * 2021-12-08 2022-12-30 深圳市康冠商用科技有限公司 Electronic stroke error correction method and device, touch screen device and storage medium

Similar Documents

Publication Publication Date Title
CN102937848B (en) Method for editing handwritings and electronic equipment
CN102937849B (en) The beautification method of real-time handwriting and electronic equipment
CN102521858B (en) Handwriting generating method for electronic writing brush
CN111381754B (en) Handwriting processing method, equipment and medium
CN110531875B (en) Writing stroke generation method, terminal equipment and storage medium
CN100520692C (en) Hand-written input method capable of implementing writing style effect
CN103310474B (en) A kind of implementation method of original handwriting and system
CN102520849B (en) Electronic brush writing method and system
CN103838429A (en) Method and system for conducting drawing on touch screen to achieve writing brush effect
CN107526526B (en) Method and device for determining pressure-sensitive handwriting area
KR20110133787A (en) Touch screen and method of displaying
CN103064554A (en) Chirography smoothing method of handwriting input method and handwriting input method
CN101763234A (en) Method and device for simulating various screen resolutions
CN103885685A (en) Method and device for processing pages
CN113590000B (en) Handwriting processing method, handwriting processing device and storage medium
CN104714742A (en) Soft pen realization method and device based on touch screen
CN103984492A (en) Method and device for scaling display picture of mobile terminal and mobile terminal
CN106909246A (en) A kind of electronic writing method for deleting and Intelligent touch TV
CN102999321A (en) Writing brush electronic paintbrush setting device and writing brush electronic paintbrush
CN104598048A (en) Digital pen writing control method and system
CN104461315A (en) Handwriting input method for achieving vigorous writing effect
CN104714743B (en) A kind of soft implementation method and device based on touch screen
CN110322538A (en) Character displaying method, device, storage medium and processor
CN110235097B (en) Reversible digital ink for inking application user interface
CN111063005B (en) Handwriting processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Wangjiang Road high tech Development Zone Hefei city Anhui province 230088 No. 666

Applicant after: Iflytek Co., Ltd.

Address before: Wangjiang Road high tech Development Zone Hefei city Anhui province 230088 No. 666

Applicant before: Anhui USTC iFLYTEK Co., Ltd.

COR Change of bibliographic data
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140604