Next Article in Journal
Fabrication of Two-Layer Microfluidic Devices with Porous Electrodes Using Printed Sacrificial Layers
Previous Article in Journal
Fabrication of Medium Mn Advanced High-Strength Steel with Excellent Mechanical Properties by Friction Stir Processing
Previous Article in Special Issue
High-Dynamic-Range Integrated NV Magnetometers
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Online Handwriting Recognition Method with a Non-Inertial Reference Frame Based on the Measurement of Linear Accelerations and Differential Geometry: An Alternative to Quaternions

by
Griselda Stephany Abarca Jiménez
1,
Carmen Caritina Muñoz Garnica
2,
Mario Alfredo Reyes Barranca
2,
Jesús Mares Carreño
1,*,
Manuel Vladimir Vega Blanco
1 and
Francisco Gutiérrez Galicia
1
1
Unidad Profesional Interdisciplinaria de Ingeniería Campus Hidalgo (UPIIH), Instituto Politécnico Nacional (IPN), Carretera Pachuca—Actopan Kilómetro 1+500, Distrito de Educación, Salud, Ciencia, Tecnología e Innovación, San Agustín Tlaxiaca 42162, Hidalgo, Mexico
2
Electrical Engineering Department, CINVESTAV IPN, Av. Instituto Politécnico Nacional 2508, Gustavo A. Madero, San Pedro Zacatenco, Mexico City 07360, Mexico
*
Author to whom correspondence should be addressed.
Micromachines 2024, 15(8), 1053; https://doi.org/10.3390/mi15081053
Submission received: 10 July 2024 / Revised: 13 August 2024 / Accepted: 18 August 2024 / Published: 21 August 2024

Abstract

:
This work describes a mathematical model for handwriting devices without a specific reference surface (SRS). The research was carried out on two hypotheses: the first considers possible circular segments that could be made during execution for the reconstruction of the trace, and the second is the combination of lines and circles. The proposed system has no flat reference surface, since the sensor is inside the pencil that describes the trace, not on the surface as in tablets or cell phones. An inertial sensor was used for the measurements, in this case, a commercial Micro-Electro Mechanical sensor of linear acceleration. The tracking device is an IMU sensor and a processing card that allows inertial measurements of the pen during on-the-fly tracing. It is essential to highlight that the system has a non-inertial reference frame. Comparing the two proposed models shows that it is possible to construct shapes from curved lines and that the patterns obtained are similar to what is recognized; this method provides an alternative to quaternion calculus for poorly specified orientation problems.

Graphical Abstract

1. Introduction

Human communication modes have evolved from drawings to patterns such as letters or symbols; we have seen the representation of these patterns in stone, paper, and nowadays in digital systems. One of the most common ways of communication is through handwriting, which is nothing more than a set of letters or patterns that together encode a message, making it possible for people who know this code to receive and recognize it. Currently, with the growing use of information technologies, there is a need to digitize messages to make them reach a broader number of people, and it is also necessary to have a way to analyze what is digitized. Two essential concepts appear when discussing this handwriting analysis: online (recognition in real time) and offline (recognition in non-real time). There are various efforts to improve the online handwriting systems to reproduce faithfully the strokes of the pen movement [1,2,3,4,5,6,7,8], and these models are based on known and efficient data analysis methodologies. However, they require prior knowledge of the patterns; that is, they need to know in advance what the patterns should be like in order to reconstruct them, and in some other cases, it is necessary to have the trajectory of the stroke to perfect it. The works [1,2,3,4,5,6,7,8] use deep learning algorithms that insert the electrical characteristics of the sensors; in other cases, the focus is on optimizing the traces already made on a surface.
Although it is a simple task, handwriting is a highly complicated skill. It is necessary to have a mental picture or memory of what each letter looks like and then develop a motion plan to create it as it is stored in our memory. The development of higher-level handwriting skills (letter formation, sizing, spacing, alignment, and more) all begins with being able to copy simple shapes (prewriting shapes) [9,10,11].
From these prewriting shapes (i.e., horizontal lines, circles, vertical lines), it is time to move on to the letter drawing (how the letters are represented) and construction (how each letter is produced). Efficient construction typically leads to better legibility and speed. Widely known online writing systems have a fixed reference system, either through an artificial vision sensor, which establishes the usual order of a matrix in rows and columns and correlates them with the position in the viewing angle vision of the person who writes [12], or through a finite-dimensional tablet and a pen, establishing fixed references with an orthogonal Cartesian coordinate frame according to the tablet. This work intends to generate a trace as faithful as possible to a path made by the user without depending on a fixed surface or being in a specific vision area. The main idea is to establish a digital writing system with two-dimensional strokes that do not require a support surface; this is writing on the fly.
It is worth mentioning that the goal of the methods proposed in this work is online handwriting recognition without a fixed inertial frame of reference, like a screen, tablet, or any other reference surface. Given the above, we do not count on a fixed reference to establish a coordinate system, so the proposed methods must not rely on a fixed reference frame; this is the main differentiator against classic online handwriting recognition methods and devices, and quaternions are a popular and efficient alternative to solving this problem and creating orientation systems using IMUs [13,14,15,16,17,18,19,20,21,22]. However, their use implies a more complex mathematical model than the one presented here.
The present work focuses on generating patterns with defined shapes from geometric characteristics, representing the information of the letters in two formats: the points in Cartesian coordinates to graph the strokes directly or the polar coordinates of the stroke that allow the generating of normalized vector features instantly. Furthermore, the methods presented here do not require prior knowledge of the patterns; they trace them on the fly. Finally, this work seeks to generate high-quality patterns to guarantee better performance in future processing using an artificial intelligence system, as mentioned in [23,24,25]. The quality of a prediction system’s results is largely based on the quality of the input data.
The system developed for the experimentation comprises three parts: the perception system, consisting of a three-axis IMU (Inertial Measurement Unit), a data acquisition and processing board, and a delivery system for the trace display.

2. Materials and Methods

The hardware of the digital writing system comprises an IMU, a data acquisition and processing system, a 3D printed case and a workstation. A pictorial representation of the inertial system and the IMU’s inner axis are shown in Figure 1; the IMU used is the MPU6050 module, of which the 3-axis accelerometer and the 3-axis gyroscope are used, and an Arduino UNO board is used for data acquisition, information processing, and communication to the workstation, the latter being the one that allows viewing the reconstructed trace according to the proposed mathematical models (see Figure 2).
A simple user-friendly case for the prototype was made with a 3D printer, with the components placed inside and aligned in the desired position (see Figure 1) for the proper operation of the device, as shown in Figure 3. The IMU is fixed to the casing so the user can draw freely, always maintaining the sensing plane between the pen’s tip and the sensor. In this way, although the velocity and acceleration vectors are three-dimensional, only the axes of the sensor plane perpendicular to the pen are sensed.
An algorithm is proposed to reproduce cursive handwriting strokes, using only the IMU data and without a fixed reference frame. In the cursive (often referenced as italic) handwriting style, letters are mainly constructed based on curved shapes, unlike the block letter style. Cursive handwriting has a greater dominance of curvatures, and several characters are usually embedded in a single continuous line. The hypothesis is that any cursive trace can be reproduced by linking a multiplicity of circular sections one after another, by knowing the variation of the slope concerning the arc the trace describes between any given pair of consecutive points   P i and P i + 1 (see Figure 4), that is, its curvature K (Equation (1)).
For the practical calculation of the curvature K an angle τ , defined between the tangents to the trace at P and P , it is calculated first by means of two consecutive data points obtained from the IMU, then the arc length S between P i and P i + 1 is calculated from the same consecutive data points, and then the quotient between the angle τ and the arc length S gives the curvature of the piece of trace between P i and P i + 1 .
K = lim S 0 τ S
where
  • K : Curvature
  • τ : Rotation   angle
  • S : Arc   length   between   P   and   P
For the reconstruction of the trace, once the curvature between P i and P i + 1 is known, a curvature radius is calculated, along with its corresponding center. As the hypothesis is that the trace can be reconstructed by circular sections, once the radius and center of curvature are known, the angular section of the corresponding circle between the two points   P and P is calculated based on the arc length previously calculated. All the data are acquired and processed in the Arduino UNO board, and then send to the workstation.
Finally, with all the above data, the circular sections a are plotted through any suitable software in the workstation.
Two different approaches to the proposed algorithm were developed and implemented, called method one and method two. For method one the velocity of the trace is used as the input data, as the selected IMU gives out a rotational velocity. First, this velocity must be transformed to a linear velocity, and for this transformation a turning radius equal to the distance from the tip of the pen to the center of the IMU is assumed. On the other hand, method two uses the linear accelerations directly from the IMU, unlike method one, without any transformation, which reduces the error in the trace reconstruction as it eliminates any assumption regarding any parameter used in the calculations, in addition to allowing the reconstruction of straight lines.
Method one is based only on circular sections, and it works in the way described below. First, suppose that a reconstructed trace is known from the respective in-plane trace velocities; considering the curvature measurement at point P of a curve (Equation (2)), we have
k = d T d S
where
  • T : Tangent   vector   to   the   curve   at   a   point
  • k : Curvature   in   absolute   value
  • S : Arc   length
Then, under the hypothesis that the trace can be considered as a multiplicity of linked circular sections, the mean arc curvature (the curvature in the section between P i and P i + 1 ) can be expressed as in Equation (3), where the change in the tangent vector (Equation (4)) to the curve to be reconstructed is the difference in linear speeds ( v i + 1 v i ) between the points P i and P i + 1 of the trace; this is assumed to be true, since the tangent vector and linear velocity vector are analogous, as long as the linear velocity component which is tangent to the trajectory is considered. Also, the trace is assumed to be in a plane, so the velocity of the trace can be decomposed into two x and y components (Equation (7)).
k m   T ^ S
where
  • k m : Mean   curvature
  • T ^ : Change   in   unit   tangent   vector
  • S : Change   in   arc   length
T ^ = T ^ i + 1 T ^ i = v i + 1 v i + 1 v i v i
where
  • T ^ i + 1 : Unit tangent   vector   at   next   position
  • T ^ i : Unit tangent   vector   at   current   position
  • v i + 1 : Velocity   vector   at   next   position
  • v i : Velocity   vector   at   current   position
T ^ = ( v i v i + 1 x v i + 1 v i x ) 2 + ( v i + 1 y v i v i + 1 v i y ) 2 v i v i + 1
S = S i + 1 S i v i t i + 1 t i
where
  • t i + 1 : time   at   v i + 1
  • t i : time   at   v i
v i = v i x ,   v i y ,     v i = v i x 2 + v i y 2
Then the k m   i t h curvature and the r i t h radius of curvature at the point P i t h are given by Equations (8) and (9), respectively.
k m   i = ( v i v i + 1 x v i + 1 v i x ) 2 + v i + 1 y v i v i + 1 v i y 2 t i + 1 t i v i 2 v i + 1
r i = 1 k m   i = t i + 1 t i v i 2 v i + 1 ( v i v i + 1 x v i + 1 v i x ) 2 + v i + 1 y v i v i + 1 v i y 2
And for the i t h iteration:
C i = P i r i + 1 r i v i + 1 v i + 1 v i v i
P i + 1 = R i P i C i + C i
R i = cos θ i sin θ i sin θ i cos θ i
where R i is the two-dimensional rotation matrix and C i is the center of the circle of radius r i (see Figure 5 and Figure 6).
In a circle, the arc length is given as the product of the radius and its respective angle in radians, hence we have S = r i θ i
θ i = v i r i t i + 1 t i
Since we are dealing with plane curves, it turns out that the curvature has a sign that indicates whether the curve turns to the left or to the right. Such a sign is defined as 1 if the unit tangent vector and the unit normal vector at a point on the curve, both considered to be the base of the plane, coincide with the orientation of the canonical base of the plane, which is the base with unit vectors i and j ; otherwise, the value of the sign is −1. One can calculate the sign either by calculating the determinant of the base change matrix, or by calculating the inner product of the unit normal vector with j (of the IMU inner axis). Thus, we introduce σ i as the sign of the rotation angle, and it is defined as follows:
σ i = 1 ,     if   T ^ · j ^ < 0 1 ,   if   T ^ · j ^ > 0
So that, if the rotation is performed in a clockwise direction, then σ i = 1 ; otherwise, when the rotation is performed in counterclockwise direction, we obtain σ i = 1 . In the case where σ i = 0 , no rotation is being performed.
For t i t t i + 1 (See Figure 6)
Figure 6. Three successive P i points describing a trace.
Figure 6. Three successive P i points describing a trace.
Micromachines 15 01053 g006
The Equation (11) can be rewritten in terms of Cartesian coordinates as Equation (15), where φ i t is the angle between two successive points and ( h i , k i ) are the Cartesian coordinates of the center of the circle (see Figure 5)
x i + 1 ( t ) y i + 1 ( t ) = cos φ i sin φ i sin φ i cos φ i x i h i y i k i + h i k i
φ i ( t ) = σ i v i r i t i + 1 t i
Following the construction of letters, it is crucial to recognize that another shape prevails mainly, in addition to the curves; this is the straight line. As mentioned above, efficient construction of the letters generally leads to better legibility and speed, so it is essential to add straight lines to the curves in the process of handwriting generation, since this gives a better projection of the image stored in human memory of what each letter looks like. According to this, the method considering only circular sections can be modified so it can reproduce straight lines, and this modification was called method two.
Method two is based on circular sections and straight lines; assuming a reconstructed trace, knowing its accelerations in the plane and considering the measurement of curvature at point P of a curve (Equation (17)), we have
k ( t ) = P t × P t P t 3
where P t is a vector defining a point, given by
P t = x ( t ) y ( t )
In addition, the radius of curvature r t of the vector P is
r ( t ) = P ( t ) 3 P ( t ) × P ( t )
The known data are the i t h accelerations ( a i x   a n d   a i y ) of point P , obtained in the plane of movement of the trace, and the time difference ( t ) between the values obtained for accelerations in the plane. Assuming initial conditions of zero, we have
P 0 = 0 0   a n d   v 0 = 0 0
Then, if we rewrite Equation (19) in Cartesian coordinates, we obtain
r i ( t ) = a i x 2 + a i y 2 3 2 ( t ) 2 a i x a i + 1 y a i + 1 x a i y
Next, the center of the circle is
C i = P i r i n ^ i
where n ^ i is the unit normal vector to the curve at P i and is expressed in Cartesian coordinates as
n ^ i = v i y v i v i x v i
The angle of rotation θ i is
θ i = arccos v i · v i + 1 v i v i + 1
Then,
P i + 1 = R i   P i C i + C i ,   i f       a i x a i + 1 y a i + 1 x a i y 0 P i + v i t ,   i f       a i x a i + 1 y a i + 1 x a i y = 0
Observe that the condition a i x a i + 1 y a i + 1 x a i y 0 in Equation (25) is sufficient to guarantee the existence of P i + 1 . Otherwise, r i ( t ) given in Equation (21) is undefined and so is P i + 1 .

3. Results

We use patterns of shapes and letters to test the previously established algorithm. In the case of the simulations, these patterns are the points from an equation describing a particular shape. In the second part, we prove the algorithm’s reconstruction of a natural trace using the electronic prototype. The pairs ( x , y ) to reconstruct the patterns were calculated using Equations (15) and (16) for method one, based only on circle sections; for method two, based on circle sections and straight lines, Equations (24) and (25), are used.

3.1. Simulation

The main characteristic of these patterns is that they have a curve morphology. The two primary shapes, curved and straight lines, can describe circles, parabolas, and, more critically, letters (see Figure 7, Figure 8, Figure 9 and Figure 10).
The reference pattern is shown in Figure 7a. The vector time is defined as t = [ 0 ,   2 π ] , the x coordinated as s i n ( t ) , and y coordinate as c o s ( t ) . It is a circle centered at the origin of the Cartesian coordinate system and drawn from the usual parametric equations. Figure 7b,c show the reconstruction of the reference pattern using method one and method two, respectively. The vector time remains equal; for method one the input was the linear velocity as cos t , s i n ( t ) and for method two the input was the linear acceleration as sin t , c o s ( t ) . In these methods, the reference pattern remains unchanged, as we again obtain a circle with a radius of one and a center at the origin. This is not surprising, since both methods construct a curve connecting circular arcs, the osculating circles, with the curve following the curvature vector estimated from the acceleration. The difference between the two methods is that method two considers the case when the curvature is close to zero, assuming a particular error. In such a case, method two constructs a straight-line segment whose extreme points are successive position estimates.
Figure 7. Circular pattern: (a) centered on the points (0,0), (b) pattern centered on the points (0,1) generated through method one, and (c) centered on the points (0,1) generated through method two.
Figure 7. Circular pattern: (a) centered on the points (0,0), (b) pattern centered on the points (0,1) generated through method one, and (c) centered on the points (0,1) generated through method two.
Micromachines 15 01053 g007
Figure 8a shows a second reference pattern, this time a sinusoid curve; in Figure 8b we observe how method one fails to reconstruct a sinusoid curve as a reference pattern. The main reason behind such a result is that method one does not detect the abrupt curvature changes at the bottom portions of the pattern, i.e., where the curvature slope changes from positive to negative and when it achieves its maximum value. So, method one is unable to capture the quick variations of acceleration. Figure 8c shows how method two successfully reconstructs the reference pattern. It is a consequence of the refinement of adding an exception that constructs straight-line segments when consecutive estimates of acceleration differ in absolute value from those below the considered error in the algorithm of method one. The advantage of straight-line segment construction is that it does not require the knowledge of the curvature sign, i.e., it does not consider when the curve is turning clockwise or counterclockwise. But it fails in reconstructing the smoothness of the curve.
Figure 8. Parabolic pattern: (a) ideal case, (b) pattern generated through method one, and (c) pattern generated through method two.
Figure 8. Parabolic pattern: (a) ideal case, (b) pattern generated through method one, and (c) pattern generated through method two.
Micromachines 15 01053 g008
Figure 9 shows the cursive letter “a” as a reference pattern, and it is constructed via the parametric equations of a circle and ellipse. As one can see in Figure 9b, method one fails again to reconstruct the reference pattern because it is unable to properly follow the changes in those points at the curve with abrupt changes in slope, for instance in the small end loop of the letter “a”. As evidence of the consistent behavior of method two, Figure 9c shows how such a method recovers the reference pattern acceptably, conserving as much as possible the topology of the trace, despite the different metric features. The pattern of the letter “a” is made up of two pairs of equations. The first forms most of the letter, which is the semi-circle, and the second is an ellipse that makes up the residual part of the letter. The connection between both equations forms a straight line, and it is observed that method one fails when trying to complete the letter just when the straight curve begins.
Figure 9. Letter “a” pattern: (a) ideal case, (b) pattern generated through method one, and (c) pattern generated through method two.
Figure 9. Letter “a” pattern: (a) ideal case, (b) pattern generated through method one, and (c) pattern generated through method two.
Micromachines 15 01053 g009
As one can see in Figure 10, the reference pattern is the letter e. It is, in a general fashion, an interesting challenge to any same-purpose algorithm, since, despite its intrinsic simplicity, it combines critical features, namely, the topological as well as the metric. It means that there must be, in the reconstructed pattern, an adequate balance between the characteristic upper loop and the bottom ending curve. Both methods reach the goal; the first method produces the letter up to a rotation and a homothety (the reasons for these effects have yet to be studied further). Meanwhile, the second method produces the letter up to just a homothety.
Figure 10. Letter “e” pattern: (a) ideal case, (b) pattern generated through method one, and (c) pattern generated through method two.
Figure 10. Letter “e” pattern: (a) ideal case, (b) pattern generated through method one, and (c) pattern generated through method two.
Micromachines 15 01053 g010

3.2. Experimental Results

The samples for these experiments are a single trace without placing an additional processing signal, and were obtained using the hardware described in Section 2. The only preprocessing was placing the IMU’s embedded 5 Hz low-pass filter before sending the data to the acquisition and processing board, and a sampling time of 10 ms was used for all the experiments. The experimental tests were carried out by tracing the curve in the air and trying to limit this to an imaginary plane mentally set in the air. The user traced the curve to be reconstructed, seeking to make circular patterns; however, the aim was to make the line as natural as possible without needing a template or forced position control, while not simply leaving the hand free to stroke at a speed that the person feels comfortable with. The test patterns drawn in the air by the person were the same as those used for the simulation.
For method one, only the result for the circular pattern is shown, since it was the only one successfully reconstructed (see Figure 11). Method one has impossibilities for pattern reconstruction in the case of significant curvature variations. In the case of method two, the patterns preserve the metric and the topology; however, it presents homothety. Method two performs better than method one, due to the generation of traverses. The fidelity concerning the original trace depends on the estimation of the initial conditions and how the speed is estimated, which is observed, above all, in the metric of the reconstructed trace. In the case of Figure 11 and Figure 12, despite having a sinusoidal shape in their respective velocities and accelerations (see Figure 13 and Figure 14), completing a cycle of 2 π , which in the case of Figure 12 is of higher quality compared to Figure 14, the circle drawn for the circular pattern is successful in both methods. Method one requires calculating linear velocities by setting the radius of gyration between the pen’s tip and the sensor’s center. This is because the IMU measures angular velocities. In method two, the linear accelerations are used directly from the IMU, so it is not necessary to assume conditions that increase the reconstruction’s uncertainty.
After all the previous remarks, we can conclude that method two produces better results in the task of reproducing the critical reference patterns, since it preserves the main topological, as well as metric geometric, features up to rotations, dilations, and translations. Given the above, the remaining test patterns are reconstructed experimentally only using method two, since it successfully reconstructed all patterns (see Figure 13, Figure 14, Figure 15, Figure 16, Figure 17, Figure 18, Figure 19 and Figure 20). For the parabolic pattern of Figure 15, the acceleration in the y-axis (see Figure 16) has a baseline; this is because, in the case of the morphology of this pattern, the displacement on this same axis has the same baseline. The letter a (see Figure 17) has a reconstruction based on the measured accelerations in Figure 18, while the letter e (see Figure 19) is reconstructed from the acceleration patterns measured in Figure 20 for both cases, maintaining the base circularity of the letter and allowing the identification of the mark with the naked eye.

4. Discussion

The main objective of this work is to demonstrate that it is possible to generate a non-inertial frame online cursive-handwriting system from curvature models, since this is the predominant form in this type of writing.
In the comparison made between the two proposed methods, we can highlight the fact that both show that it is possible to construct letters from linking multiple circular sections and that the patterns obtained are very similar to what is recognized. However, the legibility between one and the other is far from equal, since our understanding is much closer to forming letters when they are made up of curves and straight lines. Even in cursive writing, after all, the notes that only include straight lines or simple curves are the first that the human mind can identify.
That said, the method that uses circular sections and straight lines is the most complete in reconstructing cursive letters and for the generation of online handwriting with a non-inertial frame of reference. This work obtains an object focused on feature engineering based on differential geometry, prioritizing the shapes that the patterns present and not the dimension or accuracy of the position of the points, since it is aiming to be used in machine learning algorithms where it is necessary to vectorize the normalized feature.
Making a qualitative visual comparison with the results previously reported in the literature [5,8], it is possible to affirm that the results obtained with method two are comparable in terms of the fidelity of tracking the fundamental shape of the stroke. It is worth noting that, in contrast to the methods reported in [5] and [8], the method proposed in this work does not rely on an exhaustive preprocessing of the data in order to obtain the reported results.
The movement of the pen could be performed in three dimensions. However, this work assumes that the strokes made by the person are limited to an imaginary plane mentally set to write in the air. Both methods can be expanded to the idea of tracing in three dimensions; however, reading three-dimensional traces could be unpractical.

5. Conclusions

The methods shown are an alternative to the use of orientation- and trajectory-tracing tools for several reasons. The first reason is that they do not require a specific work area with special conditions such as a fixed work surface, or environmental conditions such as fixed lighting.
Comparing the two proposed models shows that it is possible to construct letters from circular sections and that the patterns obtained are similar to what is recognized, providing an alternative to quaternion calculus for poorly specified orientation problems.
The first method, based only on oscillating circles, has the advantage of a lower computational cost in the calculation. However, it has the disadvantage of not being sensitive to abrupt changes in trajectories. For method two, a combination of circles and straight lines is used; it was possible to observe that the recreation of the trajectory is faithful to the original trace, which make this method more suitable for an online handwriting system without an inertial reference frame and, even more, it could be extrapolated to other applications such as leader–follower robotic systems or teleoperation applications.

Author Contributions

All authors contributed to the study’s conception and design. C.C.M.G. and G.S.A.J. performed material preparation, data collection, and analysis. G.S.A.J. wrote the first draft of the manuscript, and all authors commented on previous versions. The methodology was in the charge of J.M.C., and formal analysis was by M.V.V.B. F.G.G. wrote the review and edited it. All authors have read and agreed to the published version of the manuscript.

Funding

The authors acknowledge Secretaría de Investigación y Posgrado del Instituto-Politécnico Nacional (Grant 20241962, 20241688 and 20241953) and Unidad Profesional Interdisciplinaria de Ingeniería Campus Hidalgo–Instituto Politécnico Nacional for their support.

Data Availability Statement

Data supporting reported results can be found here.

Conflicts of Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

References

  1. Bu, Y.; Xie, L.; Yin, Y.; Wang, C.; Ning, J.; Cao, J.; Lu, S. Handwriting-Assistant: Reconstructing Continuous Strokes with Millimeter-level Accuracy via Attachable Inertial Sensors. Proc. ACM Interact. Mob. Wearable Ubiquitous Technol. 2021, 5, 146–170. [Google Scholar]
  2. Zhao, B.; Tao, J.; Yang, M.; Tian, Z.; Fan, C.; Bai, Y. Deep imitator: Handwriting calligraphy imitation via deep attention networks. Pettern Recognit. 2020, 104, 107080. [Google Scholar]
  3. Gao, X.; Zhou, C.; Chao, F.; Yang, L.; Lin, C.M.; Xu, T.; Shang, C.; Shen, Q. A data-driven robotic Chinese calligraphy system using convolutional auto-encoder and differential evolution. Knowl.-Based Syst. 2019, 182, 104802. [Google Scholar]
  4. Phang, S.K.; Lai, S.; Wang, F.; Lan, M.; Chen, B.M. Systems design and implementation with jerk-optimized trajectory generation for UAV calligraphy. Mechatronics 2015, 30, 65–75. [Google Scholar]
  5. Choudhury, H.; Prasanna, S.M. Representation of online handwriting using multi-component sinusoidal model. Pattern Recognit. 2019, 91, 200–215. [Google Scholar]
  6. Ltaief, M.; Bezine, H.; Alimi, A.M. A Spiking Neural Network Model with Fuzzy Learning Rate Application for Complex Handwriting Movements Generation. In International Conference on Hybrid Intelligent Systems, Proceedings of the 16th International Conference on Hybrid Intelligent Systems (HIS 2016), Marrakech, Morocco, 21–23 November 2016; Springer: Cham, Switzerland, 2017; Volume 552. [Google Scholar]
  7. Qian, Z.; Huang, K.; Wang, Q.-F.; Xiao, J.; Zhang, R. Generative adversarial classifier for handwriting characters super-resolution. Pattern Recognit. 2020, 107, 107453. [Google Scholar]
  8. Al-Omari, F.A.; Al-Jarrah, O. Handwritten Indian numerals recognition system using probabilistic neural networks. Adv. Eng. Inform. 2004, 18, 9–16. [Google Scholar]
  9. Fadl, S.; Hosny, K.M.; Hammad, M. Automatic fake document identification and localization using DE-Net and color-based features of foreign inks. J. Vis. Commun. Image Represent. 2023, 92, 103801. [Google Scholar]
  10. Nicole, D.C.; Giuseppe, D.G.; Claudio, D.S.; Francesco, F.; Angelo, M.; Antonio, P. Diagnosing Alzheimer’s disease from on-line handwriting: A novel dataset and performance benchmarking. Eng. Appl. Artif. Intell. 2022, 111, 104822. [Google Scholar] [CrossRef]
  11. Erdogmus, P.; Kabakus, A.T. The promise of convolutional neural networks for the early diagnosis of the Alzheimer’s disease. Eng. Appl. Artif. Intell. 2023, 123, 106254. [Google Scholar] [CrossRef]
  12. Masaki, M. Electronic Pen, Handwriting Output System and Control State Detection Method. Patent JP2004199591A, 15 July 2004. Available online: https://patents.google.com/patent/JP2004199591A/ja (accessed on 4 March 2024).
  13. Zhang, L.; Shang, H.; Lin, Y. A Novel Distribution for Representation of 6D Pose Uncertainty. Micromachines 2022, 13, 126. [Google Scholar] [CrossRef]
  14. Liu, M.; Cai, Y.; Zhang, L.; Wang, Y. Attitude Estimation Algorithm of Portable Mobile Robot Based on Complementary Filter. Micromachines 2021, 12, 1373. [Google Scholar] [CrossRef] [PubMed]
  15. Wang, Z.; Xu, X.; Luo, Y.; Wang, G.; Yang, Y. Hypercomplex context guided interaction modeling for scene graph generation. Pattern Recognit. 2023, 141, 109634. [Google Scholar] [CrossRef]
  16. Song, T.; Xin, L.; Gao, C.; Zhang, T.; Huang, Y. Quaternionic extended local binary pattern with adaptive structural pyramid pooling for color image representation. Pattern Recognit. 2021, 115, 107891. [Google Scholar] [CrossRef]
  17. Shao, Z.; Shu, H.; Wu, J.; Chen, B.; Coatrieux, J.L. Quaternion Bessel–Fourier moments and their invariant descriptors for object reconstruction and recognition. Pattern Recognit. 2014, 47, 603–611. [Google Scholar] [CrossRef]
  18. Pan, L.; Deng, Y.; Cheong, K.H. Quaternion model of Pythagorean fuzzy sets and its distance measure. Expert Syst. Appl. 2023, 213, 119222. [Google Scholar] [CrossRef]
  19. Świtoński, A.; Josiński, H.; Michalczuk, A.; Wojciechowski, K. Quaternion statistics applied to the classification of motion capture data. Expert Syst. Appl. 2021, 164, 113813. [Google Scholar] [CrossRef]
  20. Wang, R.; Feng, Q. Weighted Convolution for Quaternion Linear Canonical Cosine Transform and Its Application. Axioms 2024, 13, 402. [Google Scholar] [CrossRef]
  21. Liu, X.; Shi, T.; Zhang, Y. Solution to Several Split Quaternion Matrix Equations. Mathematics 2024, 12, 1707. [Google Scholar] [CrossRef]
  22. Jang, J.; Ban, Y.; Lee, K. Dual-Modality Cross-Interaction-Based Hybrid Full-Frame Video Stabilization. Appl. Sci. 2024, 14, 4290. [Google Scholar] [CrossRef]
  23. Zheng, J.; Zhu, J.; Xi, H. Short-term energy consumption prediction of electric vehicle charging station using attentional feature engineering and multi-sequence stacked Gated Recurrent Unit. Comput. Electr. Eng. 2023, 108, 108694. [Google Scholar]
  24. Oprea, S.-V.; Bâra, A. Machine learning classification algorithms and anomaly detection in conventional meters and Tunisian electricity consumption large datasets. Comput. Electr. Eng. 2021, 94, 107329. [Google Scholar]
  25. Manzari, O.N.; Kashiani, H.; Dehkordi, H.A.; Shokouhi, S.B. Robust transformer with locality inductive bias and feature normalization. Eng. Sci. Technol. Int. J. 2023, 38, 101320. [Google Scholar]
Figure 1. Digital writing system, a common pen with an IMU.
Figure 1. Digital writing system, a common pen with an IMU.
Micromachines 15 01053 g001
Figure 2. Physical digital writing system, connected to an UNO Arduino board.
Figure 2. Physical digital writing system, connected to an UNO Arduino board.
Micromachines 15 01053 g002
Figure 3. Friendly prototype with the shape of a pen.
Figure 3. Friendly prototype with the shape of a pen.
Micromachines 15 01053 g003
Figure 4. Let P i + 1 be a second point over the curve close to point P i . The point of contact to the tangent describes an arc S , and the tangent rotates through an angle τ , known as the contingency angle.
Figure 4. Let P i + 1 be a second point over the curve close to point P i . The point of contact to the tangent describes an arc S , and the tangent rotates through an angle τ , known as the contingency angle.
Micromachines 15 01053 g004
Figure 5. Three successive P points describing a trace with the circles associated with it.
Figure 5. Three successive P points describing a trace with the circles associated with it.
Micromachines 15 01053 g005
Figure 11. Pattern of a circle generated through method one.
Figure 11. Pattern of a circle generated through method one.
Micromachines 15 01053 g011
Figure 12. Pattern of a circle generated through method two.
Figure 12. Pattern of a circle generated through method two.
Micromachines 15 01053 g012
Figure 13. Velocities (a) V x and (b) V y were measured through the IMU and used to reconstruct the circle.
Figure 13. Velocities (a) V x and (b) V y were measured through the IMU and used to reconstruct the circle.
Micromachines 15 01053 g013
Figure 14. Accelerations (a) A x and (b) A y were measured through the IMU and used to reconstruct the circle.
Figure 14. Accelerations (a) A x and (b) A y were measured through the IMU and used to reconstruct the circle.
Micromachines 15 01053 g014
Figure 15. Parabolic pattern generated through method two.
Figure 15. Parabolic pattern generated through method two.
Micromachines 15 01053 g015
Figure 16. Accelerations (a) A x and (b) A y were measured through the IMU and used to reconstruct the parabolic pattern.
Figure 16. Accelerations (a) A x and (b) A y were measured through the IMU and used to reconstruct the parabolic pattern.
Micromachines 15 01053 g016
Figure 17. Reconstructed trace of the handwriting letter “a” generated through method two.
Figure 17. Reconstructed trace of the handwriting letter “a” generated through method two.
Micromachines 15 01053 g017
Figure 18. Accelerations (a) A x and (b) A y were measured through the IMU and used to reconstruct the letter “a”.
Figure 18. Accelerations (a) A x and (b) A y were measured through the IMU and used to reconstruct the letter “a”.
Micromachines 15 01053 g018
Figure 19. Reconstructed trace of the handwriting letter “e” through method two.
Figure 19. Reconstructed trace of the handwriting letter “e” through method two.
Micromachines 15 01053 g019
Figure 20. Accelerations (a) A x and (b) A y were measured through the IMU and used to reconstruct the letter “e”.
Figure 20. Accelerations (a) A x and (b) A y were measured through the IMU and used to reconstruct the letter “e”.
Micromachines 15 01053 g020
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Abarca Jiménez, G.S.; Muñoz Garnica, C.C.; Reyes Barranca, M.A.; Mares Carreño, J.; Vega Blanco, M.V.; Gutiérrez Galicia, F. Online Handwriting Recognition Method with a Non-Inertial Reference Frame Based on the Measurement of Linear Accelerations and Differential Geometry: An Alternative to Quaternions. Micromachines 2024, 15, 1053. https://doi.org/10.3390/mi15081053

AMA Style

Abarca Jiménez GS, Muñoz Garnica CC, Reyes Barranca MA, Mares Carreño J, Vega Blanco MV, Gutiérrez Galicia F. Online Handwriting Recognition Method with a Non-Inertial Reference Frame Based on the Measurement of Linear Accelerations and Differential Geometry: An Alternative to Quaternions. Micromachines. 2024; 15(8):1053. https://doi.org/10.3390/mi15081053

Chicago/Turabian Style

Abarca Jiménez, Griselda Stephany, Carmen Caritina Muñoz Garnica, Mario Alfredo Reyes Barranca, Jesús Mares Carreño, Manuel Vladimir Vega Blanco, and Francisco Gutiérrez Galicia. 2024. "Online Handwriting Recognition Method with a Non-Inertial Reference Frame Based on the Measurement of Linear Accelerations and Differential Geometry: An Alternative to Quaternions" Micromachines 15, no. 8: 1053. https://doi.org/10.3390/mi15081053

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop