CN106155540B - Electronic brush pen pen shape treating method and apparatus - Google Patents

Electronic brush pen pen shape treating method and apparatus Download PDF

Info

Publication number
CN106155540B
CN106155540B CN201510158736.6A CN201510158736A CN106155540B CN 106155540 B CN106155540 B CN 106155540B CN 201510158736 A CN201510158736 A CN 201510158736A CN 106155540 B CN106155540 B CN 106155540B
Authority
CN
China
Prior art keywords
touch point
point
coordinate
pen shape
current touch
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.)
Expired - Fee Related
Application number
CN201510158736.6A
Other languages
Chinese (zh)
Other versions
CN106155540A (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

Images

Abstract

The present invention provides a kind of electronic brush pen pen shape treating method and apparatus, this method comprises: acquisition obtains the coordinate of coordinate touch point with before of the current touch point for the writing brush pen shape that user operates on electronic device touchscreen, touch point includes the previous touch point of current touch point and the first two touch point of current touch point before being somebody's turn to do;According to the distance between the coordinate of current touch point and the coordinate of previous touch point and the distance between the coordinate of the coordinate of previous touch point and the first two touch point, the deformation characteristics parameter of current touch point is determined;According to the deformation characteristics parameter of the coordinate of current touch point and current touch point, the pen shape profile of current touch point is determined;Render the pen shape profile area defined of current touch point.By calculating the pen shape profile of each touch point with the deformation characteristics parameter of each touch point, so that the writing brush pen shape and the similarity of brush writing effect of simulation greatly improve.

Description

Electronic brush pen pen shape treating method and apparatus
Technical field
The present invention relates to technical field of image processing more particularly to a kind of electronic brush pen pen shape treating method and apparatus.
Background technique
With the continuous development of touch screen technology, existing intelligent terminal mostly uses greatly touch screen.User can pass through touch Screen is interacted with intelligent terminal, to easily complete the operating process to intelligent terminal.
Moreover, the various applications for intelligent terminal are also widely deployed.For example, being painted on the terminal device especially It is the application program (referred to as: APP) etc. painted using writing brush.User can download from application provider and install drawing APP.When user needs in use, can open the APP enters operation interface, in operation interface, user can pass through finger Or felt pen operates on the touchscreen, so that simulating writing brush pen shape draws various patterns, or writes etc..
The existing method for simulating writing brush pen shape on the touchscreen, does not change since pen shape is single, with the soft easy shape of writing brush The feature of change is not inconsistent, and cannot reflect the pen shape effect that writing brush generates in writing process because deformation occurs, the simulation of writing brush pen shape Similarity is low.
Summary of the invention
The present invention provides a kind of electronic brush pen pen shape treating method and apparatus, effectively to simulate writing brush on an electronic device Because of the pen shape effect that deformation generates in writing process, to overcome the writing brush pen shape of simulation and brush writing effect similarity not high Defect.
The present invention provides a kind of electronic brush pen pen shape processing method, comprising:
Acquisition obtains the coordinate of the current touch point for the writing brush pen shape that user operates on electronic device touchscreen with before The coordinate of touch point, it is described before touch point include the current touch point previous touch point and the current touch point before Two touch points;
According to the distance between the coordinate of the current touch point and the coordinate of the previous touch point and described previous The distance between the coordinate of touch point and the coordinate of the first two touch point determine the deformation characteristics ginseng of the current touch point Number;
According to the deformation characteristics parameter of the coordinate of the current touch point and the current touch point, determine described current The pen shape profile of touch point;
Render the pen shape profile area defined of the current touch point.
The present invention provides a kind of electronic brush pen pen shape processing unit, comprising:
Acquisition module, for acquiring the current touch point for obtaining the writing brush pen shape that user operates on electronic device touchscreen Coordinate and the coordinate of touch point before, it is described before touch point include the previous touch point of the current touch point and described work as The first two touch point of preceding touch point;
First deformation characteristics computing module, for according to the coordinate of the current touch point and the seat of the previous touch point The distance between the coordinate and the coordinate of the first two touch point of the distance between mark and the previous touch point, determine institute State the deformation characteristics parameter of current touch point;
First pen shape profile processing module, for according to the coordinate of the current touch point and the current touch point Deformation characteristics parameter determines the pen shape profile of the current touch point;
Rendering module, for rendering the pen shape profile area defined of the current touch point.
Electronic brush pen pen shape treating method and apparatus provided by the invention, by with adjacent multiple writing brush pen shapes touch point Between distance be foundation, to determine the deformation characteristics parameter of current touch point, and then according to the deformation characteristics parameter and current The coordinate of touch point determines the pen shape profile of current touch point, and so on, it with little by little describing for user, can in real time The pen shape profile of each touch point is formed, so that the pen shape profile overlay area of each touch point is filled wash with watercolours step by step Dye, to show discribed person's handwriting pen shape.By being calculated in the technical program with the deformation characteristics parameter of each touch point The mode of the pen shape profile of each touch point can effectively simulate writing brush in writing process because deformation generates on an electronic device Pen shape effect so that simulation writing brush pen shape and the similarity of brush writing effect greatly improve.
Detailed description of the invention
Fig. 1 is the flow chart for the electronic brush pen pen shape processing method that the embodiment of the present invention one provides;
Fig. 2 is the flow chart of electronic brush pen pen shape processing method provided by Embodiment 2 of the present invention;
Fig. 3 is the structural schematic diagram for the electronic brush pen pen shape processing unit that the embodiment of the present invention three provides;
Fig. 4 is the structural schematic diagram for the electronic brush pen pen shape processing unit that the embodiment of the present invention four provides.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Fig. 1 is the flow chart for the electronic brush pen pen shape processing method that the embodiment of the present invention one provides, provided in this embodiment The method can be executed by a processing unit, which is integrally disposed in the electronic equipment of user.Such as Fig. 1 institute Show, this method comprises:
Step 101, acquisition obtain the seat of the current touch point for the writing brush pen shape that user operates on electronic device touchscreen The coordinate of mark and touch point before, it is described before touch point include the current touch point previous touch point and the current touching Touch the first two touch point a little.
Specifically, when user needs to write out on the touch screen of electronic equipment the font of writing brush pen shape, user can be with Touch operation is carried out on the touchscreen, is operated on the touch screen correspondingly, processing unit such as processor can detecte user Touch point position.
The present embodiment does not limit the specific algorithm for detecting the touch point position, and those skilled in the art can according to need Voluntarily select or design the detection algorithm of the required accuracy.
It will form touch point coordinate sequence in the present embodiment, in user operation process, successively connected by these touch point coordinates It connects, constitutes handwriting trace.Assuming that current touch point is n-th of touch point, wherein n is the integer more than or equal to 1.Successively Acquisition obtains each touch point formed in user operation process, and carries out subsequent deformation characteristics parameter meter to each touch point Calculation and pen shape profile calculating process.
Wherein, for current touch point, need to use the touch point before it in above two calculating process Coordinate information.It is worth noting that if calculation will be below when current touch point is first or second touch point It is explained, and for other touch points in addition to this two o'clock, it can be using at the present embodiment subsequent step Reason.
Step 102, according to the distance between the coordinate of the current touch point and coordinate of the previous touch point, and The distance between coordinate and the coordinate of the first two touch point of the previous touch point, determine the deformation of the current touch point Characteristic parameter.
The first two touch point of current touch point, the previous touch point of current touch point and current touch point are three successively phases Adjacent touch point.Assuming that: the coordinate of current touch point is Pn=(xn,yn,tn), the coordinate of the previous touch point of current touch point For 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-2Respectively correspond to the touch time of touch point.
Specifically, according to the distance between the coordinate of the coordinate of the current touch point and the previous touch point, with And the coordinate and the distance between the coordinate of the first two touch point of the previous touch point, determine the shape of the current touch point Become characteristic parameter, comprising:
According to formula
Figure BDA0000694028790000041
Determine that the deformation of current touch point is special Levy parameter wn, wherein W is pen shape width a reference value, can be preset as a constant, and e is the nature truth of a matter, asAnd bsIt is mobile Distribution coefficient, value range be [0 ,+∞), Δ t be adjacent touch point touch time interval.
It is worth noting that for the case where current touch point is first touch point, at this point, first touch point Deformation characteristics parameter setting is equal to W.The case where being second touch point for current touch point, at this point, second touch The deformation characteristics parameter of point is such as according to formula
Figure BDA0000694028790000051
It determines, i.e., according to second touch point and first Distance between a touch point determines.
Step 103, according to the coordinate of the current touch point and the deformation characteristics parameter of the current touch point, determine The pen shape profile of the current touch point.
When carrying out brush writing, the person's handwriting of writing has an one fixed width, it is corresponding with for certain unicursal, the stroke It include multiple touch points, each touch point has the profile size of a bit, and the profile of all touch points is fused together simultaneously It carries out rendering to show, then constitutes the pen shape effect of the stroke.
Therefore, the profile to each touch point is needed to calculate in the present embodiment.Specifically, according to the current touching The deformation characteristics parameter for touching coordinate and the current touch point a little, determines the pen shape profile of the current touch point, comprising:
Firstly, determining the corresponding pen shape boundary curve equation group of current touch point according to the coordinate of current touch point are as follows:
Figure BDA0000694028790000052
Wherein, described a, b and c are preset constant, yOnCorresponding pen shape upper bound curvilinear equation, yUnderCorresponding pen shape lower bound curve side Journey, yIt is rightThe corresponding right boundary's curvilinear equation of pen shape.
For each touch point, pen shape profile can be determined according to pen shape boundary curve, firstly, each touch The pen shape boundary curve of point includes upper and lower, right three boundary curves.
Secondly, solving above-mentioned pen shape boundary curve equation group, the point on the surrounded Close edges of pen shape boundary curve is obtained Set M, wherein assuming that N (x'i,y'i) be set M in any point coordinate.
Again, using formula
Figure BDA0000694028790000053
To the point N (x' on set Mi,y'i) carry out Scaling obtains the set M for constituting the point of the pen shape profile of current touch pointw.To by the point of the pen shape profile of current touch point Set MwConstitute the pen shape profile of current touch point.Wherein,For with coordinate points N (x'i,y'i) corresponding set MwIn point coordinate.
Every bit and set M in the set M of boundarywIn each point correspond, also, set MwIn certain point be set M In corresponding points zoomed in and out according to the deformation characteristics parameter of the coordinate of the point and the point after obtain.
The pen shape profile area defined of step 104, the rendering current touch point.
After the profile of touch point determines, can with will the profile area defined rendered, than Black ink effect is such as filled, real-time display is carried out.
In the present embodiment, by using the distance between adjacent multiple writing brush pen shapes touch point as foundation, to determine current touching Deformation characteristics parameter a little is touched, and then current touch point is determined according to the coordinate of the deformation characteristics parameter and current touch point Pen shape profile, and so on, with user little by little describe, the pen shape profile of each touch point can be formed in real time, from And the pen shape profile overlay area of each touch point is filled rendering step by step, to show discribed person's handwriting pen shape. It, can in a manner of the pen shape profile in the technical program by the deformation characteristics parameter of each touch point to calculate each touch point Effectively to simulate writing brush on an electronic device in writing process because of the pen shape effect that deformation generates, so that the writing brush pen shape of simulation It is greatly improved with the similarity of brush writing effect, the writing that can be more truly reflected writer is intended to, brush writing sense By force, stroke simulation degree is higher.
Fig. 2 is the flow chart of electronic brush pen pen shape processing method provided by Embodiment 2 of the present invention, as shown in Fig. 2, in Fig. 1 On the basis of illustrated embodiment, after step 103, it can also include the following steps:
Whether the distance between coordinate of step 201, the coordinate for judging the current touch point and the previous touch point Greater than preset threshold, if more than thening follow the steps 202-205, otherwise executing above-mentioned steps 104.
If the distance between the coordinate of current touch point and the coordinate of its previous touch point are greater than preset threshold, illustrate this There is very big gap between the profile of two touch points, in order to guarantee that the pen shape of pen shape effect and true brush writing process has more Good similarity needs to carry out auxiliary point insertion between this two touch point.
Step 202 is inserted at least one auxiliary point between the current touch point and the previous touch point, and according to The coordinate of the current touch point and the coordinate of the previous touch point determine the coordinate of the auxiliary point.
Assuming that: N is the number of the auxiliary point of insertion, and N is the integer more than or equal to 1.Wherein, N can be preset constant, It can also be determined by the negatively correlated function of distance between current touch point and previous touch point.
Specifically, the coordinate of auxiliary point is determined according to the coordinate of the coordinate of current touch point and previous touch point, comprising: Determine the coordinate of each auxiliary point are as follows:
Figure BDA0000694028790000071
Wherein, j=1,2, N.
Step 203 is joined according to the deformation characteristics parameter of the current touch point and the deformation characteristics of the previous touch point Number, determines the deformation characteristics parameter of the auxiliary point.
Specifically, it according to the deformation characteristics parameter of the deformation characteristics parameter of current touch point and previous touch point, determines The deformation characteristics parameter of auxiliary point, comprising: determine the deformation characteristics parameter of each auxiliary point are as follows:
Figure BDA0000694028790000072
Wherein, wn-1For the deformation characteristics parameter of previous touch point;wnFor current touch The deformation characteristics parameter of point.
Step 204 determines the auxiliary point according to the coordinate of the auxiliary point and the deformation characteristics parameter of the auxiliary point Pen shape profile.
Specifically, the pen shape profile of auxiliary point is determined according to the deformation characteristics parameter of the coordinate of auxiliary point and auxiliary point, Include:
The point for constituting the pen shape profile of each auxiliary point is determined using formula Set M'w;Wherein,
Figure BDA0000694028790000074
For with Qj(xj,yj) corresponding set M'wIn point coordinate.By each auxiliary point Pen shape profile point set M'wConstitute the pen shape profile of each auxiliary point.In turn, all auxiliary points as above calculate, Obtain the pen shape profile of each auxiliary point.
What the pen shape profile of step 205, the pen shape profile of the rendering current touch point and the auxiliary point was surrounded Region.
By all touch points, and the profile fusion of the auxiliary point that is inserted between two adjacent touch points, that is, it constitutes and uses The profile of the person's handwriting pen shape of family operation, carries out rendering filling in the region that the pen shape profile surrounds, can show final Pen shape effect.
In the present embodiment, when distance is larger between two adjacent touch points, the insertion of auxiliary point is carried out, and pass through meter The insertion coordinate position and deformation characteristics parameter for calculating each auxiliary point, calculate the pen shape profile of each auxiliary point, so that two Pen shape between farther away touch point also can be more life-like in true brush writing effect so that the writing brush pen shape of simulation with The similarity of brush writing effect greatly improves, and the writing that can be more truly reflected writer is intended to, and brush writing sense is strong, Stroke simulation degree is higher.
Fig. 3 is the structural schematic diagram for the electronic brush pen pen shape processing unit that the embodiment of the present invention three provides, as shown in figure 3, The device includes:
Acquisition module 11, for acquiring the current touch for obtaining the writing brush pen shape that user operates on electronic device touchscreen The coordinate and the coordinate of touch point before of point, the touch point before include the previous touch point of the current touch point and described The first two touch point of current touch point;
First deformation characteristics computing module 12, for according to the coordinate of the current touch point and the previous touch point The distance between the coordinate and the coordinate of the first two touch point of the distance between coordinate and the previous touch point determine The deformation characteristics parameter of the current touch point;
First pen shape profile processing module 13, for the coordinate and the current touch point according to the current touch point Deformation characteristics parameter, determine the pen shape profile of the current touch point;
Rendering module 14, for rendering the pen shape profile area defined of the current touch point.
Further, the first deformation characteristics computing module 12 is also used to:
According to formulaDetermine the current touch point Deformation characteristics parameter wn, wherein the coordinate of the current touch point is Pn=(xn,yn,tn), the coordinate of the previous touch point is Pn-1=(xn-1,yn-1,tn-1), the coordinate of the first two touch point is Pn-2=(xn-2,yn-2,tn-2), W is pen shape width benchmark Value, e are the nature truth of a matter, asAnd bsFor shifted matching coefficient, value range be [0 ,+∞), when Δ t is the touch of adjacent touch point Between be spaced, tn、tn-1And tn-2Respectively to the touch time of corresponding touch point.
Further, the first pen shape profile processing module 13 is also used to:
According to the coordinate of the current touch point, the corresponding pen shape boundary curve equation group of the current touch point is determined Are as follows:
Figure BDA0000694028790000091
Wherein, described a, b and c are preset constant, yOnCorresponding pen shape upper bound curvilinear equation, yUnderCorresponding pen shape lower bound curve side Journey, yIt is rightThe corresponding right boundary's curvilinear equation of pen shape;
The pen shape boundary curve equation group is solved, the point on the surrounded Close edges of pen shape boundary curve is obtained Set M;
Using formula
Figure BDA0000694028790000092
To the point N (x' on the set Mi,y'i) contract It puts, obtains the set M of the point for the pen shape profile for constituting the current touch pointw;By the pen shape profile of the current touch point The set M of pointwConstitute the pen shape profile of the current touch point.
Wherein, N (x'i,y'i) be the set M in any point coordinate,
Figure BDA0000694028790000093
For with the N (x'i,y'i) the corresponding set MwIn point coordinate.
The electronic brush pen pen shape processing unit of the present embodiment can be used for executing the technical side of embodiment of the method shown in Fig. 1 Case, it is similar that the realization principle and technical effect are similar, and details are not described herein again.
Fig. 4 is the structural schematic diagram for the electronic brush pen pen shape processing unit that the embodiment of the present invention four provides, as shown in figure 4, On the basis of embodiment shown in Fig. 3, the device further include:
Judgment module 21, for judge between the coordinate of the current touch point and the coordinate of the previous touch point away from From whether greater than preset threshold;
Auxiliary point processing module 22, for the judgment module determine the distance be greater than preset threshold when, described Be inserted at least one auxiliary point between current touch point and the previous touch point, and according to the coordinate of the current touch point and The coordinate of the previous touch point determines the coordinate of the auxiliary point;
Second deformation characteristics computing module 23, for according to the deformation characteristics parameter of the current touch point and described previous The deformation characteristics parameter of touch point determines the deformation characteristics parameter of the auxiliary point;
Second pen shape profile processing module 24, for according to the coordinate of the auxiliary point and the deformation characteristics of the auxiliary point Parameter determines the pen shape profile of the auxiliary point;
The rendering module 14 is also used to render the pen shape profile of the current touch point and the pen shape of the auxiliary point Profile area defined.
Further, the auxiliary point processing module 22 is also used to: determining the coordinate of the auxiliary point are as follows:
Figure BDA0000694028790000101
Wherein, j=1,2, N, N are the supplement of insertion The number of point, N are the integer more than or equal to 1;
The second deformation characteristics computing module 23 is also used to: determining the deformation characteristics parameter of the auxiliary point are as follows:
Figure BDA0000694028790000102
Wherein, wn-1For the deformation characteristics parameter of the previous touch point;
The second pen shape profile processing module 24 is also used to: using formula Determine the set M' for constituting the point of pen shape profile of the auxiliary pointw;Wherein,For with Qj(xj, yj) the corresponding set M'wIn point coordinate;By the set M' of the point of the pen shape profile of the auxiliary pointwConstitute the benefit Fill pen shape profile a little.
The electronic brush pen pen shape processing unit of the present embodiment can be used for executing the technical side of embodiment of the method shown in Fig. 2 Case, it is similar that the realization principle and technical effect are similar, and details are not described herein again.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light The various media that can store program code such as disk.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (6)

1. a kind of electronic brush pen pen shape processing method characterized by comprising
The coordinate that acquisition obtains the current touch point for the writing brush pen shape that user operates on electronic device touchscreen is touched with before The coordinate of point, the touch point before include the previous touch point of the current touch point and the first two touching of the current touch point It touches a little;
According to the distance between the coordinate of the current touch point and the coordinate of the previous touch point and the previous touch The distance between coordinate and the coordinate of the first two touch point of point, determine the deformation characteristics parameter of the current touch point;
According to the deformation characteristics parameter of the coordinate of the current touch point and the current touch point, the current touch is determined The pen shape profile of point;
Render the pen shape profile area defined of the current touch point;
It is described according to the coordinate of the current touch point and the deformation characteristics parameter of the current touch point, determine described current After the pen shape profile of touch point, further includes:
If the distance between the coordinate of the current touch point and the coordinate of the previous touch point are greater than preset threshold, in institute It states and is inserted at least one auxiliary point between current touch point and the previous touch point, and according to the coordinate of the current touch point The coordinate of the auxiliary point is determined with the coordinate of the previous touch point;
According to the deformation characteristics parameter of the deformation characteristics parameter of the current touch point and the previous touch point, the benefit is determined Fill deformation characteristics parameter a little;
The pen shape profile of the auxiliary point is determined according to the deformation characteristics parameter of the coordinate of the auxiliary point and the auxiliary point;
The pen shape profile area defined of the rendering current touch point, comprising:
Render the pen shape profile of the current touch point and the pen shape profile area defined of the auxiliary point;
The distance between the coordinate according to the current touch point and the coordinate of the previous touch point and described previous The distance between the coordinate of touch point and the coordinate of the first two touch point determine the deformation characteristics ginseng of the current touch point Number, comprising:
According to formula
Figure FDA0002030977460000021
Determine that the deformation of the current touch point is special Levy parameter wn, wherein the coordinate of the current touch point is Pn=(xn,yn,tn), the coordinate of the previous touch point is Pn-1= (xn-1,yn-1,tn-1), the coordinate of the first two touch point is Pn-2=(xn-2,yn-2,tn-2), W is pen shape width a reference value, and e is The natural truth of a matter, asAnd bsFor shifted matching coefficient, value range be [0 ,+∞), Δ t is the touch time interval of adjacent touch point, tn、tn-1And tn-2Respectively correspond to the touch time of touch point.
2. the method according to claim 1, wherein the coordinate according to the current touch point and described The deformation characteristics parameter of current touch point determines the pen shape profile of the current touch point, comprising:
According to the coordinate of the current touch point, the corresponding pen shape boundary curve equation group of the current touch point is determined are as follows:
Figure FDA0002030977460000022
Wherein, described a, b and c are preset constant, yOnCorresponding pen shape upper bound curvilinear equation, yUnderCorresponding pen shape lower bound curvilinear equation, yIt is rightThe corresponding right boundary's curvilinear equation of pen shape;
The pen shape boundary curve equation group is solved, the set of the point on the surrounded Close edges of pen shape boundary curve is obtained M;
Using formula
Figure FDA0002030977460000023
To the point N (x ' on the set Mi,y′i) zoom in and out, it obtains To the set M of the point for the pen shape profile for constituting the current touch pointw
Wherein, N (x 'i,y′i) be the set M in any point coordinate,
Figure FDA0002030977460000031
For with N (the x 'i,y′i) the corresponding set MwIn point coordinate;
By the set M of the point of the pen shape profile of the current touch pointwConstitute the pen shape profile of the current touch point.
3. the method according to claim 1, wherein the coordinate according to the current touch point and it is described before The coordinate of one touch point determines the coordinate of the auxiliary point, comprising:
Determine the coordinate of the auxiliary point are as follows:
Figure FDA0002030977460000032
Wherein, j=1,2, N, N are the auxiliary point of insertion Number, N are the integer more than or equal to 1;
It is described according to the deformation characteristics parameter of the current touch point and the deformation characteristics parameter of the previous touch point, determine institute State the deformation characteristics parameter of auxiliary point, comprising:
Determine the deformation characteristics parameter of the auxiliary point are as follows:
Figure FDA0002030977460000033
Wherein, wn-1For the deformation characteristics parameter of the previous touch point;
The pen shape wheel that the auxiliary point is determined according to the coordinate of the auxiliary point and the deformation characteristics parameter of the auxiliary point It is wide, comprising:
Using formula
Figure FDA0002030977460000034
Determine the collection for constituting the point of pen shape profile of the auxiliary point Close M 'w;Wherein,
Figure FDA0002030977460000035
Figure FDA0002030977460000036
For with Qj(xj,yj) the corresponding set M 'wIn point coordinate;
By the set M ' of the point of the pen shape profile of the auxiliary pointwConstitute the pen shape profile of the auxiliary point.
4. a kind of electronic brush pen pen shape processing unit characterized by comprising
Acquisition module, for acquiring the seat for obtaining the current touch point for the writing brush pen shape that user operates on electronic device touchscreen The coordinate of mark and touch point before, it is described before touch point include the current touch point previous touch point and the current touching Touch the first two touch point a little;
First deformation characteristics computing module, for according to the coordinate of the coordinate of the current touch point and the previous touch point it Between distance and the previous touch point coordinate and the distance between the coordinate of the first two touch point, determine described in work as The deformation characteristics parameter of preceding touch point;
First pen shape profile processing module, for the deformation according to the coordinate and the current touch point of the current touch point Characteristic parameter determines the pen shape profile of the current touch point;
Rendering module, for rendering the pen shape profile area defined of the current touch point;
Further include:
Judgment module, for whether judging the distance between the coordinate of the current touch point and the coordinate of the previous touch point Greater than preset threshold;
Auxiliary point processing module, for the judgment module determine the distance be greater than preset threshold when, in the current touching Touch and be a little inserted at least one auxiliary point between the previous touch point, and according to the coordinate of the current touch point and it is described before The coordinate of one touch point determines the coordinate of the auxiliary point;
Second deformation characteristics computing module, for according to the current touch point deformation characteristics parameter and the previous touch point Deformation characteristics parameter, determine the deformation characteristics parameter of the auxiliary point;
Second pen shape profile processing module, for true according to the coordinate of the auxiliary point and the deformation characteristics parameter of the auxiliary point The pen shape profile of the fixed auxiliary point;
The rendering module is also used to render the pen shape profile of the current touch point and the pen shape profile institute of the auxiliary point The region surrounded;
The first deformation characteristics computing module is also used to:
According to formulaDetermine that the deformation of the current touch point is special Levy parameter wn, wherein the coordinate of the current touch point is Pn=(xn,yn,tn), the coordinate of the previous touch point is Pn-1= (xn-1,yn-1,tn-1), the coordinate of the first two touch point is Pn-2=(xn-2,yn-2,tn-2), W is pen shape width a reference value, and e is The natural truth of a matter, asAnd bsFor shifted matching coefficient, value range be [0 ,+∞), Δ t is the touch time interval of adjacent touch point, tn、tn-1And tn-2Respectively correspond to the touch time of touch point.
5. device according to claim 4, which is characterized in that the first pen shape profile processing module is also used to:
According to the coordinate of the current touch point, the corresponding pen shape boundary curve equation group of the current touch point is determined are as follows:
Wherein, described a, b and c are preset constant, yOnCorresponding pen shape upper bound curvilinear equation, yUnderCorresponding pen shape lower bound curvilinear equation, yIt is rightThe corresponding right boundary's curvilinear equation of pen shape;
The pen shape boundary curve equation group is solved, the set of the point on the surrounded Close edges of pen shape boundary curve is obtained M;
Using formulaTo the point N (x ' on the set Mi,y′i) zoom in and out, it obtains To the set M of the point for the pen shape profile for constituting the current touch pointw
Wherein, N (x 'i,y′i) be the set M in any point coordinate,
Figure FDA0002030977460000053
For with N (the x 'i,y′i) the corresponding set MwIn point coordinate;
By the set M of the point of the pen shape profile of the current touch pointwConstitute the pen shape profile of the current touch point.
6. device according to claim 4, which is characterized in that the auxiliary point processing module is also used to:
Determine the coordinate of the auxiliary point are as follows:
Figure FDA0002030977460000054
Wherein, j=1,2, N, N are the auxiliary point of insertion Number, N are the integer more than or equal to 1;
The second deformation characteristics computing module is also used to:
Determine the deformation characteristics parameter of the auxiliary point are as follows:
Figure FDA0002030977460000061
Wherein, wn-1For the deformation characteristics parameter of the previous touch point;
The second pen shape profile processing module is also used to:
Using formula
Figure FDA0002030977460000062
Determine the set for constituting the point of pen shape profile of the auxiliary point M′w;Wherein,
Figure FDA0002030977460000063
Figure FDA0002030977460000064
For with Qj(xj,yj) the corresponding set M 'wIn point coordinate;
By the set M ' of the point of the pen shape profile of the auxiliary pointwConstitute the pen shape profile of the 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 CN106155540A (en) 2016-11-23
CN106155540B true 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)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108021331B (en) * 2017-12-20 2021-01-22 广州视源电子科技股份有限公司 Gap eliminating method, device, equipment and storage medium
CN110045906B (en) * 2018-01-17 2020-11-17 北京方正手迹数字技术有限公司 Display method and display system for virtual writing brush writing
CN109271084B (en) * 2018-08-22 2021-05-07 安徽慧视金瞳科技有限公司 Drawing method for simulating pen touch of art designing pen
CN111831162B (en) * 2020-07-23 2023-10-10 吕嘉昳 Writing brush shape correction method based on touch screen
CN115373534A (en) * 2021-05-20 2022-11-22 广州视源电子科技股份有限公司 Handwriting presenting method and device, interactive panel and storage medium
CN116166165B (en) * 2023-04-25 2023-06-27 福昕鲲鹏(北京)信息科技有限公司 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

Also Published As

Publication number Publication date
CN106155540A (en) 2016-11-23

Similar Documents

Publication Publication Date Title
CN106155540B (en) Electronic brush pen pen shape treating method and apparatus
CN102937848B (en) Method for editing handwritings and electronic equipment
CN107710111B (en) Determining pitch angle for proximity sensitive interaction
US9141134B2 (en) Utilization of temporal and spatial parameters to enhance the writing capability of an electronic device
CN100407798C (en) Three-dimensional geometric mode building system and method
CN108399386A (en) Information extracting method in pie chart and device
KR20130066511A (en) Method and apparatus for calligraphic beautification of handwritten characters
KR20120095852A (en) Method and apparatus for drawing and erasing calligraphic ink objects on a display surface
CN101644984B (en) Method and device for detecting touch screen
CN102937850B (en) Method for beautifying handwriting in real time and electronic equipment
CN106325737A (en) Method and equipment for erasing writing path
CN102622225A (en) Multipoint touch application program development method supporting user defined gestures
CN109345553A (en) A kind of palm and its critical point detection method, apparatus and terminal device
CN103440101A (en) Handwritten original handwriting data processing method and system and mobile phone
CN112905102B (en) Method and device for realizing writing tip, electronic equipment and readable storage medium
CN103946865B (en) Method and apparatus for contributing to the text in detection image
CN111142770A (en) Method for generating pen point and processing device
CN106371614A (en) Gesture recognition optimizing method and device
CN104461315A (en) Handwriting input method for achieving vigorous writing effect
CN113342208B (en) Railway line selection method based on multi-point touch equipment, terminal and storage medium
CN102938157B (en) A kind of stylized Freehandhand-drawing based on disk B-spline curve generates method and system
Lu et al. Cross stage partial connections based weighted Bi-directional feature pyramid and enhanced spatial transformation network for robust object detection
CN103823628A (en) Calligraphy stoke simulating method combined with pen pressure
Qin et al. On-line segmentation of freehand sketches by knowledge-based nonlinear thresholding operations
CN112488059A (en) Spatial gesture control method based on deep learning model cascade

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
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.

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

Granted publication date: 20191015