CN106155540A - Electronic brush pen form of a stroke or a combination of strokes treating method and apparatus - Google Patents

Electronic brush pen form of a stroke or a combination of strokes treating method and apparatus Download PDF

Info

Publication number
CN106155540A
CN106155540A CN201510158736.6A CN201510158736A CN106155540A CN 106155540 A CN106155540 A CN 106155540A CN 201510158736 A CN201510158736 A CN 201510158736A CN 106155540 A CN106155540 A CN 106155540A
Authority
CN
China
Prior art keywords
touch point
point
stroke
coordinate
combination
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
CN201510158736.6A
Other languages
Chinese (zh)
Other versions
CN106155540B (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.)
New Founder Holdings Development Co ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics 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 Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201510158736.6A priority Critical patent/CN106155540B/en
Publication of CN106155540A publication Critical patent/CN106155540A/en
Application granted granted Critical
Publication of CN106155540B publication Critical patent/CN106155540B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention provides a kind of electronic brush pen form of a stroke or a combination of strokes treating method and apparatus, the method includes: gather obtain the current touch point of the brush pen form of a stroke or a combination of strokes that user operate on electronic device touchscreen coordinate and before the coordinate of touch point, before this, touch point includes the previous touch point of current touch point and the first two touch point of current touch point;The distance between coordinate and the coordinate of previous touch point according to current touch point, and the distance between the coordinate of previous touch point and the coordinate of the first two touch point, determine the deformation characteristics parameter of current touch point;Coordinate according to current touch point and the deformation characteristics parameter of current touch point, determine the form of a stroke or a combination of strokes profile of current touch point;Render the form of a stroke or a combination of strokes profile area defined of current touch point.By calculating the form of a stroke or a combination of strokes profile of each touch point with the deformation characteristics parameter of each touch point so that the brush pen form of a stroke or a combination of strokes of simulation is greatly improved with the similarity of brush writing effect.

Description

Electronic brush pen form of a stroke or a combination of strokes treating method and apparatus
Technical field
The present invention relates to technical field of image processing, particularly relate to a kind of electronic brush pen form of a stroke or a combination of strokes processing method and Device.
Background technology
Along with the development of touch screen technology, existing intelligent terminal uses touch screen mostly.User can To be interacted with intelligent terminal by touch screen, thus complete the operation to intelligent terminal easily Journey.
And, the various application for intelligent terminal are also widely deployed.Such as, on the terminal device The application program carrying out painting especially with brush pen that carries out painting (is called for short: APP) etc..User can To download and to install drawing APP at application provider.When user needs to use, can be opened this APP enters operation interface, and on operation interface, user can pass through finger or felt pen at touch screen Upper operation, thus simulate the brush pen form of a stroke or a combination of strokes and draw various pattern, or write etc..
The existing method simulating the brush pen form of a stroke or a combination of strokes on the touchscreen, is not changed in owing to the form of a stroke or a combination of strokes is single, with hair The feature of the soft easily deformation of pen is not inconsistent, it is impossible to reflection brush pen produces because deforming upon in writing process Form of a stroke or a combination of strokes effect, the brush pen form of a stroke or a combination of strokes simulation similarity low.
Summary of the invention
The present invention provides a kind of electronic brush pen form of a stroke or a combination of strokes treating method and apparatus, in order to the most effective The form of a stroke or a combination of strokes effect that simulation brush pen produces because of deformation in writing process, to overcome the brush pen form of a stroke or a combination of strokes and the hair of simulation The defect that writing effect similarity is the highest.
The present invention provides a kind of electronic brush pen form of a stroke or a combination of strokes processing method, including:
Gather the coordinate of the current touch point obtaining the brush pen form of a stroke or a combination of strokes that user operates on electronic device touchscreen The coordinate of touch point before, described before touch point include described current touch point previous touch point and The first two touch point of described current touch point;
The distance between coordinate and the coordinate of described previous touch point according to described current touch point, and Distance between coordinate and the coordinate of the first two touch point described of described previous touch point, determine described currently The deformation characteristics parameter of touch point;
Coordinate according to described current touch point and the deformation characteristics parameter of described current touch point, determine The form of a stroke or a combination of strokes profile of described current touch point;
Render the form of a stroke or a combination of strokes profile area defined of described current touch point.
The present invention provides a kind of electronic brush pen form of a stroke or a combination of strokes processing means, including:
Acquisition module, for gather obtain the brush pen form of a stroke or a combination of strokes that operate on electronic device touchscreen of user ought The coordinate of the coordinate of front touch point and before touch point, described before touch point include described current touch point Previous touch point and the first two touch point of described current touch point;
First deformation characteristics computing module, for according to the coordinate of described current touch point with described previous touch Touch the distance between coordinate a little, and the coordinate of described previous touch point and the seat of the first two touch point described Distance between mark, determines the deformation characteristics parameter of described current touch point;
First form of a stroke or a combination of strokes profile processing module, for according to the coordinate of described current touch point and described currently The deformation characteristics parameter of touch point, determines the form of a stroke or a combination of strokes profile of described current touch point;
Rendering module, for rendering the form of a stroke or a combination of strokes profile area defined of described current touch point.
The electronic brush pen form of a stroke or a combination of strokes treating method and apparatus that the present invention provides, by with adjacent multiple writing brushs Distance between shape touch point is foundation, determines the deformation characteristics parameter of current touch point, and then according to this The coordinate of deformation characteristics parameter and current touch point determines the form of a stroke or a combination of strokes profile of current touch point, class successively Push away, along with little by little describing of user, the form of a stroke or a combination of strokes profile of each touch point can be formed in real time, thus by The form of a stroke or a combination of strokes profile overlay area of each touch point is filled with rendering, to demonstrate described pen by step ground The mark form of a stroke or a combination of strokes.Each touch point is calculated by deformation characteristics parameter with each touch point in the technical program The mode of form of a stroke or a combination of strokes profile, can the most effectively simulate brush pen in writing process because deformation is produced Raw form of a stroke or a combination of strokes effect so that the brush pen form of a stroke or a combination of strokes of simulation is greatly improved with the similarity of brush writing effect.
Accompanying drawing explanation
The flow chart of the electronic brush pen form of a stroke or a combination of strokes processing method that Fig. 1 provides for the embodiment of the present invention one;
The flow chart of the electronic brush pen form of a stroke or a combination of strokes processing method that Fig. 2 provides for the embodiment of the present invention two;
The structural representation of the electronic brush pen form of a stroke or a combination of strokes processing means that Fig. 3 provides for the embodiment of the present invention three;
The structural representation of the electronic brush pen form of a stroke or a combination of strokes processing means that Fig. 4 provides for the embodiment of the present invention four.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with this Accompanying drawing in bright embodiment, is clearly and completely described the technical scheme in the embodiment of the present invention, Obviously, described embodiment is a part of embodiment of the present invention rather than whole embodiments.Based on Embodiment in the present invention, those of ordinary skill in the art are obtained under not making creative work premise The every other embodiment obtained, broadly falls into the scope of protection of the invention.
The flow chart of the electronic brush pen form of a stroke or a combination of strokes processing method that Fig. 1 provides for the embodiment of the present invention one, this enforcement The described method that example provides can be performed by a processing means, and this processing means is integrally disposed in user's In electronic equipment.As it is shown in figure 1, the method includes:
The current of the brush pen form of a stroke or a combination of strokes that step 101, collection acquisition user operate on electronic device touchscreen touches Touch the coordinate of coordinate a little and touch point before, described before before touch point includes described current touch point The first two touch point of one touch point and described current touch point.
Specifically, when user needs the font writing out the brush pen form of a stroke or a combination of strokes on the touch screen of electronic equipment, User can carry out touch operation on the touchscreen, and accordingly, processing means such as processor can detect The position, touch point that user operates on this touch screen.
The present embodiment does not limit the specific algorithm detecting this position, touch point, and those skilled in the art are permissible Select or design the detection algorithm of required precision the most voluntarily.
In the present embodiment, touch point coordinate sequence can be formed during user operation, these touch points sit Mark is sequentially connected with, and constitutes handwriting trace.Assuming that current touch point is the n-th touch point, wherein n is Integer more than or equal to 1.Gather each touch point formed during obtaining user operation successively, and Each touch point carries out follow-up deformation characteristics parameter calculate and form of a stroke or a combination of strokes profile calculating process.
Wherein, for current touch point, before its above two needs to use it during calculating The coordinate information of touch point.What deserves to be explained is, if current touch point is first or second touch point Time, its calculation will be explained below explanation, and for other touch points in addition to these 2, The present embodiment subsequent step all can be used to process.
Step 102, according between coordinate and the coordinate of described previous touch point of described current touch point Distance between distance, and the coordinate of described previous touch point and the coordinate of the first two touch point described, really The deformation characteristics parameter of fixed described current touch point.
The first two touch point of current touch point, the previous touch point of current touch point and current touch point are three The most adjacent individual touch point.Assume: the coordinate of current touch point is Pn=(xn,yn,tn), current touch point The coordinate of previous touch point be Pn-1=(xn-1,yn-1,tn-1), the coordinate of the first two touch point of current touch point is Pn-2=(xn-2,yn-2,tn-2).Wherein, tn、tn-1And tn-2It is respectively the touch time of corresponding touch point.
Specifically, according between coordinate and the coordinate of described previous touch point of described current touch point Distance between distance, and the coordinate of described previous touch point and the coordinate of the first two touch point described, really The deformation characteristics parameter of fixed described current touch point, including:
According to formula w n = W · e - a s ( x n - x n - 1 ) 2 + ( y n - y n - 1 ) 2 + b s ( x n - 1 - x n - 1 ) 2 + ( y n - 1 - y n - 2 ) 2 ( a s + b s ) Δt , Determine the deformation of current touch point Characteristic parameter wn, wherein, W is form of a stroke or a combination of strokes width reference value, can be preset as a constant, and e is nature The truth of a matter, asAnd bsFor shifted matching coefficient, span be [0 ,+∞), Δ t is adjacent touch point Touch time interval.
What deserves to be explained is, when first touch point is for current touch point, now, first The deformation characteristics parameter of individual touch point is set equal to W.Second touch point is for current touch point Situation, now, the deformation characteristics parameter of second touch point is such as according to formulaDetermine, i.e. come really according to the distance between second touch point and first touch point Fixed.
Step 103, according to the coordinate of described current touch point and the deformation characteristics of described current touch point Parameter, determines the form of a stroke or a combination of strokes profile of described current touch point.
When carrying out brush writing, the person's handwriting write has one fixed width, corresponding next with certain unicursal Saying, this stroke includes multiple touch point, and each touch point has the profile size of a bit, all tactile Touch profile a little merge and carry out rendering display, then constitute the form of a stroke or a combination of strokes effect of this stroke.
Therefore, the present embodiment needs the profile of each touch point is calculated.Specifically, according to The coordinate of described current touch point and the deformation characteristics parameter of described current touch point, determine described currently The form of a stroke or a combination of strokes profile of touch point, including:
First, according to the coordinate of current touch point, the form of a stroke or a combination of strokes boundary curve side that current touch point is corresponding is determined Cheng Zuwei:
Wherein, described a, b and c are preset constant, yOnCorresponding form of a stroke or a combination of strokes upper bound curvilinear equation, yUnderCorresponding pen Shape lower bound curvilinear equation, yRightThe corresponding form of a stroke or a combination of strokes right boundary curvilinear equation.
For each touch point, its form of a stroke or a combination of strokes profile can determine according to form of a stroke or a combination of strokes boundary curve, first, The form of a stroke or a combination of strokes boundary curve of each touch point includes three boundary curves upper and lower, right.
Secondly, solve above-mentioned form of a stroke or a combination of strokes boundary curve equation group, obtain the surrounded closed sides of form of a stroke or a combination of strokes boundary curve The set M of the point in boundary, where it is assumed that N (x'i,y'i) it is the coordinate of any point in this set M.
Again, formula is usedTo the some N (x' on set Mi,y'i) enter Row scaling, obtains constituting the set M of the point of the form of a stroke or a combination of strokes profile of current touch pointw.Thus, by current touch The set M of the point of the form of a stroke or a combination of strokes profile of pointwConstitute the form of a stroke or a combination of strokes profile of current touch point.Wherein,For with coordinate points N (x'i,y'i) corresponding set MwIn the coordinate of point.
Every bit in border set M and set MwIn each point one_to_one corresponding, and, gather MwIn Certain point be set M in corresponding point contract according to the coordinate of this point and the deformation characteristics parameter of this point Obtain after putting.
Step 104, render the form of a stroke or a combination of strokes profile area defined of described current touch point.
After the profile of a touch point determines, can be with will this profile area defined carry out Render, such as fill black ink effect, show in real time.
In the present embodiment, by with the distance between adjacent multiple brush pen form of a stroke or a combination of strokes touch points as foundation, come really Determine the deformation characteristics parameter of current touch point, and then according to this deformation characteristics parameter and current touch point Coordinate determines the form of a stroke or a combination of strokes profile of current touch point, the like, along with little by little describing of user, meeting Form the form of a stroke or a combination of strokes profile of each touch point in real time, thus step by step the form of a stroke or a combination of strokes profile of each touch point is covered Cover region territory is filled with rendering, to demonstrate the described person's handwriting form of a stroke or a combination of strokes.By in the technical program with often The deformation characteristics parameter of individual touch point calculates the mode of the form of a stroke or a combination of strokes profile of each touch point, can be at electronics The form of a stroke or a combination of strokes effect that on equipment, effectively simulation brush pen produces because of deformation in writing process so that the brush pen of simulation The form of a stroke or a combination of strokes is greatly improved with the similarity of brush writing effect, it is possible to reflect writing of writer more truly Being intended to, brush writing sense is strong, and stroke simulation degree is higher.
The flow chart of the electronic brush pen form of a stroke or a combination of strokes processing method that Fig. 2 provides for the embodiment of the present invention two, such as figure Shown in 2, on the basis of embodiment illustrated in fig. 1, after step 103, it is also possible to include as follows Step:
Step 201, judge between the coordinate of described current touch point and the coordinate of described previous touch point Whether distance is more than predetermined threshold value, if being more than, then performs step 202-205, otherwise performs above-mentioned steps 104。
If the distance between the coordinate of the coordinate of current touch point and its previous touch point is more than presetting threshold Value, illustrates to have between the profile of the two touch point the biggest space, in order to ensure form of a stroke or a combination of strokes effect and true hair The form of a stroke or a combination of strokes of writing process has more preferable similarity, needs to carry out auxiliary point insertion between this two touch point.
Step 202, insert between described current touch point and described previous touch point at least one supplement Point, and determine described auxiliary point according to the coordinate of described current touch point and the coordinate of described previous touch point Coordinate.
Assume: N is the number of the auxiliary point inserted, and N is the integer more than or equal to 1.Wherein, N can Think preset constant, it is also possible to by the function with current touch point and previous touch point spacing being negative correlation Determine.
Specifically, the seat of auxiliary point is determined according to the coordinate of current touch point and the coordinate of previous touch point Mark, comprises determining that the coordinate of each auxiliary point is:
Q j ( x n - 1 + j ( x n - x n - 1 ) N , y n - 1 + j ( y n - y n - 1 ) N ) , Wherein, j=1,2, N.
Step 203, according to the deformation characteristics parameter of described current touch point and the shape of described previous touch point Become characteristic parameter, determine the deformation characteristics parameter of described auxiliary point.
Specifically, according to deformation characteristics parameter and the deformation characteristics ginseng of previous touch point of current touch point Number, determines the deformation characteristics parameter of auxiliary point, comprises determining that the deformation characteristics parameter of each auxiliary point is:
Wherein, wn-1Deformation characteristics parameter for previous touch point;wnFor working as The deformation characteristics parameter of front touch point.
Step 204, according to the coordinate of described auxiliary point and the deformation characteristics parameter determination institute of described auxiliary point State the form of a stroke or a combination of strokes profile of auxiliary point.
Specifically, according to the coordinate of auxiliary point and the pen of the deformation characteristics parameter determination auxiliary point of auxiliary point Shape profile, including:
Use formulaDetermine the form of a stroke or a combination of strokes profile constituting each auxiliary point The set M' of pointw;Wherein, x j = x n - 1 + j ( x n - x n - 1 ) N , y j = y n - 1 + j ( y n - y n - 1 ) N ; For with Qj(xj,yj) corresponding set M'wIn the coordinate of point.By often The set M' of the point of the form of a stroke or a combination of strokes profile of individual auxiliary pointwConstitute the form of a stroke or a combination of strokes profile of each auxiliary point.And then, all Auxiliary point the most calculated as above, obtain the form of a stroke or a combination of strokes profile of each auxiliary point.
Step 205, render the form of a stroke or a combination of strokes profile of described current touch point and the form of a stroke or a combination of strokes profile of described auxiliary point Area defined.
By all of touch point, and the profile of the auxiliary point inserted between two adjacent touch points melts Close, i.e. constitute the profile of the person's handwriting form of a stroke or a combination of strokes of user operation, carry out in the region that this form of a stroke or a combination of strokes profile surrounds Render filling, i.e. can be shown that final form of a stroke or a combination of strokes effect.
In the present embodiment, when adjacent two touch point spacings are bigger, carry out the insertion of auxiliary point, And by calculating insertion coordinate position and the deformation characteristics parameter of each auxiliary point, calculate each supplementing The form of a stroke or a combination of strokes profile of point so that the form of a stroke or a combination of strokes between two distant touch points also is able to more life-like in truly Brush writing effect so that the brush pen form of a stroke or a combination of strokes of simulation is greatly improved with the similarity of brush writing effect, energy Enough writers of reflection more truly write intention, and brush writing sense is strong, and stroke simulation degree is higher.
The structural representation of the electronic brush pen form of a stroke or a combination of strokes processing means that Fig. 3 provides for the embodiment of the present invention three, As it is shown on figure 3, this device includes:
Acquisition module 11, obtains the brush pen form of a stroke or a combination of strokes that operates on electronic device touchscreen of user for gathering The coordinate of the coordinate of current touch point and before touch point, described before touch point include described current touch The previous touch point of point and the first two touch point of described current touch point;
First deformation characteristics computing module 12, for according to the coordinate of described current touch point and described previous Distance between the coordinate of touch point, and the coordinate of described previous touch point and the first two touch point described Distance between coordinate, determines the deformation characteristics parameter of described current touch point;
First form of a stroke or a combination of strokes profile processing module 13, for according to the coordinate of described current touch point and described work as The deformation characteristics parameter of front touch point, determines the form of a stroke or a combination of strokes profile of described current touch point;
Rendering module 14, for rendering the form of a stroke or a combination of strokes profile area defined of described current touch point.
Further, described first deformation characteristics computing module 12 is additionally operable to:
According to formula w n = W · e - a s ( x n - x n - 1 ) 2 + ( y n - y n - 1 ) 2 + b s ( x n - 1 - x n - 1 ) 2 + ( y n - 1 - y n - 2 ) 2 ( a s + b s ) Δt , Determine described current touch point Deformation characteristics parameter wn, wherein, the coordinate of described current touch point is Pn=(xn,yn,tn), described previous tactile Touching coordinate a little is Pn-1=(xn-1,yn-1,tn-1), the coordinate of the first two touch point described is Pn-2=(xn-2,yn-2,tn-2), W is form of a stroke or a combination of strokes width reference value, and e is the nature truth of a matter, asAnd bsFor shifted matching coefficient, span be [0, + ∞), Δ t is the touch time interval of adjacent touch point, tn、tn-1And tn-2Respectively to corresponding touch point The touch time.
Further, described first form of a stroke or a combination of strokes profile processing module 13 is additionally operable to:
According to the coordinate of described current touch point, determine the form of a stroke or a combination of strokes boundary curve that described current touch point is corresponding Equation group is:
Wherein, described a, b and c are preset constant, yOnCorresponding form of a stroke or a combination of strokes upper bound curvilinear equation, yUnderCorresponding pen Shape lower bound curvilinear equation, yRightThe corresponding form of a stroke or a combination of strokes right boundary curvilinear equation;
Solve described form of a stroke or a combination of strokes boundary curve equation group, obtain described the surrounded Close edges of form of a stroke or a combination of strokes boundary curve On the set M of point;
Use formulaTo the some N (x' on described set Mi,y'i) carry out Scaling, obtains constituting the set M of the point of the form of a stroke or a combination of strokes profile of described current touch pointw;By described current touch The set M of the point of the form of a stroke or a combination of strokes profile of pointwConstitute the form of a stroke or a combination of strokes profile of described current touch point.
Wherein, N (x'i,y'i) it is the coordinate of any point in described set M,For with described N (x'i,y'i) corresponding described set MwIn the seat of point Mark.
The electronic brush pen form of a stroke or a combination of strokes processing means of the present embodiment may be used for performing embodiment of the method shown in Fig. 1 Technical scheme, it is similar with technique effect that it realizes principle, and here is omitted.
The structural representation of the electronic brush pen form of a stroke or a combination of strokes processing means that Fig. 4 provides for the embodiment of the present invention four, as Shown in Fig. 4, on the basis of embodiment illustrated in fig. 3, this device also includes:
Judge module 21, for judging coordinate and the coordinate of described previous touch point of described current touch point Between distance whether more than predetermined threshold value;
Auxiliary point processing module 22, is used for when described judge module determines described distance more than predetermined threshold value, At least one auxiliary point is inserted between described current touch point and described previous touch point, and according to described The coordinate of current touch point and the coordinate of described previous touch point determine the coordinate of described auxiliary point;
Second deformation characteristics computing module 23, for according to the deformation characteristics parameter of described current touch point and The deformation characteristics parameter of described previous touch point, determines the deformation characteristics parameter of described auxiliary point;
Second form of a stroke or a combination of strokes profile processing module 24, for according to the coordinate of described auxiliary point and described auxiliary point The form of a stroke or a combination of strokes profile of auxiliary point described in deformation characteristics parameter determination;
Described rendering module 14, is additionally operable to render the form of a stroke or a combination of strokes profile of described current touch point and described supplements The form of a stroke or a combination of strokes profile area defined of point.
Further, described auxiliary point processing module 22 is additionally operable to: the coordinate determining described auxiliary point is:
Q j ( x n - 1 + j ( x n - x n - 1 ) N , y n - 1 + j ( y n - y n - 1 ) N ) , Wherein, j=1,2, N, N are the benefit inserted Filling number a little, N is the integer more than or equal to 1;
Described second deformation characteristics computing module 23 is additionally operable to: determine the deformation characteristics parameter of described auxiliary point For:
Wherein, wn-1Deformation characteristics parameter for described previous touch point;
Described second form of a stroke or a combination of strokes profile processing module 24 is additionally operable to: use formulaDetermine the set of the point of the form of a stroke or a combination of strokes profile constituting described auxiliary point M'w;Wherein, x j = x n - 1 + j ( x n - x n - 1 ) N , y j = y n - 1 + j ( y n - y n - 1 ) N ; N ′ w ( cx n + x j - cx n Q wj , cy n + y j - cy n Q wj ) For with Qj(xj,yj) corresponding described set M'wIn the coordinate of point;By the form of a stroke or a combination of strokes profile of described auxiliary point The set M' of pointwConstitute the form of a stroke or a combination of strokes profile of described auxiliary point.
The electronic brush pen form of a stroke or a combination of strokes processing means of the present embodiment may be used for performing embodiment of the method shown in Fig. 2 Technical scheme, it is similar with technique effect that it realizes principle, and here is omitted.
One of ordinary skill in the art will appreciate that: realize all or part of step of said method embodiment Can be completed by the hardware that programmed instruction is relevant, aforesaid program can be stored in a computer-readable Taking in storage medium, this program upon execution, performs to include the step of said method embodiment;And it is aforementioned Storage medium include: various Jie that can store program code such as ROM, RAM, magnetic disc or CD Matter.
Last it is noted that above example is only in order to illustrate technical scheme, rather than to it Limit;Although the present invention being described in detail with reference to previous embodiment, the ordinary skill of this area Personnel it is understood that the technical scheme described in foregoing embodiments still can be modified by it, or Person carries out equivalent to wherein portion of techniques feature;And these amendments or replacement, do not make corresponding skill The essence of art scheme departs from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

1. an electronic brush pen form of a stroke or a combination of strokes processing method, it is characterised in that including:
Gather the coordinate of the current touch point obtaining the brush pen form of a stroke or a combination of strokes that user operates on electronic device touchscreen The coordinate of touch point before, described before touch point include described current touch point previous touch point and The first two touch point of described current touch point;
The distance between coordinate and the coordinate of described previous touch point according to described current touch point, and Distance between coordinate and the coordinate of the first two touch point described of described previous touch point, determine described currently The deformation characteristics parameter of touch point;
Coordinate according to described current touch point and the deformation characteristics parameter of described current touch point, determine The form of a stroke or a combination of strokes profile of described current touch point;
Render the form of a stroke or a combination of strokes profile area defined of described current touch point.
Method the most according to claim 1, it is characterised in that described according to described current touch point Coordinate and the deformation characteristics parameter of described current touch point, determine described current touch point the form of a stroke or a combination of strokes wheel After exterior feature, also include:
If the distance between the coordinate of the coordinate of described current touch point and described previous touch point is more than presetting Threshold value, then insert at least one auxiliary point between described current touch point and described previous touch point, and Coordinate according to described current touch point and the coordinate of described previous touch point determine the seat of described auxiliary point Mark;
Deformation characteristics parameter according to described current touch point and the deformation characteristics ginseng of described previous touch point Number, determines the deformation characteristics parameter of described auxiliary point;
Auxiliary point described in coordinate according to described auxiliary point and the deformation characteristics parameter determination of described auxiliary point Form of a stroke or a combination of strokes profile;
The described form of a stroke or a combination of strokes profile area defined rendering described current touch point, including:
The district that the form of a stroke or a combination of strokes profile of the form of a stroke or a combination of strokes profile and described auxiliary point that render described current touch point is surrounded Territory.
Method the most according to claim 2, it is characterised in that described according to described current touch point Coordinate and the coordinate of described previous touch point between distance, and the coordinate of described previous touch point and Distance between the coordinate of the first two touch point described, determines the deformation characteristics parameter of described current touch point, Including:
According to formula w n = W · e - a s ( x n - x n - 1 ) 2 + ( y n - y n - 1 ) 2 + b s ( x n - 1 - x n - 2 ) 2 + ( y n - 1 - y n - 2 ) 2 ( a s + b s ) Δt , Determine described current touch point Deformation characteristics parameter wn, wherein, the coordinate of described current touch point is Pn=(xn,yn,tn), described previous tactile Touching coordinate a little is Pn-1=(xn-1,yn-1,tn-1), the coordinate of the first two touch point described is Pn-2=(xn-2,yn-2,tn-2), W is form of a stroke or a combination of strokes width reference value, and e is the nature truth of a matter, asAnd bsFor shifted matching coefficient, span be [0, + ∞), Δ t is the touch time interval of adjacent touch point, tn、tn-1And tn-2It is respectively corresponding touch point The touch time.
Method the most according to claim 3, it is characterised in that described according to described current touch point Coordinate and the deformation characteristics parameter of described current touch point, determine described current touch point the form of a stroke or a combination of strokes wheel Exterior feature, including:
According to the coordinate of described current touch point, determine the form of a stroke or a combination of strokes boundary curve that described current touch point is corresponding Equation group is:
Wherein, described a, b and c are preset constant, yOnCorresponding form of a stroke or a combination of strokes upper bound curvilinear equation, yUnderCorresponding pen Shape lower bound curvilinear equation, yRightThe corresponding form of a stroke or a combination of strokes right boundary curvilinear equation;
Solve described form of a stroke or a combination of strokes boundary curve equation group, obtain described the surrounded Close edges of form of a stroke or a combination of strokes boundary curve On the set M of point;
Use formulaTo the some N (x ' on described set Mi,y′i) carry out Scaling, obtains constituting the set M of the point of the form of a stroke or a combination of strokes profile of described current touch pointw
Wherein, N (x 'i,y′i) it is the coordinate of any point in described set M,For with described N (x 'i,y′i) corresponding described set MwIn the seat of point Mark;
Set M by the point of the form of a stroke or a combination of strokes profile of described current touch pointwConstitute the pen of described current touch point Shape profile.
Method the most according to claim 3, it is characterised in that described according to described current touch point Coordinate and the coordinate of described previous touch point determine the coordinate of described auxiliary point, including:
The coordinate determining described auxiliary point is:
Wherein, j=1,2, N, N are the benefit inserted Filling number a little, N is the integer more than or equal to 1;
The described deformation characteristics parameter according to described current touch point and the deformation characteristics of described previous touch point Parameter, determines the deformation characteristics parameter of described auxiliary point, including:
The deformation characteristics parameter determining described auxiliary point is:
Wherein, wn-1Deformation characteristics parameter for described previous touch point;
Supplement described in the deformation characteristics parameter determination of the described coordinate according to described auxiliary point and described auxiliary point The form of a stroke or a combination of strokes profile of point, including:
Use formulaDetermine the form of a stroke or a combination of strokes profile constituting described auxiliary point The set M' of pointw;Wherein, x j = x n - 1 + j ( x n - x n - 1 ) N , y j = y n - 1 + j ( y n - y n - 1 ) N ; For with Qj(xj,yj) corresponding described set M'wIn the coordinate of point;
Set M' by the point of the form of a stroke or a combination of strokes profile of described auxiliary pointwConstitute the form of a stroke or a combination of strokes profile of described auxiliary point.
6. an electronic brush pen form of a stroke or a combination of strokes processing means, it is characterised in that including:
Acquisition module, for gather obtain the brush pen form of a stroke or a combination of strokes that operate on electronic device touchscreen of user ought The coordinate of the coordinate of front touch point and before touch point, described before touch point include described current touch point Previous touch point and the first two touch point of described current touch point;
First deformation characteristics computing module, for according to the coordinate of described current touch point with described previous touch Touch the distance between coordinate a little, and the coordinate of described previous touch point and the seat of the first two touch point described Distance between mark, determines the deformation characteristics parameter of described current touch point;
First form of a stroke or a combination of strokes profile processing module, for according to the coordinate of described current touch point and described currently The deformation characteristics parameter of touch point, determines the form of a stroke or a combination of strokes profile of described current touch point;
Rendering module, for rendering the form of a stroke or a combination of strokes profile area defined of described current touch point.
Device the most according to claim 6, it is characterised in that also include:
Judge module, for judge the coordinate of described current touch point and described previous touch point coordinate it Between distance whether more than predetermined threshold value;
Auxiliary point processing module, is used for when described judge module determines described distance more than predetermined threshold value, At least one auxiliary point is inserted between described current touch point and described previous touch point, and according to described The coordinate of current touch point and the coordinate of described previous touch point determine the coordinate of described auxiliary point;
Second deformation characteristics computing module, for the deformation characteristics parameter according to described current touch point and institute State the deformation characteristics parameter of previous touch point, determine the deformation characteristics parameter of described auxiliary point;
Second form of a stroke or a combination of strokes profile processing module, for the coordinate according to described auxiliary point and the shape of described auxiliary point Become characteristic parameter and determine the form of a stroke or a combination of strokes profile of described auxiliary point;
Described rendering module, is additionally operable to render the form of a stroke or a combination of strokes profile of described current touch point and described auxiliary point Form of a stroke or a combination of strokes profile area defined.
Device the most according to claim 7, it is characterised in that described first deformation characteristics calculates mould Block is additionally operable to:
According to formula w n = W · e - a s ( x n - x n - 1 ) 2 + ( y n - y n - 1 ) 2 + b s ( x n - 1 - x n - 2 ) 2 + ( y n - 1 - y n - 2 ) 2 ( a s + b s ) Δt , Determine described current touch point Deformation characteristics parameter wn, wherein, the coordinate of described current touch point is Pn=(xn,yn,tn), described previous tactile Touching coordinate a little is Pn-1=(xn-1,yn-1,tn-1), the coordinate of the first two touch point described is Pn-2=(xn-2,yn-2,tn-2), W is form of a stroke or a combination of strokes width reference value, and e is the nature truth of a matter, asAnd bsFor shifted matching coefficient, span be [0, + ∞), Δ t is the touch time interval of adjacent touch point, tn、tn-1And tn-2It is respectively corresponding touch point The touch time.
Device the most according to claim 8, it is characterised in that described first form of a stroke or a combination of strokes profile processes mould Block is additionally operable to:
According to the coordinate of described current touch point, determine the form of a stroke or a combination of strokes boundary curve that described current touch point is corresponding Equation group is:
Wherein, described a, b and c are preset constant, yOnCorresponding form of a stroke or a combination of strokes upper bound curvilinear equation, yUnderCorresponding pen Shape lower bound curvilinear equation, yRightThe corresponding form of a stroke or a combination of strokes right boundary curvilinear equation;
Solve described form of a stroke or a combination of strokes boundary curve equation group, obtain described the surrounded Close edges of form of a stroke or a combination of strokes boundary curve On the set M of point;
Use formulaTo the some N (x ' on described set Mi,y′i) carry out Scaling, obtains constituting the set M of the point of the form of a stroke or a combination of strokes profile of described current touch pointw
Wherein, N (x 'i,y′i) it is the coordinate of any point in described set M,For with described N (x 'i,y′i) corresponding described set MwIn the seat of point Mark;
Set M by the point of the form of a stroke or a combination of strokes profile of described current touch pointwConstitute the pen of described current touch point Shape profile.
Device the most according to claim 8, it is characterised in that described auxiliary point processing module is also For:
The coordinate determining described auxiliary point is:
Wherein, j=1,2, N, N are the benefit inserted Filling number a little, N is the integer more than or equal to 1;
Described second deformation characteristics computing module is additionally operable to:
The deformation characteristics parameter determining described auxiliary point is:
Wherein, wn-1Deformation characteristics parameter for described previous touch point;
Described second form of a stroke or a combination of strokes profile processing module is additionally operable to:
Use formulaDetermine the form of a stroke or a combination of strokes profile constituting described auxiliary point The set M' of pointw;Wherein, x j = x n - 1 + j ( x n - x n - 1 ) N , y j = y n - 1 + j ( y n - y n - 1 ) N ; For with Qj(xj,yj) corresponding described set M'wIn the coordinate of point;
Set M' by the point of the form of a stroke or a combination of strokes profile of described auxiliary pointwConstitute the form of a stroke or a combination of strokes profile of described auxiliary point.
CN201510158736.6A 2015-04-03 2015-04-03 Electronic brush pen pen shape treating method and apparatus Expired - Fee Related CN106155540B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510158736.6A CN106155540B (en) 2015-04-03 2015-04-03 Electronic brush pen pen shape treating method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510158736.6A CN106155540B (en) 2015-04-03 2015-04-03 Electronic brush pen pen shape treating method and apparatus

Publications (2)

Publication Number Publication Date
CN106155540A true CN106155540A (en) 2016-11-23
CN106155540B CN106155540B (en) 2019-10-15

Family

ID=57337538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510158736.6A Expired - Fee Related CN106155540B (en) 2015-04-03 2015-04-03 Electronic brush pen pen shape treating method and apparatus

Country Status (1)

Country Link
CN (1) CN106155540B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108021331A (en) * 2017-12-20 2018-05-11 广州视源电子科技股份有限公司 A kind of gap removing method, device, equipment and storage medium
CN109271084A (en) * 2018-08-22 2019-01-25 安徽慧视金瞳科技有限公司 A kind of rendering algorithm for simulating art designing pen style of writing
CN110045906A (en) * 2018-01-17 2019-07-23 北京方正手迹数字技术有限公司 Display methods, the display system of virtual brush writing
CN111831162A (en) * 2020-07-23 2020-10-27 吕嘉昳 Writing brush shape correction method based on touch screen
WO2022242011A1 (en) * 2021-05-20 2022-11-24 广州视源电子科技股份有限公司 Method and apparatus for presenting handwriting, and interaction tablet computer and storage medium
CN116166165A (en) * 2023-04-25 2023-05-26 福昕鲲鹏(北京)信息科技有限公司 Visual text selection method, visual text selection device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521858A (en) * 2011-11-28 2012-06-27 北京盛世宣合信息科技有限公司 Handwriting generating method for electronic writing brush
CN102521856A (en) * 2011-11-28 2012-06-27 北京盛世宣合信息科技有限公司 Writing brush shape changing method for writing of electronic writing brush
CN102937848A (en) * 2012-12-04 2013-02-20 上海合合信息科技发展有限公司 Method for editing handwritings and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521858A (en) * 2011-11-28 2012-06-27 北京盛世宣合信息科技有限公司 Handwriting generating method for electronic writing brush
CN102521856A (en) * 2011-11-28 2012-06-27 北京盛世宣合信息科技有限公司 Writing brush shape changing method for writing of electronic writing brush
CN102937848A (en) * 2012-12-04 2013-02-20 上海合合信息科技发展有限公司 Method for editing handwritings and electronic equipment

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108021331A (en) * 2017-12-20 2018-05-11 广州视源电子科技股份有限公司 A kind of gap removing method, device, equipment and storage medium
CN108021331B (en) * 2017-12-20 2021-01-22 广州视源电子科技股份有限公司 Gap eliminating method, device, equipment and storage medium
CN110045906A (en) * 2018-01-17 2019-07-23 北京方正手迹数字技术有限公司 Display methods, the display system of virtual brush writing
CN110045906B (en) * 2018-01-17 2020-11-17 北京方正手迹数字技术有限公司 Display method and display system for virtual writing brush writing
CN109271084A (en) * 2018-08-22 2019-01-25 安徽慧视金瞳科技有限公司 A kind of rendering algorithm for simulating art designing pen style of writing
CN109271084B (en) * 2018-08-22 2021-05-07 安徽慧视金瞳科技有限公司 Drawing method for simulating pen touch of art designing pen
CN111831162A (en) * 2020-07-23 2020-10-27 吕嘉昳 Writing brush shape correction method based on touch screen
CN111831162B (en) * 2020-07-23 2023-10-10 吕嘉昳 Writing brush shape correction method based on touch screen
WO2022242011A1 (en) * 2021-05-20 2022-11-24 广州视源电子科技股份有限公司 Method and apparatus for presenting handwriting, and interaction tablet computer and storage medium
CN116166165A (en) * 2023-04-25 2023-05-26 福昕鲲鹏(北京)信息科技有限公司 Visual text selection method, visual text selection device and storage medium
CN116166165B (en) * 2023-04-25 2023-06-27 福昕鲲鹏(北京)信息科技有限公司 Visual text selection method, visual text selection device and storage medium

Also Published As

Publication number Publication date
CN106155540B (en) 2019-10-15

Similar Documents

Publication Publication Date Title
CN106155540A (en) Electronic brush pen form of a stroke or a combination of strokes treating method and apparatus
CN109726643B (en) Method and device for identifying table information in image, electronic equipment and storage medium
CN110796031A (en) Table identification method and device based on artificial intelligence and electronic equipment
CN108399386A (en) Information extracting method in pie chart and device
Harouni et al. Online Persian/Arabic script classification without contextual information
CN103093196B (en) Character interactive input and recognition method based on gestures
KR101825154B1 (en) Overlapped handwriting input method
CN103530590B (en) DPM Quick Response Code recognition system
CN105069811B (en) A kind of Multitemporal Remote Sensing Images change detecting method
CN104636649A (en) Electronic equipment and guiding method thereof
CN102937850B (en) Method for beautifying handwriting in real time and electronic equipment
CN103473492B (en) Authority recognition method and user terminal
CN105139004A (en) Face expression identification method based on video sequences
CN106407891A (en) Target matching method based on convolutional neural network and device
CN102999926B (en) A kind of image vision significance computational methods merged based on low-level image feature
CN106325737A (en) Method and equipment for erasing writing path
CN104809453A (en) Authentication method based on fingerprints
CN104200240A (en) Sketch retrieval method based on content adaptive Hash encoding
CN107463331A (en) Gesture path analogy method, device and electronic equipment
CN102750552B (en) Handwriting recognition method and system as well as handwriting recognition terminal
CN110223202B (en) Method and system for identifying and scoring teaching props
CN107622710A (en) Digitize writing practising method and system
CN103946865B (en) Method and apparatus for contributing to the text in detection image
CN102208039B (en) Method and device for recognizing multi-language mixed handwriting text lines
CN103279788B (en) The method of counting of a kind of automatic identification numeral and mobile terminal

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
TR01 Transfer of patent right

Effective date of registration: 20220622

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871, Beijing, Haidian District, Cheng Fu Road, No. 298, Zhongguancun Fangzheng building, 9 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

TR01 Transfer of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20191015