CN111427499B - Handwriting drawing method, device, equipment and storage medium - Google Patents

Handwriting drawing method, device, equipment and storage medium Download PDF

Info

Publication number
CN111427499B
CN111427499B CN202010197846.4A CN202010197846A CN111427499B CN 111427499 B CN111427499 B CN 111427499B CN 202010197846 A CN202010197846 A CN 202010197846A CN 111427499 B CN111427499 B CN 111427499B
Authority
CN
China
Prior art keywords
points
handwriting
continuous
point
sampling
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
CN202010197846.4A
Other languages
Chinese (zh)
Other versions
CN111427499A (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 Shizhen Information Technology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shizhen Information Technology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN202010197846.4A priority Critical patent/CN111427499B/en
Publication of CN111427499A publication Critical patent/CN111427499A/en
Application granted granted Critical
Publication of CN111427499B publication Critical patent/CN111427499B/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/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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses a handwriting drawing method, a handwriting drawing device, terminal equipment and a storage medium. The method comprises the following steps: acquiring four continuous sampling points in the writing process; constructing an initial quadrangle for two adjacent sampling points; confirming two groups of derivative points based on middle points of opposite sides of three initial quadrilaterals corresponding to the continuous four sampling points; confirming two second-order Bezier curves according to the two groups of derivative points; and drawing the two second-order Bezier curves and the closed areas confirmed by the end points thereof as handwriting units corresponding to the continuous four sampling points. And performing geometric relation processing on the continuous four sampling points to obtain handwriting units corresponding to the middle two sampling points, and drawing based on the processing mode of the handwriting units to obtain continuous and smooth writing handwriting.

Description

Handwriting drawing method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of touch display, in particular to a handwriting drawing method, a handwriting drawing device, handwriting drawing equipment and a handwriting drawing storage medium.
Background
Along with the development of intelligent technology, the types of electronic products contacted by people in daily life are increasingly rich, wherein the interactive electronic products realized based on the touch technology can realize the input of instructions and the input of information contents. The input of information content is performed through a software interactive interface (such as an electronic whiteboard) presented on hardware equipment by a user, the detection of touch data is completed, the touch data is loaded by software and then displayed in the software interactive interface presented on the hardware equipment, and by the method, handwritten content, namely handwriting, can be displayed on the hardware equipment.
In the conventional handwriting drawing process, the handwriting is not drawn by taking a touch event (namely, from contact to leaving) as a unit, but a plurality of sampling points are obtained in the touch event, and a plurality of handwriting units are drawn according to the positions of continuous sampling points to form a smooth line as far as possible. In particular, as shown in FIG. 1, for three consecutive sample points A0, B0 and C0, connecting two neighboring sample points (i.e., the line segment A0B0 and the line segment B0C0) with sample points as centers of circles (i.e., circles as indicated by:. A0,. B0 and. C0); in the case of [ < I > A0 </I > where a diameter A01A02 perpendicular to the line segment A0B0 exists, in the case of [ < I > B0 </I > where a diameter B01B03 perpendicular to the line segment A0B0 exists and in the case of [ < I > B04 </I > where a diameter B02B04 perpendicular to the line segment B0C0 exists, an angle bisector I0J0 between the two diameters exists, in the case of [ < I > C0 </I > where a diameter C01C02 perpendicular to the line segment B0C0 exists, E0 is the midpoint of the line segment A01B01, G0 is the end of the line segment B02C01, F0 is the end of the line segment A02B03, and H0 is the end of the line segment B04C 02; constructing a second-order Bezier curve E0G0 by taking E0 and G0 as endpoints, taking I0 as a control point, constructing a second-order Bezier curve F0H0 by taking F0 and H0 as endpoints and taking J0 as a control point; the two second-order Bezier curves are connected with corresponding end points (E0 and F0, G0 and H0) to obtain a closed graph E0F0H0G0, and the closed graph E0F0H0G0 is the handwriting unit corresponding to the sampling point B0.
The inventor finds that, in the process of realizing handwriting drawing, when a plurality of handwriting units are connected into a handwriting because of the confirmation strategy of end points and control points in the drawing process in the prior art, abrupt change may occur in the connection between two adjacent handwriting units as shown in a rectangular frame in fig. 2, and the handwriting is not smooth enough.
Disclosure of Invention
The invention provides a handwriting drawing method, a handwriting drawing device, terminal equipment and a storage medium, and aims to solve the problem that touch handwriting drawing in the prior art is not smooth enough.
In a first aspect, an embodiment of the present invention provides a method for drawing a handwriting, including:
acquiring four continuous sampling points in the writing process;
constructing an initial quadrangle for two adjacent sampling points;
confirming two groups of derivative points based on middle points of opposite sides of three initial quadrilaterals corresponding to the continuous four sampling points;
confirming two second-order Bezier curves according to the two groups of derivative points;
and drawing the two second-order Bezier curves and the closed areas confirmed by the end points thereof as handwriting units corresponding to the continuous four sampling points.
Wherein, the initial quadrangle is constructed by the two adjacent sampling points, and the method comprises the following steps:
connecting two adjacent sampling points to obtain a connecting line;
determining a circle with a set radius by taking the sampling point as a circle center;
two points are taken on each circle as the vertices of the initial quadrilateral, the two points being the end points of the diameter perpendicular to the connecting line.
Wherein, the identifying two groups of derivative points based on the middle points of the opposite sides of the three initial quadrilaterals corresponding to the four continuous sampling points comprises:
and determining the middle points of the sides of the three initial quadrilaterals positioned on the same side of the continuous three continuous center lines as a group of derivative points.
Wherein the identifying two second order bezier curves from the two sets of derivative points comprises:
and determining an end point according to the control point and the other two points by taking the derivative point positioned in the middle in each group of derivative points as the control point, and determining a second-order Bezier curve according to the control point and the end point.
The radius is determined by the set size of the drawn handwriting, the touch area in the writing process, the writing speed in the writing process and/or the pressure in the writing process.
Wherein, the method further comprises:
and confirming an extension point at the tail end of the handwriting according to a set extension rule, and drawing the last handwriting unit of the handwriting according to the extension point.
In a second aspect, an embodiment of the present invention further provides a handwriting drawing apparatus, including:
the writing sampling unit is used for acquiring four continuous sampling points in the writing process;
the rectangular construction unit is used for constructing an initial quadrangle for two adjacent sampling points;
the derived point confirming unit is used for confirming two groups of derived points based on the middle points of the opposite sides of the three initial quadrangles corresponding to the continuous four sampling points;
the curve confirming unit is used for confirming two second-order Bezier curves according to the two groups of derivative points;
and the area determining unit is used for drawing the two second-order Bezier curves and the closed areas confirmed by the end points thereof as handwriting units corresponding to the continuous four sampling points.
Wherein the rectangular construction unit includes:
the sampling point connecting module is used for connecting two adjacent sampling points to obtain a connecting line;
the circle determining module is used for determining a circle with a set radius by taking the sampling point as a circle center;
and the vertex determining module is used for taking two points on each circle as the vertexes of the initial quadrangle, wherein the two points are the end points of the diameter perpendicular to the connecting line.
Wherein, the derivation point confirmation unit is specifically configured to:
and determining the middle points of the sides of the three initial quadrilaterals positioned on the same side of the continuous three continuous center lines as a group of derivative points.
Wherein, the curve confirmation unit is specifically configured to:
and determining an end point according to the control point and the other two points by taking the derivative point positioned in the middle in each group of derivative points as the control point, and determining a second-order Bezier curve according to the control point and the end point.
The radius is determined by the set size of the drawn handwriting, the touch area in the writing process, the writing speed in the writing process and/or the pressure in the writing process.
Wherein, the device still includes:
and the tail end drawing unit is used for confirming an extension point at the tail end of the handwriting according to a set extension rule and drawing the last handwriting unit of the handwriting according to the extension point.
In a third aspect, an embodiment of the present invention further provides a terminal device, including:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method of handwriting rendering according to any of the first aspects.
In a fourth aspect, the embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the handwriting drawing method according to any one of the first aspect.
The handwriting drawing method, the handwriting drawing device, the terminal equipment and the storage medium acquire four continuous sampling points in the writing process; constructing an initial quadrangle for two adjacent sampling points; confirming two groups of derivative points based on middle points of opposite sides of three initial quadrilaterals corresponding to the continuous four sampling points; confirming two second-order Bezier curves according to the two groups of derivative points; and drawing the two second-order Bezier curves and the closed areas confirmed by the end points thereof as handwriting units corresponding to the continuous four sampling points. And performing geometric relation processing on the continuous four sampling points to obtain handwriting units corresponding to the middle two sampling points, and drawing based on the processing mode of the handwriting units to obtain continuous and smooth writing handwriting.
Drawings
FIG. 1 is a diagram illustrating a prior art handwriting unit validation method;
FIG. 2 is a diagram of a writing script composed of handwriting units in the prior art;
FIG. 3 is a flowchart of a method for drawing handwriting according to an embodiment of the present invention;
FIG. 4 is a flowchart of a handwriting drawing method according to a second embodiment of the present invention;
FIG. 5 is a diagram illustrating a method for confirming a handwriting unit according to a second embodiment of the present invention;
FIG. 6 is a schematic diagram of a writing script composed of handwriting units according to a second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a handwriting drawing apparatus according to a third embodiment of the present invention;
fig. 8 is a schematic structural diagram of a terminal device according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not limitation. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
It should be noted that, for the sake of brevity, this description does not exhaust all alternative embodiments, and it should be understood by those skilled in the art after reading this description that any combination of features may constitute an alternative embodiment as long as the features are not mutually inconsistent.
For example, in one embodiment of the first embodiment, one technical feature is described: in another implementation of the first embodiment, another technical feature is described: the initial quadrilateral is a rectangle. Since the above two technical features are not mutually contradictory, after reading the present application, it should be understood that an embodiment having both of these features is also an alternative embodiment, that is, after confirming the position of the sampling point by receiving the encapsulated touch data, an initial quadrangle with a rectangular shape is confirmed.
The features described in the different embodiments, which are not mutually inconsistent, may also be arbitrarily combined to form alternative embodiments.
For example, example two describes: and performing extension drawing at the tail end of the writing script. This feature is not described in the first embodiment for the sake of controlling the space of the present specification. But it should be understood by those skilled in the art after reading the present specification that the handwriting drawing method provided in the first embodiment may also include the feature.
The following examples are described in detail.
Example one
Fig. 3 is a flowchart of a handwriting drawing method according to an embodiment of the present invention. The handwriting drawing method provided in the embodiment may be executed by an operating device of the intelligent interaction tablet, the operating device of the intelligent interaction tablet may be implemented in a software and/or hardware manner, and the operating device of the intelligent interaction tablet may be formed by two or more physical entities or may be formed by one physical entity. For example, the operating device of the smart interactive tablet may be a cell phone, an industrial control computer, or the like.
In order to facilitate understanding, in the embodiment, the intelligent interactive tablet is used as an actual carrier, and a process of processing touch data by a bottom layer when the handwriting drawing method is implemented is exemplarily described. The intelligent interactive panel can be an integrated device which controls the content displayed on the display panel and realizes man-machine interaction 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.
Specifically, referring to fig. 3, the handwriting drawing method specifically includes:
and step S101, acquiring four continuous sampling points in the writing process.
Taking a touch device (e.g., an electronic whiteboard) of an Android system as an example, a specific method for acquiring a sampling point may be: the Android system can transmit the packaged data to an application program (such as a whiteboard application), so that the application program only needs to acquire the touch data from the packaged data.
If more data are detected in the touch process, such as pressure values, contact areas and the like, more data can be correspondingly packaged to confirm basic parameters of the final handwriting drawing. The corresponding handwriting size is determined, for example, by the contact area and the pressure value.
And S102, constructing an initial quadrangle for two adjacent sampling points.
The initial quadrangle takes a straight line where a connecting line of two sampling points is located as a symmetry axis, four sides of the initial quadrangle are respectively a line segment passing through the two sampling points and a connecting line of end points of the two line segments on the same side of the symmetry axis, and therefore the initial quadrangle can be a rectangle or an isosceles trapezoid and is specifically determined by display setting of handwriting. If the thickness of the handwriting is not changed, the initial quadrangle is a rectangle, and if the thickness of the handwriting is changed correspondingly according to pressure, speed and the like, the line lengths of two sampling points are different, so that the initial quadrangle is an isosceles trapezoid.
Step S103: and confirming two groups of derivative points based on the middle points of the opposite sides of the three initial quadrilaterals corresponding to the continuous four sampling points.
Three initial quadrilaterals can be determined for four consecutive sampling points, the midpoint of the connecting line of the end points of the three initial quadrilaterals is determined as a derivative point, and the derivative points on each side of the connecting line of the sampling points are a group of derivative points.
Step S104: and confirming two second-order Bezier curves according to the two groups of derivative points.
The middle point in each group of derivative points is taken as a control point, the middle point of the connecting line of the control point and the other two points is taken as an end point, so that a second-order Bezier curve can be confirmed, and the two groups of derivative points can correspondingly confirm the two second-order Bezier curves.
Step S105: and drawing the two second-order Bezier curves and the closed areas confirmed by the end points thereof as handwriting units corresponding to the continuous four sampling points.
After the corresponding end points of the two second-order Bezier curves are connected, a closed area can be constructed by the connecting line of the end points and the second-order Bezier curves, the closed area can be confirmed to be a handwriting unit, and the handwriting units are drawn in sequence according to the writing operation to obtain the writing handwriting corresponding to the writing operation.
Therefore, each section of the second-order Bezier curve and the adjacent second-order Bezier curve are tangent to the same point of the same line segment, so that the boundary of the handwriting units in each handwriting is continuous and smooth, and the continuous and smooth of the whole handwriting is finally realized.
In the actual processing process, the time interval (or the space interval) between the sampling points is very small, so for the first two sampling points, the drawing can be omitted, and the display effect of the finally drawn handwriting is not influenced. In addition, in the specific drawing process, the first determined handwriting unit can be properly extended, and a mellow initial shape is drawn at the initial position of the handwriting, so that the handwriting input by touch is closer to the real writing effect.
Acquiring four continuous sampling points in the writing process; constructing an initial quadrangle for two adjacent sampling points; confirming two groups of derivative points based on middle points of opposite sides of three initial quadrilaterals corresponding to the continuous four sampling points; confirming two second-order Bezier curves according to the two groups of derivative points; and drawing the two second-order Bezier curves and the closed areas confirmed by the end points thereof as handwriting units corresponding to the continuous four sampling points. And performing geometric relation processing on the continuous four sampling points to obtain handwriting units corresponding to the middle two sampling points, and drawing based on the processing mode of the handwriting units to obtain continuous and smooth writing handwriting.
Example two
Fig. 4 is a flowchart of a handwriting drawing method according to a second embodiment of the present invention. The present embodiment is embodied on the basis of the above-described embodiments.
Specifically, referring to fig. 4, the handwriting drawing method provided in this embodiment specifically includes:
and step S201, acquiring four continuous sampling points in the writing process.
And S202, connecting the two adjacent sampling points to obtain a connecting line.
And step S203, determining a circle with a set radius by taking the sampling point as a circle center.
And S204, taking two points on each circle as the vertexes of the initial quadrangle, wherein the two points are end points of the diameter perpendicular to the connecting line.
And S205, determining the middle points of the sides of the three initial quadrilaterals positioned on the same side of the three continuous center lines as a group of derivative points.
And S206, determining an end point according to the control point and the other two points by taking the derivative point positioned in the middle in each group of derivative points as the control point, and determining a second-order Bezier curve according to the control point and the end point.
And step S207, drawing the two second-order Bezier curves and the closed regions confirmed by the end points thereof as handwriting units corresponding to the continuous four sampling points.
As shown in FIG. 5, in steps S201 to S207, specifically referring to FIG. 5, four sampling points A, B, C and D were sequentially obtained during the writing process, and two adjacent sampling points were connected to obtain three continuous lines (i.e., a line segment AB, a line segment BC, and a line segment CD), with A, B, C and D as the centers, and with set radii (set by static setting values or touch parameters), the corresponding indications A, B, C and D were confirmed. Two points are taken on each circle, specifically the end point of the diameter perpendicular to the center line, the center line associated with A has a line segment AB, and the two points are taken correspondingly as A1 and A2; a connecting line related to the line B is provided with a line segment AB and a line segment BC, and two points B11 and B12, and B21 and B22 are correspondingly taken; the connecting line related to the C is provided with a line segment BC and a line segment CD, and two points C11 and C12 and C21 and C22 are correspondingly taken; a connecting line related to D is provided with a line segment CD, and two points are correspondingly taken as D1 and D2. From the above endpoints, three initial quadrilaterals A1A2B12B11, B21B22C12C11, and C21C22D2D1 can be identified, for the comparison midpoints of the three initial quadrilaterals, identifying points E, G and I as a set of derivative points, and points F, H and J as a set of derivative points. For the set of derivative points E, G and I, a second order bezier curve (i.e., KM tangent to EG at point K, GI at point M) can be identified using G as the control point and the midpoint of the line EG (i.e., K) and GI as the endpoints; similarly, for the set of derived points F, H and J, a second-order bezier curve (i.e., LN tangent to FH at the point L, and HJ at the point N) can be also determined, and K and L are further connected, and M and N are connected, so that a closed region KLNM can be obtained, where the closed region is a handwriting unit corresponding to the four sampling points A, B, C and D.
In the process of drawing the next handwriting unit, corresponding to four sampling points, including B, C and one sampling point after D and D, after the steps S201 to S207, two second-order bezier curves are also generated, and are correspondingly connected to KM and LN, and are respectively tangent to GI and HJ, respectively, at point M and point N, because it is believed that the two second-order bezier curves are tangent to the same point and are continuous smooth curves, finally, as shown in fig. 6, the writing handwriting drawn by the handwriting unit in the present scheme is a completely smooth curve.
And S208, confirming an extension point at the tail end of the handwriting according to a set extension rule, and drawing the last handwriting unit of the handwriting according to the extension point.
And setting an extension rule to construct a virtual sampling point at the tail end, and drawing the last handwriting unit based on the sampling point. The set extension rule may be obtained by performing rule conversion based on the last three or two actual sampling points in combination with the last written velocity component and the stroke form empirical value, for example, drawing a stroke front through the stroke form empirical value. In addition, a smooth end can be provided for the last real handwriting unit, namely, the drawing of the writing is finished.
EXAMPLE III
Fig. 7 is a schematic structural diagram of a handwriting drawing apparatus according to a third embodiment of the present invention. Referring to fig. 7, the handwriting drawing apparatus includes: a writing sampling unit 301, a rectangular construction unit 302, a derivation point confirmation unit 303, a curve confirmation unit 304, and an area determination unit 305.
The writing sampling unit 301 is configured to obtain four consecutive sampling points in the writing process; a rectangle constructing unit 302, configured to construct an initial quadrangle for two adjacent sampling points; a derived point confirming unit 303, configured to confirm two groups of derived points based on middle points of opposite sides of three initial quadrilaterals corresponding to the four consecutive sampling points; a curve confirming unit 304, configured to confirm two second-order bezier curves according to the two sets of derivative points; the area determining unit 305 is configured to draw the two second-order bezier curves and the closed areas confirmed by the end points thereof as handwriting units corresponding to the four consecutive sampling points.
On the basis of the above embodiment, the rectangular configuration unit 302 includes:
the sampling point connecting module is used for connecting two adjacent sampling points to obtain a connecting line;
the circle determining module is used for determining a circle with a set radius by taking the sampling point as a circle center;
and the vertex determining module is used for taking two points on each circle as the vertexes of the initial quadrangle, wherein the two points are the end points of the diameter perpendicular to the connecting line.
On the basis of the foregoing embodiment, the derivation point determining unit is specifically configured to:
and determining the middle points of the sides of the three initial quadrilaterals positioned on the same side of the continuous three continuous center lines as a group of derivative points.
On the basis of the foregoing embodiment, the curve confirming unit is specifically configured to:
and determining an end point according to the control point and the other two points by taking the derivative point positioned in the middle in each group of derivative points as the control point, and determining a second-order Bezier curve according to the control point and the end point.
On the basis of the above embodiment, the radius is determined by the set drawing handwriting size, the touch area during writing, the writing speed during writing and/or the pressure sensation during writing.
On the basis of the above embodiment, the apparatus further includes:
and the tail end drawing unit is used for confirming an extension point at the tail end of the handwriting according to a set extension rule and drawing the last handwriting unit of the handwriting according to the extension point.
The handwriting drawing device provided by the embodiment of the invention is contained in the terminal equipment, can be used for executing any handwriting drawing method provided by the first embodiment and the second embodiment, and has corresponding functions and beneficial effects.
It should be noted that, in the embodiment of the handwriting drawing apparatus, the included units and modules are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
Example four
Fig. 8 is a schematic structural diagram of a terminal device according to a fourth embodiment of the present invention, where the terminal device is a specific hardware presentation scheme of the operation device of the intelligent interactive tablet. As shown in fig. 8, the terminal device includes a processor 410, a memory 420, an input means 430, an output means 440, and a communication means 450; the number of the processors 410 in the terminal device may be one or more, and one processor 410 is taken as an example in fig. 8; the processor 410, the memory 420, the input device 430, the output device 440 and the communication device 450 in the terminal equipment may be connected by a bus or other means, and fig. 8 illustrates the connection by the bus as an example.
The memory 420 serves as a computer-readable storage medium, and may be used to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the handwriting drawing method in the embodiment of the present invention (for example, the writing sampling unit 301, the rectangle construction unit 302, the derivation point confirmation unit 303, the curve confirmation unit 304, and the region determination unit 305 in the handwriting drawing apparatus). The processor 410 executes various functional applications and data processing of the terminal device by running software programs, instructions and modules stored in the memory 420, that is, implements the handwriting drawing method described above.
The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 420 may further include memory located remotely from processor 410, which may be connected to a terminal device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. The output device 440 may include a display device such as a display screen.
The terminal equipment comprises the handwriting drawing device, can be used for executing any handwriting drawing method, and has corresponding functions and beneficial effects.
EXAMPLE five
Embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform operations related to the handwriting drawing method provided in any of the embodiments of the present application, and have corresponding functions and advantages.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product.
Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein. The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (7)

1. A method of handwriting rendering, comprising:
acquiring four continuous sampling points in the writing process;
constructing an initial quadrangle for two adjacent sampling points;
confirming two groups of derivative points based on middle points of opposite sides of three initial quadrilaterals corresponding to the continuous four sampling points;
confirming two second-order Bezier curves according to the two groups of derivative points;
drawing the two second-order Bezier curves and the closed areas confirmed by the end points of the two second-order Bezier curves into handwriting units corresponding to the continuous four sampling points;
wherein, the initial quadrangle is constructed by the two adjacent sampling points, and the method comprises the following steps:
connecting two adjacent sampling points to obtain a connecting line;
determining a circle with a set radius by taking the sampling point as a circle center;
taking two points on each circle as the vertexes of the initial quadrangle, wherein the two points are end points of the diameter perpendicular to the connecting line;
confirming two groups of derivative points based on middle points of opposite sides of three initial quadrilaterals corresponding to the continuous four sampling points, wherein the steps comprise:
and determining the middle points of the sides of the three initial quadrilaterals positioned on the same side of the continuous three continuous center lines as a group of derivative points.
2. The method of claim 1, wherein identifying two second order bezier curves from the two sets of derivative points comprises:
and determining an end point according to the control point and the other two points by taking the derivative point positioned in the middle in each group of derivative points as the control point, and determining a second-order Bezier curve according to the control point and the end point.
3. The method according to claim 1, wherein the radius is determined by a set drawing handwriting size, a touch area during writing, a writing speed during writing and/or a pressure sense size during writing.
4. The method of claim 1, further comprising:
and confirming an extension point at the tail end of the handwriting according to a set extension rule, and drawing the last handwriting unit of the handwriting according to the extension point.
5. A handwriting-drawing apparatus, comprising:
the writing sampling unit is used for acquiring four continuous sampling points in the writing process;
the rectangular construction unit is used for constructing an initial quadrangle for two adjacent sampling points;
the derived point confirming unit is used for confirming two groups of derived points based on the middle points of the opposite sides of the three initial quadrangles corresponding to the continuous four sampling points;
the curve confirming unit is used for confirming two second-order Bezier curves according to the two groups of derivative points;
the area determining unit is used for drawing the two second-order Bezier curves and the closed areas confirmed by the end points of the two second-order Bezier curves as handwriting units corresponding to the four continuous sampling points;
wherein the rectangular construction unit includes:
the sampling point connecting module is used for connecting two adjacent sampling points to obtain a connecting line;
the circle determining module is used for determining a circle with a set radius by taking the sampling point as a circle center;
the vertex determining module is used for taking two points on each circle as the vertexes of the initial quadrangle, wherein the two points are end points of the diameter perpendicular to the connecting line;
the derivation point confirmation unit is specifically configured to:
and determining the middle points of the sides of the three initial quadrilaterals positioned on the same side of the continuous three continuous center lines as a group of derivative points.
6. A terminal device, comprising:
one or more processors;
a memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a handwriting rendering method according to any one of claims 1 to 4.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method of handwriting rendering according to any one of claims 1 to 4.
CN202010197846.4A 2020-03-19 2020-03-19 Handwriting drawing method, device, equipment and storage medium Active CN111427499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010197846.4A CN111427499B (en) 2020-03-19 2020-03-19 Handwriting drawing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010197846.4A CN111427499B (en) 2020-03-19 2020-03-19 Handwriting drawing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111427499A CN111427499A (en) 2020-07-17
CN111427499B true CN111427499B (en) 2021-10-19

Family

ID=71548101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010197846.4A Active CN111427499B (en) 2020-03-19 2020-03-19 Handwriting drawing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111427499B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328102A (en) * 2020-10-16 2021-02-05 深圳市千分一智能技术有限公司 Pen point implementation method, device, equipment and readable storage medium
CN113934395B (en) * 2021-10-19 2024-01-26 河北师达教育科技有限公司 Method, device and terminal equipment for synchronously displaying books in display screen

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9230514B1 (en) * 2012-06-20 2016-01-05 Amazon Technologies, Inc. Simulating variances in human writing with digital typography
CN107526526A (en) * 2017-09-19 2017-12-29 广州视源电子科技股份有限公司 Determine the method and device in pressure sensitivity person's handwriting region
CN109284059A (en) * 2018-08-28 2019-01-29 广州视源电子科技股份有限公司 Person's handwriting method for drafting, device, interactive intelligent tablet computer and storage medium
CN110321054A (en) * 2019-06-20 2019-10-11 广州视源电子科技股份有限公司 Writing brush person's handwriting method for drafting, device, equipment and readable storage medium storing program for executing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9230514B1 (en) * 2012-06-20 2016-01-05 Amazon Technologies, Inc. Simulating variances in human writing with digital typography
CN107526526A (en) * 2017-09-19 2017-12-29 广州视源电子科技股份有限公司 Determine the method and device in pressure sensitivity person's handwriting region
CN109284059A (en) * 2018-08-28 2019-01-29 广州视源电子科技股份有限公司 Person's handwriting method for drafting, device, interactive intelligent tablet computer and storage medium
CN110321054A (en) * 2019-06-20 2019-10-11 广州视源电子科技股份有限公司 Writing brush person's handwriting method for drafting, device, equipment and readable storage medium storing program for executing

Also Published As

Publication number Publication date
CN111427499A (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN109192054B (en) Data processing method and device for map region merging
CN111427499B (en) Handwriting drawing method, device, equipment and storage medium
CN110502357B (en) Stack backtracking method, device, medium and equipment
CN107292945B (en) Layer rendering processing method and system for video image
CN109324796B (en) Interface layout method and device
CN104969220A (en) Immersive view navigation
CN112486987A (en) City inquiry method, device, equipment and storage medium based on longitude and latitude
US11543299B2 (en) Method, apparatus, touch chip and electronic device for determining temperature status of touch screen
CN107613046B (en) Filter pipeline system, image data processing method and device and electronic equipment
CN110838306B (en) Voice signal detection method, computer storage medium and related equipment
US20200225759A1 (en) Gesture control method and apparatus for display screen
CN108280135B (en) Method and device for realizing visualization of data structure and electronic equipment
CN110688116A (en) Image file analysis method, device, equipment and readable medium
CN114972558A (en) Handwriting drawing method, device, medium and interactive panel
CN112199066A (en) Display control method and device, and data processing method and device
CN109558565B (en) Operation method, device and related product
CN107645541B (en) Data storage method and device and server
CN111898615A (en) Feature extraction method, device, equipment and medium of object detection model
CN111049988A (en) Intimacy prediction method, system, equipment and storage medium for mobile equipment
CN111553187A (en) Method and system for identifying form in CAD drawing
CN105354453A (en) Verification method and apparatus for mobile device operation source
CN110868697A (en) Interconnection method and device for vehicle machine and multiple mobile devices and storage medium
CN109325127A (en) A kind of Risk Identification Method and device
CN113656414B (en) Data processing method, device, equipment and medium
CN110647574B (en) Social network data display method, terminal device and storage medium

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