Children’s Online Handwriting Quality Analysis.

—Contributions: An innovative e-learning project is presented in this paper, which is a mobile workbook that teaches handwriting at school. This mobile application proposes a new qualitative and quantitative analysis process of online cursive handwriting. It gives a real-time feedback, detects mistakes and helps teachers evaluate children’s writing skills. The main aim of this notebook is to aid kids learn how to write correctly. We analyze handwriting according to major criteria like shape, kinematics of the trace, position respect to the reference lines, stroke order and direction. Background: Beta-elliptic model with dissimilarity distance (DD) and similarity detection (SD), and SVM with Cartesian Fourier Descriptor Model (FDcarM) are used to analyze the handwriting quality. Our work apprehends dynamic and visual representa-tions of the acquired traces, describes the overall geometry of a trace as a function of the undulations of its curvature function and selects efﬁcient features adapted to various handwriting styles. This work demonstrates that beta-elliptic model is not only a model for segmentation and recognition but also a tool to evaluate handwriting. Intended outcomes: A master-class environment that motivates childrents to perform better on in application evaluations. The mobile workbook should be positively received by learners and teachers. Application design: Our application provides interfaces for both learners and experts which are ﬂexible with the particularity of each child and makes experienced kids engaged with challenging tasks.Findings: For the validation of our proposed system,we collected a database of 400 Tunisian children from pre-schools and primary schools. Results demonstrate the efﬁciency and robustness of our application an the great majority of expertts expressed a positive attitude toward it.


Abstract-Contributions:
An innovative e-learning project is presented in this paper, which is a mobile workbook that teaches handwriting at school. This mobile application proposes a new qualitative and quantitative analysis process of online cursive handwriting. It gives a real-time feedback, detects mistakes and helps teachers evaluate children's writing skills. The main aim of this notebook is to aid kids learn how to write correctly. We analyze handwriting according to major criteria like shape, kinematics of the trace, position respect to the reference lines, stroke order and direction. Background: Beta-elliptic model with dissimilarity distance (DD) and similarity detection (SD), and SVM with Cartesian Fourier Descriptor Model (FDcarM) are used to analyze the handwriting quality. Our work apprehends dynamic and visual representations of the acquired traces, describes the overall geometry of a trace as a function of the undulations of its curvature function and selects efficient features adapted to various handwriting styles. This work demonstrates that beta-elliptic model is not only a model for segmentation and recognition but also a tool to evaluate handwriting. Intended outcomes: A masterclass environment that motivates childrents to perform better on in application evaluations. The mobile workbook should be positively received by learners and teachers. Application design: Our application provides interfaces for both learners and experts which are flexible with the particularity of each child and makes experienced kids engaged with challenging tasks. Findings: For the validation of our proposed system,we collected a database of 400 Tunisian children from pre-schools and primary schools. Results demonstrate the efficiency and robustness of our application an the great majority of expertts expressed a positive attitude toward it.

I. INTRODUCTION
W ITH pen-based tablet or finger, various criteria can be studied or analyzed like shape, pressure and direction. Our digital notebook gives immediately and personalized feedback to children and also to teachers who teach kids how to write. It also adopt an specific educational progression to each child. It is currently composed of Letter Writing, Word Writing, Digit Writing, Symbol Writing in Arabic/French/English as shown in Fig. 1. All evaluated writings are cursive. The evaluation process needs the segmentation of acquired traces into elliptic strokes and the extraction of beta-elliptic and Cartesian Fourier Descriptor parameters. We define reference models and we compare the child's trace by applying similarity and dissimilarity rules. The analysis evaluates the target symbol by comparing it with a model of reference. Our handwriting analyser system proposes finer analysis based on five metrics (direction, kinematics, order, shape , position respect to the reference lines). The assessor system is mainly based on Cartesian Fourier Descriptor model and beta-elliptic model . The plan of our paper is as follows: Section 2 reports some systems for handwriting analysis in literature. The architecture of our children's online handwriting analysis system is presented in section 3. Section 4 & 5 describe the different features used in analyzing children traces. Results are discussed in Section 6. Finally, section 7 conclude remarks about the future works.

II. RELATED WORKS
Handwriting quality is related to legibility and kinematics [1]. Three main skills are required in the writing process: a global visual representation of online script, identification of elementary strokes in it, and being able to generate a script as a group of elementary strokes respecting direction. The challenge of evaluation is more complex than recognition because we will not only evaluate the shape but also direction and order of writing. Children frequently make several kinds of errors: write correct shape in wrong direction or unversed, add addition strokes, letter or word transformation, etc. So,we have to be able to detect the kind of errors related to shape, order or direction. Handwriting recognition is the task of transforming language from graphical marks into meaningful representation. Humans are able to read or write easily. To analyze handwriting, we proceed by the detection of common properties, then we group together according to some laws like shape, direction , and order... The goal of this section is to illustrate theoretical approaches of handwriting analysis. In 2015, Bouillon et al [2] present a new work for evaluating handwriting of children (symbols, letters as an any geometric form) by using online fuzzy models. Simonnet et al. [3] proposed a multi-criteria approach for Latin handwriting quality analysis. In this work, the handwriting of children are evaluated by making compare with models using inter-class and intra-class scores. Indeed, a multi-criteria score describes the legibility (shape) and kinematic (order and direction) . Likewise, in 2018, the authors [4] introduced an explicit segmentation approach for handwritten cursive word evaluation. First, the authors start by extracting the primary segmentation hypotheses. Next, they extract the letter hypotheses based on scoring and evaluation is based on the fusion of elastic matching and writing analysis scores. In a recent work [5], Corbillé et al. combine different channels at the input of a single network to improve the classification performance of online children handwriting recognition. They convert the online trace into different image channels taking into account the dynamical information. Accadro et al. analyze handwriting kinematics of kids on tablets by dealing with different types of features (number of strokes per letter, pen down duration...) and shows that the handwriting is based on various kinematics characteristics like velocity and spatial grouping... [6] Only one work [7] deals with Chinese characters that identify 3 types of errors related to sequence stroke, stroke relationship and stroke production. Jolly et al. [8] compare the acquisition of traces from paper and tablets. This study encourage the using of digital devices in primary schools and preschools and the development of digital workbooks to assist teachers and children. A research [9] used five primitives to evaluate handwriting proficiency of children : legibility, form, alignment, size and space. An educational system [10] is used for handwriting teaching and repair by evaluating the quality of children handwritten letters. Other researchers are exploited the analyzing of children handwriting to identify children with dysgraphia [11]. A new study [12] shows that handwriting legibility improves with spelling ability more so than with the handwriting practice. It demonstrates also that the bilingual pupils had weaker spelling skills. The work of Boram and Choi [13] examines differences in children's graphomotor skills based on types of writing medium and gender. It approved that boys generated larger print sizes than girls and Preschoolers' graphomotor skills vary depending on writing support. Generally medical applications mainly deal with the kinematics features of handwriting in contrast with the educational systems that focus legibility criteria and use only the features of velocity and acceleration. The field of Arabic text evaluation is still an area of research for exploration because there is not any work dealing with this script. This work offers a writing experience at schools by using tablets ( with stylus or finger touch ). The experiments of this work were performed in primary schools and preschool Tunisian children. The paper presents results of the first experimentation in Tunisian primary schools with 400 children. During threehour sessions, groups of six to eight kids as illustrated in Fig.  1, were writing letters, symbols, words and having automatic feedback. This application lets children work alone with realtime feedback. It proposes automatically pedagogical tasks that are personalized according to each child ability to write correctly or his difficulties based on its automatic writing analysis. It provides precise evaluation of kids writing ( direction, shape, order) to aid experts in the automatic examination of kids writing skills and difficulties. The work demonstrates that betaelliptic is not only a model for segmentation and recognition but also a tool to evaluate handwriting.

III. PROPOSED SYSTEM
Our system consists of evaluating children's writing based on various criteria such as shape, order and direction and gives immediately feedback. It is the combination of visual  Fig. 2). The aim of our work is to help teachers with handwriting evaluation and return corrective feedback to children's schools during the learning process. Indeed, the handwritten sequences are online signals captured with digital devices. Next, five main criteria are utilized to evaluate the handwriting quality based on the combination of two models of handwriting modeling: Beta-elliptic model and FDcarM. Finally, a meaningful confidence score about each criterion is established for test samples depending on a principle method: comparison engine method based on similarity detection (SD) and measuring distance (MD) technique and SVM engines.

IV. SELECTION OF THE PERTINENT PARAMETERS
The evaluation of the quality of kids writing tests depends on the five criteria presented above. The proportional progression of scores for all criteria during the learning process is not guaranteed since kids often tends to focus on one or two criteria at the same time. The diversification of the evaluation criteria needs diversification of the parameters involved in the step of evaluation in order to refine their estimation and gives online feedback to the child and the teacher. The selection of the pertinent parameters to characterize each criterion is a very crucial step in the assessment process. Indeed, the visual and curvature generic features generated by FDcarM of the online trace that describe respectively the variation of the trajectory curvature function and the final view obtained post-drawing. For the criteria direction and order, we need to compare the succession of geometric and dynamic feature vectors of the strokes. Likewise, to evaluate the importance of the kinematics criterion in the handwriting learning process, we compare the velocity profile of the test script executed by the child to the trace models recorded by an expert. To do this, we have decided to use the dynamic part of the beta-elliptic model to characterize this criterion that evaluates quantitatively the correctness of a criterion characteristics of the trajectory A stroke which is limited by extremum velocity. Our system compares the traces produced by children with n correct traces named 'models', existing in the training database by using their features vectors.

A. Preprocessing
Preprocessing is a primordial step for handwriting evaluation in order to obtain better analysis of children's handwriting traces. We remove trembling in writing, reducing hardware imperfections and banish inaccuracies in rapid pen-down/up detection. Chebyshev low pass filer is applied to decrease the noise and errors of temporal and spatial quantification caused by the acquisition system. In our analysis system, we avoid interpolation, adding missing points that can affect the direction information and gives bad representation of child script. All acquired traces should have the same scale so we have to apply normalization on the script (x, y) coordinates.

B. Beta-elliptic Features
Handwriting is movement, the sum of impulse signals as the response to the neuromuscular system according to the Beta function [14]. The Beta-elliptic model consists of decomposing the online trajectory into elliptic strokes based on the combination of the dynamic and geometric aspects [15]. Thus, handwriting can be decomposed into movements named strokes. Stokes are the result of superposition of time overlapped velocity profiles. Beta-elliptic model segments online script into different strokes by tracing Beta-elliptic parameters with their curvilinear velocity obeys this model. Equation (1) presents the Beta function: where t 0 : starting time of Beta function. t c : is the instant when the curvilinear velocity reaches the amplitude of the inflexion point. t 1 : the ending time of Beta function. W ith(p, q, t 0 < t 1 ) ∈ R, and p , q intermediate parameters that influence on symmetry and width of Beta shape. As a result, a stroke is presented by 10 parameters. For our analyser system, we use only 5 beta-elliptic parameters from ten that characterize each stroke. a, b, x 0 , y 0 and θ describe the geometric features of handwriting and represent its static aspect. Theta parameter θ classify strokes into basic codes. The principal basic codes to write are: −, /, |, \which can compose any script [16]. Those four perceptual codes are expanded to eight in order to identify the direction of elliptic stroke. Basic perceptual codes are not directly detectable so the step of segmentation by Beta-elliptic model is crucial. As a conclusion, handwriting is an arrangement of basic perceptual codes with numerous possible combinations of BPCs can form a similar letter or symbol but in evaluation we must pay attention to their directions.
In fact, the number of strokes is extracted automatically from the curvilinear velocity representation. Beta-elliptic arcs are presented in red in Fig. 3. a, b, x 0 , y 0 and θ are the geometricdynamic features of each elliptic stroke with its correspond basic code that describes the visual aspect, we form a vector feature of each elliptic stroke.

C. Cartesian Fourier descriptor model (FDcarM)
FDcarM represents one of the most precise approaches for modeling a trajectory or a closed contour [17]. To benefit from their robust approximation ability of periodic functions of the representation of online acquired traces, we have to convert the graphic signatures corresponding to the open trajectories of traces into periodic functions. M 1 and M n are respectively the start point and the end point of the trajectory of a trace. This model is used to solve the problem of periodicity consists in traversing the trajectory of the trace come and back from M 1 to M n and then from M n to M 1 (see Fig. 4. a ). For the DFcarM, the trajectory of an online script is represented by the two signature functions which respectively describe the variation of the abscissa x i and the ordinate y i of a current point M i of the trajectory according to the curvilinear length l i , calculated in Equation (3), traveled from the starting point M 1 .
Where dL i is the elementary curvilinear distance between the current point M i and its previous point determinated below in the Equation (4).
The two functions f x (l i ), f y (l i ) and representing the Cartesian signature of a trace can adequately be approximated by Fourier series as long as they represent periodic (and symmetric) functions satisfying: f x (l 1 ) = f x (l 2n ) = x 1 abscissa of the trajectory at point M 1 , f y (l 1 ) = f y (l 2n ) = y 1 ordinate of the trajectory at point M 1 , f x (l i ) = f x (l 2n−i+1 ) = x i abscissa of the trajectory at the current point M i , f y (l i ) = f y (l 2n−i+1 ) = y i ordinate of the trajectory at the current point M i , with i=1, ..., n. The Fourier descriptor parameters which constitute the coefficients a 0 , a i and b j with j=1, ..., k of the Fourier series approximating the abscissa signature x i = f x (l i ) at the k-th harmonic, are then calculated in Equations (5), (6) and (7). As well as the parameters the coefficients c 0 , c j and d j with j = 1, ..., k of the Fourier series approximating the ordinate signature y i = f y (l i ), also at the k-th harmonic. Fig. 4. b presents the signature of Arabic letter Sad . For the reconstruction of the two signatures representing the trajectory, Fourier series use this approximation function presented in the Equation (8) below: The choice of the harmonic number k used in the Fourier descriptors is determined by a compromise between the precision of description of the model and its power of generalization. In fact, when the number of harmonics increases, the approximation of the Cartesian signature of online child script becomes more precise espacially its resolution in number of points i = 1, ..., n is enough (the number of points n must be higher than 2k). This precision makes better distinction between the modeled traces. However, when the precision increases further, the obtained model composed by the coefficients a j , b j , c j and d j will contain d the noise introduced by the acuiition system at the level of the harmonics of high frequency or also data modeling the writing style specific to writer. The most relevant value of k for online handwriting recognition systems is fixed to k = 8 according to a statistical study.

VI. EXPERIMENTS AND RESULTS
The results of the assessor are reported in this section. Data-sets introduced are followed by the approach and the evaluation protocol. Then, results will be illustrated.

A. Data-sets
Data-sets are gathered from 400 children in Tunisian preschools. The data-set used to validate the efficiency and robustness of our application is collected by using five digital tablets. The constructed data-set comprises especially three subsets. Set 1 contains Arabic letters (i. e. , , , , ,

B. Setup
To study the efficient of our two mentioned models and their combination in handwriting quality evaluation, we have designed three groups of experiments. The first one is based on Beta-elliptic model using SD-DD comparison method. The second and is realized on FDcarM based on SVM classifier. Finally, the three test is fusion of the two previous tests. Beta-elliptic model extracts a set of pertinent features to characterize the five analysis criteria. The system determines for each criterion two thresholds: TCC and TCW delimiting respectively three evaluation zones: certainly correct (CC), Fuzzy (F), and certainly wrong (CW) presented in Fig. 5. The thresholds are calculated from two distributions distances DD CM and DD W M separating correct models and wrong ones respectively as demonstrated in Equation (9) and Equation (10) .
Where Q D D(u) is the value of the quantile function of the DD distribution at a cumulative probability of u percent. u max and u min are adjustable cumulative probabilities that limit the substantial part of the distribution DD fixed empirically to 96% and 4% respectively. A first normalized score N S 1 is assigned to the test sample relying on the correct partition using in Equation (11).
Similarly, we calculated the DD T W distance separating the test sample from the set of wrong samples which represent the most common errors before converting them to a normalized score noted N S 2 between 0 and 1 analogously to Eq. 11. As described in Eq. 12, the final score NS is computed as the average between N S 1 and the complement of N S 2 .
SVM model using FDcarM allows u to analyze three criteria: shape, direction, and order. Those criteria are the input for the multi-class SVM with RBF kernel function for making classification step. We evaluated the impact of the hybrid results of the two mentioned models. The final score attributed for each criterion is calculated as a weighted average of the scores assigned by each separate subsystem.

C. Results
In this section, we present the various levels of evaluation of our system and the different criteria used for analyzing traces

1) Type of Evaluation:
The global evaluation classify the test script into six classes (Correct,wrong Shape, Wrong order, Wrong direction,Irregular kinematic, Reference line surpass). With the value of distance between the test trace and models, the test script is evaluated correct or wrong. Table I sums up the global results achieved by our analyser system using the different feature extraction models. We can see from this table that our method is very effective for handwriting children's evaluation. In fact, it gives good results for characterizing the five criteria. The specific temporal information, geometricperceptual parameters and curvature description provided by Beta-elliptic model (BEM) and FDcarM allow us to analyze all criteria. In fact, the final score assigned for each criterion is calculated as a weighted average of the scores assigned by each separate subsystem (Beta-elliptic system (BEM) and FDcarM system) weighted by its Correct Classification Rate (CCR). The second type of evaluation provides a quantitative description of the test script by attributing for each criterion a quantitative evaluation label. It assigns a confidence score ranging from [0, 100] for each criterion as illustrated in Fig.  6 (red circle). The validation of our system is enhanced by a database gathered from Tunisian primary schools (letters, words and symbols). Obtained quantitative results of some observations are presented in Table 1.They demonstrate that the best confidence score of shape criterion is achieved by using FDcarM features rather than beta-elliptic features. This can be explained by the use of visual and curvature generic features generated by FDcarM. Moreover, the beta-elliptic approach is more accurate for the analysis of order and direction criteria than FDcarM. This robustness is due to the precise features to the change of direction and order of basic perceptual codes. The third evaluation method provides a qualitative description of the test script by attributing for each criterion a qualitative evaluation label: (very well (VW), well (W), medium (M), bad (B), very bad (VB)) attributing according to the final score presented by green emoticon in blue rectangle in Fig. 6 and emoticons in Fig. 7.
2) Criteria of Evaluation: It is crucial to analyze the feedback of children about their first adventure with tablets. This experience with various criteria prove that kids get familiar with the workbook and to their score has gradually improved. Moreover, the personalized feedback lets children take steps forward with autonomy at their own speed. The specific temporal information and geometric-perceptual parameters provided by Beta-elliptic model allow us to analyze the five criteria (shape, direction, order, kinematic, and position). FDcarM characterize (shape, direction, order) according of the handwriting velocity. Qualitative results of the shape criterion are summed up in Fig. 7 that present the qualitative evaluation of Arabic letter Baa . According the Table II, shape criterion is better evaluated with the curvature approach. This can be explained by the use of visual and curvature generic features generated by FDcarM. The kind shape errors are additional or missing strokes and contain strokes that disregard relative stroke proportions. A correct order of a trace must coincide with the order of the correspond models.
Recognition the correct order is based on our four basic perceptual strokes. Thus, Table II shows a significant results of direction criterion with elliptic approach which is more robust than curvature approach in identifying the orientation stroke. The feedback given based on multi-criteria. In fact, it depends mainly on legibility and ductus of teachers models. The kinematic criterion lets us to distinguish the nature of writing (fast or slow) based on elliptic approach. This is due to the use of dynamic parameters that give the overall temporal properties of the neuromuscular networks implicated in motion generation, and the geometric features of all the joints and muscles inducted to execute the movement. The elliptic model gives also an information about the position of the trace criterion.
To evaluate the performance of our proposed system com- paring to the state of the art, we didn't find any work deals with children's Arabic script. A mobile application presents the works of [2], [3] that gives only the opportunity to test Latin traces and imposes the use of stylus and specific version Android that is free for only one month.Thus, we can not test it.

VII. DETECTION & IDENTIFICATION OF CHILDREN'S ERRORS
Our proposed system is able to detect the children's errors. The several types of errors frequently made by children: write correct shape in wrong direction or versed, add additional strokes, letter or word transformation, etc. The challenge of evaluation is to identify the kind of errors. The incoming figures illustrate some sample of handwriting errors made by children. Those mistakes can be performed by our analysis application. Fig. 9 illustrates the Arabic letter Seen with Fig. 9. Arabic Letter "Seen" with added strokes.
two additional strokes and Fig. 8 presents the Arabic letter Tad with missing stroke. We enrich our workbook with symbols in order to simplify the view of writing and instructional strategies for children with difficulties. For some children, decoding handwriting and making links between its parts is very difficult task. So, we need to improve our workbook with simple symbols as illustrated in Fig. 10. With those symbols, children will be able to decompose into primitives and can also reproduce easily automatic flow of traces.

VIII. CONCLUSION
A new system for online handwriting evaluation and analysis is presented in this paper which deals with both cursive and non-cursive handwriting multi-script. It analyzes the handwriting quality of children and provides them realtime feedback based on basic criteria ( direction, shape, order, position, kinematic ). It uses the Beta-elliptic model for handwriting representation, that offers the possibility of detecting dynamic and geometric aspects in online handwriting trajectory modeling and the Cartesian Fourier descriptor model (FDcarM) for curvature description. We validate our system with databases collected from pre-schools which contained digits, letters Arabic/Latin, symbols. Results prove the effectiveness of the proposed system that aids experts and learners by giving feedback during the handwriting assessment process. The extracted features are universal and can be extracted from other scripts. They can be adapted for other applications such as the pre-diagnosis of neuromuscular pathologies and the difficulties of dyslexia and dysgraphia.