CN110321054B - Writing brush handwriting drawing method, device, equipment and readable storage medium - Google Patents

Writing brush handwriting drawing method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN110321054B
CN110321054B CN201910537596.1A CN201910537596A CN110321054B CN 110321054 B CN110321054 B CN 110321054B CN 201910537596 A CN201910537596 A CN 201910537596A CN 110321054 B CN110321054 B CN 110321054B
Authority
CN
China
Prior art keywords
point
handwriting
sampling
circle
writing
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.)
Active
Application number
CN201910537596.1A
Other languages
Chinese (zh)
Other versions
CN110321054A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201910537596.1A priority Critical patent/CN110321054B/en
Publication of CN110321054A publication Critical patent/CN110321054A/en
Application granted granted Critical
Publication of CN110321054B publication Critical patent/CN110321054B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0414Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means using force sensing means to determine a position
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a writing brush writing drawing method, a writing brush writing drawing device, writing brush writing drawing equipment and a readable storage medium, wherein the writing brush writing drawing method comprises the following steps: receiving a writing operation for drawing a writing brush handwriting on the touch-sensitive surface; obtaining a plurality of sampling points according to the writing operation; for each preset number of sampling points which are continuously acquired, drawing handwriting units corresponding to the preset number of sampling points; and displaying the handwriting units so as to generate the writing brush handwriting according to the plurality of drawn handwriting units. By implementing the method, the writing brush handwriting drawing with high efficiency, no sawtooth and free zooming without distortion can be realized.

Description

Writing brush handwriting drawing method, device, equipment and readable storage medium
Technical Field
The invention relates to the field of intelligent interactive panels, in particular to a method, a device and equipment for drawing writing brush traces and a readable storage medium.
Background
An Intelligent Interactive Panel (IIP) is an integrated device that controls the content displayed on a display panel (LCD, LED, PDP) and implements human-computer interaction operations through a touch technology. The equipment integrates multiple functions of a projector, an electronic whiteboard, a curtain, a sound device, a television and a video conference terminal, is suitable for group communication occasions, and intensively meets the requirements of remote audio and video communication in a conference, high-definition display of conference documents in various formats, video file playing, on-site sound, screen writing, file marking, storage, printing, distribution and other systematized conferences; meanwhile, a television receiving function and surround sound are also built in, and the requirements of audio-visual entertainment can be met after the mobile phone works. The method is widely applied to the fields of education and teaching, enterprise meetings, commercial exhibition and the like.
In an educational teaching scene, for example, a writing brush teaching classroom or some specific scenes, it may be sometimes necessary to draw writing brush handwriting by using an intelligent interactive tablet. In the prior art, a writing brush handwriting is generated by fitting through continuous chartlet, and the problems that redundant drawing and larger saw teeth are inevitably generated due to continuous chartlet, and the chartlet can be blurred in the zooming process to cause larger distortion exist.
Disclosure of Invention
The embodiment of the invention provides a method, a device and equipment for writing brush handwriting drawing and a readable storage medium, which can realize writing brush handwriting drawing with high efficiency, no sawtooth and free zooming without distortion.
The embodiment of the invention provides a writing brush writing drawing method which is characterized by comprising the following steps:
receiving a writing operation for drawing a writing brush handwriting on the touch-sensitive surface;
obtaining a plurality of sampling points according to the writing operation;
drawing handwriting units corresponding to the sampling points of the preset number for each sampling point continuously acquired by the preset number; and
and displaying the handwriting units so as to generate the writing brush handwriting according to the plurality of drawn handwriting units.
Preferably, after obtaining a plurality of sampling points according to the writing operation, the method further comprises:
estimating the speed of passing through each sampling point according to the distance between adjacent sampling points;
calculating the writing pressure value at each sampling point according to the speed passing through each sampling point;
then, for each sampling point obtained by continuously collecting the predetermined number, drawing a handwriting unit corresponding to the sampling point with the predetermined number, specifically:
and for each preset number of sampling points acquired continuously, drawing handwriting units corresponding to the preset number of sampling points according to the writing pressure values corresponding to the sampling points.
Preferably, the velocity passing through each sampling point is positively correlated with the distance between the sampling point and the previous sampling point, and the written pressure value at each sampling point is negatively correlated with the velocity passing through the sampling point.
Preferably, the written pressure value P-a v at each sampling point; where n is the maximum width of the handwriting, v is the velocity at which the sample point is being passed, and a is the empirical coefficient.
Preferably, the predetermined number is 3, and the three sampling points acquired continuously are a first sampling point a, a second sampling point B and a third sampling point C, and the sampling time of the second sampling point B is between the first sampling point a and the third sampling point C; when the third sampling point C is not the last sampling point of the writing operation, the handwriting unit corresponding to the predetermined number of sampling points is drawn according to the pressure value corresponding to each sampling point for each sampling point, which specifically includes:
for three sampling points obtained by continuous collection, taking the position of each sampling point as the center of a circle and taking the corresponding writing pressure value as the radius to make a circle; a circle corresponding to the first sampling point A is marked as a circle A, a circle corresponding to the second sampling point B is marked as a circle B, and a circle corresponding to the third sampling point C is marked as a circle C;
generating a first tangent and a second tangent which are tangent to the circle A and the circle B; wherein the first tangent intersects with the circle A at a point D and intersects with the circle B at a point E; the second tangent line intersects with the circle A at a point F and intersects with the circle B at a point G;
generating a third tangent and a fourth tangent which are tangent to the circle B and the circle C; the third tangent line intersects with the circle B at a point H and intersects with the circle C at a point I; the fourth tangent line intersects the circle B at a point J and intersects the circle C at a point K;
acquiring a midpoint L of a line segment DE, a midpoint M of a line segment FG, a midpoint N of a line segment HI and a midpoint O of a line segment JK;
acquiring intersection points P and Q of an angle bisector of the & lt ABC and a circle B;
generating a closed area according to point L, M, N, P, Q, O;
and filling colors in the closed area to generate handwriting units corresponding to the three sampling points.
Preferably, the generating of the closed region according to point L, M, N, P, Q, O specifically includes:
taking P as a curve control point and L, N as a vertex to make a Bezier curve LPN;
taking Q as a curve control point and M, O as a vertex to make a Bezier curve MQO;
l, M and N, O are connected, respectively, so that segment LM, segment NO, Bezier curve LPN and Bezier curve MQO form a closed region.
Preferably, when the third sampling point C is the last sampling point of the writing operation, the step of drawing, according to the writing pressure value corresponding to each sampling point, a handwriting unit corresponding to the sampling point of the predetermined number for each sampling point continuously acquired by the predetermined number is specifically as follows:
generating an extension point Z according to the speed at the third sampling point C and the coordinate of the third sampling point C;
generating a closed region according to point L, M, P, Q, Z;
and filling colors in the closed area to generate handwriting units corresponding to the three sampling points.
Preferably, the coordinates of the extension point Z are:
Z x =C x +V cx *n;
Z y =C y +V cy *n;
wherein C is x ,C y Respectively the abscissa and ordinate, V, of the third sample point C cx And V cy N is an empirical value for the transverse velocity component and the longitudinal velocity component corresponding to the third sample point C.
The embodiment of the present invention further provides a writing brush writing drawing device, including:
the writing operation receiving unit is used for receiving writing operation used for drawing writing brush handwriting on the touch-sensitive surface;
the sampling unit is used for obtaining a plurality of sampling points according to the writing operation;
the handwriting unit drawing unit is used for drawing handwriting units corresponding to the sampling points of the preset number for each sampling point which is obtained by continuously collecting the preset number; and
and the writing brush handwriting generating unit is used for displaying the handwriting units so as to generate writing brush handwriting according to the plurality of handwriting units obtained by drawing.
Preferably, the method further comprises the following steps:
a sampling point speed estimation unit for estimating the speed of passing through each sampling point according to the distance between adjacent sampling points;
the writing pressure value calculating unit is used for calculating the writing pressure value at each sampling point according to the speed passing through each sampling point;
the handwriting unit drawing unit is specifically configured to:
and for each preset number of sampling points acquired continuously, drawing handwriting units corresponding to the preset number of sampling points according to the writing pressure values corresponding to the sampling points.
Preferably, the velocity passing through each sampling point is positively correlated with the distance between the sampling point and the previous sampling point, and the written pressure value at each sampling point is negatively correlated with the velocity passing through the sampling point.
Preferably, the written pressure value P-a v at each sampling point; where n is the maximum width of the handwriting, v is the velocity at which the sample point is being passed, and a is the empirical coefficient.
Preferably, the predetermined number is 3, and the three sampling points acquired continuously are a first sampling point a, a second sampling point B and a third sampling point C, and the sampling time of the second sampling point B is between the first sampling point a and the third sampling point C; when the third sampling point C is not the last sampling point of the writing operation, the handwriting unit drawing unit specifically includes:
the circle making module is used for making a circle by taking the position of each sampling point as the center of a circle and the corresponding writing pressure value as the radius of the three sampling points obtained by continuous acquisition; a circle corresponding to the first sampling point A is marked as a circle A, a circle corresponding to the second sampling point B is marked as a circle B, and a circle corresponding to the third sampling point C is marked as a circle C;
the first tangent generating module is used for generating a first tangent and a second tangent which are tangent to the circle A and the circle B; wherein the first tangent intersects the circle A at a point D and intersects the circle B at a point E; the second tangent line intersects with the circle A at a point F and intersects with the circle B at a point G;
the second tangent generating module is used for generating a third tangent and a fourth tangent which are tangent to the circle B and the circle C; the third tangent line intersects with the circle B at a point H and intersects with the circle C at a point I; the fourth tangent line intersects the circle B at a point J and intersects the circle C at a point K;
the middle point acquisition module is used for acquiring a middle point L of the line segment DE, a middle point M of the line segment FG, a middle point N of the line segment HI and a middle point O of the line segment JK;
the intersection point determining module is used for acquiring intersection points P and Q of an angular bisector of the & lt ABC and a circle B;
a first closed region generation module to generate a closed region according to point L, M, N, P, Q, O;
and the first filling module is used for filling colors into the closed area so as to generate handwriting units corresponding to the three sampling points.
Preferably, the first closed region generation module is specifically configured to:
taking P as a curve control point and L, N as a vertex to make a Bezier curve LPN;
taking Q as a curve control point and M, O as a vertex to make a Bezier curve MQO;
l, M and N, O are connected, respectively, so that segment LM, segment NO, Bezier curve LPN and Bezier curve MQO form a closed region.
Preferably, when the third sampling point C is the last sampling point of the writing operation, the handwriting drawing unit specifically includes:
the extension point module is used for generating an extension point Z according to the speed at the third sampling point C and the coordinate of the third sampling point C;
a second closed region generation module to generate a closed region according to point L, M, P, Q, Z;
and the second filling module is used for performing color filling on the closed area so as to generate handwriting units corresponding to the three sampling points.
Preferably, the coordinates of the extension point Z are:
Z x =C x +V cx *n;
Z y =C y +V cy *n;
wherein C x ,C y Respectively, the abscissa and ordinate of the third sample point C, V cx And V cy N is an empirical value for the transverse velocity component and the longitudinal velocity component corresponding to the third sample point C.
The embodiment of the present invention further provides a writing brush handwriting drawing device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processing, and when the processor executes the computer program, the writing brush handwriting drawing method is implemented.
An embodiment of the present invention further provides a computer-readable storage medium, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the method for writing brush handwriting as described above is implemented.
In the embodiment, in the writing brush handwriting drawing process, one handwriting unit is generated according to each preset number of sampling points, and then the final writing brush handwriting is formed through the handwriting units in a combined mode.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a writing brush handwriting drawing method according to a first embodiment of the present invention.
FIG. 2 is a combined display diagram of unfilled handwriting elements provided by a first embodiment of the invention.
FIG. 3 is a schematic diagram of the writing brush script generated after filling in FIG. 2.
Fig. 4 is a graphical representation of the relationship of sample point A, B, C.
Fig. 5 is a schematic diagram of the generation of a closed area from the sampling point A, B, C.
Fig. 6 is a schematic diagram of the enclosed region created in fig. 5.
Fig. 7 is a schematic diagram of the generation of a closed region when the sampling point C is the last sampling point.
Fig. 8 is a schematic diagram of the enclosed region created by fig. 7.
Fig. 9 is a schematic structural diagram of a writing brush handwriting drawing device according to a second embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a first embodiment of the present invention provides a writing brush handwriting drawing method, which can be executed by a writing brush handwriting drawing device and at least includes the following steps:
and S101, receiving writing operation for drawing writing brush handwriting on the touch-sensitive surface.
In this embodiment, the writing brush handwriting drawing device (hereinafter referred to as a device) may be formed by two or more physical entities, or may be formed by one physical entity. For example, the device may be a personal computer, a mobile phone, a tablet computer, or a smart interactive tablet, etc.
For convenience of understanding, the smart interactive tablet is exemplarily described as the device in the present embodiment. The intelligent interactive panel is an integrated device which can control the content displayed on the display panel and realize man-machine interactive operation through a touch technology, and integrates one or more functions of a projector, an electronic whiteboard, a curtain, a sound box, a television, a video conference terminal and the like. In general, the display screen of the smart interactive tablet may be a capacitive screen, a resistive screen, or an electromagnetic screen. The user can perform touch operation on the intelligent interaction panel through a finger or a touch pen.
Furthermore, the intelligent interactive tablet is provided with application software carried by an operating system, and simultaneously, application software downloaded from a third-party device or a server can be installed, wherein the specific type and content of the application software can be set according to actual conditions, and generally, the application software has an electronic whiteboard function, and can be realized through the electronic whiteboard function: writing, drawing, commenting, courseware making, displaying and playing. The intelligent interactive whiteboard in the embodiment has a writing brush handwriting drawing function, namely writing operation of a user can be converted into handwriting similar to writing brush characters to be displayed on a display screen.
During specific operation, a user can open corresponding editing software (such as an electronic whiteboard) first, and start a writing brush writing function, so that writing handwriting drawn on the editing software by a subsequent user is converted into writing brush handwriting.
And S102, obtaining a plurality of sampling points according to the writing operation.
In this embodiment, when a user performs a writing operation on the touch-sensitive display screen, the smart interactive tablet may perform touch point sampling once every predetermined sampling time, and may obtain touch information of a current sampling point during the sampling, where the touch information at least includes coordinates of each sampling point.
And S103, drawing handwriting units corresponding to the sampling points of the preset number for each preset number of continuously acquired sampling points.
And S104, displaying the handwriting units to generate writing brush handwriting according to the plurality of drawn handwriting units.
In this embodiment, the user will generate sampling points continuously while writing continuously, and the intelligent interactive tablet can draw a plurality of sampling points obtained by continuous collection through a predetermined drawing algorithm (for example, a bezier algorithm can be adopted) to obtain handwriting units corresponding to the sampling points.
For example, assuming that the predetermined number is set to 3, after each three sampling points are generated by the intelligent interactive tablet, a handwriting unit is generated according to the three sampling points, and after 3 sampling points are generated, a handwriting unit is generated by drawing, and the steps are repeated until the writing operation of the user is finished. If a total of 300 sampling points are generated after the writing operation of the user is finished, 100 handwriting units are generated, and the 100 handwriting units are combined to form the final writing brush handwriting.
As shown in fig. 2 and 3, each small closed region in fig. 2 corresponds to a handwriting unit (an actual handwriting unit is generated by filling the closed region), and it can be seen that a complete writing brush handwriting is generated by sequentially combining and filling colors in a plurality of closed regions.
It should be noted that, in this embodiment, the predetermined number may be set according to the requirement of an actually adopted rendering algorithm, and the present invention is not particularly limited.
It should be noted that, in the process of drawing by using the drawing algorithm, different drawing parameters are provided according to different requirements of the actual drawing algorithm, which may be determined according to the requirements of the drawing algorithm, and these schemes are all within the protection scope of the present invention.
In summary, in the embodiment, in the writing brush handwriting drawing process, one handwriting unit is generated according to each predetermined number of sampling points, and then the final writing brush handwriting is formed by combining the handwriting units.
On the basis of the above embodiment, in a preferred embodiment of the present invention, after step S102 and before step S103, the method further includes:
and S105, estimating the speed passing through each sampling point according to the distance between the adjacent sampling points.
And S106, calculating the writing pressure value at each sampling point according to the speed passing through each sampling point.
Step S103 specifically includes:
and for each preset number of sampling points acquired continuously, drawing handwriting units corresponding to the preset number of sampling points according to the writing pressure values corresponding to the sampling points.
The distance between two adjacent sampling points can be calculated according to the coordinates of each sampling point, and the time of passing through each sampling point can be estimated according to the distance and the sampling time.
Obviously, since the sampling time is fixed, the longer the pitch, the faster the writing speed, i.e. the speed is positively correlated with the pitch.
For example, the speed v ═ b × d/t may be set. Wherein d is the distance between adjacent sampling points, t is the sampling time, and b is an empirical coefficient.
Wherein the writing pressure value is inversely related to the speed, i.e. generally speaking, the faster the speed, the smaller the writing pressure value.
For example, in one particular implementation, the written pressure value P ═ n-a ×, v at each sample point; where n is the maximum width of the handwriting, v is the velocity at which the sample point is being passed, and a is the empirical coefficient.
In this embodiment, the writing force of writing is simulated according to the relation between the writing speed and the writing pressure value, so that the drawn handwriting unit can generate a pen point with higher reality, thereby having higher simulation degree, and realizing smooth writing on the premise of not using external electronic equipment.
As shown in fig. 4, on the basis of the above-described embodiment, in a preferred embodiment of the present invention,
the predetermined number is 3, and the three sampling points obtained by continuous acquisition are taken as a first sampling point A, a second sampling point B and a third sampling point C, and the sampling time of the second sampling point B is between the first sampling point A and the third sampling point C; when the third sample point C is not the last sample point of the writing operation, step S103 specifically includes:
s1031, taking the position of each sampling point as the center of a circle and taking the corresponding writing pressure value as the radius to make a circle for the three sampling points obtained by continuous collection; and recording a circle corresponding to the first sampling point A as a circle A, recording a circle corresponding to the second sampling point B as a circle B, and recording a circle corresponding to the third sampling point C as a circle C.
S1032, generating a first tangent line and a second tangent line which are tangent to the circle A and the circle B; wherein the first tangent intersects with the circle A at a point D and intersects with the circle B at a point E; the second tangent intersects circle a at point F and circle B at point G.
S1033, generating a third tangent and a fourth tangent which are tangent to the circle B and the circle C; the third tangent line intersects with the circle B at a point H and intersects with the circle C at a point I; the fourth tangent intersects circle B at point J and intersects circle C at point K.
S1034, acquiring a middle point L of the line segment DE, a middle point M of the line segment FG, a middle point N of the line segment HI and a middle point O of the line segment JK.
And S1035, acquiring intersection points P and Q of an angle bisector of &andcircle B.
S1036, a closed region is generated from point L, M, N, P, Q, O.
As shown in fig. 5 and 6, specifically:
firstly, taking P as a curve control point and L, N as a vertex to make a Bezier curve LPN;
then, taking Q as a curve control point and M, O as a vertex to make a Bezier curve MQO;
finally, L, M and N, O are connected, respectively, so that the segment LM, the segment NO, the bezier curve LPN and the bezier curve MQO form a closed region.
S1037, color filling is carried out on the closed area to generate handwriting units corresponding to the three sampling points.
In this embodiment, after the closed region is obtained, color filling is performed on the closed region, that is, the handwriting units corresponding to the three sampling points can be obtained, where what color to fill is specifically determined according to actual settings, and the present invention is not particularly limited.
By adopting the drawing algorithm of the embodiment to draw the handwriting unit, the drawn handwriting unit has a smooth boundary and strong anti-aliasing capability.
As shown in fig. 7 and 8, on the basis of the above-described embodiments, in a preferred embodiment of the present invention,
when the third sample point C is the last sample point of the writing operation, the step S103 specifically includes:
the extension point Z is generated from the velocity at the third sampling point C and the coordinates of the third sampling point C.
Wherein, in one implementation mode,
the coordinates of the extension point Z are as follows:
Z x =C x +V cx *n;
Z y =C y +V cy *n;
wherein C is x ,C y Respectively the abscissa and ordinate, V, of the third sample point C cx And V cy N is an empirical value for the transverse velocity component and the longitudinal velocity component corresponding to the third sample point C.
The enclosed region is generated according to point L, M, P, Q, Z.
And filling colors in the closed area to generate handwriting units corresponding to the three sampling points.
When a section of writing brush handwriting is drawn, a trend of drawing the writing brush is needed. Therefore, in the embodiment, when the last handwriting unit is drawn, an extension point Z is added, and the tail end of the handwriting unit converges to the extension point Z, so that the shape of the handwriting is closer to the shape of the writing brush handwriting, and the simulation degree of the handwriting is improved.
Referring to fig. 9, a second embodiment of the present invention further provides a writing brush writing apparatus, including:
a writing operation receiving unit 210 for receiving a writing operation for drawing a writing brush script on the touch-sensitive surface;
a sampling unit 220, configured to obtain a plurality of sampling points according to the writing operation;
a handwriting unit drawing unit 230, configured to draw a handwriting unit corresponding to each sampling point of a predetermined number for each sampling point of the predetermined number that is continuously acquired; and
and the writing brush handwriting generating unit 240 is used for displaying the handwriting units and generating writing brush handwriting according to the plurality of drawn handwriting units.
Preferably, the method further comprises the following steps:
a sampling point speed estimation unit for estimating the speed of passing through each sampling point according to the distance between adjacent sampling points;
the writing pressure value calculating unit is used for calculating the writing pressure value at each sampling point according to the speed passing through each sampling point;
the handwriting unit drawing unit 230 is specifically configured to:
and for each preset number of sampling points acquired continuously, drawing handwriting units corresponding to the preset number of sampling points according to the writing pressure values corresponding to the sampling points.
Preferably, the velocity passing through each sampling point is positively correlated with the distance between the sampling point and the previous sampling point, and the written pressure value at each sampling point is negatively correlated with the velocity passing through the sampling point.
Preferably, the written pressure value P-a v at each sample point; where n is the maximum width of the handwriting, v is the velocity at which the sample point is being passed, and a is the empirical coefficient.
Preferably, the predetermined number is 3, and the three sampling points acquired continuously are a first sampling point a, a second sampling point B and a third sampling point C, and the sampling time of the second sampling point B is between the first sampling point a and the third sampling point C; when the third sample point C is not the last sample point of the writing operation, the handwriting unit drawing unit 230 specifically includes:
the circle making module is used for making a circle by taking the position of each sampling point as the center of a circle and the corresponding writing pressure value as the radius of the three sampling points obtained by continuous acquisition; the circle corresponding to the first sampling point A is marked as a circle A, the circle corresponding to the second sampling point B is marked as a circle B, and the circle corresponding to the third sampling point C is marked as a circle C;
the first tangent generating module is used for generating a first tangent and a second tangent which are tangent to the circle A and the circle B; wherein the first tangent intersects with the circle A at a point D and intersects with the circle B at a point E; the second tangent line intersects with the circle A at a point F and intersects with the circle B at a point G;
the second tangent generating module is used for generating a third tangent and a fourth tangent which are tangent to the circle B and the circle C; the third tangent line intersects with the circle B at a point H and intersects with the circle C at a point I; the fourth tangent line intersects the circle B at a point J and intersects the circle C at a point K;
the middle point acquisition module is used for acquiring a middle point L of the line segment DE, a middle point M of the line segment FG, a middle point N of the line segment HI and a middle point O of the line segment JK;
the intersection point determining module is used for acquiring intersection points P and Q of an angular bisector of the & lt ABC and a circle B;
a first closed region generation module to generate a closed region according to point L, M, N, P, Q, O;
and the first filling module is used for filling colors into the closed area so as to generate handwriting units corresponding to the three sampling points.
Preferably, the first closed region generation module is specifically configured to:
taking P as a curve control point and L, N as a vertex to make a Bezier curve LPN;
taking Q as a curve control point and M, O as a vertex to make a Bezier curve MQO;
l, M and N, O are connected, respectively, so that segment LM, segment NO, Bezier curve LPN and Bezier curve MQO form a closed region.
Preferably, when the third sampling point C is the last sampling point of the writing operation, the handwriting drawing unit 230 specifically includes:
the extension point module is used for generating an extension point Z according to the speed at the third sampling point C and the coordinate of the third sampling point C;
a second closed region generation module to generate a closed region according to point L, M, P, Q, Z;
and the second filling module is used for performing color filling on the closed area so as to generate handwriting units corresponding to the three sampling points.
Preferably, the coordinates of the extension point Z are:
Z x =C x +V cx *n;
Z y =C y +V cy *n;
wherein C is x ,C y Respectively the abscissa and ordinate, V, of the third sample point C cx And V cy N is an empirical value for the transverse velocity component and the longitudinal velocity component corresponding to the third sample point C.
A third embodiment of the present invention provides a writing brush writing drawing device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the writing brush writing drawing device implements the writing brush writing drawing method according to the first embodiment.
The fourth embodiment of the present invention also provides a computer-readable storage medium including a stored computer program. When the computer program runs, the apparatus on which the computer-readable storage medium is located is controlled to execute the method for drawing writing with a brush in the first embodiment.
Illustratively, the computer programs described in the third and fourth embodiments of the present invention may be partitioned into one or more modules, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of performing certain functions, which are used to describe the execution of the computer program in the implementation of a pen-writing apparatus. For example, the device described in the second embodiment of the present invention.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general processor can be a microprocessor or the processor can also be any conventional processor and the like, the processor is a control center of the writing brush handwriting drawing method, and various interfaces and lines are utilized to connect all parts of the whole writing brush handwriting drawing method.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the internet-of-things based item tracking method by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, a text conversion function, etc.), and the like; the storage data area may store data (such as audio data, text message data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein the implemented module, if implemented in the form of a software functional unit and sold or used as a stand-alone product, can be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer-readable medium may contain suitable additions or subtractions depending on the requirements of legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer-readable media may not include electrical carrier signals or telecommunication signals in accordance with legislation and patent practice.
It should be noted that the above-described device embodiments are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A writing brush writing drawing method is characterized by comprising the following steps:
receiving a writing operation for drawing a writing brush handwriting on the touch-sensitive surface;
obtaining a plurality of sampling points according to the writing operation;
estimating the speed of passing through each sampling point according to the distance between adjacent sampling points;
calculating a writing pressure value at each sampling point according to the speed of passing through each sampling point; the writing pressure value at each sampling point is inversely related to the speed of passing through the sampling point;
for each preset number of sampling points which are continuously acquired, drawing handwriting units corresponding to the preset number of sampling points; drawing handwriting units corresponding to the sampling points of the preset number according to the writing pressure values corresponding to the sampling points for each preset number of continuously acquired sampling points; and
and displaying the handwriting units so as to generate the writing brush handwriting according to the plurality of drawn handwriting units.
2. The method for writing brush handwriting according to claim 1, wherein the velocity passing through each sample point is positively correlated with the distance between the sample point and the sample point immediately above it.
3. The writing brush handwriting drawing method according to claim 1, wherein a writing pressure value P = n-a x v at each sampling point; where n is the maximum width of the handwriting, v is the velocity at which the sample point is being passed, and a is the empirical coefficient.
4. The writing brush handwriting drawing method according to claim 1, wherein the predetermined number is 3, and the three continuously collected sampling points are a first sampling point a, a second sampling point B and a third sampling point C, and the sampling time of the second sampling point B is between the first sampling point a and the third sampling point C; when the third sampling point C is not the last sampling point of the writing operation, the handwriting unit corresponding to the predetermined number of sampling points is drawn according to the pressure value corresponding to each sampling point for each sampling point, which specifically includes:
for three sampling points obtained by continuous collection, taking the position of each sampling point as the center of a circle and taking the corresponding writing pressure value as the radius to make a circle; a circle corresponding to the first sampling point A is marked as a circle A, a circle corresponding to the second sampling point B is marked as a circle B, and a circle corresponding to the third sampling point C is marked as a circle C;
generating a first tangent and a second tangent which are tangent to the circle A and the circle B; wherein the first tangent intersects with the circle A at a point D and intersects with the circle B at a point E; the second tangent line intersects with the circle A at a point F and intersects with the circle B at a point G;
generating a third tangent and a fourth tangent which are tangent to the circle B and the circle C; the third tangent line intersects with the circle B at a point H and intersects with the circle C at a point I; the fourth tangent line intersects the circle B at a point J and intersects the circle C at a point K;
acquiring a midpoint L of a line segment DE, a midpoint M of a line segment FG, a midpoint N of a line segment HI and a midpoint O of a line segment JK;
acquiring intersection points P and Q of an angular bisector of the & lt ABC and a circle B;
generating a closed area according to point L, M, N, P, Q, O;
and filling colors in the closed area to generate handwriting units corresponding to the three sampling points.
5. The writing brush handwriting drawing method according to claim 4, wherein the generating of the closed area according to the point L, M, N, P, Q, O specifically comprises:
taking P as a curve control point and L, N as a vertex to make a Bezier curve LPN;
taking Q as a curve control point and M, O as a vertex to make a Bezier curve MQO;
l, M and N, O are connected, respectively, so that segment LM, segment NO, Bezier curve LPN and Bezier curve MQO form a closed region.
6. The writing brush handwriting drawing method according to claim 4, wherein when the third sampling point C is the last sampling point of the writing operation, the writing brush handwriting unit corresponding to each predetermined number of sampling points is drawn according to the writing pressure value corresponding to each sampling point, specifically:
generating an extension point Z according to the speed at the third sampling point C and the coordinate of the third sampling point C;
generating a closed region according to point L, M, P, Q, Z;
and filling colors in the closed area to generate handwriting units corresponding to the three sampling points.
7. The writing brush handwriting drawing method according to claim 6, wherein the coordinates of the extension point Z are:
Z x =C x +V cx *n;
Z y = C y +V cy *n;
wherein C is x ,C y Respectively the abscissa and ordinate, V, of the third sample point C cx And V cy N is an empirical value for the transverse velocity component and the longitudinal velocity component corresponding to the third sample point C.
8. A writing brush trace drawing apparatus, comprising:
the writing operation receiving unit is used for receiving writing operation used for drawing writing brush handwriting on the touch-sensitive surface;
the sampling unit is used for obtaining a plurality of sampling points according to the writing operation;
a sampling point speed estimation unit for estimating the speed of passing through each sampling point according to the distance between adjacent sampling points;
the writing pressure value calculating unit is used for calculating the writing pressure value at each sampling point according to the speed passing through each sampling point; the writing pressure value at each sampling point is inversely related to the speed of passing through the sampling point;
the handwriting unit drawing unit is used for drawing handwriting units corresponding to the sampling points of the preset number for each sampling point which is obtained by continuously collecting the preset number; drawing handwriting units corresponding to the sampling points of the preset number according to the writing pressure values corresponding to the sampling points for each preset number of continuously acquired sampling points; and
and the writing brush handwriting generating unit is used for displaying the handwriting units so as to generate writing brush handwriting according to the plurality of drawn handwriting units.
9. A writing brush handwriting drawing apparatus comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the writing brush handwriting drawing method according to any of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, the computer program being executable by a processor of a device in which the computer-readable storage medium is located to implement the writing brush handwriting drawing method according to any one of claims 1 to 7.
CN201910537596.1A 2019-06-20 2019-06-20 Writing brush handwriting drawing method, device, equipment and readable storage medium Active CN110321054B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910537596.1A CN110321054B (en) 2019-06-20 2019-06-20 Writing brush handwriting drawing method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910537596.1A CN110321054B (en) 2019-06-20 2019-06-20 Writing brush handwriting drawing method, device, equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN110321054A CN110321054A (en) 2019-10-11
CN110321054B true CN110321054B (en) 2022-08-16

Family

ID=68120006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910537596.1A Active CN110321054B (en) 2019-06-20 2019-06-20 Writing brush handwriting drawing method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN110321054B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110910469A (en) * 2019-10-18 2020-03-24 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for drawing handwriting
CN111427499B (en) * 2020-03-19 2021-10-19 广州视源电子科技股份有限公司 Handwriting drawing method, device, equipment and storage medium
CN113590000B (en) * 2020-04-30 2023-01-17 京东方科技集团股份有限公司 Handwriting processing method, handwriting processing device and storage medium
CN113589999B (en) 2020-04-30 2024-01-30 京东方科技集团股份有限公司 Handwriting processing method, handwriting processing device and non-transitory storage medium
CN111782131A (en) * 2020-07-27 2020-10-16 深圳市千分一智能技术有限公司 Pen point implementation method, device, equipment and readable storage medium
CN112102435B (en) * 2020-09-24 2023-08-01 安徽文香科技股份有限公司 Method, device, equipment and storage medium for drawing geometric figure
CN112148199A (en) * 2020-10-09 2020-12-29 北京文香信息技术有限公司 Handwriting implementation method and device in electronic equipment
CN112394838B (en) * 2020-11-17 2023-11-10 青岛海信商用显示股份有限公司 Handwriting determining method and touch display device
CN113138692A (en) * 2021-04-07 2021-07-20 维沃移动通信有限公司 Input device, method and apparatus
CN113934394B (en) * 2021-10-19 2024-05-03 河北师达教育科技有限公司 Method, device and terminal equipment for realizing memory display in display screen
CN115205423B (en) * 2022-09-19 2022-12-13 北京猎户座信息技术有限公司 Handwriting method and system based on electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081803A (en) * 2011-01-20 2011-06-01 周佳 Method for implementing writing style of original handwriting
CN102103761A (en) * 2011-01-31 2011-06-22 周佳 Method for realizing original handwriting
JP2014026582A (en) * 2012-07-30 2014-02-06 Brother Ind Ltd Contact detection processing program, contact detection processing method and touch panel device
CN104345948A (en) * 2013-07-31 2015-02-11 北京壹人壹本信息科技有限公司 Implementation method and implementation device for original handwriting as well as electronic equipment
CN107526526A (en) * 2017-09-19 2017-12-29 广州视源电子科技股份有限公司 Determine the method and device in pressure sensitivity person's handwriting region

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102081803A (en) * 2011-01-20 2011-06-01 周佳 Method for implementing writing style of original handwriting
CN102103761A (en) * 2011-01-31 2011-06-22 周佳 Method for realizing original handwriting
JP2014026582A (en) * 2012-07-30 2014-02-06 Brother Ind Ltd Contact detection processing program, contact detection processing method and touch panel device
CN104345948A (en) * 2013-07-31 2015-02-11 北京壹人壹本信息科技有限公司 Implementation method and implementation device for original handwriting as well as electronic equipment
CN107526526A (en) * 2017-09-19 2017-12-29 广州视源电子科技股份有限公司 Determine the method and device in pressure sensitivity person's handwriting region

Also Published As

Publication number Publication date
CN110321054A (en) 2019-10-11

Similar Documents

Publication Publication Date Title
CN110321054B (en) Writing brush handwriting drawing method, device, equipment and readable storage medium
CN110580125B (en) Partial refreshing method, device, equipment and medium for display interface
CN108733296B (en) Method, device and equipment for erasing handwriting
US20200363946A1 (en) Systems and methods for interactive image caricaturing by an electronic device
CN108304132B (en) Graph display method, device, equipment and storage medium
CN107608668B (en) Method and device for making and compatibly displaying H5 page, terminal equipment and storage medium
CN101763234B (en) Method and device for simulating various screen resolutions
CN109215098B (en) Handwriting erasing method and device
EP3886449A1 (en) Video file playback method and apparatus, and storage medium
CN105930464B (en) Web rich media cross-screen adaptation method and device
CN108762628B (en) Page element mobile display method and device, terminal equipment and storage medium
CN108509142B (en) Writing software interaction method and device, terminal equipment and storage medium
CN114138165B (en) Pattern recognition method, apparatus, device and storage medium
KR20150012291A (en) Animation playing method, device and apparatus
CN102402279A (en) Human-computer interaction method and system based on gestures
CN104427258A (en) Video image operation realization method and apparatus
US9223417B1 (en) Method and apparatus for on-the-run processing of electronic ink using digital filtering and adaptive parameterization
CN114327140B (en) Screen touch method, device, system, equipment and storage medium
CN113849106B (en) Page turning handwriting processing method, device, electronic device and storage medium
CN114168060A (en) Electronic whiteboard rendering method, device, equipment and storage medium
CN115552364A (en) Multi-terminal collaborative display updating method and device
CN109085974B (en) Screen control method, system and terminal equipment
CN114972558A (en) Handwriting drawing method, device, medium and interactive panel
CN112306359A (en) Handwriting display method, device, equipment and storage medium
CN111063005A (en) Handwriting processing method and device

Legal Events

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