Handwriting Analysis Software

Lovepreet Kaur (Wayne State University)

ABSTRACT

A software tool has been developed in Labview that can be used to analyze handwriting data for research related to conditions such as Huntington disease, Parkinson’s disease and Development Coordination Disorders in children. Existing analysis programs are expensive, complex and do not provide the desired analytical tools. This program is easy to use and provides a collection of powerful analysis tools specifically designed to address the research needs. The application has three main features – parameter calculation, graphical displays and data saving which are discussed in section 2. Data analysis examples are provided at end to illustrate the functional capabilities and the accuracy of the analysis software.

BACKGROUND

Handwriting analysis has been one of the most popular techniques used by researchers to study a variety of conditions including; Huntington disease, Parkinson’s disease and Development Coordination Disorders in children [(1), (2)]. Handwriting data has also been used to analyze the effects of age, experience and medication in handwriting performance (3).

The hardware required to perform this type of analysis usually involves two devices. A digital tablet with a screen on which the subjects can write is used to collect the data and this data is then sent to a PC which has software specially designed to analyze the data. The analysis software using the collected data calculates parameters related to the handwriting and enables the researcher to draw conclusions about the functional capabilities of a subject. This type of study helps to understand how handwriting patterns vary with age, disease, experience, and medication.

STATEMENT OF THE PROBLEM

Dr. Gerry Conti Directior, Human Movement Laboratory and Assistant Professor, Occupational Therapy at the Eugene Applebaum College of Pharmacy, Wayne State was the main client and inspiration for this application. She is establishing a handwriting database to learn how handwriting skills vary from a motor standpoint, and how handwriting declines with aging. According to her this will allow comparing the handwriting characteristics of people with impairments to a solid database. It will also allow demonstrating the effectiveness of pharmaceutical or therapeutic interventions to improve handwriting.

While tablets are readily available from companies such as Wacom to collect the handwriting data, the software to analyze the collected data is not easily available yet. There are some handwriting analyzing tools available such as the MovAlyer, ScriptAlyzer and GripAlyzer. However, they are expensive and very complex to use (4). Therefore, the object of this project was to design software that is simple, can perform the required tasks and is user-friendly.

1. METHOD

a. Method of Data Collection

i. Participants

Data was collected from healthy people of four different age groups. This involved children from 7 to 9 years old, teenagers from 12 to 14 years old, young adults from 30 to 50 years old and elderly men and women from 60 to 80 years old. Also, the data was collected from Huntington patients belonging to the last age category.

ii. Apparatus and Task

The subject was asked to write four cursive lowercase ‘l’ letters on a Wacom tablet (Wacom Cintiq.21UX) which is connected by a USB cable to the computer. The data recorded from the screen are parameters such as the x and y co-ordinates, pen angle, pen pressure and time the data was recorded. The file with all the recorded parameters is given a unique name and is saved in a specified folder on the computer and is ready to be analyzed. 

b. Method to Analyze Data

The application allows selecting one data file at a time. Once a file is selected the raw data is filtered using low pass Butterworth filter to remove the tremors which appear in the form of low band frequency. The order of the filter is set to 2, sampling frequency to 100 Hz and lower frequency cut-off to 12Hz [(5), (6)].

Dr. Conti provided a list of parameters to be calculated from the data files. These parameters are discussed in detail in section 2.a. Once the data is filtered, the specified parameters are calculated, displayed on the front panel and then saved to a text file.

To test the accuracy of the developed application, total 8 healthy subjects, 2 from each of the four age categories discussed above were analyzed. Also, 2 Huntington subjects belonging to 60 to 80 years age category were analyzed.  Each subject had 4 trials. Hence, total of 40 data files were run through the application and results were calculated which are discussed in section 3.0.

2. FEATURES OF THE APPLICATION

The program allows a user to view parameters such as peak velocity and acceleration, total trial time, force inefficiency, and character width on the front panel and also allows saving them in a text file. The application also allows the user to look at the actual handwriting sample which is displayed on a graph. The velocity and acceleration are also displayed on two other graphs separately. Below is a description of each of these three main features of the application. Link to a video which gives demonstration of the features of the application is also given at the end of the paper.

a. Parameter Calculation:

i. Peak Velocity and Peak Acceleration are the maximum values in the velocity curve and acceleration curve respectively and are displayed as an indicator on the side of the corresponding graph.

ii. Time to peak velocity and time to peak acceleration are obtained by indexing the time array with the index of the peak velocity and peak acceleration respectively.

iii. Time from peak velocity or acceleration to the next zero crossing is calculated by indexing the time array with indices of peak velocity or peak acceleration and next zero crossing in velocity or acceleration and subtracting the two time values.

iv. Number of zero crossings in velocity and acceleration curves respectively is the count of number of time the velocity curve and the acceleration curve cross the zero crossing line.

v. Force Inefficiency is the ratio of the number of zero crossings in velocity and the number of zero crossings in acceleration.

vi. Character Width can be calculated using the curse on the XY graph, the one that displays the characters. The mean of the characters width is also displayed on the right hand side.

vii. Total Trial Time is the difference between the maximum and minimum value of the time array.

b. Graphical Displays:

There are four graphs displayed on the screen to make the analysis easier to visualize and to confirm that calculated parameters indeed correspond to the graphical outlook. Clicking on different tab buttons on the front panel (Figure 1.0) allows user to see the four different graphs.

i. Handwriting Graph

This graph displays how the characters were actually written. The x and y coordinates are parsed from the data file and sent to a XY type graph which draws the picture of the characters.  The X and Y coordinates are in Pixels.

In addition to displaying the characters, this graph has another plot in it which shows the velocity against time.  The velocity plot with the characters’ plot helps to visualize at what point on the character the velocity went high and where it dropped.

ii. Velocity Graph

This is the graph of velocity against time. It displays the instantaneous velocity at different times while the characters were being written. The velocity is in pixels per milliseconds and time is in milliseconds. Velocity is calculated from the derivative of the distance with respect to time and distance is calculated by using a distance formula.

iii. Acceleration Graph

This is a plot of acceleration which is in pixels per milliseconds-squared against time. It displays the instantaneous acceleration at different times when the characters were written. Acceleration is calculated from the first derivative of the velocity.

iv. Raw vs Filtered Graphs

There are Raw vs Filtered graphs one for each coordinate axis. One shows the plot of raw X values and filtered (through low-pass Butterworth filter) X values against time and the other shows the plot of raw Y values and filtered (through low-pass Butterworth filter) Y values against time.

c. Saving Results to File:

Once all the parameters are calculated and graphs viewed and analyzed the results can be saved to a text by clicking on the save file button. The file with results gets saved in the same folder as the one from which the data file to be analyzed was selected.

3. RESULTS

As mentioned above the application was run on 10 subjects – 8 healthy subjects belonging to 4 different age categories and 2 Huntington subjects belonging to the 60 to 80 age category. Since each subject had 4 trials, total 40 files were created with calculated parameters and saved in specified folder on the computer. Average values of three main parameters – force inefficiency, peak velocity and peak accelerations were calculated manually from the saved files for each age category and the Huntington patient category.

Table 1.0 at the end of the document shows how the average force inefficiency decreased from 29.92 to 18.13 in the four age categories as age increased from 7 years to 80 years. Also, it further decreased to 7.87 in case of old Huntington patients. On the other hand, the peak velocity increased from 94.54 pixels/sec to 139.33 pixels/sec and peak acceleration also increased from 148.15 pixels/sec2 to 331.71 pixels/sec2 as age increased from 7 years to 80 years. Average peak velocity observed in the Huntington patient was 326.24 pixels/sec and average peak acceleration was 1685.97 pixels/sec2.

4. DISCUSSION AND PERFORMANCE

It can be observed from the results above that force inefficiency dropped consistently with age and became worse when condition changed from healthy subjects to Huntington patients. This is consistent with what was expected. Also, it can be observed that peak velocity and peak acceleration increased with age. The increase in peak velocity and acceleration with age was also expected because movements are jerkier in older adults compared to youth and adults. When moving from healthy to Huntington disease patients it can be seen that the peak velocity and peak acceleration jumped to very high values which is again what is expected as the jerky movements are even worse in Huntington patients. Therefore, being consistent with expected results the application is very accurate and can be used to analyze handwriting data research laboratories.

A drawback of the application is that it can analyze only one trial at a time and the results get saved in different files for each different trial. The user has to manually calculate average of parameters from different trials in excel or other program. Another application will have to be developed with can look at the files with saved output parameters and can perform standard analysis.

5. COST AND CONCLUSION

Building this application did not cost anything because all it needed was a computer and LabView program both of which were easily available. My personal laptop was used to build the application on and the LabView software using which the application was developed was available from the computer lab of College of Engineering in Wayne State University.

In conclusion, the application is very accurate when calculating parameters such as peak velocity, peak acceleration and force inefficiency which can help a researcher analyze handwriting data and draw conclusions on how age, disease and medication affect handwriting. The application is developed in LabView and is therefore easy to install and uses relatively little space on a computer. Dr. Conti is very satisfied with the results and is currently using the program in her laboratory.  Though improvements can be made, the application is overall an easy, simple and user-friendly tool to help researchers analyze handwriting data.

Front Panel Image

Below is the front panel of the application which shows the Handwriting graph, tabs buttons for Velocity, Acceleration and Filetered vs Raw graphs. Also, it shows controls for the Butterworth filter on the right hand side such as Sampling Frequency, Lower Cut-off and Order of the filter and some other controls and indicators.

Figure 1.0 Handwriting Graph and Tabs for Other Graphs

Results Table

This table shows variation in force inefficiency, peak velocity and peak acceleration with age and condition

Condition Age Category Force Inefficiency Average Peak Velocity Average (Pixels/ms) Peak Acceleration Average (Pixels/ms2)
Healthy Young Child (7-14 years) 29.92 94.54 148.15
Healthy Young Adult (25- 50 years) 18.35 111.66 331.33
Healthy Young Old (60-80 years) 18.13 139.33 331.71
Huntington Old (60 – 80 years) 7.87 326.24 1685.97

Table 1.0

Handwriting Analysis Software Video

CITATIONS

1. Phillips, J., Bradshaw, J., Chiu, E., & Bradshaw, J. (2004). Characteristics of handwriting of patients with      Huntington’s disease. Movement Disorders, 9(5), 521-530.

2. Rosenblum, S., & Livneh-Zirinski, M. (2008). Handwriting process and product characteristics of children diagnosed with developmental coordination disorder. [doi: DOI: 10.1016/j.humov.2008.02.011]. Human Movement Science, 27(2), 200-214.

3. Dixon, R., Kurzman, D., & Friesen, I. (1993). Handwriting performance in younger and older adults: Age, familiarity, and practice effects. Psychology and aging, 8(3), 360-370.

4. MovAnalyzer, Retrieved April 12, 2010 from Neuro Script website: http://www.neuroscript.net/movalyzer.php

5. Slavin, M., Phillips, J., & Bradshaw, J. (1996). Visual cues and the handwriting of older adults: A kinematic analysis. Psychology and aging, 11(3), 521-526.

6. Van Den Heuvel, C. E., van Galen, G. P., Teulings, H.-L., & van Gemmert, A. W. A. (1998). Axial pen force increases with processing demands in handwriting. [doi: DOI: 10.1016/S0001-6918(98)00031-6]. Acta Psychologica, 100(1-2), 145-159.

Author’s Contact Information:

Name:     Lovepreet Kaur

Address: 900 Forest W., Apt # 2

Detroit, MI 48201

Phone:     313-574-8190

, , , ,

Powered by WordPress. Designed by WooThemes

Skip to toolbar