METHOD AND SYSTEM FOR GENERATING HANDWRITTEN TEXT WITH DIFFERENT DEGREES OF MATURITY OF THE WRITER
20190303422 ยท 2019-10-03
Inventors
- Maria Cristina Carmona Duarte (Las Palmas de Gran Canaria, ES)
- Miguel Angel Ferrer Ballester (Las Palmas de Gran Canaria, ES)
Cpc classification
E04F11/1834
FIXED CONSTRUCTIONS
International classification
Abstract
The invention relates to a method and system for generating handwritten text with different degrees of maturity of the writer without needing to have the original text of the writer, thereby allowing the generation of text online (synthesizing temporal movement) and offline (generating the image of the handwriting), the simulation of real development in terms of the number of strokes and the velocity profile of the writer according to his or her progress, and the generation of handwriting of writers with possible neurological and motor disorders.
Claims
1. A method for generating valid handwritten text for writers with different degrees of maturity, the method comprising the following steps: (i) for each letter to be synthesized, selecting its n.sub.sl points making up its trajectory such that they allow performing paragraph (ii), said points having been previously stored in a memory such that each point of the trajectory thereof corresponds with a specific point of a common grid for any type of character to be synthesized, (ii) applying the method for generating temporal handwritten text development which is characterized by selecting a percentage E of initial points n.sub.sl that the trajectory of each letter has. The percentage E is inversely proportional to the development or maturity of the writing. A rule on the legibility of the synthesized text is set. In the event that the rule on legibility is not complied with, the selection of points is repeated again until the rule on legibility is complied with, (iii) connecting each of the letters forming the word by joining the end point of the preceding letter to the initial point of the next letter, making sure that the upper and lower lines of the grid are joined together, (iv) transforming the positions of the points of the trajectory into a temporal sequence of vectors and calculating the initial time instant corresponding to each vector depending on the preceding one. For every two consecutive points, a vector
2. The method according to claim 1, characterized in that the characteristics typical of the synthetic writer are established by defining parameters (K, K, Kt, KD, K, D, t), where: K.sub.: is a constant which depends on the motor characteristics of the subject, which is considered to be zero at first, K.sub.: is a constant defining the width of each of the signals |{right arrow over (.sub.j)}(t;t.sub.0j)| modeling each of the vectors, and it is different for each writer. To generate development, this parameter approximates 0.01 (for K.sub. equal to 0) so as to simulate children's writing and gradually increased until simulating an experienced, healthy writer, K.sub.t: is the time increment between the start of each of the signals |{right arrow over (.sub.j)}(t;t.sub.0j)| for every vector and is constant for each letter size and writing speed. It must be smaller than the width of signal (|{right arrow over (.sub.j)}(t;t.sub.0j)|) when synthesizing normal subjects and continuous writing, unless a writer writing at an abnormally slow speed is to be synthesized, K.sub.D: is a constant dependent on each individual and can also be used for scaling of the letters in the cases in which the increase in K.sub.t is not sufficient to obtain the desired letter size, K.sub.: is the maximum time of delay due to the angle between the current and preceding trajectories, .sub.D: is a random variable for generating each (|{right arrow over (.sub.j)}(t;t.sub.0j)|) which modifies the distance at which the points of the trajectory are located (close to 0 for healthy subjects and increased to simulate the poor skill of the writer or a disease), .sub.t: is a random variable which emulates dispersion over time and is inversely proportional to the skill of the writer (close to 0 for skilled healthy adult subjects and increased to simulate a poor writing skill or a disease).
3. The method according to claim 1, characterized in that the rule on legibility of the text is defined in that at least one of the points coinciding with the lines set for each language, if they coincide in the initial character design, must be maintained.
4. The method according to claim 1, characterized in that the predetermined equation of paragraph (vi) is determined by:
5. The method according to claim 1, characterized in that the predetermined equation of paragraph (vi) is determined by:
6. The method according to claim 1, wherein the predetermined sigmoid curve S of paragraph (iv) is approximated by (S(,b,c)), where the value of b approximates 0.06 and c approximates 65.
7. The method according to claim 1, wherein the initial time instant of each vector t.sub.0j is expressed as:
8. The method according to claim 1, characterized by being an online method and by generating the velocity profile after paragraph (vii) taking into account the degree of maturity of the writer.
9. The method according to claim 1, characterized by being an offline method and by applying an ink model after paragraph (viii) (202) and by adding to each vector
10. The method according to claim 1, characterized by obtaining the writing characteristics of a real person by means of adjusting parameters K.sub., K.sub.t, K.sub., K.sub.t, K.sub. and K.sub.D based on the real velocity profile. Furthermore, the trajectory vectors which have been previously stored in a memory used in paragraph (i) are obtained from the real writing of the writer to be synthesized.
11. The method according to claim 1, characterized in that paragraphs (ii) and (iii) are interchangeable.
12. The method according to claim 1, characterized by defining the value of E from 100 to 20 to emulate child-to-adult development.
13. The method according to claim 1, characterized by the parameters .sub.D and .sub.t being related to learning or neurological health of the individual. The value is increased until synthesizing poor neurological health or poor learning.
14. The method according to claim 1, characterized by synthesizing patients with Parkinson's disease, increasing the time increment between signals |{right arrow over (.sub.j)}(t;t.sub.0j)| by means of increasing Kt in a manner proportional to the extent of the disease until the value thereof exceeds the width of said signal. In this manner, the more the disease affects the patient, the less the signals modeling each of the vectors will overlap one another. It is considered that the vectors of the trajectory are designed in pairs, and in each of the pairs the direction of one offsets the direction of the preceding one.
15. The method according to claim 1, characterized by synthesizing patients with Alzheimer's disease by means of increasing the parameters related to the starting point stability of the signal representing each vector and the error in the trajectory (.sub.D, .sub.t).
16. The method according to claim 1, characterized by synthesizing patients with amyotrophic lateral sclerosis by means of increasing the width of |{right arrow over (.sub.j)}(t;t.sub.0j)| by varying K.sub.K.sub. and reducing the amplitude (K.sub.D) thereof.
17. A computer program with instructions configured to be run by at least one processor, which instructions, when run by an electronic device, cause said electronic device to carry out the method of claim 1.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings are presented so as to illustrate but in no way limit the invention. In the drawings:
[0032]
[0033]
[0034]
[0035]
[0036]
DETAILED DESCRIPTION OF THE INVENTION
[0037] Although the invention is described in terms of a specific preferred embodiment, it will be obvious for those skilled in the art that various modifications, rearrangements, and replacements can be made. The scope of the invention is defined by the claims attached hereto.
[0038] The present invention allows providing a solution to the technical problem of synthesizing text similar to real text without needing to have an earlier original text of the writer, simulating real development in terms of the number of strokes and the velocity profile of the writer according to his or her progress and providing the possibility of varying parameters which may be related to neurological or motor parameters of human learning in a simple manner.
Detailed Description of a Preferred Embodiment of the Invention
[0039] The present invention can be implemented in hardware, software, or a combination of both.
[0040]
[0041] Unlike in [Ferrer, M. A.; Diaz-Cabrera, M.; Morales, A., Static Signature Synthesis: A Neuromotor Inspired Approach for Biometrics, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. PP, no. 99, pp. 1,1 (2015)], in the proposed method, it is considered that every two consecutive points of the grid is considered a vector
(
and the current vector
is also calculated, being defined as:
[0042] With these previous calculations, it is considered that for every vector ({right arrow over (Q.sub.1Q.sub.j+1)}), parameters D.sub.j,t.sub.0j,.sub.j, and .sub.j of a signal are adjusted, said signal modelling the velocity profile and recommended to be a lognormal (or another which, by adjusting the parameters thereof, provides the same adjustment):
where and are the location and scale parameters, respectively, j indicates the number of the corresponding vector, and t.sub.0j is the initial instant where the start of the lognormal is located. The equations and premises that these parameters must have so that handwritten text that looks real and includes the requirements for writer development to be similar to real development can be synthesized, are described below.
[0043] In this method, the value .sub.j which defines the width of each lognormal, is defined for each similar lognormal and determined by the equation:
.sub.j=K.sub.(3)
where K.sub. is a constant defined for each writer and is different for different writers. To generate development, the parameter K.sub. approximates 0.01 so as to simulate children's writing and it gradually varies to a value of 0.05 for adults in order to obtain results like the ones in
[0044] The initial period of each lognormal t.sub.0j is expressed as:
where n.sub.sl is the number of points forming the trajectory of the letter, K.sub.t is a constant which can be set for each writer for setting the small scales of the letters and the mean velocity, K.sub. is the maximum time of delay due to the angle, N(0,.sub.t) is a random variable which emulates dispersion and is inversely proportional to the writer's skill, and finally the delay introduced due to the angle between the vectors (.sub.j) is determined by a sigmoid curve (S(,b,c)), where the value of b approximates 0.06 and c approximates 65 for the initial configuration, where said values can be increased or decreased up to 10% to better adjust the writer to be synthesized, and where:
[0045] K.sub.t=0.04, K.sub.=0.1, and .sub.t=+/0.02 is set as the starting adjustment. These values can be adjusted to approximate the real parameters of a writer as explained for the angle. In this case, parameter K.sub. would be adjusted with a greater time increment (t) (drawing on the bottom in
[0046] Amplitude D.sub.j of the lognormal j is defined proportional to the distance between the points of the trajectory:
D.sub.j=K.sub.D(d.sub.act,j+N(0,.sub.D))/d.sub.refj=0,1,2, . . . ,n.sub.sl(6)
where d.sub.act,j is the distance between the points of the trajectory, Q.sub.j to Q.sub.j+1, d.sub.ref is the minimum distance between the points of the grid, K.sub.D is a constant dependent on each individual and can also be used for massive scaling of the letters in the cases in which K.sub.t is not sufficient. N(0,.sub.D) is a random value for each lognormal j. K.sub.D=d.sub.ref,j, and .sub.D=0.3 is set as the initial adjustment. These values can be adjusted by means of an approximation to adjust them to the real parameters of a writer, when this is the purpose thereof.
[0047] The variable .sub.j is equal to a constant K.sub., a constant which depends on the motor characteristics of the subject and is therefore different for each individual. In the experiment performed for obtaining
[0048] Once all the parameters for each component of the trajectory {right arrow over ()}.sub.j(t;t.sub.oj) have been calculated, it is obtained by substituting parameters D.sub.j,t.sub.0j,.sub.j, and .sub.j in Equation 2. Finally, the final velocity vector is obtained by means of adding up each of the {right arrow over ()}.sub.j(t;t.sub.oj) based on [M. Djioua, R. Plamondon, A new algorithm and system for the characterization of handwriting strokes with delta-lognormal parameters, IEEE Transactions on Pattern Analysis and Machine Intelligence, 31 (2009) 2060-2072]:
{right arrow over (.sub.n)}(t)=.sub.j=1.sup.n.sup.
[0049] Components x and y of vector {right arrow over ()}.sub.j(t) are adjusted by calculating the angle of each trajectory .sub.j,
followed by substituting it into the equations to calculate .sub.x(t;t.sub.oj) and .sub.y(t;t.sub.oj) from {right arrow over ()}.sub.j(t;t.sub.oj) by means of (Equation 9) and (Equation 10).
[0050] Finally, the Cartesian trajectory used for drawing the letter is obtained:
x(t)=.sub.x(t)dt(12)
y(t)=.sub.y(t)dt(13)
[0051] To synthesize problems relating to the learning or neurological health of the individual, parameters .sub.D and .sub.t are modified, increasing their value the farther away the ideal individual to be synthesized is from the normal value.
[0052] To synthesize patients with Parkinson's disease, the time increment between signals representing each vector (K.sub.t) is increased. In this manner, the more the disease affects the patient, the less the signals modeling each of the vectors will overlap one another. The vectors of the trajectory are designed in pairs, and in each of the pairs the direction of one offsets the direction of the preceding one (simulates agonist and antagonist muscle movement).
[0053] To synthesize patients with Alzheimer's disease, the value of the parameters related to the starting point stability of the signal representing each vector and the error in the trajectory (.sub.D,.sub.t) is increased. The higher the value of these parameters, the greater the degree of degeneration will be due to the mentioned disease in adults.
[0054] To synthesize patients with amyotrophic lateral sclerosis, the width of the signal representing each vector of the trajectory is increased by varying K.sub.K.sub. and reducing amplitude (K.sub.D). The greater the width and the smaller the amplitude, the greater the degree of degeneration will be due to the disease in adults.
Alternative Method
[0055] Instead of using Equation 1, a sinusoid can be used, where:
[0056] The method would be the same as in the preceding method with the exception that in this case the value of .sub.j (Equation 3) would be multiplied by K.sub.Ds as follows:
.sub.j=K.sub.Ds(0.01+K.sub.)(14)
[0057] Like K.sub.s, the value of K.sub.Ds depends on the writer. To simulate a real writer, the value is adjusted by comparing the synthesized value with the rest of the parameters and K.sub.D equal to 1 with the velocity signal obtained from a real sample. The real sample will be obtained from an image captured by means of a digitizing tablet on which the real writer will draw a line of 1 cm.
Method for Temporal Development
[0058] This section provides a detailed description of block (103) that is shown in detail in
[0059] This method is based on the premise that, as learning progresses, the number of points used in the writing is smaller, and therefore the length d.sub.act,j is greater. To that end, a variable E defining the selected percentage of points for each individual is defined. Therefore, the number of outputs the system will have will be determined by L:
[0060] This method is described in detail in
[0064] Once the points of the grid have been calculated, the parameters are calculated with the preceding method.
EXAMPLES
[0065] The invention will be illustrated below by means of tests performed by the inventors, which clearly show the efficacy of the invention.
[0066] These specific examples that are provided serve to illustrate the nature of the present invention and are included only for illustrative purposes, so they must not be interpreted as limitations of the invention herein claimed. Therefore, the examples described below illustrate the invention without limiting the field of application thereof.
Example 1. Text Synthesized Automatically Offline
[0067]
Example 1. Text Synthesized Automatically Online
[0068]
[0069] To obtain real samples, 20 children (from 5 to 10 years of age) from one and the same school were asked to write the letter a on a Wacom digitizing tablet. The digitizing tablet is a WACOM Intuos 3 tablet with an Intuos 3 Grip Pen, a sampling frequency of 200 Hz, a resolution of 2540 dpi, and a work surface of 304.8 mm228.6 mm. The same process was carried out with 10 adults over 18 years of age.
[0070] The left column of
[0071] The right column of