CN115237320A - Handwriting display method, touch display device, computer device and medium - Google Patents
Handwriting display method, touch display device, computer device and medium Download PDFInfo
- Publication number
- CN115237320A CN115237320A CN202210859276.XA CN202210859276A CN115237320A CN 115237320 A CN115237320 A CN 115237320A CN 202210859276 A CN202210859276 A CN 202210859276A CN 115237320 A CN115237320 A CN 115237320A
- Authority
- CN
- China
- Prior art keywords
- point
- coordinate
- actual coordinate
- ith
- handwriting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000004590 computer program Methods 0.000 claims description 10
- 238000005457 optimization Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 description 18
- 230000008859 change Effects 0.000 description 16
- 230000008569 process Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 8
- 238000005070 sampling Methods 0.000 description 5
- 238000004422 calculation algorithm Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000013507 mapping Methods 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000002708 enhancing effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002035 prolonged effect Effects 0.000 description 2
- 102000002508 Peptide Elongation Factors Human genes 0.000 description 1
- 108010068204 Peptide Elongation Factors Proteins 0.000 description 1
- 230000003321 amplification Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000005674 electromagnetic induction Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction 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/0488—Interaction 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/0416—Control or interface arrangements specially adapted for digitisers
- G06F3/04166—Details of scanning methods, e.g. sampling time, grouping of sub areas or time sharing with display driving
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)
- Character Discrimination (AREA)
Abstract
The embodiment of the invention discloses a handwriting display method, touch display equipment, computer equipment and a medium. In one embodiment, the method comprises: acquiring the actual coordinate of the ith stroke point input by the user; obtaining a predicted coordinate of the ith stroke point according to the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point, wherein the distance between the predicted coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point is more than or equal to the distance between the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point, and the ratio of the distance between the predicted coordinate of the ith stroke point and the actual coordinate of the ith stroke point to the distance between the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point is N i ,N i Not less than 0; and realizing handwriting display according to the predicted coordinates of the ith stroke point. This embodiment can improve the display delay of the written handwriting,the writing experience of the user is improved.
Description
Technical Field
The invention relates to the technical field of display. And more particularly, to a handwriting display method, a touch display device, a computer device, and a medium.
Background
Currently, with the rapid development of information technology, the technology of handwriting input by holding a pen or a finger on a type of touch display device such as an electronic paper touch display device is becoming more and more mature. However, due to various reasons such as a display refresh rate, a data processing speed, and the like, the problem of display delay of the handwriting has not been solved, and particularly, for electronic paper touch display equipment, the problem of display delay of the handwriting is serious, which affects writing experience of a user.
Disclosure of Invention
The present invention is directed to a handwriting display method, a touch display device, a computer device, and a medium, so as to solve at least one of the problems in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
the first aspect of the present invention provides a handwriting display method, including:
acquiring the actual coordinate of the ith stroke point input by the user;
obtaining the predicted coordinate of the ith stroke point according to the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point, wherein the distance between the predicted coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point is more than or equal to the distance between the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point, and the ratio of the distance between the predicted coordinate of the ith stroke point and the actual coordinate of the ith stroke point to the distance between the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point is N i ,N i Not less than 0; and
and realizing handwriting display according to the predicted coordinates of the ith stroke point.
Optionally, the obtaining the predicted coordinate of the ith trace point according to the actual coordinate of the ith trace point and the actual coordinate of the (i-1) th trace point includes:
will be on an extension of a first line connecting the actual coordinates of said (i-1) th trace point to the actual coordinates of said ith trace point, andthe ratio N of the distance between the actual coordinates of the ith track point to the distance between the actual coordinates of the ith track point and the actual coordinates of the (i-1) th track point i As the predicted coordinates of the ith trace point.
Alternatively, N i The value of (b) is determined according to at least one of a first included angle between a first connecting line and a second connecting line, the writing speed from the (i-1) th handwriting point to the (i) th handwriting point and a second included angle between the first connecting line and a third connecting line, wherein the first connecting line is a connecting line from the actual coordinate of the (i-1) th handwriting point to the actual coordinate of the (i-1) th handwriting point, the second connecting line is a connecting line from the actual coordinate of the (i-2) th handwriting point to the actual coordinate of the (i-1) th handwriting point, and the third connecting line is a connecting line from the actual coordinate of the (i-1) th handwriting point to the predicted coordinate of the (i-1) th handwriting point.
Alternatively, i > 2.
Optionally, in a case that the (i-1) th handwriting point is not predicted, the actual coordinate of the ith handwriting point is used as the predicted coordinate of the (i-1) th handwriting point.
Alternatively, N i The value taking mode is as follows:
judging whether at least one of the first included angle is smaller than a preset first included angle threshold value, the writing speed is smaller than a preset writing speed threshold value, and the second included angle is smaller than a preset second included angle threshold value is satisfied:
if so, then N i =N i-1 +1, wherein, N i-1 The ratio of the distance between the predicted coordinate of the (i-1) th track point and the actual coordinate of the (i-1) th track point to the distance between the actual coordinate of the (i-1) th track point and the actual coordinate of the (i-2) th track point is obtained;
if not, then N i And taking a preset value.
Alternatively, N i The value taking mode is as follows:
judging whether the first included angle is smaller than a preset first included angle threshold value, the writing speed is smaller than a preset writing speed threshold value, and the second included angle is smaller than a preset second included angle threshold value:
if so, then N i =N i-1 +1, wherein, N i-1 The ratio of the distance between the predicted coordinate of the (i-1) th track point and the actual coordinate of the (i-1) th track point to the distance between the actual coordinate of the (i-1) th track point and the actual coordinate of the (i-2) th track point is obtained;
if not, then N i And taking a preset value.
Alternatively, N i The value taking mode is as follows:
judging whether at least one of the first included angle is smaller than a preset first included angle threshold value, the writing speed is smaller than a preset writing speed threshold value, and the second included angle is smaller than a preset second included angle threshold value is satisfied:
if so, then N i =min((N i-1 +1),N max ) Wherein, N is i-1 Is the ratio of the distance between the predicted coordinate of the (i-1) th track point and the actual coordinate of the (i-1) th track point to the distance between the actual coordinate of the (i-1) th track point and the actual coordinate of the (i-2) th track point, N max Is the maximum value of the preset proportion;
if not, then N i And taking a preset value.
Alternatively, N i The value mode of (A) is as follows:
judging whether the first included angle is smaller than a preset first included angle threshold value, the writing speed is smaller than a preset writing speed threshold value, and the second included angle is smaller than a preset second included angle threshold value:
if so, then N i =min((N i-1 +1),N max ) Wherein N is i-1 Is the ratio of the distance between the predicted coordinate of the (i-1) th stroke point and the actual coordinate of the (i-1) th stroke point to the distance between the actual coordinate of the (i-1) th stroke point and the actual coordinate of the (i-2) th stroke point, N max Is the maximum value of the preset proportion;
if not, then N i And taking a preset value.
Optionally, N without predicting the (i-1) th handwriting point i-1 And taking a preset value.
Optionally, the preset value is 0, 1 or 2.
Optionally, the preset maximum proportion N max Is 5-7.
Optionally, the displaying handwriting according to the predicted coordinates of the ith handwriting point includes: and carrying out pen shape optimization according to the predicted coordinate of the ith pen shape point and preset pen shape parameters, and displaying the optimized handwriting.
The second aspect of the present invention provides a touch display device, which includes a touch display screen and a processor, where the processor includes:
the acquisition module is used for acquiring relevant parameters of the ith handwriting point input by a user, wherein the relevant parameters comprise actual coordinates and acquisition time;
the prediction module is used for obtaining the prediction coordinate of the ith trace point according to the actual coordinate of the ith trace point and the actual coordinate of the (i-1) th trace point, wherein the distance between the prediction coordinate of the ith trace point and the actual coordinate of the (i-1) th trace point is greater than or equal to the distance between the actual coordinate of the ith trace point and the actual coordinate of the (i-1) th trace point, the ratio of the distance between the prediction coordinate of the ith trace point and the actual coordinate of the ith trace point and the distance between the actual coordinate of the (i-1) th trace point is N i ,N i Not less than 0; and
and the control module is used for controlling the touch display screen to display the handwriting according to the predicted coordinate of the ith stroke point.
Optionally, the touch display device is an electronic paper touch display device.
A third aspect of the present invention provides a computer device, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the handwriting display method provided by the first aspect of the present invention.
A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the handwriting display method provided by the first aspect of the present invention.
The invention has the following beneficial effects:
the technical scheme of the invention can improve the display delay of the handwriting and improve the writing experience of a user.
Drawings
The following describes embodiments of the present invention in further detail with reference to the accompanying drawings.
FIG. 1 is a flow chart illustrating a handwriting display method according to an embodiment of the present invention.
Fig. 2 shows a schematic view of the first angle.
Fig. 3 shows a schematic view of the second angle.
FIG. 4 shows a schematic diagram of a handwriting display.
Fig. 5 is a schematic structural diagram of a computer system implementing the touch display device provided in the embodiment of the present invention.
Detailed Description
In order to more clearly illustrate the present invention, the present invention will be further described with reference to the following examples and the accompanying drawings. Similar parts in the figures are denoted by the same reference numerals. It is to be understood by persons skilled in the art that the following detailed description is illustrative and not restrictive, and is not to be taken as limiting the scope of the invention.
Currently, with the rapid development of information technology, the technology of handwriting input by holding a pen or a finger on a type of touch display device such as an electronic paper touch display device is becoming more and more mature. However, due to various reasons such as a screen refresh rate, a data transmission speed of hardware, a data processing speed of software, and the like, the problem of display delay of the writing handwriting has not been solved, and particularly, for electronic paper touch display equipment, the problem of display delay of the writing handwriting is serious, which affects writing experience of a user.
In view of this, an embodiment of the present invention provides a handwriting display method, including:
acquiring the actual coordinate of the ith stroke point input by the user;
according to the ith handwritingThe actual coordinate of some and the actual coordinate of (i-1) th trace point obtain the prediction coordinate of ith trace point, wherein, the prediction coordinate of ith trace point with distance more than or equal to between the actual coordinate of (i-1) th trace point the actual coordinate of ith trace point and the actual coordinate of (i-1) th trace point between the distance, the prediction coordinate of ith trace point with distance between the actual coordinate of ith trace point with the ratio of the distance between the actual coordinate of ith trace point and the actual coordinate of (i-1) th trace point between the distance is N i ,N i Not less than 0; and
and realizing handwriting display according to the predicted coordinates of the ith stroke point.
According to the handwriting display method provided by the embodiment, the predicted coordinate of the current trace point is obtained by predicting the current trace point, wherein the predicted coordinate is farther away from the actual coordinate of the previous trace point than the actual coordinate of the current trace point, handwriting display is realized according to the predicted coordinate of the current trace point, which prolongs the point distance, so that the display delay of the handwriting can be improved, and the writing experience of a user is improved.
Fig. 1 is a schematic flowchart of a handwriting display method provided in this embodiment. For example, the handwriting processing method is applied to a computing device, which includes any electronic device with computing functions, such as a mobile phone, a notebook computer, a tablet computer, a desktop computer, a server, and the like, and the embodiments of the present disclosure are not limited thereto. For example, the computing device has a Central Processing Unit (CPU) or a Graphics Processing Unit (GPU), and also includes memory. The Memory is, for example, a non-volatile Memory (e.g., a Read Only Memory (ROM)) having code for an operating system stored thereon. For example, the memory further stores codes or instructions, and by executing the codes or instructions, the handwriting display method provided by the embodiment can be implemented.
For example, the computing device may also include a touch display screen to obtain the points of the stroke that the user makes on the working surface of the touch display screen while writing. The touch display screen can not only receive handwriting points, but also display correspondingly. The user may write directly on the working surface of the touch display screen with a finger, or may write on the working surface of the touch display screen with an active stylus or a passive stylus, which is not limited in this embodiment. Here, the work surface refers to a surface for detecting a touch operation by a user, such as a touch surface of a touch display screen.
As shown in fig. 1, the handwriting display method provided by this embodiment includes the following steps:
and S110, acquiring the actual coordinate of the ith stroke point input by the user.
For example, the ith handwriting point is one of a plurality of continuous handwriting points input by the user on the touch display screen, and the actual coordinate of the ith handwriting point is set as P i (x i ,y i ) It is understood that the input time of the ith handwriting point may be acquired and recorded at the same time of acquiring the actual coordinates of the ith handwriting point input by the user.
S120, obtaining a predicted coordinate of the ith stroke point according to the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point, wherein the distance between the predicted coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point is greater than or equal to the distance between the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point, and the ratio of the distance between the predicted coordinate of the ith stroke point and the actual coordinate of the ith stroke point to the distance between the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point is N i ,N i ≥0。
And S130, displaying the handwriting according to the predicted coordinates of the ith stroke point.
Understandably, after the prediction is performed in step S120, the distance between the predicted coordinate of the ith handwriting point and the actual coordinate of the (i-1) th handwriting point is greater than or equal to the distance between the actual coordinate of the ith handwriting point and the actual coordinate of the (i-1) th handwriting point, N i Can be understood as the ith predicted handwriting point and the ith predicted handwriting point brought by the actual coordinate prediction of the ith stroke pointThe point distance between the actual handwriting points is extended by multiple, for example, suppose that the 5 th handwriting point corresponds to N 5 If the stroke point is predicted to be the 5 th stroke point, the point distance between the 5 th predicted stroke point and the 5 th actual stroke point is prolonged by 4 times. It can be seen that, in step S120, the predicted coordinate of the current trace point (i.e., the ith trace point) is obtained by predicting the current trace point, wherein the predicted coordinate is farther from the actual coordinate of the last trace point (i-1 th trace point) than the actual coordinate of the current trace point, and therefore, in step S130, the trace display can be realized according to the predicted coordinate of the current trace point, which prolongs the point distance, so that the display delay of the written trace can be improved, and the writing experience of the user is improved.
In a possible implementation manner, in step S120, obtaining the predicted coordinate of the ith trace point according to the actual coordinate of the ith trace point and the actual coordinate of the (i-1) th trace point includes:
will be in the actual coordinate of (i-1) th trace point extremely on the extension line of the first line of the actual coordinate of i th trace point, and with the distance between the actual coordinate of i th trace point with the ratio of the distance between the actual coordinate of i th trace point and the actual coordinate of (i-1) th trace point is N i As the predicted coordinates of the ith stroke point.
In a specific example, let the actual coordinate of the ith stroke point be P i (x i ,y i ) The actual coordinate of the (i-1) th stroke point is P i-1 (x i-1 ,y i-1 ) Then predicted coordinate P 'of the ith stroke point' i (x′ i ,y′ i ) Is determined at P i-1 (x i-1 ,y i-1 ) To P i (x i ,y i ) Extension line of the connection lineAnd predicted coordinate P 'of ith point' i (x′ i ,y′ i ) With the actual coordinate P of the ith trace point i (x i ,y i ) The pitch ofSeparating fromAnd the actual coordinate P of the ith trace point i (x i ,y i ) With the actual coordinate P of the (i-1) th locus point i-1 (x i-1 ,y i-1 ) Distance between themIs N i I.e. by
Then, the actual coordinates P of the (i-1) th locus point is known i-1 (x i-1 ,y i-1 ) Actual coordinates P of ith trace point i (x i ,y i ) And N i In the case of value taking, the predicted coordinate P 'of the ith stroke point can be calculated by the following formula' i (x′ i ,y′ i ):
(x′ i -x i ,y′ i -y i )=N i ·(x i -x i-1 ,y i -y i-1 )
x′ i =N i ·(x i -x i-1 )+x i Formula (1)
y′ i =N i ·(y i -y i-1 )+y i Formula (2)
It can be understood that, although a certain error may be caused by the implementation of handwriting display according to predicted coordinates in which the dot distance is extended when the angle of the handwriting input by the user changes, the manner provided in this embodiment is to determine the predicted coordinates of the current handwriting point according to the actual coordinates of the current handwriting point and the actual coordinates of the previous handwriting point (note that the predicted coordinates of the previous handwriting point are not the same), the handwriting formed by the predicted coordinates may change along with the change of the angle of the handwriting, and the sampling frequency of the handwriting point sampling device of the touch display screen for the handwriting point is usually higher than that of the handwriting point, for exampleThe distance between adjacent tracing points is high and thus short, so that the error can be controlled within an acceptable range, for example, by extending the distance by a factor of N i Is controlled to achieve a balance between the distance over which the predicted coordinates are extended and the error of the predicted coordinates.
In addition, it can be understood that, at present, a common sampling frequency is 144Hz, and some touch display screens can reach over 270Hz, so that even if the handwriting speed of a user is high, the situation that the included angle between the actual coordinate connecting lines of adjacent handwriting points is larger than 90 degrees does not occur, and therefore, no contradiction exists between the fact that the predicted coordinate of the ith handwriting point is on the extension line of the first connecting line from the actual coordinate of the (i-1) th handwriting point to the actual coordinate of the ith handwriting point, and the fact that the distance between the predicted coordinate of the ith handwriting point and the actual coordinate of the (i-1) th handwriting point is larger than or equal to the distance between the actual coordinate of the ith handwriting point and the actual coordinate of the (i-1) th handwriting point.
The embodiment adopts the point distance extension multiple N i The way of dynamic value taking, in particular, in one possible implementation, N i The value of (b) is determined according to at least one of a first included angle between a first connecting line and a second connecting line, the writing speed from the (i-1) th handwriting point to the (i) th handwriting point and a second included angle between the first connecting line and a third connecting line, wherein the first connecting line is a connecting line from the actual coordinate of the (i-1) th handwriting point to the actual coordinate of the (i-1) th handwriting point, the second connecting line is a connecting line from the actual coordinate of the (i-2) th handwriting point to the actual coordinate of the (i-1) th handwriting point, and the third connecting line is a connecting line from the actual coordinate of the (i-1) th handwriting point to the predicted coordinate of the (i-1) th handwriting point.
The inventor finds that the current predicted deviation is easily large due to the fact that the angle of the handwriting is changed greatly, the writing speed is high and the last predicted deviation is large, and based on the fact that the current predicted deviation is large, the implementation mode enables the angle change of the current handwriting point (the first included angle between the first connecting line and the second connecting line), the current writing speed and the last predicted deviation (the second clamp between the first connecting line and the third connecting line) to be clampedAngle) as a judgment condition to the pitch extension factor N i And dynamic value taking is carried out, so that the accuracy of prediction can be ensured under the condition of realizing the extended distance of the predicted coordinates, and better writing experience of a user is brought.
Further, in one possible implementation, i > 2, i.e., i is an integer greater than or equal to 3. Therefore, for a plurality of continuous trace points input by a user, point distance extension times N can be adopted point by point from the 3 rd trace point i The 2 nd handwriting point can be directly taken as a prediction coordinate which can be corresponding to N of the 2 nd handwriting point 2 =0, i.e. the distance between the predicted coordinate of the 2 nd trace point and the actual coordinate of the 2 nd trace point is zero; alternatively, N for the 2 nd locus point can be set 2 =1 or N 2 =2 implementation of prediction for 2 nd handwriting point and point-to-point extension multiple N using point distance from 3 rd handwriting point i And predicting in a dynamic value taking mode.
Further, in a possible implementation manner, under the condition that the (i-1) th handwriting point is not predicted, the actual coordinate of the i-th handwriting point is used as the predicted coordinate of the (i-1) th handwriting point.
For example, if a trace point is selected at fixed or dynamic intervals for prediction or prediction is started from a trace point in the middle of a continuous trace, the prediction coordinate of the (i-1) th trace point may not exist during prediction of the ith trace point, so that if the ith trace point needs to be predicted according to the prediction deviation of the last prediction, the actual coordinate of the ith trace point can be used as the prediction coordinate of the (i-1) th trace point to determine the prediction deviation of the last prediction, and the prediction of the ith trace point is finished.
For another example, when the 3 rd handwriting point is predicted point by point, the predicted coordinate of the (i-1) =2 th handwriting point required for predicting the 3 rd handwriting point does not exist, so that if the 3 rd handwriting point needs to be predicted according to the predicted deviation of the last prediction, the 3 rd handwriting point can be predictedAnd determining the predicted deviation of the last prediction by taking the actual coordinates of the 3 track points as the predicted coordinates of the 2 nd track point (or directly selecting the predicted coordinates of the 2 nd track point as the actual coordinates of the 3 rd point), thereby completing the prediction of the 3 rd track point. In addition, N of the 2 nd stroke point can be directly set 2 =1 or N 2 And =2, predicting the 2 nd handwriting point to obtain the predicted coordinate of the 2 nd handwriting point.
Further, in one possible implementation, the dot pitch is extended by a factor of N i The first specific way of dynamic value taking comprises:
judging whether the first included angle is smaller than a preset first included angle threshold value, the writing speed is smaller than a preset writing speed threshold value, and the second included angle is smaller than a preset second included angle threshold value, wherein at least one of the first included angle, the second included angle and the preset second included angle threshold value is satisfied:
if so, then N i =N i-1 +1, wherein, N i-1 The ratio of the distance between the predicted coordinate of the (i-1) th stroke point and the actual coordinate of the (i-1) th stroke point to the distance between the actual coordinate of the (i-1) th stroke point and the actual coordinate of the (i-2) th stroke point is obtained;
if not, then N i And taking a preset value.
Understandably, when the ith handwriting point is predicted, the point distance is extended by a multiple N i The larger the value is, the larger the predicted dot pitch is, the longer the predicted handwriting is, and the more the writing delay is theoretically reduced. But on the other hand, the dot pitch is extended by a multiple N i The larger the value is, the lower the probability of predicting the actual handwriting with the coordinate conforming to or close to, that is, the higher the probability of occurrence of prediction deviation.
In summary, the dot pitch is extended by a multiple of N i In the first specific way of dynamic value taking, when predicting the current stroke point, as long as judging that the condition that the writing angle change of the current stroke point is smaller, the writing speed is slower and the predicted deviation of the last prediction is smaller is met, the risk that the current or the stage prediction has larger deviation is considered to be small, and the currently predicted point distance is extended by a multiple N i Value is (N) i-1 + 1) to progressively enlarge the predicted dot spacing, enhancing the improvement displayShowing the effect of the delay. When the three conditions of small writing angle change, slow writing speed and small prediction deviation of the last prediction of the handwriting point are not met, namely the writing angle change is large, the writing speed is high and the prediction deviation of the last prediction is large, the risk that the large deviation occurs in the current or the stage prediction is considered to be large, and the current predicted point distance is extended by a multiple N i A smaller value, for example 1, and a time control deviation. Therefore, in continuous prediction, point distance extension multiples can be dynamically selected according to the condition of each trace point, and the prediction accuracy can be ensured under the condition of realizing the distance of extending the predicted coordinates, so that better writing experience of a user is brought.
In one possible implementation, the dot pitch is extended by a factor of N i The first specific way of dynamic value taking is that under the condition that the (i-1) th handwriting point is not predicted, for example, under the condition that the handwriting point is selected at fixed or dynamic intervals for prediction, the prediction is started from a certain handwriting point in the middle of a continuous handwriting or the prediction is carried out point by point from the 3 rd handwriting point, the predicted coordinate of the 2 nd handwriting point does not exist, N is i-1 And taking a preset value.
In one possible implementation, the dot pitch is extended by a factor of N i In a first specific way of dynamic value determination, the preset value is 0, 1 or 2.
In a specific example, taking the preset value as 1 as an example, the dot pitch is extended by a multiple of N i A first specific way of dynamic value-taking can be formulated as a nonlinear mapping function as follows:
wherein, theta i A first included angle formed between a first connection line between the actual coordinate of the (i-1) th trace point and the actual coordinate of the ith trace point and a second connection line between the actual coordinate of the (i-2) th trace point and the actual coordinate of the (i-1) th trace point represents writing angle change of the ith trace point; theta.theta. th Presetting a first included angle threshold value; v. of i Writing speed from the (i-1) th handwriting point to the ith handwriting point; v. of th Setting a writing speed threshold value; delta i Representing a prediction deviation or a prediction error for predicting the (i-1) th handwriting point for a second included angle between a connecting line from the actual coordinate of the (i-1) th handwriting point to the actual coordinate of the ith handwriting point of the first connecting line and a connecting line from the actual coordinate of the (i-1) th handwriting point to the prediction coordinate of the (i-1) th handwriting point of a third connecting line; delta th A second angle threshold is preset. Wherein, theta th 、v th And delta th The three thresholds can be selected according to the performance, setting and other factors of the actual computing equipment including the touch display screen, such as the electronic paper touch display device.
Exemplarily, as shown in fig. 2, a first included angle θ between a first connection line representing the writing angle change of the ith handwriting point, i.e., a connection line from the actual coordinate of the (i-1) th handwriting point to the actual coordinate of the ith handwriting point, and a second connection line, i.e., a second included angle θ between the actual coordinate of the (i-2) th handwriting point and the actual coordinate of the (i-1) th handwriting point i The calculation formula of (a) is as follows: the actual coordinate of the ith trace point marked 203 in FIG. 2 is P i (x i ,y i ) The actual coordinate of the (i-1) th stroke point marked 202 in FIG. 2 is P i-1 (x i-1 ,y i-1 ) The actual coordinate of the (i-2) th locus point marked 201 in fig. 2 is P i-2 (x i-2 ,y i-2 ) Then, the directed quantity:
then, can obtainI.e. the ith handwriting is characterizedFirst angle theta of change of writing angle of point i Comprises the following steps:
exemplary writing speed v from the (i-1) th handwriting point to the ith handwriting point i The calculation can be carried out according to the actual coordinates of the (i-1) th stroke point and the ith stroke point and the acquired input time to obtain:
wherein, t i Input time, t, for the ith stroke point i-1 The input time of the (i-1) th stroke point.
Illustratively, as shown in FIG. 3, a second included angle δ between a first connection line "a connection line from the actual coordinate of the (i-1) th trace point to the actual coordinate of the ith trace point" and a third connection line "a connection line from the actual coordinate of the (i-1) th trace point to the predicted coordinate of the (i-1) th trace point" representing the prediction deviation of the (i-1) th trace point i The calculation formula of (c) is as follows: the actual coordinate of the ith stroke point, labeled 302 in FIG. 3, is P i (x i ,y i ) The actual coordinate of the (i-1) th locus point marked 301 in FIG. 3 is P i-1 (x i-1 ,y i-1 ) The predicted coordinate of the (i-1) th track point marked 301 'in FIG. 3 is P' i-1 (x′ i-1 ,y′ i-1 ) Then, the directed quantity:
then, can obtainI.e. a second angle delta characterizing the prediction deviation for predicting the (i-1) th handwriting point i Comprises the following steps:
in one specific example, the dot pitch elongation factor N is combined with the above i A first specific way of dynamically taking values is to take point-by-point prediction as an example, and display the flow of the first 5 trace points of the writing trace shown in fig. 4, for example:
the actual coordinate P marked as 401 at the 1 st handwriting point is obtained 1 (x 1 ,y 1 ) Then, according to the actual coordinate P of the 1 st stroke point 1 (x 1 ,y 1 ) Starting a handwriting display flow for the handwriting containing the 1 st handwriting point, wherein the handwriting display flow comprises triggering a touch driving signal, reporting coordinate data, processing by a time schedule controller of a touch display screen and refreshing a display picture;
actual coordinates P marked as 402 when the 2 nd handwriting point is acquired 2 (x 2 ,y 2 ) Then, the actual coordinate P of the 1 st stroke point is calculated 1 (x 1 ,y 1 ) Actual coordinates P of the 2 nd locus point 2 (x 2 ,y 2 ) And the point distance extension multiple N corresponding to the 2 nd handwriting point 2 Substituting =1 into equations (1) and (2) to calculate predicted coordinates P ' labeled 402 ' of the 2 nd stroke point ' 2 (x′ 2 ,y′ 2 ) And according to the predicted coordinate P 'of the 2 nd stroke point' 2 (x′ 2 ,y′ 2 ) Combining the actual coordinate P of the 1 st stroke point 1 (x 1 ,y 1 ) Starting a handwriting display flow from the 1 st stroke point to the 2 nd stroke point;
when the actual coordinate P marked as 403 of the 3 rd stroke point is obtained 3 (x 3 ,y 3 ) Then, theta is judged 3 <θ th 、v 3 <v th 、δ 3 <δ th If at least one of them is true, if at least one of them is trueThe term holds (theta can be roughly seen in FIG. 4) 3 <θ th Is true of another delta 3 =0,δ 3 <δ th True) then determine N 3 =N 2 +1=1+1=2, and the actual coordinate P of the 2 nd stroke point 2 (x 2 ,y 2 ) Actual coordinate P of the 3 rd stroke point 3 (x 3 ,y 3 ) And the point distance extension multiple N corresponding to the 3 rd handwriting point 3 Substituting equation (1) and equation (2) with =2 to calculate predicted coordinate P ' labeled 403 ' of the 3 rd stroke point ' 3 (x′ 3 ,y′ 3 ) And according to the predicted coordinate P 'of the 3 rd stroke point' 3 (x′ 3 ,y′ 3 ) Combining predicted coordinates P 'of the 2 nd stroke point' 2 (x′ 2 ,y′ 2 ) Starting a handwriting display flow from the 2 nd stroke point to the 3 rd stroke point;
actual coordinates P marked as 404 when acquiring the 4 th handwriting point 4 (x 4 ,y 4 ) Then, judge θ 4 <θ tb 、v 4 <v th 、δ 4 <δ th If at least one of them is true, if at least one is true (see roughly θ in FIG. 4) 3 <θ th And delta 4 <δ th True) then N is determined 4 =N 3 +1=2+1=3, and the actual coordinate P of the 3 rd stroke point 3 (x 3 ,y 3 ) And the actual coordinate P of the 4 th stroke point 4 (x 4 ,y 4 ) And the point distance extension multiple N corresponding to the 4 th handwriting point 4 Substituting equation (1) and equation (2) for =3 to calculate the predicted coordinate P ' labeled 404 ' of the 4 th stroke point ' 4 (x′ 4 ,y′ 4 ) And according to the predicted coordinate P 'of the 4 th stroke point' 4 (x′ 4 ,y′ 4 ) Combining predicted coordinates P 'of the 3 rd track point' 3 (x′ 3 ,y′ 3 ) Starting a handwriting display flow from the 3 rd stroke point to the 4 th stroke point;
actual coordinates P of mark 405 when acquiring 5 th handwriting point 5 (x 5 ,y 5 ) Then, theta is judged 5 <θ th 、v 5 <v th 、δ 5 <δ th If at least one of them is true, if at least one is true (theta can be seen approximately in FIG. 4) 5 <θ th And delta 5 <δ th True) then N is determined 5 =N 4 +1=3+1=4, and the actual coordinate P of the 4 th trace point 4 (x 4 ,y 4 ) 5 th stroke point's actual coordinate P 5 (x 5 ,y 5 ) And the point distance extension multiple N corresponding to the 5 th handwriting point 5 Substituting equation (1) and equation (2) with =4 to calculate predicted coordinate P ' marked as 405 ' of the 5 th stroke point ' 5 (x′ 5 ,y′ 5 ) And according to the predicted coordinate P 'of the 5 th stroke point' 5 (x′ 5 ,y′ 5 ) Combining predicted coordinates P 'of the 4 th track point' 4 (x′ 4 ,y′ 4 ) Starting the handwriting display flow from the 4 th handwriting point to the 5 th handwriting point, and displaying the point P in the graph shown in FIG. 4 1 (x 1 ,y 1 )、P′ 2 (x′ 2 ,y′ 2 )、P′ 3 (x′ 3 ,y′ 3 )、P′ 4 (x′ 4 ,y′ 4 ) And P' 5 (x′ 5 ,y′ 5 ) And (5) forming handwriting. Assuming that the actual writing trace point is located at the trace point position marked as 4010 in fig. 4, that is, if there is no trace display delay, the trace point position should be displayed to 4010, and after the trace point is actually obtained, due to the limitation of the screen refresh rate, the data processing needs to be performed on the trace point coordinate, and the like, when the actual writing trace is located at the trace point position marked as 4010 in fig. 4, the display of only the 5 th trace point can be performed if no prediction is performed, that is, only the actual coordinate P of the 5 trace points in fig. 4 can be displayed 1 (x 1 ,y 1 )、P 2 (x 2 ,y 2 )、P 3 (x 3 ,y 3 )、P 4 (x 4 ,y 4 ) And P 5 (x 5 ,y 5 ) The formed handwriting can be seen that the display delay of the handwriting can be effectively improved by adopting the prediction mode provided by the embodiment compared with the display hypothesis. Wherein, it is required to sayIt should be noted that the complexity of the prediction algorithm employed in this embodiment is not high, so the prediction calculation speed can be completed quickly, and the difference between the data processing time displayed by using the actual coordinates and the predicted coordinates is very small for the same trace point.
Continuing with the above example, taking the preset value as 1 as an example, when the 6 th handwriting point is predicted, if θ of the 6 th handwriting point is provided 6 <θ th 、v 6 <v th 、δ 6 <δ th If the number of the handwriting points is not satisfied, the point distance corresponding to the 6 th handwriting point is extended by a multiple N 6 =1, actual coordinate P of the 5 th stroke point in prediction 5 (x 5 ,y 5 ) Actual coordinate P of the 6 th stroke point 6 (x 6 ,y 6 ) And the point distance extension multiple N corresponding to the 6 th handwriting point 6 Substituting equation (1) and equation (2) with 1 to calculate the predicted coordinate P 'of the 6 th stroke point' 6 (x′ 6 ,y′ 6 ). Next, when the 7 th handwriting point is predicted, let us say θ of the 7 th handwriting point 7 <θ th 、v 7 <v th 、δ 7 <δ th When at least one of the two is satisfied, the corresponding point distance of the 7 th handwriting point is extended by a multiple N 7 =N 6 +1=1+1=2, and the actual coordinate P of the 6 th stroke point is predicted 6 (x 6 ,y 6 ) Actual coordinates P of the 7 th stroke point 7 (x 7 ,y 7 ) And the dot pitch corresponding to the 7 th handwriting point is prolonged by multiple N 7 Substituting equation (1) and equation (2) with =2 to calculate predicted coordinate P 'of 7 th stroke point' 7 (x′ 7 ,y′ 7 ) And the rest is analogized in the same way.
In addition, continuing the above example, taking the preset value as 0 as an example, when the 6 th trace point is predicted, if θ of the 6 th trace point is provided 6 <θ th 、v 6 <v th 、δ 6 <δ th If the number of the handwriting points is not satisfied, the point distance corresponding to the 6 th handwriting point is extended by a multiple N 6 =0, namely, the actual coordinate of the 6 th trace point is directly used as the predicted coordinate without predicting the 6 th trace point or directly using the actual coordinate of the 6 th trace point as the predicted coordinateThe coordinate as the predicted coordinate may also correspond to "the actual coordinate P of the 5 th stroke point 5 (x 5 ,y 5 ) Actual coordinate P of the 6 th stroke point 6 (x 6 ,y 6 ) And the point distance extension multiple N corresponding to the 6 th handwriting point 6 Substituting equation (1) and equation (2) with =0 to calculate the predicted coordinate P 'of the 6 th stroke point' 6 (x′ 6 ,y′ 6 )=P 6 (x 6 ,y 6 ) ". Next, when the 7 th handwriting point is predicted, let us say θ of the 7 th handwriting point 7 <θ th 、v 7 <v th 、δ 7 <δ th When at least one of the two is satisfied, the dot pitch corresponding to the 7 th handwriting point is extended by a multiple N 7 =N 6 +1=0+1=1, and the actual coordinate P of the 6 th stroke point is predicted 6 (x 6 ,y 6 ) Actual coordinates P7 (x) of the 7 th stroke point 7 ,y 7 ) And the dot distance extension multiple N corresponding to the 7 th handwriting point 7 Substituting equation (1) and equation (2) for =1 to calculate the predicted coordinate P 'of the 7 th stroke point' 7 (x′ 7 ,y′ 7 ) And the rest is analogized in the same way.
It can be understood that, as can be seen from the fact that the distances between adjacent actual coordinates in the actual coordinates of the 5 stroke points in fig. 4 are approximately the same, fig. 4 shows a situation that the writing speeds of the user are approximately consistent among the 5 stroke points. In addition, under the condition that the writing speed of the user changes, the prediction mode provided by the embodiment can also improve the display delay of the handwriting.
In a possible implementation, the point distance is extended by a factor N, which is different from the judgment condition of the first embodiment i The second specific way of dynamic value taking comprises:
judging whether the first included angle is smaller than a preset first included angle threshold value, the writing speed is smaller than a preset writing speed threshold value, and the second included angle is smaller than a preset second included angle threshold value:
if so, then N i =N i-1 +1, wherein, N i-1 The predicted coordinate of the (i-1) th stroke point and the actual coordinate of the (i-1) th stroke pointThe ratio of the distance between the (i-1) th stroke point and the (i-2) th stroke point;
if not, then N i And taking a preset value.
The point distance extension factor N i In the second specific way of dynamic value taking, when the current stroke point is predicted, only when three conditions of small writing angle change, slow writing speed and small prediction deviation of last prediction of the current stroke point are judged to be met, the risk that the current or the stage prediction has large deviation is considered to be small, and the currently predicted point distance is extended by multiple N i Value is (N) i-1 + 1) to gradually enlarge the predicted dot pitch, enhancing the effect of improving the display delay. If only one of the three conditions of small writing angle change of the handwriting point, slow writing speed and small prediction deviation of the last prediction is not satisfied, the risk that the prediction at the current stage or the previous stage has large deviation is considered to be large, and the distance between the currently predicted points is extended by a multiple N i A small value, e.g., 1, and a time control deviation. Therefore, in continuous prediction, point distance extension multiples can be dynamically selected according to the condition of each trace point, and the prediction accuracy can be better ensured under the condition of realizing the distance of extending the prediction coordinate, so that better writing experience of a user is brought.
In one possible implementation, the dot pitch is extended by a factor of N i The second concrete way of dynamic value taking is that N is under the condition that the (i-1) th handwriting point is not predicted i-1 And taking a preset value.
In one possible implementation, the dot pitch is extended by a factor of N i In a second specific way of dynamic value taking, the preset value is 1 or 2.
In a specific example, taking the preset value as 1 as an example, the second specific way of dynamically taking the value of the point-to-point distance extension multiple Ni can be formulated as a nonlinear mapping function as follows:
in a possible implementation, N is the same as that of the first embodiment i The difference of the values is that the dot pitch is extended by a multiple N i The third specific way of dynamic value taking comprises:
judging whether at least one of the first included angle is smaller than a preset first included angle threshold value, the writing speed is smaller than a preset writing speed threshold value, and the second included angle is smaller than a preset second included angle threshold value is satisfied:
if so, then N i =min((N i-1 +1),N max ) Wherein, N is i-1 Is the ratio of the distance between the predicted coordinate of the (i-1) th track point and the actual coordinate of the (i-1) th track point to the distance between the actual coordinate of the (i-1) th track point and the actual coordinate of the (i-2) th track point, N max Is the maximum value of the preset proportion;
if not, then N i And taking a preset value.
The dot pitch extension factor N i In the third concrete mode of dynamic value taking, when the current trace point is predicted, if only one condition of small writing angle change, slow writing speed and small prediction deviation of last prediction of the current trace point is judged to be met, the risk that the large deviation occurs in the current or the stage prediction is considered to be small, and the current predicted point distance is extended by multiple N i Value is (N) i-1 + 1) and the maximum value of the preset proportion (namely the maximum point distance) to gradually enlarge the predicted point distance and enhance and improve the effect of display delay, wherein the maximum value of the preset proportion is used for limiting the point distance, so that the problem that the error of single prediction is large and difficult to correct due to the fact that the point distance of the predicted coordinate is too large can be avoided. When the three conditions of small writing angle change, slow writing speed and small prediction deviation of the last prediction of the handwriting point are not met, namely the writing angle change is large, the writing speed is high and the prediction deviation of the last prediction is large, the risk that the large deviation occurs in the current or the stage prediction is considered to be large, and the current predicted point distance is extended by a multiple N i A smaller value, for example 1, and a time control deviation. Thus, in continuous prediction, needles can be usedThe point distance extension times are dynamically selected for the condition of each handwriting point, so that the accuracy of prediction can be better guaranteed under the condition of realizing the distance of extending the predicted coordinates, and better writing experience of a user is brought.
In one possible implementation, the dot pitch is extended by a factor of N i The third concrete way of dynamic value taking is that N is under the condition that the (i-1) th handwriting point is not predicted i-1 And taking a preset value.
In one possible implementation, the dot pitch is extended by a factor of N i In a third specific dynamic value taking mode, the preset value is 1 or 2.
In a specific example, taking the preset value as 1 as an example, the dot pitch is extended by a multiple of N i A third specific way of dynamic value-taking can be formulated as a non-linear mapping function as follows:
in a possible implementation manner, the point distance is extended by a multiple of N in combination with the second specific manner and the third specific manner i The fourth specific way of dynamic value taking comprises:
judging whether the first included angle is smaller than a preset first included angle threshold value, the writing speed is smaller than a preset writing speed threshold value, and the second included angle is smaller than a preset second included angle threshold value:
if so, then N i =min((N i-1 +1),N max ) Wherein N is i-1 Is the ratio of the distance between the predicted coordinate of the (i-1) th stroke point and the actual coordinate of the (i-1) th stroke point to the distance between the actual coordinate of the (i-1) th stroke point and the actual coordinate of the (i-2) th stroke point, N max Is the maximum value of the preset proportion;
if not, then N i And taking a preset value.
The point distance extension factor N i In the fourth concrete mode of dynamic value taking, when the current stroke point is predicted, only the writing angle change of the current stroke point is judged to be smallThe risk of large deviation in the current or the stage of prediction is considered to be small when the three conditions of low writing speed and small prediction deviation of the last prediction are all met, and the point distance of the current prediction is extended by a multiple N i Take the value of (N) i-1 + 1) and the maximum value of the preset proportion (namely the maximum point distance) to gradually enlarge the predicted point distance and enhance and improve the effect of display delay, wherein the maximum value of the preset proportion is used for limiting the point distance, so that the problem that the error of single prediction is large and difficult to correct due to the fact that the point distance of the predicted coordinate is too large can be avoided. If only one of the three conditions of small writing angle change of the handwriting point, slow writing speed and small prediction deviation of the last prediction is not satisfied, the risk that the prediction at the current stage or the previous stage has large deviation is considered to be large, and the distance between the currently predicted points is extended by a multiple N i A small value, e.g., 1, and a time control deviation. Therefore, in continuous prediction, the point distance extension multiple can be dynamically selected according to the condition of each trace point, and the prediction accuracy can be better ensured under the condition of realizing the distance of the extension of the prediction coordinate, so that better writing experience of a user is brought.
In one possible implementation, the dot pitch is extended by a factor of N i The fourth concrete way of dynamic value taking is that N is under the condition that the (i-1) th handwriting point is not predicted i-1 And taking a preset value.
In one possible implementation, the dot pitch is extended by a factor of N i The fourth specific way of dynamic value taking is that the preset value is 1 or 2, and the maximum value N of the preset proportion is max Is 5-7.
In a specific example, taking the preset value as 1 as an example, the fourth specific way of dynamically taking the value of the point-to-point distance extension multiple Ni can be formulated as a nonlinear mapping function as follows:
in one possible implementation, step S130 further includes: and carrying out pen shape optimization according to the predicted coordinate of the ith pen shape point and preset pen shape parameters, and displaying the optimized handwriting.
For example, a model pattern or a basic shape corresponding to the handwriting point, for example, including a circle, an ellipse, etc., may be determined based on the selected pen type (pencil, ball pen, brush pen, etc.) and the predicted coordinates and type (start point, middle point, or end point in the continuous handwriting) of the ith handwriting point, and then the ith handwriting point may be drawn based on the model pattern and connected to the last handwriting point.
Another embodiment of the present invention provides a touch display device, including a touch display screen and a processor, wherein the processor includes:
the acquisition module is used for acquiring relevant parameters of the ith handwriting point input by a user, wherein the relevant parameters comprise actual coordinates and acquisition time;
the prediction module is used for obtaining the prediction coordinate of the ith stroke point according to the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point, wherein the distance between the prediction coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point is more than or equal to the distance between the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point, and the ratio of the distance between the prediction coordinate of the ith stroke point and the actual coordinate of the ith stroke point and the distance between the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point is N i ,N i Not less than 0; and
and the control module is used for controlling the touch display screen to display the handwriting according to the predicted coordinate of the ith stroke point.
It should be noted that the handwriting display principle and the workflow of the touch display device provided in this embodiment are similar to those of the handwriting display method, and the above description may be referred to for relevant parts, and are not repeated herein.
The workflow of the touch display device provided in this embodiment is specifically described below by taking an electronic paper touch display device based on an Android operating system as an example.
Triggering a touch drive when a user starts writing on a touch display screen through a hand or a touch pen; then, application software processing and algorithm processing are executed, then, drive acceleration library processing is executed, and finally, screen TCON (timing controller) processing and screen display are executed. The specific handwriting event logic processing procedure is as follows:
when a user starts writing on an electromagnetic induction (EMR) touch film through a passive pen, the EMR touch film receives an EMR interrupt signal, and reports track point information according to a point reporting rate, and further triggers a touch driving signal, reports coordinate data and the like;
after the touch driving signal is transmitted through a Framework layer, the coordinate data of the stroke point is sent to application software for processing;
the application Software calls an algorithm SDK (Software Development Kit) to process and draw handwriting;
driving the acceleration library to process and transmitting a signal to the TCON;
after TCON processing, an EPD (Electronic Paper Display) screen Display handwriting is refreshed.
According to the above-mentioned logic processing process of the handwriting event, there is a delay when the user writes on the electronic paper touch display device, and the delay time is the time consumed from the detection of the touch signal of the pen/hand to the display of the electrical signal of the corresponding track on the screen.
The application software calls an algorithm SDK for processing and drawing a handwriting pattern, and the flow of processing and drawing handwriting by the SDK is as follows:
and sampling the handwriting sequence of the selected pen type point by point, and sequentially acquiring the original information such as the actual coordinate, the input time, the flag value, the initial line width and the like of a single pen point. Wherein, the flag value can distinguish whether the handwriting point is a start/stop point;
in the sampling process, the ith point (single track point) in the handwriting sequence is predicted in sequence, and the predicted coordinate P 'is output' i (x′ i ,y′ i );
To predicted coordinate P' i (x′ i ,y′ i ) Is mapped into pairs according to information such as distance, time and the likeThe line width is determined;
to the predicted coordinate P' i (x′ i ,y′ i ) Drawing a basic shape of a single point;
sequentially connecting the drawn basic shapes of the predicted handwriting points to form beautified handwriting corresponding to the pen shape;
and optimizing the beautified handwriting of the corresponding pen type to form the final beautified handwriting.
As shown in fig. 5, a computer system suitable for implementing the touch display device provided in the above embodiments includes a central processing module (CPU) that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) or a program loaded from a storage section into a Random Access Memory (RAM). In the RAM, various programs and data necessary for the operation of the computer system are also stored. The CPU, ROM, and RAM are connected thereto via a bus. An input/output (I/O) interface is also connected to the bus.
The following components are connected to the I/O interface: an input portion including a touch display screen, a keyboard, a mouse, and the like; an output section including a touch display screen, etc., and a speaker, etc.; a storage section including a hard disk and the like; and a communication section including a network interface card such as a LAN card, a modem, or the like. The communication section performs communication processing via a network such as the internet. The drive is also connected to the I/O interface as needed. A removable medium such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive as necessary, so that a computer program read out therefrom is mounted into the storage section as necessary.
In particular, the processes described by the above flowcharts may be implemented as computer software programs according to the present embodiment. For example, the present embodiments include a computer program product comprising a computer program tangibly embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section, and/or installed from a removable medium.
The flowchart and schematic diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to the present embodiments. In this regard, each block in the flowchart or schematic diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the schematic and/or flowchart illustration, and combinations of blocks in the schematic and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the present embodiment may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module, a prediction module, and a control module. Wherein the names of the modules do not in some way constitute a limitation on the modules themselves. For example, the prediction module may also be described as a "dot pitch amplification module".
On the other hand, the present embodiment also provides a nonvolatile computer storage medium, which may be the nonvolatile computer storage medium included in the apparatus in the foregoing embodiment, or may be a nonvolatile computer storage medium that exists separately and is not assembled into a terminal. The non-volatile computer storage medium stores one or more programs that, when executed by a device, cause the device to: acquiring the actual coordinate of the ith stroke point input by the user; obtaining the ith handwriting point according to the actual coordinate of the ith handwriting point and the actual coordinate of the (i-1) th handwriting pointThe predicted coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point are more than or equal to the distance between the actual coordinate of the ith stroke point and the actual coordinate of the (i-1) th stroke point, and the ratio of the distance between the predicted coordinate of the ith stroke point and the actual coordinate of the ith stroke point to the distance between the actual coordinate of the (i-1) th stroke point is N i ,N i Not less than 0; and realizing handwriting display according to the predicted coordinates of the nth stroke point.
It should be noted that, in the description of the present invention, relational terms such as first and second, and the like are used only for distinguishing one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between the entities or operations. Also, 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 phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
It should be understood that the above-mentioned embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention, and it will be obvious to those skilled in the art that other variations and modifications can be made on the basis of the above description, and all embodiments cannot be exhaustive, and all obvious variations and modifications belonging to the technical scheme of the present invention are within the protection scope of the present invention.
Claims (17)
1. A handwriting display method, comprising:
acquiring the actual coordinate of the ith stroke point input by the user;
obtaining the predicted coordinate of the ith trace point according to the actual coordinate of the ith trace point and the actual coordinate of the (i-1) th trace point, wherein the predicted coordinate of the ith trace point and the distance between the actual coordinate of the (i-1) th trace point are greater than or equal to the distance between the actual coordinate of the ith trace point and the actual coordinate of the (i-1) th trace point, and the ratio of the distance between the predicted coordinate of the ith trace point and the actual coordinate of the ith trace point and the distance between the actual coordinate of the ith trace point and the actual coordinate of the (i-1) th trace point is N i ,N i Not less than 0; and
and realizing handwriting display according to the predicted coordinates of the ith stroke point.
2. The method according to claim 1, wherein obtaining the predicted coordinates of the ith stroke point according to the actual coordinates of the ith stroke point and the actual coordinates of the (i-1) th stroke point comprises:
the ratio of the distance between the actual coordinate of the (i-1) th stroke point and the distance between the actual coordinate of the i th stroke point and the actual coordinate of the (i-1) th stroke point is N i As the predicted coordinates of the ith trace point.
3. The method of claim 2, wherein N is i The value of (i) is determined according to at least one of the writing speed of the first included angle between the first connecting line and the second connecting line, the writing speed of the (i-1) th trace point to the i th trace point, and the second included angle between the first connecting line and the third connecting line, wherein the first connecting line is that the actual coordinate of the (i-1) th trace point is connected to the actual coordinate of the i th trace point, the second connecting line is that the actual coordinate of the (i-2) th trace point is connected to the actual coordinate of the (i-1) th trace point, and the third connecting line is that the actual coordinate of the (i-1) th trace point is connected to the actual coordinate of the (i-1) th trace pointAnd (5) connecting the predicted coordinates of the (i-1) th stroke point.
4. The method of claim 3, wherein i > 2.
5. A method as claimed in claim 3, wherein the actual coordinates of the (i-1) th trace point are taken as the predicted coordinates of the (i-1) th trace point without predicting the (i-1) th trace point.
6. The method of claim 3, wherein N is i The value mode of (A) is as follows:
judging whether the first included angle is smaller than a preset first included angle threshold value, the writing speed is smaller than a preset writing speed threshold value, and the second included angle is smaller than a preset second included angle threshold value, wherein at least one of the first included angle, the second included angle and the preset second included angle threshold value is satisfied:
if so, then N i =N i-1 +1, wherein, N i-1 The ratio of the distance between the predicted coordinate of the (i-1) th stroke point and the actual coordinate of the (i-1) th stroke point to the distance between the actual coordinate of the (i-1) th stroke point and the actual coordinate of the (i-2) th stroke point is obtained;
if not, then N i And taking a preset value.
7. The method of claim 3, wherein N is i The value taking mode is as follows:
judging whether the first included angle is smaller than a preset first included angle threshold value, the writing speed is smaller than a preset writing speed threshold value, and the second included angle is smaller than a preset second included angle threshold value:
if so, then N i =N i-1 +1, wherein, N i-1 The ratio of the distance between the predicted coordinate of the (i-1) th track point and the actual coordinate of the (i-1) th track point to the distance between the actual coordinate of the (i-1) th track point and the actual coordinate of the (i-2) th track point is obtained;
if not, then N i And taking a preset value.
8. The method of claim 3, wherein N is i The value mode of (A) is as follows:
judging whether the first included angle is smaller than a preset first included angle threshold value, the writing speed is smaller than a preset writing speed threshold value, and the second included angle is smaller than a preset second included angle threshold value, wherein at least one of the first included angle, the second included angle and the preset second included angle threshold value is satisfied:
if so, then N i =min((N i-1 +1),N max ) Wherein, N is i-1 Is the ratio of the distance between the predicted coordinate of the (i-1) th track point and the actual coordinate of the (i-1) th track point to the distance between the actual coordinate of the (i-1) th track point and the actual coordinate of the (i-2) th track point, N max Is the maximum value of the preset proportion;
if not, then N i And taking a preset value.
9. The method of claim 3, wherein N is i The value mode of (A) is as follows:
judging whether the first included angle is smaller than a preset first included angle threshold value, the writing speed is smaller than a preset writing speed threshold value, and the second included angle is smaller than a preset second included angle threshold value:
if so, then N i =min((N i-1 +1),N max ) Wherein, N is i-1 Is the ratio of the distance between the predicted coordinate of the (i-1) th stroke point and the actual coordinate of the (i-1) th stroke point to the distance between the actual coordinate of the (i-1) th stroke point and the actual coordinate of the (i-2) th stroke point, N max Is the maximum value of the preset proportion;
if not, then N i And taking a preset value.
10. A method as claimed in any one of claims 6 to 9, characterized in that N is the case where the (i-1) th handwriting point is not predicted i-1 And taking a preset value.
11. The method according to any one of claims 6 to 9, wherein the preset value is 0, 1 or 2.
12. Method according to claim 8 or 9, characterized in that said preset proportional maximum value N is max Is 5-7.
13. The method according to claim 1, wherein the handwriting display according to the predicted coordinates of the ith handwriting point comprises: and performing stroke optimization according to the predicted coordinates of the ith stroke point and preset stroke parameters, and performing stroke display on the optimized handwriting.
14. A touch display device comprising a touch display screen and a processor, wherein the processor comprises:
the system comprises an acquisition module, a handwriting analysis module and a handwriting analysis module, wherein the acquisition module is used for acquiring relevant parameters of the ith handwriting point input by a user, and the relevant parameters comprise actual coordinates and acquisition time;
the prediction module is used for obtaining the prediction coordinate of the ith trace point according to the actual coordinate of the ith trace point and the actual coordinate of the (i-1) th trace point, wherein the distance between the prediction coordinate of the ith trace point and the actual coordinate of the (i-1) th trace point is greater than or equal to the distance between the actual coordinate of the ith trace point and the actual coordinate of the (i-1) th trace point, the ratio of the distance between the prediction coordinate of the ith trace point and the actual coordinate of the ith trace point to the distance between the actual coordinate of the ith trace point and the actual coordinate of the (i-1) th trace point is N i ,N i Not less than 0; and
and the control module is used for controlling the touch display screen to display the handwriting according to the predicted coordinate of the ith stroke point.
15. The touch display device of claim 14, wherein the touch display device is an electronic paper touch display device.
16. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-13 when executing the program.
17. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210859276.XA CN115237320A (en) | 2022-07-21 | 2022-07-21 | Handwriting display method, touch display device, computer device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210859276.XA CN115237320A (en) | 2022-07-21 | 2022-07-21 | Handwriting display method, touch display device, computer device and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115237320A true CN115237320A (en) | 2022-10-25 |
Family
ID=83672823
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210859276.XA Pending CN115237320A (en) | 2022-07-21 | 2022-07-21 | Handwriting display method, touch display device, computer device and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115237320A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116071459A (en) * | 2023-03-06 | 2023-05-05 | 深圳市英唐数码科技有限公司 | Ink screen-based hand drawing control method, system and readable storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010055322A (en) * | 2008-08-27 | 2010-03-11 | Pentel Corp | Handwriting input system |
CN102299718A (en) * | 2010-06-25 | 2011-12-28 | 汉王科技股份有限公司 | Compression and decompression methods for locus at hand-written terminal |
CN103310474A (en) * | 2013-06-08 | 2013-09-18 | 深圳市经纬科技有限公司 | Method and system for implementing original handwriting |
WO2018227819A1 (en) * | 2017-06-15 | 2018-12-20 | 广州视源电子科技股份有限公司 | Handwriting data synchronization method and device, storage medium and terminal device |
CN111381754A (en) * | 2020-04-30 | 2020-07-07 | 京东方科技集团股份有限公司 | Handwriting processing method, equipment and medium |
CN112099654A (en) * | 2020-09-16 | 2020-12-18 | 安徽文香信息技术有限公司 | Intelligent blackboard positioning system based on double ultrasonic modules and method thereof |
CN112667103A (en) * | 2020-12-28 | 2021-04-16 | 北京字节跳动网络技术有限公司 | Correction method and device of writing device, terminal and storage medium |
CN112764616A (en) * | 2021-01-22 | 2021-05-07 | 广州文石信息科技有限公司 | Method, device and equipment for accelerating handwriting of electronic ink screen and storage medium |
CN112783346A (en) * | 2021-01-19 | 2021-05-11 | 深圳市皓丽智能科技有限公司 | Handwriting data processing method and system, computer equipment and storage medium |
-
2022
- 2022-07-21 CN CN202210859276.XA patent/CN115237320A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010055322A (en) * | 2008-08-27 | 2010-03-11 | Pentel Corp | Handwriting input system |
CN102299718A (en) * | 2010-06-25 | 2011-12-28 | 汉王科技股份有限公司 | Compression and decompression methods for locus at hand-written terminal |
CN103310474A (en) * | 2013-06-08 | 2013-09-18 | 深圳市经纬科技有限公司 | Method and system for implementing original handwriting |
WO2018227819A1 (en) * | 2017-06-15 | 2018-12-20 | 广州视源电子科技股份有限公司 | Handwriting data synchronization method and device, storage medium and terminal device |
CN111381754A (en) * | 2020-04-30 | 2020-07-07 | 京东方科技集团股份有限公司 | Handwriting processing method, equipment and medium |
CN112099654A (en) * | 2020-09-16 | 2020-12-18 | 安徽文香信息技术有限公司 | Intelligent blackboard positioning system based on double ultrasonic modules and method thereof |
CN112667103A (en) * | 2020-12-28 | 2021-04-16 | 北京字节跳动网络技术有限公司 | Correction method and device of writing device, terminal and storage medium |
CN112783346A (en) * | 2021-01-19 | 2021-05-11 | 深圳市皓丽智能科技有限公司 | Handwriting data processing method and system, computer equipment and storage medium |
CN112764616A (en) * | 2021-01-22 | 2021-05-07 | 广州文石信息科技有限公司 | Method, device and equipment for accelerating handwriting of electronic ink screen and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116071459A (en) * | 2023-03-06 | 2023-05-05 | 深圳市英唐数码科技有限公司 | Ink screen-based hand drawing control method, system and readable storage medium |
CN116071459B (en) * | 2023-03-06 | 2023-06-09 | 深圳市英唐数码科技有限公司 | Ink screen-based hand drawing control method, system and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111381754B (en) | Handwriting processing method, equipment and medium | |
US10719168B2 (en) | Wet ink predictor | |
CN112764616B (en) | Method, device and equipment for accelerating handwriting of electronic ink screen and storage medium | |
KR20120095852A (en) | Method and apparatus for drawing and erasing calligraphic ink objects on a display surface | |
US20130182956A1 (en) | Methods and Devices for Processing Handwriting Input | |
KR20130060145A (en) | Processoing method and apparatus for beautifying handwritten input | |
CN107798717A (en) | Electronic brush writing method, device, computer equipment and storage medium | |
CN112558812B (en) | Pen point generation method and device, intelligent device and storage medium | |
WO2022242379A1 (en) | Stroke-based rendering method and device, storage medium and terminal | |
CN115237320A (en) | Handwriting display method, touch display device, computer device and medium | |
EP3607422A1 (en) | Ink render using high priority queues | |
CN109857322B (en) | Android-based painting brush width control method and device | |
US11789604B2 (en) | Handwriting processing method, handwriting processing device and non-transitory storage medium | |
CN110633042A (en) | Handwriting erasing method, device and equipment for electronic whiteboard | |
CN107193424A (en) | A kind of Intelligent electronic-type method for deleting and device | |
WO2021218448A1 (en) | Handwriting forming method and apparatus, and electronic device | |
JP2024024440A (en) | Pen state detection circuit and method, and input system | |
US20180350121A1 (en) | Global annotations across contents | |
JP2015203955A (en) | Drawing control device by digitizer pen, drawing control method and drawing control program | |
US20120299837A1 (en) | Identifying contacts and contact attributes in touch sensor data using spatial and temporal features | |
US10546399B2 (en) | Pencil ink render using high priority queues | |
US20240020893A1 (en) | Handwriting Forming Method and Apparatus, and Electronic Device | |
LU101625B1 (en) | Systems and methods for grid-aligned inking | |
CN107730571A (en) | Method and apparatus for drawing image | |
US20220358624A1 (en) | Writing Trajectory Processing Method, Touch Control Device, Writing System 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 |